$(document).ready(function() {

	/*/ BEGIN SPECIALS SLIDER // 
	$(".paging").show();
	$(".paging a:first").addClass("active");
	var imageWidth = $(".window").width();
	var imageSum = $(".reel div").size();
	var imageReelWidth = imageWidth * imageSum;
	$(".reel").css({'width' : imageReelWidth});
	rotate = function(){	
		var triggerID = $active.attr("rel") - 1;
		var reelPosition = triggerID * imageWidth;
		$(".paging a").removeClass('active');
		$active.addClass('active');
		$(".reel").fadeOut(600);
		$(".reel").animate({ left: -reelPosition }, 0 );
		$(".reel").fadeIn(600);
	}; 
	rotateSwitch = function(){		
		play = setInterval(function(){
			$active = $('.paging a.active').next();
			if ( $active.length === 0) {
				$active = $('.paging a:first');
			}
			rotate();
		}, 5000);
	};
	rotateSwitch();
	$(".reel div").hover(function() {
		clearInterval(play);
	}, function() {
		rotateSwitch();
	});	
	$(".paging a").click(function() {	
		$active = $(this);
		clearInterval(play);
		rotate();
		rotateSwitch();
		return false;
	});	
	// END SPECIALS SLIDER /*/ 

	// BEGIN SLOGAN // 
	$('#bd .aux_elements .slogan h1').css({display: 'none'});
	$('#bd .aux_elements .slogan h1:first').css({display: 'block'});
	rotateCol = function(){	
		var current = ($('#bd .aux_elements .slogan h1.show')) ? $('#bd .aux_elements .slogan h1.show') : $('#bd .aux_elements .slogan h1:first');
		nextCol = ((current.next().length) ? ((current.next().hasClass('show')) ? $('#bd .aux_elements .slogan h1:first') : current.next()) : $('#bd .aux_elements .slogan h1:first'));
		current.fadeOut(1000).removeClass('show');
		nextCol.delay(500).fadeIn(1000).addClass('show');				
	}; 
	rotateColSwitch = function(){		
		playCol = setInterval(function(){
			rotateCol(0);
		}, 6*1000);
	};
	rotateColSwitch();
	// END SLOGAN SLIDER // 

	// BEGIN COLLAGE SLIDER // 
	$('div.slider div').css({display: 'none'});
	$('div.slider div:first').css({display: 'block'});
	rotateSli = function(){	
		var current = ($('div.slider div.show')) ? $('div.slider div.show') : $('div.slider div:first');
		nextSli = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.slider div:first') : current.next()) : $('div.slider div:first'));
		current.fadeOut(1000).removeClass('show');
		nextSli.delay(500).fadeIn(1000).addClass('show');				
	}; 
	rotateSliSwitch = function(){		
		playSli = setInterval(function(){
			rotateSli(0);
		}, 6*1000);
	};
	rotateSliSwitch();
	// END COLLAGE SLIDER // 

	// BEGIN B&W IMAGE ROLLOVER //
	$("#ft .socials li").hover(function() {
		var thumbOver = $(this).find("img").attr("src");
		$(this).find("a.item").css({'background' : 'url(' + thumbOver + ') no-repeat center bottom'});
		$(this).find("span").stop().fadeTo('normal', 0 , function() {
			$(this).hide()
		});
	} , function() {
		$(this).find("span").stop().fadeTo('normal', 1).show();
	});
	// END B&W IMAGE ROLLOVER //

});
