$(function(){$.ajaxSetup({cache:false,timeout:5000,type:"POST"});if(window.location.href.indexOf("power-companies")==-1){root=""}else{root="../"}var d=$("#menu ul.dropdown_horizontal > li").not(".menu_active").hover(function(){$(this).css({"background-image":"url("+root+"assets/images/general/menu-bg-over.gif)",})},function(){$(this).css({"background-image":"none",})}).click(function(g){g.preventDefault();var f=$("a",this).attr("target");var h=$("a",this).attr("href");if(h){if(f=="_blank"){window.open(h,"_blank")}else{window.location=h}}});var a=$("#menu li.dir li");a.each(function(){$(this).css("cursor","pointer");var e=$("a",$(this));if(e.length){e.click(function(f){f.preventDefault()});$(this).click(function(){$href=$("a",this).attr("href");if($href){window.location=$href}return false})}});var b=$('a[rel="alinea_image_link"]',$("#content_left"));if(b.length){b.colorbox({returnFocus:false})}var c=getUrlVar("demo");if(typeof c=="undefined"){setTimeout(function(){demoPopup()},250)}});function preload(){var f=document;f.preloadArray=new Array();var e,c=f.preloadArray.length,b=preload.arguments;for(e=0;e<b.length;e++){if(b[e].indexOf("#")!=0){f.preloadArray[c]=new Image;f.preloadArray[c++].src=b[e]}}}function clickCheckbox(){var a=document.formulier.brochure.checked;var c=document.formulier.discuss.checked;var b=document.formulier.trial.checked;if(a||c||b){document.getElementById("div_name").style.visibility="visible";document.getElementById("div_company").style.visibility="visible";document.getElementById("div_email").style.visibility="visible"}else{document.getElementById("div_name").style.visibility="hidden";document.getElementById("div_company").style.visibility="hidden";document.getElementById("div_email").style.visibility="hidden"}if(a){document.getElementById("div_address1").style.visibility="visible"}else{document.getElementById("div_address1").style.visibility="hidden"}if(c||b){document.getElementById("div_telephone").style.visibility="visible"}else{document.getElementById("div_telephone").style.visibility="hidden"}}function sendForm(){var a=document.formulier.brochure.checked;var c=document.formulier.discuss.checked;var b=document.formulier.trial.checked;if(!a&&!c&&!b){alert("Please select at least one of the options.");return false}if(!checkVeld("name","Please enter your name before submitting this form.")){return false}if(!checkVeld("company","Please enter your company before submitting this form.")){return false}if(a){if(!checkVeld("address1","Please enter your address before submitting this form.")){return false}}if(!checkVeld("email","Please enter your emailaddress before submitting this form.")){return false}if(c||b){if(!checkVeld("telephone","Please enter your telephone before submitting this form.")){return false}}document.formulier.verzenden.value=1;document.formulier.submit()}function checkVeld(veldnaam,message){veld=eval("document.formulier."+veldnaam);if(veld.value==""){alert(message);veld.focus();return false}return true}function popNews(c,b){var a=$("div.news_pop:visible");if(a.length){a.each(function(){var k=$(this).parents("div.news");var h=$("div.news_pop_open",k);var e=$("div.news_pop_close",k);var g=$("div.news_pop",k);var f=$("div.news_linkedin",k);var d=$("div.news_twitter",k);var j=$("div.news_download",k);e.hide();f.hide();d.hide();j.hide();h.show();g.slideUp(150,function(){if(c){popNewsItem(b)}})})}else{if(c){popNewsItem(b)}}}function popNewsItem(a){var h=$("#news"+a);var f=$("div.news_pop_open",h);var c=$("div.news_pop_close",h);var e=$("div.news_pop",h);var d=$("div.news_linkedin",h);var b=$("div.news_twitter",h);var g=$("div.news_download",h);f.hide();c.show();d.show();b.show();g.show();e.slideDown(150)}function popAboutyou(c,b){var a=$("div.aboutyou_pop:visible");if(a.length){a.each(function(){var g=$(this).parents("div.aboutyou");var f=$("div.aboutyou_pop_open",g);var d=$("div.aboutyou_pop_close",g);var e=$("div.aboutyou_pop",g);d.hide();f.show();e.slideUp(150,function(){if(c){popAboutyouItem(b)}})})}else{if(c){popAboutyouItem(b)}}}function popAboutyouItem(a){var e=$("#aboutyou"+a);var d=$("div.aboutyou_pop_open",e);var b=$("div.aboutyou_pop_close",e);var c=$("div.aboutyou_pop",e);d.hide();b.show();c.slideDown(150)}function preload(){var f=document;f.preloadArray=new Array();var e,c=f.preloadArray.length,b=preload.arguments;for(e=0;e<b.length;e++){if(b[e].indexOf("#")!=0){f.preloadArray[c]=new Image;f.preloadArray[c++].src=b[e]}}}function demoPopup(){$.colorbox({href:root+"demo_popup.php?root="+root,width:"666px",height:"551px",opacity:"0.65",onLoad:function(){$("#cboxContent").css("background-image","url("+root+"assets/images/demo/demo-bg.png)")},onCleanup:function(){$("#cboxContent").css("background-image","none")},onComplete:function(){demoLoad(1);preload(root+"assets/images/demo/icon-arrow-left-over.gif");preload(root+"assets/images/demo/icon-arrow-right-over.gif");preload(root+"assets/images/demo/icon-nr-over.gif");var c=$("#demo_navigation_container div.demo_navigation_button");var a=c.length-2;if(a>0){for(i=1;i<=a;i++){var b=i;if(b<10){b="0"+b}preload(root+"assets/images/demo/screens/"+b+".jpg")}}c.click(function(){var f=$(this);if(f.hasClass("demo_navigation_left")){var e=parseInt(f.siblings(".demo_navigation_button_active").html(),10)-1;if(e<1){e=1}}else{if(f.hasClass("demo_navigation_right")){var e=parseInt(f.siblings(".demo_navigation_button_active").html(),10)+1;var d=f.siblings();if(e>d.length-2){e=d.length-2}}else{var e=parseInt(f.html(),10)}}demoLoad(e)})}})}function demoLoad(c){var f=300;var a=parseInt($("#demo_navigation_container div.demo_navigation_button_active").html(),10);if(a){var b=c-a;if(b<0){b=b*-1}f+=b*150}$("#demo_navigation_container div.demo_navigation_button_active").removeClass("demo_navigation_button_active");$("#demo_navigation_"+c).addClass("demo_navigation_button_active");var e=$("#demo_slide_container .demo_slide:first");var d=(parseInt(e.width(),10)+0)*(c-1);$("#demo_slide_container").animate({"margin-left":"-"+d+"px"},f,"easeOutCubic")}function getUrlVars(){var d=window.location.href.slice(window.location.href.indexOf("?")+1).split("&");var c=new Array();for(var b=0;b<d.length;b++){var a=d[b].split("=");c[a[0]]=a[1]}return c}function getUrlVar(a){aVars=getUrlVars();if(a in aVars){return aVars[a]}else{return""}};
