﻿/* 
 *	By Ryan McGinty
 */

(function ($) {

	$.fn.rollovers=function (options) {
		//Set some default options
		var defaults={
			targets : 'li',
			elem : '.img-tile,.img-tile-sl'
		};

		//Extend options with defaults
		options=$.extend(defaults,options);

		return this.each(function () {
			var $this = $(this);
			$(this).find(options.targets).each(function(){
				var $targ = $(this);
				var $chld = $targ.find(options.elem); 
				if($chld.length){
					$targ.hoverIntent(
						function(e){
							$chld.show();
						},
						function(e){
							$chld.hide();
						}
					);
				}
			});
		});
	};

})(jQuery);


