$(function(){
	var pager = $(".scrollButton");
	var activeClass = "scrollButtonActive";
	var hiddenClass = "hidden";
	
	var texts = $(".promoDesc");
	var images = $("#frameContainer a");
	
	$("."+hiddenClass).not(texts).css({
		opacity: 0,
		display:"none"
	}).removeClass(hiddenClass);
	$("."+hiddenClass).not(images).css("opacity", "0");
	
	
	
	pager.each(function(i){
		this.sn = i;
	}).click(function(){
		pager.removeClass(activeClass);
		$(this).addClass(activeClass);
		
		var image = $(images.get(this.sn));
		var text = $(texts.get(this.sn));

		images.not(image).stop().animate({
			opacity:0
		}, 700, function() {
			$(this).hide();
		});		
		image.show().stop().animate({
			opacity:1
		}, 700);
		
		texts.not(text).stop().animate({
			opacity:0,
			left:"200%"
		}, 400, function(){
			$(this).hide();
		});
		text.show().css({
			left: "-100%"
		}).stop().animate({
			left:"25px",
			opacity:1
		}, 600);
		
	});
});

$(document).ready(function(){
$('.mover').hide();

$('.slideToggle').click(function(){
$(this).parent().next('.mover:eq(0)').slideToggle("slow");
});

});
