$(document).ready(function() {
	
	// ----- Blog Dropdowns
	
	//For IE
	if($.browser.msie){
		
		$('#blogDropDown').hide();
		
		$('#topNav .product-drop').mouseover(function(){
			
			
			$('#blogDropDown').show();
			$('#blogDropDown2').hide();	
			$('#blogDropDown').css( { "left": "121px", "top":"40px"} );
			clearTimeout(t);
			
		});
		
		$('#topNav .product-drop').mouseleave(function(){
			t = setTimeout(function(){
				$('#blogDropDown').hide();	
			}, 1000);
			$('#topNav .product-drop').removeClass("hover");
		});
		
		$('#blogDropDown').mouseenter(function(){
			if($(this).is(':hidden')){
				$(this).stop().animate( { top:"-10000px"}, 100 );
			} else {
				clearTimeout(t);
				$(this).show();
				$('#blogDropDown2').hide();
				$('#topNav .product-drop').addClass("hover");
			}
		});
		
		$('#blogDropDown').mouseleave(function(){
			$('#blogDropDown').hide();
			$('#topNav .product-drop').removeClass("hover");
		});
		
		//2
		
		$('#blogDropDown2').hide();
		
		$('#topNav .product-drop2').mouseover(function(){
			
			
			$('#blogDropDown2').show();
			$('#blogDropDown').hide();	
			$('#blogDropDown2').css( { "left": "299px", "top":"40px"} );
			clearTimeout(t);
			
		});
		
		$('#topNav .product-drop2').mouseleave(function(){
			t = setTimeout(function(){
				$('#blogDropDown2').hide();	
			}, 1000);
			$('#topNav .product-drop2').removeClass("hover");
		});
		
		$('#blogDropDown2').mouseenter(function(){
			if($(this).is(':hidden')){
				$(this).stop().animate( { top:"-10000px"}, 100 );
			} else {
				clearTimeout(t);
				$(this).show();
				$('#blogDropDown').hide();	
				$('#topNav .product-drop2').addClass("hover");
			}
		});
		
		$('#blogDropDown2').mouseleave(function(){
			$('#blogDropDown2').hide();
			$('#topNav .product-drop2').removeClass("hover");
		});
		
	} else {
	
	//For Awesome
	
		$('#blogDropDown').css('opacity',0);
		
		$('#topNav .product-drop').mouseover(function(){
			
			
			$('#blogDropDown').stop().animate({ opacity: 1 }, { queue:false, duration:500 } );
			$('#blogDropDown2').css('opacity',0);
			$('#blogDropDown').css( { "left": "121px", "top":"40px"} );
			clearTimeout(t);
			
		});
		
		$('#topNav .product-drop').mouseleave(function(){
			t = setTimeout(function(){
				$('#blogDropDown').stop().animate({ opacity: 0 }, { queue:false, duration:700 } );	
			}, 1000);
			$('#topNav .product-drop').removeClass("hover");
		});
		
		$('#blogDropDown').mouseenter(function(){
			if($('#blogDropDown').css("opacity") == "0"){
				clearTimeout(t);
				$('#blogDropDown').stop().animate( { top:"-10000px"}, 100 );
			} else {
				clearTimeout(t);
				$('#blogDropDown').stop().animate({ opacity: 1 }, { queue:false, duration:200 } );
				$('#blogDropDown2').css('opacity',0);
				$('#topNav .product-drop').addClass("hover");
			}
		});
		
		$('#blogDropDown').mouseleave(function(){
			t = setTimeout(function(){
				$('#blogDropDown').stop().animate({ opacity: 0 }, { queue:false, duration:500 } );		
			}, 700);
			$('#topNav .product-drop').removeClass("hover");
		});
		
		//2
		
		$('#blogDropDown2').css('opacity',0);
		
		$('#topNav .product-drop2').mouseover(function(){
			
			
			$('#blogDropDown2').stop().animate({ opacity: 1 }, { queue:false, duration:500 } );
			$('#blogDropDown').css('opacity',0);
			$('#blogDropDown2').css( { "left": "299px", "top":"40px"} );
			clearTimeout(t);
			
		});
		
		$('#topNav .product-drop2').mouseleave(function(){
			t = setTimeout(function(){
				$('#blogDropDown2').stop().animate({ opacity: 0 }, { queue:false, duration:700 } );	
			}, 1000);
			$('#topNav .product-drop2').removeClass("hover");
		});
		
		$('#blogDropDown2').mouseenter(function(){
			if($('#blogDropDown2').css("opacity") == "0"){
				clearTimeout(t);
				$('#blogDropDown2').stop().animate( { top:"-10000px"}, 100 );
			} else {
				clearTimeout(t);
				$('#blogDropDown2').stop().animate({ opacity: 1 }, { queue:false, duration:200 } );
				$('#blogDropDown').css('opacity',0);
				$('#topNav .product-drop2').addClass("hover");
			}
		});
		
		$('#blogDropDown2').mouseleave(function(){
			t = setTimeout(function(){
				$('#blogDropDown2').stop().animate({ opacity: 0 }, { queue:false, duration:500 } );		
			}, 700);
			$('#topNav .product-drop2').removeClass("hover");
		});
	
	}
	
	$('#topNav .product-drop a').attr('class','blogs');
	
	$('a.blogs').attr('href','#');
	
	$('#blogDropDown p:last').css({"border-bottom":"none"});
	
	$('#blogDropDown2 p:last').css({"border-bottom":"none"});
	
});

