/*
	JS Version 1.0 Host Monsterz
	Dated: 29 Nov 2010	
*/

$(function(){
	
	/*	HEADER	*/
	$('#header').load('_includes/header.html', function(){
		$('#mainNav').find('ul ul').hide();
		$('#mainNav').find('li').each(function(){
			$(this).hover(function(){
				$(this).find('a:first').addClass('active');				   
				$(this).find('ul').slideDown('slow');
			}, function(){								   
				$(this).find('ul').slideUp('fast');	
				$(this).find('a:first').removeClass('active');
			});									   
		});												
	});
	
	/*	Signup Slider	*/
	$('#signupBlock').load('_includes/signup.html', function(){
		$('#signupBlock').hide();	
		$('#flipper').click(function(){											
			$(this).toggleClass('flipOpen');
			$('#signupBlock').slideToggle('slow');							 
		});	
	});
	
});

$(function(){
		$("#banner .st").mouseenter(function(){	
		$("#banner .st_active").animate({ height : "0px" }, 600);
		$("#banner .st_active p.active a.naruci_sad").animate({ bottom: "-70px" }, 500)
		$("#banner .st_active p.active a.info_btn").animate({ bottom: "-70px" }, 400)
		
		var  klasa = $(this).attr("class");
		
		klasa =  klasa.replace(/st st_background /, "");
		
		var height_active="10px";
		

		if(( klasa=="st_idea") || ( klasa=="st_deployment")){ height_active="280px"; }
		if(( klasa=="st_design") || ( klasa=="st_coding")){ height_active="308px"; }
		if ( klasa=="st_slicing"){ height_active = "339px" }
		
		$("." + klasa + ':not(.st_background)').animate({ height:height_active }, 600); //
		

		$("#banner .st_active").removeClass("st_active");
		
		$("." + klasa + ':not(.st_background)').addClass("st_active");
		
		setTimeout('$(".st_active p.active a.naruci_sad").animate({ bottom: "9px" }, 400);',500);
		setTimeout('$(".st_active p.active a.info_btn").animate({ bottom: "9px" }, 350);',400);		
	
	})

})



