var CINEMANL="cinema.nl";var timer={};var timerAtt=null;var menuHeights=[];var menuHides=[];var isIe6=/MSIE 6/.test(navigator.userAgent);var wait=isIe6?400:200;var userId;var userName;var navAlias;$(function(){if(typeof console=="undefined"){console={log:function(){}}}if(typeof dwr!="undefined"){dwr.engine.beginBatch()}if(getUrlParam("js")=="no"){return }if(typeof dwr!="undefined"){dwr.engine.setErrorHandler(function(C){if(typeof errorHandler=="function"){errorHandler(C);errorHandler=null}else{}})}$("body").addClass("js");$("div.hide-for-menu").each(function(){menuHides.push(this)});$("#menuCinema, #menuCommunity, #menuUser").hover(function(){$(this).navWaitOpen()},function(){$(this).navWaitClose()});$("#menuCinema h1 a").attr("href",$("#menuCinema h1 a").attr("href").split("?")[0]);var B=$.cookie("userinfo");if(B){var A=/"id=([0-9]+),name=([^,]+),navAlias=([0-9a-zA-Z_\\s-]+)"/.exec(B);userId=A[1];userName=A[2];navAlias=A[3];$("#usertab").addClass("loggedin")}$("#menu-personal, p.username").setUsernameFromCookie();$("#menuUser").userMenu();$("ul.menu>li").slowHighlight();$("ul.rondContainer").navResize();$("#topPhotos li").roundcorner();$("div.bottom").roundcorner("bottom");$("dl.related dt").roundcorner("top");$("body:not(#Front) div.component h4").roundcorner("top");$("#Front div.component, #Bioscoop #sub-page-teaser div.component, , #TVgids #sub-page-teaser div.component").roundcorner();$("body:not(#Front) div.ad-hor.component").roundcorner("bottom");$("#main-page-teaser div.teaser").roundcorner();$("#main-page-teaser ul.hor-scroll li").roundcorner("both","-5-black");$("#main-page-teaser ul.hor-scroll li").highlight().overlay(fullPath("images/icons/thumbnail_selected.png",true)).teaserAjax();$("#sub-page-teaser ul.hor-scroll li").highlight().overlay(fullPath("images/icons/thumbnail_selected_subpage.png",true)).teaserAjax();$("div.hor-scroll").teaserScroll();$("#main-page-teaser, #sub-page-teaser").find("div.teaser-meta-text, img.teaser-head-image").hover(function(){$("#main-page-teaser div.teaser-meta-text").addClass("highlight")},function(){$("#main-page-teaser div.teaser-meta-text").removeClass("highlight")}).click(function(){$(this).parent("div").go()});$("#sub-page-teaser ul.hor-scroll li").roundcorner("both","-5-white");$("#sub-page-teaser h2.kop").roundcorner("top");$("div.rel-block").each(function(){var C=$(this);C.find("dt a").bind("click",null,function(D){var E=$(this).parent()[0].className.replace(/rel-([a-z]*).*/,"$1");C.removeClass("cinema").removeClass("community").removeClass("user");C.addClass(E);D.preventDefault()})});$("div.rel-block").listJump();$("#crumbtrail a.abonneer").bind("click",function(){$("div.rel-block").find("dt.rel-user a").trigger("click")});$("div.component.tv").tabs();$("div.component.promo").tabs();$("div.component.dvd").tabs();$("div.component.bios").tabs();$("div.component.bios").each(function(){var D=new Date();var C=D.getDay();switch(C){case 4:case 5:case 6:$(this).find("ul.minitab li").eq(2).trigger("click");break}});$("a.popup").highlight().popUp();$("ul.movie li").movieMeta();$("div.component.list dd:even").addClass("stripe");$("div.rating.user:not(.delayed)").ratorUser();$("div.rating.community:not(.delayed)").ratorCommunity();$("p.mouseover, div.mouseover").highlight();$("p.mouseover, div.mouseover").click(function(){$(this).go()});$("div.component.reacties").reactions();if(userId){$("dt.rel-user a").text(userName.toUpperCase())}$.cookie("referer",document.URL,{path:"/"});if(isIe6){$("img").each(function(){var C=this;if(/\.png/.test(C.src)){C.src=C.src.replace(/\.png/,".gif")}});$("input[@type=image]").each(function(){var C=this;if(/\.png/.test(C.src)){C.src=C.src.replace(/\.png/,".gif")}})}$("#crumbtrail ol li div").highlight();$("dd.more").listMore();if(isIe6){$("div.text-images").height($("div.text-images ul.images").height())}else{$("div.text-images").css("min-height",$("div.text-images ul.images").height())}$("ul.minitab li").highlight();if($.browser.safari){$("div.hor-scroll").css({height:"70px"})}$("dl.slider").slider();$("ul.subscribe li").subscription();$("ul.subscribe select").selectSwitch();$("dl.list-comp ol a").compMovieInfo();$("dl.list-comp").find("div.comp-view").bind("click",function(){$(this).go()});$("#search input").bind("focus",function(){$("#menuUser").navClose()}).bind("keydown",function(){$("#menuUser").navClose()});$("#footer-top a.toplink").click(function(){$("html").scrollTo(0);return false});$("#make-bookmark").highlight().addBookmark();$.ajax({url:base+((magazine!=CINEMANL)?magazine+"/":"")+"header/header.jsp",success:function(D){$("#main-nav").html(D);$("#menuCinema, #menuCommunity, #menuUser").hover(function(){$(this).navWaitOpen()},function(){$(this).navWaitClose()});if(B){var C=/"id=([0-9]+),name=([^,]+),navAlias=([0-9a-zA-Z_\\s-]+)"/.exec(B);userId=C[1];userName=C[2];navAlias=C[3];$("#usertab").addClass("loggedin")}$("#menu-personal, p.username").setUsernameFromCookie();$("#menuUser").userMenu();$("#menuCinema h1 a").attr("href",$("#menuCinema h1 a").attr("href").split("?")[0])}});$("#footer-content").load(base+"footer/footer.jsp");$("input[@name=iframe-url]").loadAd();if(typeof ready=="function"){ready()}ie6repair();counterInc();if(typeof dwr!="undefined"){dwr.engine.endBatch()}});jQuery.fn.setUsernameFromCookie=function(){var A=$.cookie("userinfo");return this.each(function(){if(A){var B=/name=([^,]+)/.exec(A)[1];$(this).html(B)}})};function textSizeRatio(){return $("#menuCinema h1").height()/30}jQuery.fn.navResize=function(){return this.each(function(){var B=$(this);var C=this.id;B.find("ul li").mouseover(function(){A()});function A(){var D=B.menuHeight();if(menuHeights[C]==undefined){menuHeights[C]=0}if(menuHeights[C]<D){$("#"+C+"_Toggle").animate({height:D+10},"normal");menuHeights[C]=D}}})};jQuery.fn.navWaitOpen=function(){return this.each(function(){clearTimeout(timer[this.id]||null);timer[this.id]=setTimeout(B,wait);var A=$(this);$("ul.rondContainer").css("z-index",1);A.css("z-index",2);function B(){$(menuHides).css("visibility","hidden");A.navOpen()}})};jQuery.fn.navWaitClose=function(){return this.each(function(){clearTimeout(timer[this.id]||null);timer[this.id]=setTimeout(B,wait);var A=$(this);function B(){A.navClose();$(menuHides).css("visibility","visible")}})};jQuery.fn.navOpen=function(A){return this.each(function(C,B){var F=this.id;var E=textSizeRatio();var D=$(this).menuHeight();if(D<menuHeights[F]){D=menuHeights[F]}$("#"+this.id+"_Arrow").stopAnimation();$("#"+this.id+"_Toggle").stopAnimation();$("#"+this.id+"_Arrow").show(0);$("#"+this.id+"_Toggle").animate({height:A?10:D+10},"fast");$(this).animate({width:240+(A?0:40*E)},"fast")})};jQuery.fn.navClose=function(){return this.each(function(C,B){var D=this.id;$("#"+D+"_Arrow").stopAnimation();$("#"+D+"_Toggle").stopAnimation();$("#"+D+"_Toggle").animate({height:0},"fast","",A);$(this).animate({width:240},"fast");function A(){$(this).css("z-index",1);$(this).css("height",0);$("#"+D+"_Arrow").show(1);menuHeights[D]=undefined}})};jQuery.fn.menuHeight=function(){var A=0;this.each(function(){var E=this.id;A=$("#sub"+E).height();var B=$("#sub"+E).find("li.highlight h4");if(B.length>0){var C=B.parent("li").find("ul");var D=C.height();hSub=D+B.offset().top-35;if(hSub>A){A=hSub}}});return A};jQuery.fn.userMenu=function(){return this.each(function(){var C;if(userName){$("#submenuUser .login").hide();C=base+"mijncinema/"+navAlias;var B=[{type:"dt",title:"Mijn pagina",alt:"Mijn pagina",url:"mijncinema/alias"},{type:"dd",title:"Mijn pagina aanpassen",alt:"Mijn pagina aanpassen",url:"bewerkmijncinema"},{type:"dt",title:"Beoordelingen",alt:"Beoordelingen"},{type:"dd",title:"Bekijk de laatste 25",alt:"Bekijk de laatste 25",url:"mijncinema/alias?ratingrelated=last#userratings"},{type:"dd",title:"Download mijn beoordelingen",alt:"Download mijn beoordelingen",url:"mijncinema/alias?format=excel"},{type:"dt",title:"Abonnementen",alt:"Abonnementen"},{type:"dd",title:"Aanpassen",alt:"Aanpassen",url:"mijncinema/alias?aborelated=edit#subscriptions"},{type:"dd",title:"Bioscoop",alt:"Bioscoop",url:"mijncinema/alias?aborelated=bios#subscriptions"},{type:"dd",title:"Televisie",alt:"Televisie",url:"mijncinema/alias?aborelated=tv#subscriptions"},{type:"dt",title:"Nieuwsbrief",alt:"Nieuwsbrief",url:"nieuwsbrief"},{type:"dt",title:"Help",alt:"Help",url:"helpmij"}];A(B,$(this).find("dl.menu dt.logout"),true)}else{$("#submenuUser .logout").hide();C=base+"switchboard.jsp";var B=[{type:"dt",title:"Help",alt:"Help",url:"helpmij"},{type:"dt",title:"Nieuwsbrief",alt:"Nieuwsbrief",url:"nieuwsbrief"}];A(B,$(this).find("dl.menu dt.login"),false)}$(this).find("h1 a").attr("href",C);function A(G,I,E){var H=G.length;for(var D=0;D<H;D++){var F=$.create(G[D].type);if(typeof G[D].url!="undefined"){F.append('- <a href="'+base+G[D].url.replace(/alias/,navAlias)+'" title="'+G[D].title+'">'+G[D].title+"</a>")}else{F.append("- "+G[D].title)}if(E){I.before(F)}else{I.after(F)}}}})};jQuery.fn.teaserScroll=function(){return this.each(function(){var E=$(this).find("ul.hor-scroll");var D=E.children("li").length;var B=67;var C=$("#sub-page-teaser").length>0;E.width(D*B);var H=parseInt(getUrlParam("main-teaser"));if(H>5){H=Math.floor(H/5)*5+(H%5?0:-5);if(H>D-7){H=D-7}E.css({"marginLeft":-B*H})}else{H=0}var F=$("p.hover-text");$(this).find("img.left").mouseover(function(){A("back")});$(this).find("img.right").mouseover(function(){A("forward")});E.find("li img").hover(function(){},function(){if(C){var I="Uitgelicht"}if(!$.browser.safari){F.html(I||"&nbsp;")}else{F.text(I||"")}});G(true);function A(J){if(J=="forward"){H+=5}else{H-=5}if(H<0){H=0}else{if(H>D-7){H=D-7}}var K=-B*H;if(K==0){K=1}E.animate({"marginLeft":K},"slow","expoout",I);function I(){G();E.css({"marginLeft":K})}}function G(I){$(this).find("img.left").show(H>0?0.7:0,I);$(this).find("img.right").show((H<D-7)?0.7:0,I)}})};jQuery.fn.show=function(A,B){return this.each(function(){var D=$(this);if(A>0){D.css("visibility","visible")}D[B?"css":"animate"]({"opacity":A},"fast","",C);if(B){C()}function C(){if(A==0){D.css("visibility","hidden")}}})};jQuery.create=function(A,C,B){return $(jQuery.extend((B||document).createElement(A),C))};jQuery.fn.roundcorner=function(A,B){return this.each(function(){var G;B=B||"";if(this.tagName.toLowerCase()=="img"){G=$.create("div");var D=$(this);var C=(D.width())?D.width():(D.attr("width"))?D.attr("width"):(D.css("width"))?D.css("width"):0;var E=(D.height())?D.height():(D.attr("height"))?D.attr("height"):(D.css("height"))?D.css("height"):0;G.width(parseFloat(C)+parseInt(D.css("padding-left"))+parseInt(D.css("padding-right"))+"px");G.height(parseFloat(E)+parseInt(D.css("padding-top"))+parseInt(D.css("padding-bottom"))+"px");D.after(G);D.appendTo(G)}else{G=$(this)}if(!$(this).is(".notrelative")){G.get(0).style.position="relative"}if(A!="bottom"){F(G,"lb"+B,{left:0,top:0});F(G,"rb"+B,{right:isIe6?"-1px":0,top:0})}if(A!="top"){F(G,"lo"+B,{left:0,bottom:isIe6?"-1px":0});F(G,"ro"+B,{right:isIe6?"-1px":0,bottom:isIe6?"-1px":0})}function F(K,J,I){var H=$.create("img",{src:fullPath("images/roundcorners/"+J+".png",true)});H.css({"position":"absolute"});jQuery.extend(H.get(0).style,I);K.append(H)}})};jQuery.fn.highlight=function(A){return this.each(function(){$(this).hover(function(){$(this).addClass(A||"highlight")},function(){$(this).removeClass(A||"highlight")})})};jQuery.fn.slowHighlight=function(D){var C=null;var B=null;var E=null;var A=this;D=D||"highlight";return this.each(function(){var F=$(this);F.hover(function(){clearTimeout(B);clearTimeout(C);if(E){B=setTimeout(G,120)}else{G()}function G(){if(E!=F&&E){E.removeClass(D)}E=F;F.addClass(D||"highlight")}},function(){var G=F;C=setTimeout(H,1000);function H(){G.removeClass(D);E=null}})})};jQuery.easing.expoout=function(B,C,A,F,E){var D=1;if(F<0){D*=-1;F*=-1}return D*(-Math.exp(-Math.log(F)/E*(C-E))+F+1)+A};function getUrlParam(C){var E=document.location.search.substring(1);var A=E.split(/&/);for(var B=0;B<A.length;B++){var D=A[B].split(/=/i);if(D[0]==C){return D[1]}}return null}function changeUrlParam(A,I,B){var G=B||document.location.search.substring(1);var C=G.split(/&/);var E=[];var H=false;for(var D=0;D<C.length;D++){var F=C[D].split(/=/i);if(F[0]!=A){E.push(C[D])}}E.push(A+"="+I);return E.join("&")}jQuery.fn.overlay=function(A){return this.each(function(){var C=$(this);var B=$.create("img",{src:A});B.css("position","absolute");B.addClass("overlay");C.append(B)})};function fullPath(B,A){if(A&&/MSIE [1-6]\./.test(navigator.userAgent)){B=B.replace(".png",".gif")}return base+B}jQuery.fn.stopAnimation=function(){return this.each(function(){this.queue=[]})};jQuery.fn.ratorUser=function(){if(userId==undefined){return this}return this.each(function(){var B=$(this);var H=B.children("div");var G=Math.round(H.width()/7.2);var F=B.find("input").val();var C=[0,7,13,21,27,36,42,51,57,66,72];$(this).bind("mousemove",null,function(I){rating=Math.round((I.clientX-$(this).offset().left)/7.2+1);if(rating>10){rating=10}A(rating,true)});$(this).bind("click",function(I){if(F){ratingServiceDWR.rate(rating,F,E)}G=rating;I.preventDefault()});$(this).bind("mouseout",function(){A(G)});ratingServiceDWR.getUserRating(F,function(I){if(I==-1){I=0}G=I;A(I)});function E(){B.parents("div.rating-container").find("div.rating.community").ratorCommunity()}function A(I,J){H[J?"css":"animate"]({width:C[I]});var K=B.next().children("p.meta");K.html(sterrenTekst(I))}function D(I,J){I.children.css({width:C[J]});var K=I.parent().next().children("p.meta");K.html(sterrenTekst(J))}})};jQuery.fn.ratorCommunity=function(){var A={};this.each(function(){var B=$(this);var C=B.find("input").val();if(!(C in A)){A[C]=[]}A[C].push(B)});$.each(A,function(C){ratingServiceDWR.getAverageRating(C,function(D){if(D){B(D.rating,D.numRatings)}else{B(0)}});function B(E,D){$.each(A[C],function(F){var G=A[C][F];var I=G.children("div");I.animate({width:Math.round(E*7.2)});var H=G.parent().find("> div").children("p.meta");H.text(sterrenTekst(E,D))})}})};function sterrenTekst(C,B){var A;if(C<=0){A="Nog niet beoordeeld"}else{if(C==2){A="1 ster"}else{var A=Math.floor(C/2);if(C%2){A+=",5 ster"}else{A+=" sterren"}}}if(B){if(B==1){A+=" (1 stem)"}else{A+=" ("+B+" stemmen)"}}return A}jQuery.fn.popUp=function(){return this.each(function(){var D=this.href;var B=$(this);var F=D.substr(this.href.indexOf("?")+1);var E=F.replace(/.*width=([0-9]+).*/,"$1");var A=F.replace(/.*height=([0-9]+).*/,"$1");var C=$.create("img",{src:fullPath("images/icons/icon_white_zoeken.png",true)});C.addClass("loep");B.append(C);B.bind("click",null,function(G){window.open(D,"_blank","width="+E+",height="+A);G.preventDefault()})})};jQuery.cookie=function(B,I,L){if(typeof I!="undefined"){L=L||{};var E="";if(L.expires&&(typeof L.expires=="number"||L.expires.toGMTString)){var F;if(typeof L.expires=="number"){F=new Date();F.setTime(F.getTime()+(L.expires*24*60*60*1000))}else{F=L.expires}E="; expires="+F.toGMTString()}var K=L.path?"; path="+L.path:"";var G=L.domain?"; domain="+L.domain:"";var A=L.secure?"; secure":"";document.cookie=[B,"=",encodeURIComponent(I),E,K,G,A].join("")}else{var D=null;if(document.cookie&&document.cookie!=""){var J=document.cookie.split(";");for(var H=0;H<J.length;H++){var C=jQuery.trim(J[H]);if(C.substring(0,B.length+1)==(B+"=")){D=decodeURIComponent(C.substring(B.length+1));break}}}return D}};jQuery.fn.movieMeta=function(){return this.each(function(){var D=false;var C=$(this);C.find("div.rating-uitklap div.cinema img").css("cursor","pointer").bind("click",function(E){if(C.find("div.rating-more").css("display")=="block"){C.find("div.ankeiler").slideUp("fast");C.find("div.rating-more").slideUp("fast")}else{if(!D){A()}if(!$.browser.safari){B()}}E.preventDefault()});C.find("div.ankeiler").highlight().click(function(){C.go()});function A(){C.find("div.rating.user").ratorUser();C.find("div.rating.community").ratorCommunity();var E=C.find("div.ankeiler");var F=C.find("input").val();if(C.find("div.ankeiler").text().length<=2){movieServiceDWR.getMovieDetails(F,function(G){E.html(G.aankeiler+"<br><span>Meer...</span>");D=true;if($.browser.safari){B()}})}}function B(){C.find("div.ankeiler").css("display","block");C.find("div.rating-more").css("display","block")}})};jQuery.fn.go=function(){return this.each(function(){var A=$(this).find("a").attr("href");if(A){window.open(A,"_self")}})};jQuery.fn.moreLess=function(){return this.each(function(){var C=$(this);var E=C.find(".text");var A=false;var D=E.cssComputed("line-height")*2;C.addClass("autoheight");var B=E.height();C.removeClass("autoheight");E.animate({height:D});C.find(".more").click(function(){A=!A;if(A){E.animate({height:B});$(this).addClass("less").html("Minder...")}else{E.animate({height:D});$(this).removeClass("less").html("Meer...")}return false})})};jQuery.fn.reactions=function(){return this.each(function(){var F=$(this);var C=F.find("ol.template li");var B=F.find("ol.reacties");F.css("display","block");var E=F.find("form");if(userId){E.css("display","block")}var G=F.find("input").val();F.find("form").bind("submit",function(H){H.preventDefault();var I=$(this).find("input").val();if(I==""){return }$(this).find("input").val("");messageServiceDWR.addMessage(G,I,function(K){var J=A(C,K);J.css("display","none");B.append(J);if($.browser.msie){J.css("display","block");B.scrollDown()}else{J.slideDown("fast",null,function(){B.scrollDown()})}setTimeout(function(){B.show()},500);D()})});messageServiceDWR.findMessagesByTarget(G,function(I){for(r in I){var H=A(C,I[r]);B.append(H)}B.find("img.avatar").roundcorner("both","-5-white").parent().css("float","left");$("dd.rel-community").find("img.avatar").roundcorner("both","-5-white").parent().css("float","left");D();B.scrollDown()});function A(L,M){var H=L.clone();if(M.author.principal==userId){H.addClass("self")}var N=$.create("a");N.attr("href",base+"mijncinema/"+M.author.navAlias);N.text(M.author.alias);H.find("h3").append(N);var J=H.find("img.avatar");if(M.author.avatar){J.attr("src",base+"images/rendered/"+M.author.avatar.id+"_avatarSmall.jpg")}else{var K=$.create("span");K.addClass("community");J.removeClass("avatar");J.removeAttr("width");J.removeAttr("height");J.attr("src",base+"images/icons/icon_white_gebruiker_reactie."+((isIe6)?"gif":"png"));J.wrap(K)}H.find("p.reactie").text(M.text);H.find("p.datum").text(niceDate(M.dateCreated));var I=H.find("img.delete").get(0);I.onclick=function(){if(confirm("Wil je deze reactie echt wissen?")){messageServiceDWR.deleteMessage(M.id,function(){H.slideUp("normal",function(){H.remove();D()})})}};I.onmouseover=function(){H.addClass("delete");H.find("p.datum").text("verwijderen")};I.onmouseout=function(){H.removeClass("delete");H.find("p.datum").text(niceDate(M.dateCreated))};return H}function D(){var H=B.find("li");var I=H.length;if(I==0){text="Er zijn nog geen reacties.";if(!userId){text+=' <a href="'+base+'switchboard.jsp">Log in</a> om te reageren'}}else{if(I==25){text="De laatste 25 reacties."}else{if(I==1){text="Er is 1 reactie."}else{text="Er zijn "+I+" reacties."}}text+=" Laatste reactie: "+$(H[I-1]).find("p.datum").text()}F.find("p.top").html(text)}})};function niceDate(D,F,L){if(typeof L=="undefined"){L=true}if(typeof F=="undefined"){F=true}var C=["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"];var K=["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"];var B=Math.floor(new Date().getTime()/(24*60*60*1000));var J=Math.floor(D.getTime()/(24*60*60*1000));var H=B-J;var I;if(H==0){I="vandaag"}else{if(H==1){I="gisteren"}else{if(H==2){I="eergisteren"}else{if(H<60){I=K[D.getDay()]+" "+D.getDate()+" "+C[D.getMonth()]}else{I=K[D.getDay()]+" "+D.getDate()+" "+C[D.getMonth()]+" "+D.getFullYear()}}}}var G=D.getHours();var A=D.getMinutes();var E=G+":"+(A<10?"0"+A:A);return""+((F)?I+" ":"")+((L)?E:"")}jQuery.fn.log=function(A){return this};jQuery.fn.teaserAjax=function(){return this.each(function(){var C=$("#main-page-teaser, #sub-page-teaser");var B=$(this);var A=null;B.bind("mouseover",null,function(D){D.preventDefault();var F=$(this).find("a").attr("href");var K=$(this).find("input").val();if(C.attr("id")=="sub-page-teaser"){var J="articleimagemedium";var H="&round=true"}else{var J="width473";var H=""}var E;if($("body#TVgids").length){E="components/singleTvSelection"}else{E="components/singleTeaser/"+K}var I=$("#sub-page-teaser").length>0?"&sub=true":"";if(A){G(A)}else{$.ajax({type:"GET",url:base+E+F+"&imageprofile="+J+H+I,dataType:"xml",success:G})}function G(N){A=N;var O=$("component image img",N).attr("src");if(!O){O=base+"images/placeholder/placeholder_default_groen.jpg"}C.find("img.teaser-head-image").attr("src",O);var U=$("component text h2 a",N).text();C.find("h2 a").text(U);C.find("h2 a").attr("href",$("component text h2 a",N).attr("href"));var T=$('component text p[@class="metadata"]',N).text();var V=$('component text p[@class="intro"]',N).text();var P=$('component text p[@class="zender"]',N).text();var L=$("component text moviemetatext",N).text();var M=$("component text rating",N).text();var S=$("component text movieoftheday",N).text().replace(/\s/g,"");if(S=="true"){C.find("p.selection").removeClass("hidden")}else{C.find("p.selection").addClass("hidden")}C.find("p.metadata").text(T);C.find("p.intro").text(V);C.find("p.zender").text(P);C.find('dl[@class="movie-meta-text"] dt span').text(U);C.find('dl[@class="movie-meta-text"] dt div.rating div').animate({width:Math.round(M*7.2)});C.find('dl[@class="movie-meta-text"] dd').text(L);var R=$("#Bioscoop").length>0;var Q=C.find("ul.related");C.find("ul.related").empty();$("component related ul li",N).each(function(){var W=$.create("li");W.addClass($(this).attr("class"));var X=$.create("a",{href:$(this).find("a").attr("href")});X.text($(this).find("a").text());W.append(X);var b=$(this).find('p[@class="meta"]').text();Q.append(W);if(b!=""&&R){C.find("p.metadata").html(b)}else{var Z=$.create("p",{className:"meta"}).html(b);X.append(Z)}if(V==""&&R){var Y=$(this).find('p[@class="intro"]').text();C.find("p.intro").text(Y)}});C.find("li.selected").removeClass("selected");B.addClass("selected")}})})};jQuery.fn.scrollDown=function(){return this.each(function(){this.scrollTop=this.scrollHeight-this.offsetHeight+100})};jQuery.fn.cssComputed=function(A){if(typeof this[0].currentStyle!="undefined"){p=this[0].currentStyle[toCamelCase(A)]}else{p=document.defaultView.getComputedStyle(this[0],null).getPropertyValue(A)}return parseInt(p)};function toCamelCase(B){var A="";$.each(B.split("-"),function(C,D){A+=A?toFirstCapital(D):D});return A}function toFirstCapital(A){out="";if(A.length>0){out+=A.substr(0,1).toUpperCase()}if(A.length>1){out+=A.substr(1)}return out}jQuery.fn.listMore=function(A){return this.each(function(){var B=$(this);var C=false;B.click(function(){C=!C;sibling=$(this).prev();while(sibling&&sibling.is("dd")){sibling.toggleClass("show");sibling=sibling.prev()}B.toggleClass("less");B.text(C?"Minder... ":"Meer...")})})};jQuery.fn.listJump=function(){return this.each(function(){var A=$(this);A.find("ul.top.cinema, ul.top.community").each(function(){var B=$(this);var C=this.className.replace(/top /,"");A.find("dd.rel-"+C+" h5").each(function(){var E=$(this);var H=E.is(".count");var F=E.next("ul");if(F.length==0){F=E.next().next("ul")}var D=F.length;if(D>0){var G=F.attr("className");A.listJumpIcon(B,G,E,F.children().length,A.find("dd.rel-"+C))}})})})};jQuery.fn.listJumpIcon=function(D,E,B,A,F,C){return this.each(function(){var J=$(this);var I=J.find("div.status");var H=$.create("a");var G=$.create("li");H.text(""+A).attr("href","#"+B.attr("id"));G.addClass(E);if(C){D.prepend(G)}else{D.append(G)}G.append(H);H.hover(function(){I.text(B.html())},function(){I.text(" ")});H.bind("click",function(K){h5First=B.parents("dd").find("h5:first");nextPos=B.offset().top-h5First.offset().top;F.scrollTo(nextPos);K.preventDefault()})})};jQuery.fn.scrollTo=function(A){return this.each(function(){var B=$(this);var C=B.get(0).scrollTop;var E=Math.ceil(Math.abs(A-C)/10);D();function D(){if(C==A){return }if(C>A){C-=E;if(C<A){C=A}}else{C+=E;if(C>A){C=A}}B.get(0).scrollTop=C;if(B.get(0).scrollTop==C){setTimeout(D,20)}}})};function ie6repair(){if(isIe6){$("ul.list-tabs li img[@src$=rb.gif]").css({right:"-1px"});$("#sub-page-teaser h2 img[@src$=lb.gif]").css({left:"-10px"})}}function counterInc(){if(typeof objectNr!="undefined"){setTimeout(function(){statisticsServiceDWR.incrementViewCounter(objectNr)},10000)}}jQuery.fn.tabs=function(){return this.each(function(){var D=$(this);var B=D.find('ul.minitab li:not(".arrow")');var C=D.find("dl h4");var A=D.find("dl dd");$(B[0]).addClass("selected");B.each(function(E){if(E>0){if(D.is("bios")){alert(C[E].text())}$(C[E]).addClass("hidden");$(A[E]).addClass("hidden")}$(this).click(function(){C.each(function(F){if(E==F){$(C[F]).removeClass("hidden");$(A[F]).removeClass("hidden");if($(B[F])){$(B[F]).addClass("selected")}}else{$(C[F]).addClass("hidden");$(A[F]).addClass("hidden");if($(B[F])){$(B[F]).removeClass("selected")}}})})})})};jQuery.darken=function(B){B=B||100;var A=$.create("div");$("html").append(A);A.css({position:"absolute",top:"0",left:"0",width:"100%",height:$("html").height()+"px",backgroundColor:"#000",zIndex:B,opacity:"0.7"});return{layer:A,cancel:function(){A.remove()}}};jQuery.fn.subscription=function(){var A=[];return this.each(function(){var B=$(this);var D=this.id;B.find("strong").click(function(){if($.browser.msie){$("#"+D+"-fold").toggleClass("hidden")}else{$("#"+D+"-fold").slideToggle()}B.toggleClass("down");switch(D){case"tv-subscription":if(typeof A[D]=="undefined"){tvServiceDWR.listTVStationGroups(E);A[D]=true}break;case"bios-subscription":if(typeof A[D]=="undefined"){geographyServiceDWR.listAllCities(E);A[D]=true}break}});B.find("button").bind("click",C);function E(H){var F=B.find("select");for(d in H){var G=$.create("option",{value:H[d].id}).text(H[d].title||H[d].name);F.append(G)}}function C(H){var F=B.find("select")[0];var J=F[F.selectedIndex].value;var I=F[F.selectedIndex].text;if(typeof objectNr!="undefined"){switch(D){case"tv-subscription":notificationServiceDWR.createTVNotification(objectNr,J,G);break;case"bios-subscription":notificationServiceDWR.createCinemaNotification(objectNr,J,G);break}}else{if(typeof keywordGenres!="undefined"){switch(D){case"tv-subscription":notificationServiceDWR.createTVNotificationKeywords(keywordTags,keywordGenres,keywordCountries,J,G);break;case"bios-subscription":notificationServiceDWR.createCinemaNotificationKeywords(keywordTags,keywordGenres,keywordCountries,J,G);break}}}H.preventDefault();function G(K){if($.browser.msie){$("#"+D+"-fold").addClass("hidden")}else{$("#"+D+"-fold").slideUp()}B.removeClass("down");if(K.filterCity!=null){addSubscription("CINEMA")([K])}else{if(K.filterTVStationGroup!=null){addSubscription("TV")([K])}}}}})};jQuery.fn.subscriptions=function(){return this.each(function(){if(userId){$(this).find("> strong > a").each(function(){$(this).attr("href",$(this).attr("href").replace("alias",navAlias))})}var A=$("#Film").length>0;var B=A?"Movie":"Person";if($("#trefwoord").length==0){if(userId){notificationServiceDWR.listNotificationsForObject(objectNr,"TV",addSubscription("TV",false));notificationServiceDWR.listNotificationsForObject(objectNr,"CINEMA",addSubscription("CINEMA",false));notificationServiceDWR["listNotificationCriteriaMatchesFor"+B](objectNr,"TV",addSubscription("TV",true));notificationServiceDWR["listNotificationCriteriaMatchesFor"+B](objectNr,"CINEMA",addSubscription("CINEMA",true))}}else{if(userId&&typeof keywordTags!="undefined"){notificationServiceDWR.listNotificationsForKeywords(keywordTags,keywordGenres,keywordCountries,"TV",addSubscription("TV",false));notificationServiceDWR.listNotificationsForKeywords(keywordTags,keywordGenres,keywordCountries,"CINEMA",addSubscription("CINEMA",false))}notificationServiceDWR.findAllKeywordCriteria("TV",addSubscription("TV",true));notificationServiceDWR.findAllKeywordCriteria("CINEMA",addSubscription("CINEMA",true))}})};function addSubscription(B,A){return function(G){var I,H;var E=$("li.subscriptions-current dl");for(d in G){if(G[d].movie){I=G[d].movie.title}else{if(G[d].keywords){I=G[d].keywords.join(", ")}else{I=G[d].person.fullName}}switch(B){case"TV":H=G[d].filterTVStationGroup.title;if(G[d].results&&G[d].results.length>0&&G[d].results[0].theaterShows){var J=G[d].results[0].theaterShows.length;H=$.format("{1} ({2} {3})",H,J,J==1?"uitzending":"uitzendingen")}break;case"CINEMA":H=G[d].filterCity.name;if(G[d].results&&G[d].results.length>0){var J=G[d].results[0].theaterShows.length;H=$.format("{1} ({2} {3})",H,J,J==1?"vertoning":"vertoningen")}break}var D=$.format("{1} subs_{2} count",B.toLowerCase(),G[d].id);if(G[d].results&&G[d].results.length>0){E.find(".subs_"+G[d].id).remove()}var F=$.create("dt",{className:D}).text(I);E.append(F);var C=$.create("dd",{className:D}).text(H);E.append(C);F.addClass("highlight");setTimeout(function(K){return function(){K.removeClass("highlight")}}(F),800)}}}jQuery.fn.slider=function(){return this.each(function(){var A=$(this);A.find("dt").click(function(){A.toggleClass("down");var B=$(this).next();while(B[0].tagName=="DD"){B.slideToggle();B=B.next()}})})};jQuery.format=function(B){var A=arguments;return B.replace(/{[^}]*}/g,C);function C(E){var G=/{([0-9]+)([:a-z]*)}/.exec(E);var D=A[G[1]];if(G[2]){var F=G[2].substr(1).split(/:/);for(i in F){D=jQuery.format.fn[F[i]](D)}}return D}};jQuery.format.fn={};jQuery.format.fn.urlencode=function(A){return encodeURI(A)};jQuery.format.fn.htmlencode=function(A){return A.replace(/&/,"&amp;").replace(/</,"&lt;").replace(/>/,"&gt;")};jQuery.format.fn.upper=function(A){return A.toUpperCase()};jQuery.fn.selectSwitch=function(){return this.each(function(){var A=$(this);var B=A.parents("form").find("button");A.change(function(){if(A[0].selectedIndex==0){B.attr("disabled","disabled")}else{B.attr("disabled","")}})})};jQuery.fn.compMovieInfo=function(){return this.each(function(){$(this).mouseover(function(){var I=$(this);var K=$(this).parents("li");var G=K.find("input[@name=title]").val();var A=K.find("input[@name=href]").val();var H=K.find("input[@name=subtitle]").val();var C=K.find("input[@name=img]").val();var E=K.find("input[@name=appreciation]").val();var J=K.find("input[@name=appreciationA]").val();var F=K.find("input[@name=appreciationB]").val();var D=K.find("input[@name=ontv]").val();var B=I.parents("dd").find("div.comp-view");if(C){C=base+"images/rendered/"+C+"_tvComp2.jpg"}else{if(B.parents("div.component.tv")){C=base+"images/placeholder/placeholder_default_limoen.jpg"}else{C=base+"images/placeholder/placeholder_default_alg.jpg"}}if(A){B.find("a").attr("href",A).text(G)}B.find("img:eq(0)").attr("src",C);B.find("p.small:first").text(H);if(E){B.find("div.rating:eq(0) > div").animate({width:Math.floor(E*7.2)})}else{B.find("div.rating:eq(0) > div").animate({width:Math.floor(J*7.2)})}B.find("div.rating:eq(1) > div").animate({width:Math.floor(F*7.2)});if(D){B.find("p.small:first").append("<br /><strong>"+unescape(D)+"</strong>")}K.parent().find("li").removeClass("selected");K.addClass("selected");return false})})};jQuery.fn.addBookmark=function(){return this.each(function(){$(this).click(function(){var C=navigator.userAgent.toLowerCase();var A=(C.indexOf("konqueror")!=-1);var B=(C.indexOf("webkit")!=-1);var E=(C.indexOf("mac")!=-1);var D=E?"Command/Cmd":"CTRL";if(window.external&&(!document.createTextNode||(typeof (window.external.AddFavorite)=="undefined"))){window.external.AddFavorite(document.URL,document.title)}})})};jQuery.fn.loadAd=function(){return this.each(function(){var A=$(this).val();var B=$(this).next("iframe");setTimeout(function(){B.attr("src",A)},1000)})};jQuery.fn.addTabbedMovieLists=function(A){return this.each(function(){var D=$(this).attr("class").match(/rel-[^\s]+/)[0];var B=$(this).parent().find("> dd."+D);var C=base+"tabs/movie_communitytab.jsp?";$(A).each(function(E){C+=A[E]+"=true&"});B.find("> div.remoteContent").text(C).hide();$(this).one("click",function(){var F=$(this).attr("class").match(/rel-[^\s]+/)[0];var G=$(this).parent().find("> dd."+F+" > div.remoteContent");var E=G.text();if(E.length>0){G.empty().load(E).css("display","block")}});if(B.css("display")=="block"){$(this).click()}})}