function __startVideo(a){var c=document.getElementById(a.id.replace("image-link-","image-menu-")).src;var b=c.replace(".jpg","");document.getElementById("mediareel").style.display="none";document.getElementById("mediaspace").style.display="block";document.getElementById("videoLoader").style.display="block";__playVideo(swfPlayer,b,c,"true")}var videoPlaying=false;function __playVideo(b,c,e,f){$j("#clickedMenu").val(0);var a=document.createElement("video");a.id="videoEl";if((typeof a.play==="function")&&(navigator.userAgent.toLowerCase().indexOf("safari")==-1)){document.getElementById("mediaspace").appendChild(a);a.setAttribute("width","700");a.setAttribute("height","394");a.setAttribute("poster",e);a.setAttribute("autoplay","true");a.setAttribute("src",c+".ogv");a.play();a.addEventListener("canplay",function(){videoPlaying=true;document.getElementById("videoLoader").style.display="none"},true);a.addEventListener("waiting",function(){videoPlaying=false;document.getElementById("videoLoader").style.display="block"},true);a.addEventListener("click",function(){if(videoPlaying){a.pause();videoPlaying=false}else{a.play();videoPlaying=true}},true)}else{var d=new SWFObject(b,"ply","700","394","9");d.addParam("allowfullscreen","true");d.addParam("allowscriptaccess","always");d.addParam("wmode","transparent");d.addVariable("file",c+".flv");d.addVariable("image",e);d.addVariable("controlbar","none");d.addVariable("dock","false");d.addVariable("autostart",f);d.addVariable("logo.hide","true");d.addVariable("icons","false");d.addVariable("width","700");d.addVariable("height","394");d.addVariable("stretching","fill");document.getElementById("videoLoader").style.display="none";d.write("mediaspace")}}var $j=jQuery;$j(document).ready(function(){var a=0.6;var b=1;var d=0.5;var c=1;$j("#topmenu-root > td").each(function(f){if(this.id!="topmenu-other"){$j(this).hover(function(){$j(this).css("background-color","#000A12")},function(){$j(this).css("background-color","#00233f")})}});$j("#menu-container > table").each(function(f){var g=$j("#shownMenu").val();if(this.id!=g){$j(this).css("display","none")}$j("#link-"+g).removeClass("topmenuotherlink");$j("#link-"+g).addClass("topmenuotherlinktoggled")});$j(".downloadbutton > img").each(function(f){$j(this).fadeTo(0,a)});$j(".web2button > img").each(function(f){$j(this).fadeTo(0,d)});$j("#selection-menu > a").click(clickReelEvent);$j(".downloadbutton > img").hover(function(){$j(this).fadeTo("fast",b)},function(){$j(this).fadeTo("fast",a)});$j(".web2button > img").hover(function(){$j(this).fadeTo("fast",c)},function(){$j(this).fadeTo("fast",d)});if(($j("#contactsForm").length+$j("#tInputCheck").length)>1){var e=$j(document.createElement("input")).attr({type:"hidden",value:$j("#tInputCheck").val(),name:"data[Contact][tInput]"});$j("#contactsForm").append(e)}slideToPicture($j("#shownMenu").val().replace("menu-",""));window.setTimeout(autoReelEvent,5000)});function reelEvent(a){document.getElementById("mediaspace").innerHTML="";document.getElementById("mediareel").style.display="block";document.getElementById("videoLoader").style.display="none";if(!$j(a.target).hasClass("topmenuotherlinktoggled")){$j(a.target).toggleClass("topmenuotherlinktoggled")}eventId=a.target.id.replace("link-","");$j("#menu-container > table").each(function(b){if((this.style.display=="block"||this.style.display=="")&&this.id!=eventId){$j("#"+this.id).hide(0);elementId="#link-"+this.id;$j(elementId).addClass("topmenuotherlink");$j(elementId).removeClass("topmenuotherlinktoggled")}});if(a.target.display!="block"||a.target.display==""){$j("#"+eventId).show("slow")}slideToPicture(a.target.id)}function clickReelEvent(a){$j("#clickedMenu").val(0);reelEvent(a)}function autoReelEvent(){var a=parseInt($j("#clickedMenu").val());if(a>0){event={target:document.getElementById("link-menu-"+a)};reelEvent(event);$j("#clickedMenu").val(((a)%4)+1);window.setTimeout(autoReelEvent,10000)}}function sidemenuOnOut(a){$j(a).css("background-color","#e5e5e5")}function sidemenuOnOver(a){$j(a).css("background-color","#cecece")}function slideToPicture(a){var b=394*(parseInt(a.replace("link-menu-",""))-1);$j("#mediareel").animate({scrollTop:b+"px"},1000)};

