$(function(){	
	
	/* top menu */	
	$(".headerMenu a").not(".selected").hoverIntent({
		over: function(){
			$(this).find("div").show().animate({
				top:0,
				backgroundColor:"#b6aea0"
			}, '200');
		},
		out: function(){
			$(this).find("div").animate({
				top:-55,
				backgroundColor:"#861a17"
			}, '300');
		},
		interval: 50
	});
	
	/* locations links */
	$(".locations a").hoverIntent({
		over: function(){
			$(this).find("img").animate({
				left:-6
			}).parent().prev().animate({
				width:"100%",
				backgroundColor:"#000"
			});
		},
		out: function(){
			$(this).find("img").animate({
				left:0
			}, 'slow' ).parent().prev().animate({
				width:0,
				backgroundColor:"#eee"
			}, 'slow' );
		},
		interval: 50
	});
	
	
	/* product category links 
	var speedIn = 200;
	var speedOut = 400;
	$("div.productCategory").hoverIntent({
		over: function(){
			$(this).find("a.more").animate({
				color:"#fff"
			}, speedIn).find("span").animate({
				left:-50,
				color:"#fff"
			}, speedIn).parent().prev().animate({
				width:160,
				backgroundColor:"#000"
			}, speedIn);
			$(this).find("img").animate({
				backgroundColor:"#861a17"
			}, speedIn);
		},
		out: function(){
			$(this).find("a.more").animate({
				color:"#87837"
			}, speedOut).find("span").animate({
				left:0,
				color:"#87837"
			}, speedOut ).parent().prev().animate({
				width:0,
				backgroundColor:"#861a17"
			}, speedOut );
			$(this).find("img").animate({
				backgroundColor:"#eee"
			}, speedOut);
		},
		interval: 50
	});
	*/
	
	/* buttons */
	$("input:submit, button").button();
	
	
	$("#logo").click(function(){
		window.location.href = '/';
	});
	
	
	/* newsletter color effect */
	//highlight("black");	
});




function highlight(color){
	if(color=="black"){
		newcolor = "blue";
	} else {
		newcolor="black";
	}
	$(".newsjoin").animate({
		color: newcolor
	}, 1500);
	
	highlight(newcolor);
}

