// remap jQuery to $
(function($){})(window.jQuery);


/* trigger when page is ready */
$(document).ready(function () {

	// Disable search button so it can reveal the search field
	$('#searchform input[type=submit]').click (function (e) {
		if (!$(this).hasClass('prevented')) {
			e.preventDefault();
			$('#searchform input[type=search]').show().animate({'width':200}, 'slow');
			$(this).addClass('prevented');
		}
	});

	// Main navigation hover tip
	$("#main-nav a").hover (function () {
		$(this).animate({color: "#8d0e2d"}).prev().stop().animate({opacity: 1}, "fast");
	},
	function () {
		$(this).animate({color: "#444"}).prev().stop().animate({opacity: 0}, "fast");
	});

	// Shop navigation hover color
	$("#shop-nav a").hover (function () {
		$(this).animate({color: "#8d0e2d"});
	},
	function () {
		$(this).animate({color: "#444"});
	});

	// Footer social button tip
	$(".social-button").hover (function () {
		$(this).find("span").stop().animate({opacity:1}, "fast");
	}, function () {
		$(this).find("span").stop().animate({opacity:0}, "fast");
	});

	// Highlight store products
	$("ul.products li a img").hover (function () {
		$(this).stop().animate({borderTopColor: '#000', borderLeftColor: '#000', borderRightColor: '#000', borderBottomColor: '#000'}, 250);
	}, function () {
		$(this).stop().animate({borderTopColor: '#fff', borderLeftColor: '#fff', borderRightColor: '#fff', borderBottomColor: '#fff'}, 250);
	});
});


