if(!window['dryan']) {
	window['dryan'] = {};
	var dryan = window['dryan'];
}

(function($) {

	$(document).ready(function() {
		dryan.heroshots();
	});
	
	dryan.heroshots = function() {
		var heroshots = $('div.heroshot');
		heroshots.each(function() {
			var images = $(this).find('img');
			setInterval(function(){
				var current = images.filter('img:visible');
				var to = images.index( current ) + 1 < images.size() ? images.eq( images.index( current ) + 1 ) : images.eq( 0 );
				current.fadeOut(2000);
				to.fadeIn(2000); 
			}, 7000);
		});
	}
})(jQuery);
