$(document).ready( function() {
		$(window).resize(function(){
			var elem=$(this);
			var hautgeurSiteM6= $(window).height();
			var largeurSiteM6=elem.width();
			var hauteurHeader = $('#header').height();
			var hauteurFooter = $('#footer').height();
			var hauteurMain = $('#main').height();
			var hauteurFlashHome = hautgeurSiteM6;
			var topFooter = hauteurMain-hauteurHeader;
			$('#footer').css({top:topFooter+'px'});
			
				 
		});
		$(window).resize();	
		
			// Header Nav
			$('#header ul li').hover(
			  function () {
				$(this).children('.sub').css({display: 'block'});
				$(this).children('.sub').css({height: 'auto'});
			  }
			  ,
			  function () {
				$(this).children('.sub').css({display: 'none'});
				$(this).children('.sub').css({height: '0'});
			});
					
			$('#header ul li ul .sub1').each(function(){
				$(this).mouseover(function(){
						$(this).stop().css({"backgroundColor":"#7c176b"}, 500);
					}).mouseleave(function(){
						$(this).stop().css({"backgroundColor":"#680a58"}, 200);
			
				});
			});			
			


								

		function socialShow() {
			$('#social_plugins').fadeIn(300);
			$('#social_plugins').css('display', 'block');
		}
				
		setTimeout('socialShow()', 3500);
			
		$('#facebook_open_button').hover(function() {
			$('#facebook_plugin').toggle('slow');
		}, function() {
			$('#facebook_plugin').stop(true, true);
			$('#facebook_plugin').css('display', 'none');
		});
		$('#twitter_open_button').hover(function() {
		$('#twitter_plugin').toggle('slow');
		}, function() {
		$('#twitter_plugin').stop(true, true);
			$('#twitter_plugin').css('display', 'none');
		});								
		
		
		
});
