// (c) 2011 - All jQuery codes written by Hamed Bidi (www.hamed-bd.com)

// Layers Fading
$(document).ready(function() {
	$(".sitemap").css("display","none");
	$(".layer1").fadeIn(1000,function(){
		$(".layer2").fadeIn(1000,function(){
			$(".layer3").fadeIn(1000);
		});
	});
});

// DIVs effects
$(document).ready(function() {
	$(".graphicdiv .container img").mouseenter(function() {
		$(".graphicdiv .content").clearQueue();
		$(".logoinvert div").fadeToggle(1000);
		$(".graphicdiv .content").animate({height:"75px"},"normal");
		$(".graphicdiv .content").animate({height:"65px"},"fast");
	});
	$(".graphicdiv .container").mouseleave(function() {
		$(".graphicdiv .content").animate({height:"0px"},"slow");
	});

	$('.graphicdiv .container a').mouseenter(function(){
		$(this).animate({backgroundPosition: '50% 0%'},{duration:1000});
		$(this).animate({backgroundPosition: '50% 100%'},{duration:3000});
	});
	
	$('.graphicdiv .container a').mouseleave(function(){
		$(this).clearQueue();
		$(this).stop();
		$(this).css("background-position","50% 50%");
	});

	
	$(".weblogdiv .container img").mouseenter(function() {
		$(".weblogdiv .content").clearQueue();
		$(".logoinvert div").fadeToggle(1000);
		$(".weblogdiv .content").animate({height:"120px"},"normal");
		$(".weblogdiv .content").animate({height:"110px"},"fast");
	});
	$(".weblogdiv .container").mouseleave(function() {
		$(".weblogdiv .content").animate({height:"0px"},"slow");
	});
	
	$(".webdesigndiv .container img").mouseenter(function() {
		$(".webdesigndiv .content").clearQueue();
		$(".logoinvert div").fadeToggle(1000);
		$(".webdesigndiv .content").animate({height:"95px"},"normal");
		$(".webdesigndiv .content").animate({height:"85px"},"fast");
	});
	$(".webdesigndiv .container").mouseleave(function() {
		$(".webdesigndiv .content").animate({height:"0px"},"slow");
		
	});
	
	$(".essaysdiv .container img").mouseenter(function() {
		$(".essaysdiv .content").clearQueue();
		$(".logoinvert div").fadeToggle(1000);
		$(".essaysdiv .content").animate({height:"75px"},"normal");
		$(".essaysdiv .content").animate({height:"65px"},"fast");
	});
	$(".essaysdiv .container").mouseleave(function() {
		$(".essaysdiv .content").animate({height:"0px"},"slow");
		
	});
	
	$(".videodiv .container img").mouseenter(function() {
		$(".videodiv .content").clearQueue();
		$(".logoinvert div").fadeToggle(1000);
		$(".videodiv .content").animate({height:"75px"},"normal");
		$(".videodiv .content").animate({height:"65px"},"fast");
	});
	$(".videodiv .container").mouseleave(function() {
		$(".videodiv .content").animate({height:"0px"},"slow");
		
	});
	
	// Footer Copyright
	$(".mainfooter img").removeAttr("alt");
	$(".mainfooter img").mouseover(function() {
		$(".mainfooter .version").fadeIn(500);
	});
	$(".mainfooter").mouseleave(function() {
		$(".mainfooter .version").fadeOut(500);
	});
	
});	
