/**
 * currentreplace
 *
 * @version      1.2
 * @author       msdf
 * @license      The MIT License
 *
 */
 
jQuery.fn.currentreplace = function(options){

	// options
	var options = jQuery.extend({
		groupItemClass: "item",
		currentSuffix: "_current"
	}, options);
	
	// prepare elements
	var $targetItem = jQuery("."+options.groupItemClass, this);
	var currentClass = "." + jQuery(this).attr("class");
	var currentSuffix = options.currentSuffix;
	
	// init
	$targetItem.filter(currentClass).each(function(){
		jQuery("img", this).attr("src", jQuery("img", this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1"+currentSuffix+"$2"));
	});
	
	return this;
}
