$(document).ready(function(){
	 $("ul.dropdown li").hover(function(){
    
        $(this).addClass("hover");
        $('ul:first',this).css('visibility', 'visible');
    
    }, function(){
    
        $(this).removeClass("hover");
        $('ul:first',this).css('visibility', 'hidden');
    
    });
    $('.leftmenu li a').append('<span class="smallarrow"><img src="images/small_arrow.png"/></span>');
	$('.leftmenu li a').parent().not('.active').hover(function(){
		$(this).children('a').animate({ fontSize: "14px" }, "fast");
		$(this).children('a').children().fadeIn("fast");
	}, function() {
		$(this).children('a').animate({ fontSize: "12px" }, "fast");
	 	$(this).children('a').children().fadeOut("fast");
	});
	$("#content").css('width', 920);
	$("#left").css('width', 900);
	$("#left h1").css('marginLeft', 330);
	//$("#left h1").css('opacity', 0);
	$(".leftmenu").css('opacity', 0);
	$("#left").css('height', 494);
	$("#main img").css('marginLeft', 862);
	$("#content").css('height', 494);
	//$("#main").hide();
	/*Animering*/
	 $("#left h1").animate({marginLeft: "300"}, 100 ).animate({marginLeft: "300"}, 1500 ).animate({marginLeft: "0"},{duration:1000, easing:'easeInOutQuint'}).
	 animate({marginLeft: "0"}, 100,function(){two()});
	 
	 function two(){
	 	$("#left").animate({width: "220"}, 0,function(){three()} );
	 }
	  function three(){
	  	$("#main img").animate({marginLeft: "0"},{duration:1500, easing:'easeOutQuint'}).
	 animate({opacity: "1"}, 100,function(){four()});
	  }
	  function four(){
	  	$(".leftmenu").animate({opacity: "1"}, 500 );
	  }
 });
