// this is the jquery onready function - anything in here gets called whenever the page is loaded$(function(){	setup_mouseover();	ddsmoothmenu.init({			mainmenuid: "smoothmenu1", //menu DIV id			orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"			classname: 'ddsmoothmenu', //class added to menu's outer DIV			contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]	});	submit_on_enter();	// click handler for step 1 'Next' button	$('.nextbutton').live('click', function() { // process step 1 'next' button click and goto step 2		select_tab(1);		var location_id = $(this).attr('id');		buildstep2(location_id);	});	// click handler for info links	$('.infolink').live('click', function() { 		var location_id = $(this).attr('id');		if(location_id){			step_dispatcher(location_id,2);		}	});	// click handler for get directions links	$('.directionslink').live('click', function() {		var location_id = $(this).attr('id');		if(location_id){			var get_dir_flag=1;			step_dispatcher(location_id,2,'',get_dir_flag);		}	});	// click handler for back to map	$('.back_to_map').live('click', function() {		back_to_map();	});	// click top menu links	$('.topmenu').live('click', function() {		var location_id = $(this).attr('id');		step_dispatcher(location_id,2);	});	$('#map_and_directions_link').live('click', function(){		var location_id = $(this).attr('class');		load_map_and_directions(location_id);	});	$('#go_button').live('click', function() {		var location_id = $(this).attr('class');		get_directions(location_id);	});	$('#get_dir_submit_button').live('click', function() {		get_step2_directions();	}); 	$('.template_menu_item').live('mouseover mouseout',function(){		if (event.type == 'mouseover') {			$(this).css({ backgroundImage : "url(images/blue_arrow.png)" });		}else{			$(this).css({ backgroundImage : "url(images/red_arrow.png)" });		} 	}); 	$('.step_2_menu_item').live('mouseover mouseout',function(){		if (event.type == 'mouseover') {			$(this).css({ backgroundImage : "url(images/blue_arrow.png)" });		}else{			$(this).css({ backgroundImage : "url(images/red_arrow.png)" });		} 	});});function submit_on_enter(){// used to submit search critera on hitting 'enter key' or clicking 'search' button	var  testTextBox = $('#searchcritera');	var code =null;	testTextBox.keypress(function(e)	{		code= (e.keyCode ? e.keyCode : e.which);		if (code == 10 || code == 13){			$('#submit_button').click();		}	});}function setup_mouseover(){	$('#menu_locations').mouseover(function(){		$('#menu_locations').css({ backgroundImage : "url(images/locations_red.png)" });	});	$('#menu_locations').mouseout(function(){		$('#menu_locations').css({ backgroundImage : "url(images/locations_blue.png)" });	});	$('#menu_about_storage').mouseover(function(){		$('#menu_about_storage').css({ backgroundImage : "url(images/about_storage_red.png)" });	});	$('#menu_about_storage').mouseout(function(){		$('#menu_about_storage').css({ backgroundImage : "url(images/about_storage_blue.png)" });	});	$('#menu_special_offers').mouseover(function(){		$('#menu_special_offers').css({ backgroundImage : "url(images/special_offers_red.png)" });	});	$('#menu_special_offers').mouseout(function(){		$('#menu_special_offers').css({ backgroundImage : "url(images/special_offers_blue.png)" });	});	$('#menu_special_offers').mouseover(function(){		$('#menu_special_offers').css({ backgroundImage : "url(images/special_offers_red.png)" });	});	$('#menu_special_offers').mouseout(function(){		$('#menu_special_offers').css({ backgroundImage : "url(images/special_offers_blue.png)" });	});	$('#menu_packing_supplies').mouseover(function(){		$('#menu_packing_supplies').css({ backgroundImage : "url(images/packing_supplies_red.png)" });	});	$('#menu_packing_supplies').mouseout(function(){		$('#menu_packing_supplies').css({ backgroundImage : "url(images/packing_supplies_blue.png)" });	});	$('#menu_about_us').mouseover(function(){		$('#menu_about_us').css({ backgroundImage : "url(images/about_us_red.png)" });	});	$('#menu_about_us').mouseout(function(){		$('#menu_about_us').css({ backgroundImage : "url(images/about_us_blue.png)" });	});	$('#learn_more_button_1').mouseover(function(){		$('#learn_more_button_1').css({ backgroundImage : "url(images/learn_more_red.png)" });	});	$('#learn_more_button_1').mouseout(function(){		$('#learn_more_button_1').css({ backgroundImage : "url(images/learn_more_blue.png)" });	});	$('#learn_more_button_2').mouseover(function(){		$('#learn_more_button_2').css({ backgroundImage : "url(images/learn_more_red.png)" });	});	$('#learn_more_button_2').mouseout(function(){		$('#learn_more_button_2').css({ backgroundImage : "url(images/learn_more_blue.png)" });	});	$('#tab1').mouseover(function(){ 		$('#tab1').css({ backgroundImage : "url(images/tab_step_1_red.png)" });	});	$('#tab1').mouseout(function(){		$('#tab1').css({ backgroundImage : "url(images/tab_step_1_blue.png)" });	});	$('#tab2').mouseover(function(){ 		$('#tab2').css({ backgroundImage : "url(images/tab_step_2_red.png)" });	});	$('#tab2').mouseout(function(){		$('#tab2').css({ backgroundImage : "url(images/tab_step_2_blue.png)" });	});	$('#tab3').mouseover(function(){ 		$('#tab3').css({ backgroundImage : "url(images/tab_step_3_red.png)" });	});	$('#tab3').mouseout(function(){		$('#tab3').css({ backgroundImage : "url(images/tab_step_3_blue.png)" });	});}
