(function ($) {

$(document).ready(function() {

	// Container Table Headers
	Cufon.replace('div.content-header h1 strong');
	Cufon.replace('div.content-header h1 span');
	Cufon.replace('div.content-header h2 strong');
	Cufon.replace('div.content-header h2 span');
	Cufon.replace('div.content-header div.weight');

	// Nav Menu
	$('ul#nav li').hoverIntent(
		function() { $(this).children('ul').slideDown('fast'); },
		function() { $(this).children('ul').slideUp('fast'); }
	);

	// Product Menu
	$('#productmenu ul li ul li ul').hide();
	$('#productmenu ul li a').click(function() {
		var sublist = $(this).next('ul');
		if ( sublist.length > 0 ) {
			if ( sublist.css('display') == 'none' ) {
				$(this).addClass('active');
				sublist.slideDown('fast');
			} else {
				$(this).removeClass('active');
				sublist.slideUp('fast');
			}
			return false;
		}
	});

	// Store Locator Input Box
	var locator_input = $('#locator-input input#addressInput');
	var default_text = 'Type your address or postcode here';
	if ( locator_input.attr('value') == '' ) { locator_input.attr('value', default_text); }
	locator_input.focus(function() { if ( $(this).attr('value') == default_text ) $(this).attr('value',''); });
	locator_input.blur(function() { if ( $(this).attr('value') == '' ) $(this).attr('value', default_text); });

});

})(jQuery);