(function($) {

	$.fn.ImgMouseEventChange = function(options) {
  		this.each(function () {  // keep track of which element is being transformed
			
			var el = $(this);
			var m_filePaths;

			if(typeof(options) == "object"){
				m_filePaths = $.extend({}, $.fn.ImgMouseEventChange.defaultPaths, options);
			}

			if(m_filePaths.over != null){
				el.mouseover(function(p_evt){
					p_evt.target.src = m_filePaths.over;
				})
			}

			if(m_filePaths.over != null){
				el.mouseup(function(p_evt){
					p_evt.target.src = m_filePaths.over;
				})
			}

			if(m_filePaths.down != null){
				el.mousedown(function(p_evt){
					p_evt.target.src = m_filePaths.down;
				})
			}

			if(m_filePaths.out != null){
				el.mouseout(function(p_evt){
					p_evt.target.src = m_filePaths.out;
				})
			}
		});
	}

	$.fn.ImgMouseEventChange.defaultPaths = {
		over: null,
		down: null,
		out:null
	}
})(jQuery);