/*
 * jQuery RollOver plugin
 * 
 * @author 		Jelle-Jan van Veelen
 * @copyright 	Zicht Online, www.zicht.nl
 */

(function($) {
	
	$.fn.rollover = function() {
		
		return this.each(function() {
			
			var self = $(this);
			
			$(this).attr('srcNormal', $(this).attr('src'));
			$(this).attr('srcOver',   $(this).attr('rollover'));
			
			(new Image()).src = $(this).attr('srcOver'); 
			
			$(this).mouseover(function() {
				$(this).attr('src', $(this).attr('srcOver'));
			});
			
			$(this).mouseout(function() {
				$(this).attr('src', $(this).attr('srcNormal'));
			});
			
		});
		
	}

})(jQuery);

	

