<!--

var state = 'none';

function showhide(layer_ref) {

if (state == 'block') {
state = 'none';
}
else {
state = 'block';
}
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( "document.all." + layer_ref + ".style.display = state");
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[layer_ref].display = state;
}
if (document.getElementById &&!document.all) {
hza = document.getElementById(layer_ref);
hza.style.display = state;
}
}
//-->

$(document).ready(function(){ //requires jQuery
	Toyota.Home = (function(){ //Home singleton
				var params = {
					wmode: 'transparent',
					allowscriptaccess: 'always',
					flashvars: $('#home_menu param[name="flashvars"]').attr('value')
				};
				return {
					homeFlashParms:params,
					init: function(){// 'Home' primary initialization method						
						//'Home' swfobject call
				    	swfobject.embedSWF($('#home_menu param[name="movie"]').attr('value'), 'home_menu', $('#home_menu').attr('width'), $('#home_menu').attr('height'), Toyota.CommonTools.currentFlashVersion, Toyota.CommonTools.currentEnvironment + "/shared/expressinstall.swf", null, Toyota.Home.homeFlashParms, null);
				        
				
						//promo hover fix for IE
						$('ul#promo_panel2 li a').hover(
						      function () {
						        $(this).children('img').css('top','0px');
						      }, 
						      function () {
						        $(this).children('img').css('top','-73px');
						      }
						);
						$('ul#safety_panel li a').hover(
						      function () {
						        $(this).children('img').css('top','0px');
						      }, 
						      function () {
						        $(this).children('img').css('top','-66px');
						      }
						);
						$('div#CONTENT tr.content_nav th a').hover(
						      function () {
						        $(this).children('img').css('top','0px');
						      }, 
						      function () {
						        $(this).children('img').css('top','-44px');
						      }
						);
						
						//hide Safety Info FAQs on load
						$('.recall_list li').removeClass('expanded').addClass('collapsed');
					}
				};	
			})();			
	Toyota.Home.init();
		
});

