$(function() {

		// Track newsletter downloads
	$(".newsletter a").bind("click", function() {
		_gaq.push(['_trackEvent', 'Newsletters', 'Download', $(this).attr('href')]);
	});

		// Top level headings
	$(".nav-shopdept").toggle(
		function() {
			$(this).css('height', 'auto') ;
			return false ;
		},
		function() {
			$(this).css('height', '18px') ;
			return false ;
		}
	) ;
	$(".nav-shopdept").hover(function() {}, function() {
		if ($(this).css('height') == 'auto') $(this).click() ;
		$(".nav-shopdept li.expanded").removeClass('expanded') ;
		$(".nav-shopcat").hide() ;
	}) ;
	$(".nav-shopdept > li > a").click(function() {
		if ($(this).parent().hasClass('expanded')) {
			$(this).parent().removeClass('expanded') ;
			$(this).next().slideUp('fast') ;
		}
		else {
			$(this).parent().addClass('expanded') ;
			$(this).next().slideDown('fast') ;
		}
		return false ;
	}) ;
	$(".nav-shopdept li li a").click(function() {
		window.location.href = $(this).attr('href') ;
		return false ;
	}) ;

		// Search box
	$("#searchkeywords").focus(function() {
		if ($(this).val() == 'Search') {
			$(this).val('') ;
			$(this).addClass('focused') ;
		}
	}) ;
	$("#searchkeywords").blur(function() {
		if ($(this).val() == '') {
			$(this).val('Search') ;
			$(this).removeClass('focused') ;
		}
	}) ;

});