function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

var timeout         = 200;
var closetimer		= 0;
var ddmenuitem      = 0;

// open hidden layer
function mopen(id)
{	
	// cancel close timer
	mcancelclosetime();

	// close old layer
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';

	// get new layer and show it
	ddmenuitem = document.getElementById(id);
	ddmenuitem.style.visibility = 'visible';

}
// close showed layer
function mclose()
{
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
}
// go close timer
function mclosetime()
{
	closetimer = window.setTimeout(mclose, timeout);
}
// cancel close timer
function mcancelclosetime()
{
	if(closetimer)
	{
		window.clearTimeout(closetimer);
		closetimer = null;
	}
}
// close layer when click-out
document.onclick = mclose; 

function onYouTubePlayerReady(playerId) {
      ytplayer = document.getElementById("myytplayer");
}
	
//////////////////////////////////////////////////////////////////////////////////
$(document).ready(function()
{
	$("div.archive-btn").click(function()
    {
		$(this).next("div.archive-menu").slideToggle(200).siblings("div.archive-menu").slideUp("slow");
	});
	
	$("#openvid").click(function()
    {
		$(".product-vid").css('visibility', 'visible');
	});
	
	$("#closevid").click(function()
    {
		function onYouTubePlayerReady(playerId) {
      		ytplayer = document.getElementById("myytplayer");
		}
		ytplayer.stopVideo();
		$(".product-vid").css('visibility', 'hidden');
	});

});
////////////////////////////////////////////////////////////////////////////////////
function formatText(index, panel) {
    		  return index + "";
    	  };

		$(document).ready(function(){
			
            $('.anythingSlider').anythingSlider({
                easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
                autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
                delay: 4000,                    // How long between slide transitions in AutoPlay mode
                startStopped: false,            // If autoPlay is on, this can force it to start stopped
                animationTime: 900,             // How long the slide transition takes
                hashTags: true,                 // Should links change the hashtag in the URL?
                buildNavigation: false,          // If true, builds and list of anchor links to link to each slide
            		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
            		startText: "Go",                // Start text
    		        stopText: "Stop",               // Stop text
            });
			
			$('.productview').anythingSlider({
                easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
                autoPlay: false,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
                delay: 4000,                    // How long between slide transitions in AutoPlay mode
                startStopped: false,            // If autoPlay is on, this can force it to start stopped
                animationTime: 900,             // How long the slide transition takes
                hashTags: false,                 // Should links change the hashtag in the URL?
                buildNavigation: false,          // If true, builds and list of anchor links to link to each slide
            		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
            		startText: "Go",                // Start text
    		        stopText: "Stop",               // Stop text
            });
			
			$(".prod-alt-view").click(function(){
				var value 	= $(this).attr('id')+"";
				var id 		= value.replace("img_", "");
     			$('.productview').anythingSlider(parseInt(id));
			});

		})

