/* ==================================================================
*
*	ROLLOVERS PLUGIN
* 
*	DATE: 				AUGUST 22, 2009
*	AUTHOR: 			AMY HAYWOOD
* 	URL: 				WWW.AMYHAYWOOD.COM
*
*	REQUIREMENTS: 		jQuery
*						Be sure to include the jQuery library before including this script
* 	IMPLEMENTATION:
*		Within the $(document).ready(); all that you really need to include is:
*		|	$('.CLASS_NAME_FOR_ROLLOVER').rollover();
*		
*		Within your HTML, be sure to give the image, use the same classname that you used to call .rollover()
*		Within the rel attribute, include the path to the rollover image
*		|	<img src="MY_IMAGE_NAME.jpg" class="CLASS_NAME_FOR_ROLLOVER" rel="MY_ROLLOVER_IMAGE.jpg" />
*
===================================================================== */

(function($) {
	$.fn.rollover = function(options){

		// DEFINE OPTIONS
		var defaults = {};
	
		var settings = $.extend(defaults, options);
	
		return this.each(function() {
			var $element = $(this);
			var defaultImage = $element.attr('src');
			
			$element.hover(function() {
				$element.attr('src',  $element.attr('rel'));
			}, function() {
				$element.attr('src', defaultImage);
			});
			
			
		});
	};
})(jQuery);


