var liqwd = window.liqwd || {};

liqwd.topnav = (function($){
	
	function init() {
		//initAudio();
	}
	
	function initAudio() {
		// add the controls for the audio
		if (top.location != location) {
			$('#tertiarynav').append('<li><a href="#" id="toggle-audio"><img style="vertical-align:top;" src="img/norm/topnav/btn_on.gif" alt="TURN AUDIO OFF" title="TURN AUDIO OFF" border="0" /></a></li>');
			
			// toggle the audio
			$('#toggle-audio').click(function(){
				// parent. references the containing iframe's DOM
				if (parent.isAudioOn()) {
					// turn the audio off if it's on
					parent.fadeOut(false);
					
					// then flip the icon
					$(this).find('img').attr({
						src: 'img/norm/topnav/btn_off.gif',
						alt: 'TURN AUDIO ON',
						title: 'Turn Audio On'
					});
				}
				else {
					// turn the audio on if it's off
					parent.fadeIn(true);
					
					// then flip the icon
					$(this).find('img').attr({
						src: 'img/norm/topnav/btn_on.gif',
						alt: 'TURN AUDIO OFF',
						title: 'Turn Audio Off'
					});
				}
			});
		}
	}
	
	return {
		init:init
	}
})(jQuery);

jQuery(document).ready(liqwd.topnav.init);

function showcontact(){
    document.getElementById('contact').style.display = 'block';
}

function hidecontact(){
    document.getElementById('contact').style.display = 'none';
}

function contactFormSuccess() {
	$('#contact iframe').css('height','160px');
}

function showtestimonial(){
    document.getElementById('testimonial').style.display = 'block';
}

function hidetestimonial(){
    document.getElementById('testimonial').style.display = 'none';
}

function gotoStore(){
	/*alert("Goto Store");
	alert("Parent:"+window.parent);*/
	
	window.parent.location="http://shopping.netsuite.com/liqwd";
}