// JavaScript Document
google.setOnLoadCallback(function() {
	$(document).ready(function() {

		$('ul.accordian_nav li a').mouseenter(function(){
			$(this).fadeTo(100,.5);	
		});
		
		$('ul.accordian_nav li a').mouseleave(function(){
			$(this).fadeTo(100,1);	
		});

	    $('#slider').nivoSlider({
        		effect: 'fade', // Specify sets like: 'fold,fade,sliceDown'
		        controlNav: false, // 1,2,3... navigation
       		 	directionNav: false, // Next & Prev navigation
				captionOpacity: 0 // Universal caption opacity
		});
		
		$(function(){
		$('ul li',$('#mainMenu')).hover(
			function(){$(this).addClass('over');},
			function(){$(this).removeClass('over');});
		
		//Tour selector auto
		$('#tourSelector').change(function(){
				window.location.href=$(this).attr('value');
			});
		});
		
	});
});

// JavaScript Document
function toggleSubmenu(submenuId, show){
	var theSub=document.getElementById('submenu-'+submenuId);
	var theMenu=document.getElementById(submenuId);
	if(show==1){
		theSub.className='submenu';
		theMenu.className='menu-over';
	}
	else{
		theSub.className='submenu-hide';
		theMenu.className='';
	}
}

function toggleSubmenuH(submenuId, show){
	var theSub=document.getElementById('submenu-'+submenuId);
	var theMenu=document.getElementById(submenuId);
	if(show==1){
		theSub.className='submenu-h';
	}
	else{
		theSub.className='submenu-hide';
	}
}

//Make the shipping details same as billing details
function checkShipping(){
	var theForm=document.forms['cart'];
	if(theForm.elements['controller'].checked){
		theForm.elements['dName'].value=theForm.elements['bName'].value;
		theForm.elements['dAddress'].value=theForm.elements['bAddress'].value;
		theForm.elements['dPhone'].value=theForm.elements['bPhone'].value;
	}else{
		theForm.elements['dName'].value='';
		theForm.elements['dAddress'].value='';
		theForm.elements['dPhone'].value='';
	}

}
	

	
