//Add hover class to below IE7 

$(function() {  
	if ($.browser.msie && parseInt($.browser.version)< 7) { //check for below IE7
		$(".links-nav-inner").hover( //add sfHover class to the following selectors 
			 function() { $(this).addClass("sfHover");  }, //on hover add sfHover class
			 function() { $(this).removeClass("sfHover"); //remove sfHover class  
		}); 
	} 
	
	
	if ($.browser.msie && parseInt($.browser.version)< 7) { //check for below IE7
		var shopMenuW = $('.shop-menu').width(); //Find width of the parent ul item
		$('.shop-menu ul').width(shopMenuW+15); //Match the width for the child ul item as bug in IE6
	} 
	
	$("ul.shop-menu a.sub-menu, ul.shop-menu ul").hover( //add sfHover class to the following selectors 
		 function() { $("#shop-nav .links-nav-inner").addClass("links-nav-top")  }, //on hover add sfHover class
		 function() { $("#shop-nav .links-nav-inner").removeClass("links-nav-top"); //remove sfHover class  
	}); 
	
	$("#shop-nav .links-nav-inner").removeClass("links-nav-bg"); //JavaScript enabled remove class links-nav-bg from page

});  

// adding text for Locate Dealer field
$(document).ready(function(){
	var default_value = $('.locate-search label[for=EnterPostcode]').text();
	locateDealerField = '.locate-search .text-field';
	$(locateDealerField).attr('value', default_value);
	
	$(locateDealerField).focus(function() {
		if(this.value == default_value) {
		this.value = '';	}							
	})
	
	$(locateDealerField).blur(function() {
		if(this.value == '') {
		this.value = default_value;	}							
	})
});
