"use strict";(function(a){var d=a.jQuery14,c=a.navigator.userAgent;d.isIE7=(/MSIE\s[7]/).test(c);d.isEPIEditMode=(function(){return(document.location.search&&(/idkeep=True/).test(document.location.search))}());d.log=function(e){if(a.console&&a.console.debug){a.console.debug(arguments)}else{if(a.console&&a.console.log){a.console.log(arguments)}else{alert(e)}}};d.alert=function(){var h=arguments,e=0,f=h.length,g="";for(e=0;e<f;e+=1){if(!e){g+=h[e]}else{g+="\n"+h[e]}}alert(g)};d.uniqueId=function(g){var e=0,f;if(document.getElementById(g+e)){while(document.getElementById(g+e)){e+=1}}f=g+e;return f};d.fn.bindEvent=function(){var k=arguments[0].event,e=arguments[0].callback,h=e.length,f,g,j=function(i){var l=[],m;try{for(m=1;m<arguments.length;m+=1){l.push(arguments[m])}i.data.n[i.data.f].apply(i.data.n,l)}catch(n){d.log(n.message)}};for(g=0;g<h;g+=1){f=e[g];d(this).bind(k,f,j)}};d.create=function(D){var k=D,m=k?(k.length?k.length:0):0,s=(k&&k.tagName)?k.tagName:"div",t=document.createElement(s),q=t,z,r=0,l=null,j=k?(k.repeat?true:false):false,y=document.createDocumentFragment(),x=null,n=false,o=0,C=[],A;if(!D){return q}if(typeof D==="string"){return document.createElement(D)}if(k.type){q.setAttribute("type",k.type)}if(k.src){q.setAttribute("src",k.src)}if(k){if(d.isArray(k)){y=document.createDocumentFragment();for(r=0;r<m;r+=1){try{y.appendChild(d.create(k[r]))}catch(w){alert(w+"\n\ntagName = "+s+"\n\n"+z+":\n"+k[z]+"\n\ncreate loop (isArray)");break}}t=y}else{for(z in k){if((/(string|function|object|number)/).test(typeof k[z])){if((/^((un)?load|(dbl)?click|change|resize|scroll|select|submit|focus(in|out)?|blur|mouse(enter|leave|over|out|move|down|up)|key(press|down|up))$/).test(z)&&typeof k[z]==="function"){d(q).bind(z,k[z]);if(z==="load"){C.push(k[z])}}else{if(typeof k[z]==="function"){x=k[z]();if(x){if(typeof q.style[z]==="string"){q.style[z]=x}else{q[z]=x}}}else{if(z==="data"){for(A in k[z]){if((/^(object|function|number|string|boolean)$/).test(typeof k[z][A])){d.data(q,A,k[z][A])}}}else{if(!(/(tagName|append(Child(ren)?)?|type|repeat|src)/).test(z)){if(typeof q.style[z]==="string"){q.style[z]=k[z]}else{if(z==="opacity"&&typeof q.style[z]!=="string"){d.alert("Do not use Opacity here","Do it with CSS or the JS lib of your choise")}else{try{if(!((/^(className)$/).test(z)&&!k[z])){q[z]=k[z]}}catch(u){alert(u+"\n\ntagName = "+s+"\n\n"+z+":\n"+k[z]+"\n\nattribute");n=true}}}}else{if((/^(append)(Child(ren)?)?$/).test(z)){if(typeof k[z]==="object"&&k[z].length){for(r=0;r<k[z].length;r+=1){try{q.appendChild(d.create(k[z][r]))}catch(v){alert(v+"\n\ntagName = "+s+"\n\n"+z+":\n"+k[z]+"\n\ncreate loop");n=true}}}else{if(typeof k[z]==="object"){try{q.appendChild(d.create(k[z]))}catch(B){alert(B+"\n\ntagName = "+s+"\n\n"+z+":\n"+k[z]+"\n\ncreate");n=true}}}}}}}}if(n){break}}}}}if(j){y=document.createDocumentFragment();for(r=0;r<k.repeat;r+=1){l=t.cloneNode(true);y.appendChild(l)}t=y}if(C.length){setTimeout(function(){for(r=0;r<C.length;r+=1){C[r].apply(t)}},10)}return t};d.runWhenExists=function b(k,g){var l=0,h=0,e=100,j=0,i=50,f=function(){h+=1;j+=1;if(j>=i){clearInterval(l);try{g()}catch(m){}}if(k()){clearInterval(l);setTimeout(g,100)}if(h===5){clearInterval(l);e=(e*2);h=0;l=setInterval(f,e)}};l=setInterval(f,e)};d.objectWalk=function(f,g,j){var e,h=j?j:[];if(typeof g!=="function"){throw new Error("file: custom.js, Error: "+g+" is not a function")}g.apply(f,h);for(e in f){if(f[e]&&typeof f[e]==="object"&&(!f[e].length&&f[e].length!==0)){d.objectWalk(f[e],g,h)}}};d.runAll=function(){var f=this,g,e;d.objectWalk(f,function(){if(this[arguments[0]]){if(typeof this[arguments[0]]==="function"){this[arguments[0]]()}else{if(typeof this[arguments[0]]==="object"&&(!this[arguments[0]].length&&this[arguments[0]].length!==0)){e=this[arguments[0]];for(g in e){if(typeof e[g]==="function"){e[g]()}}}}}},[arguments[0]])};d.runInit=function(e){d.runAll.apply(e,["init"])}}(window));"use strict";(function(d){var i=d.jQuery14,a={},h=d.navigator.userAgent,c=(/MSIE\s\d/).test(h),e=(/MSIE\s[7]/).test(h),g=false;(function(){if(i.isEPIEditMode){i("body").addClass("ready")}}());if(!d._gaq){d._gaq=[]}a={iframes:{init:function(){if(e){i.runWhenExists(function(){return i("body").hasClass("ready")},function(){i("iframe").each(function(){var l=this,m=l.src;l.src="about:blank";setTimeout(function(){l.src=m},100)})})}}},googleMaps:{initMap:function f(q){if(d.google&&document.getElementById("map_canvas")){var l=new google.maps.LatLng(63.0748656905866,16.5234375),m=i("#coords").val()?(function(){var r=i("#coords").val().split(",");return new google.maps.LatLng(r[0],r[1])}()):l,p={zoom:11,center:m,mapTypeId:google.maps.MapTypeId.ROADMAP,mapTypeControl:true,mapTypeControlOptions:{style:google.maps.MapTypeControlStyle.DROPDOWN_MENU}},n=new google.maps.Map(document.getElementById("map_canvas"),p),o=new google.maps.Marker({icon:new google.maps.MarkerImage("/UI/Images/VW/poi.png"),map:n,position:m,visible:true});google.maps.event.addListener(o,"click",function(){i("#mapsDialog").remove();i(i.create({id:"mapsDialog"})).dialog({position:["center","top"],width:"600px",height:"400px"});i("#mapsDialog").css({width:"600px",height:"400px"});var u=new google.maps.Map(document.getElementById("mapsDialog"),p),r=new google.maps.Marker({icon:new google.maps.MarkerImage("/UI/Images/VW/poi.png"),map:u,position:m,visible:true}),t=function(){var v=this,x=v.offsetWidth,w=document.body.offsetWidth;return parseInt((w/2)-(x/2),10)+"px"},s=function(){var v=d.pageYOffset?d.pageYOffset:document.documentElement.scrollTop;return parseInt(v+100,10)+"px"};i("body > .ui-dialog").css({padding:"10px",border:"solid 1px #000",background:"#fff",position:"absolute",top:s,left:t});i(d).resize(function(){i("body > .ui-dialog").css({top:s,left:t})});google.maps.event.addListener(r,"click",function(v){})})}},init:function(){var l=0,m=false;if(c){i.runWhenExists(function(){if(d.google&&d.google.maps&&d.google.maps.Load){d.google.maps.Load();return false}else{return(d.google&&d.google.maps&&d.google.maps.LatLng)}},a.googleMaps.initMap)}else{i.runWhenExists(function(){return(d.google&&d.google.maps&&d.google.maps.LatLng)},a.googleMaps.initMap)}}},clickablePuff:{init:function(){i("body").find("div.clickable, div.click").delegate("*","click",function(m){m.preventDefault();var n=this,o=i(n),p=o.closest("div.clickable, div.click"),l=p.find("a.getLink"),q=l.get(0)?(l.get(0).rel?(/(^|\s)external(\s|$)/).test(l.get(0).rel):false):false;if(m){m.stopPropagation();m.preventDefault()}if(q){if((/^a$/i).test(n.tagName)){d.open(n.href)}else{d.open(l.attr("href"))}}else{if((/^a$/i).test(n.tagName)){document.location=n.href}else{document.location=l.attr("href")}}})}},addClassOnElement:{init:function(){i(".content .row .module:first").addClass("first");i("#header .menu li:first").addClass("first")}},slideshow:{thumbsFadeIn:{init:function(){var o=100,n=i("div.slideshow ul.thumbs li"),m=0,l=function(p){i(p).animate({opacity:1},500,function(){m+=1;if(n[m]){l(n[m])}})};n.css({opacity:0,display:"block"});l(n[m])}},init:function(){var n=5000,o=parseInt(i("#hiddenSlideShow").val(),10),p=o?(o*1000):n,m=i("div.slideshow"),l=function(q){var z=this,r=150,t=i.data(z,"bigImg"),y=i(z).offset(),w=parseInt(y.top,10),u=parseInt(y.left,10),A=parseInt(y.top-14,10),B=parseInt(y.left-25,10),D=z.offsetWidth,x=z.offsetHeight,s=null,v=i.create({className:"hoverImg",top:y.top+"px",left:y.left+"px",width:D+"px",append:{tagName:"a",href:z.href,append:{tagName:"img",src:t,alt:"",width:"158px",height:"91px"}}}),C=function(E){if(!E){E=i("div.hoverImg")}E.animate({opacity:0,top:w,left:u,width:D,height:x},r);E.find("img").animate({width:158,height:91},r,function(){i(this).closest("div.hoverImg").remove()})};if(q.type==="mouseover"){i("body").append(v);s=i(v);s.css("opacity","0").animate({opacity:1,top:A,left:B,width:parseInt(D+50,10),height:parseInt(x+27,10)},r);s.find("img").animate({width:206,height:119},r)}else{if(q.type==="mouseout"){C()}}};if(m.length){i("body").delegate("div.hoverImg","mouseout",function(q){var r=this;l.apply(r,[q])});m.each(function(){var s=this,v=i(s),u=v.find(".slides ul"),x=u.find("li"),r=x.eq(0).width(),w=parseInt(x.eq(0).width()*x.length,10),q=function(){u.animate({left:-r+"px"},"slow",function(){var t=u.find("> li:first-child").get(0);u.append(t);u.css("left",0)})};if(x.length>1){u.css("width",w+"px");setInterval(q,p)}v.find("ul.thumbs a").each(function(){i.data(this,"bigImg",i(this).parent().find("input[type=hidden]").val())}).mouseover(l)})}}},fourColsEqualHeight:{setHeight:function(){i("div.fourCols").each(function(){var o=this,q=i(o),r=q.find("div.boxMid"),n=0,p=r.length,m=0;for(n=0;n<p;n+=1){if(r[n].offsetHeight>m){m=r[n].offsetHeight}}for(n=0;n<p;n+=1){r[n].style.height=m+"px"}})},init:function(){var m=i("div.fourCols img"),n=m.length,l=0;m.each(function(){var o=this,q=i(o),p=i.create({tagName:"img",alt:o.alt?o.alt:"",title:o.title?o.title:"",src:o.src,load:function(){l+=1;if(l===n){setTimeout(function(){g=true},1000)}}});o.parentNode.replaceChild(p,o)});if(n){i.runWhenExists(function(){return g},a.fourColsEqualHeight.setHeight)}}},init:{relExternal:function j(){i("body").delegate("a[rel~=external], area[rel~=external]","click",function(l){if(l){l.preventDefault();d.open(this.href,"","")}})},removeEmptyDivs:function(){i("div").each(function(){var m=this,l=i.trim(m.innerHTML.replace(/\n/g,""));if(!m.className&&!m.id&&!l){i(m).remove()}})},"2000":function k(){try{delete d.jQuery14}catch(l){}},"3000":function b(){i("body").addClass("ready")}}};if(i.view){i.extend(true,i.view,a)}else{i.extend({view:a})}i(document).ready(function(){i.runInit(a)})}(window));
