if(!this.JSON){this.JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}}());$(document).ready(function(){if(window.opera){if($("a.jqbookmark").attr("rel")!=""){$("a.jqbookmark").attr("rel","sidebar")}}if($("a.jqbookmark")!=null){$("a.jqbookmark").click(function(b){b.preventDefault();var a=this.href;var c=GetImgProp(varCurNi).Naam;if(/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){window.sidebar.addPanel(c,a,"")}else{if((navigator.appName=="Microsoft Internet Explorer")&&(parseInt(navigator.appVersion)>=4)){window.external.AddFavorite(a,c)}else{if(window.opera){return false}else{alert("Unfortunately, this browser does not support the requested action, please bookmark this page manually.")}}}})}});function Querystring(a){this.params={};if(a==null){a=location.search.substring(1,location.search.length)}if(a.length==0){return}a=a.replace(/\+/g," ");var f=a.split("&");for(var b=0;b<f.length;b++){var e=f[b].split("=");var d=decodeURIComponent(e[0]);var c=(e.length==2)?decodeURIComponent(e[1]):d;this.params[d]=c}}Querystring.prototype.get=function(c,a){var b=this.params[c];return(b!=null)?b:a};Querystring.prototype.contains=function(a){var b=this.params[a];return(b!=null)};jQuery.fn.outerHTML=function(){return $("<div>").append(this.eq(0).clone()).html()};function articleDataService(a){$("#imagesList div.artDiv:first").css("marginLeft",-195);$.ajax({type:"POST",url:"http://"+location.hostname+"/webservices/WebServiceKenze.asmx/GetProperties",data:"{'nodeIds':'"+a+"'}",contentType:"application/json; charset=utf-8",dataType:"json",error:function(b,c,d){alert(b.responseText+" NodeId: "+a+" Status: "+c+" ErrorThrown: "+d)},success:function(b){imageListObject.curArticle=JSON.parse(b.d,imageListObject.curArticle);for(var c=0;c<imageListObject.curArticle.length;c++){imageListObject.curArticle[c].Index=c;$("#imagesList").data(c+"_"+imageListObject.curArticle[c].NodeId,imageListObject.curArticle[c]);myImage=$("#ni_"+c+"_"+imageListObject.curArticle[c].NodeId+" img");if(c==4){updateProperties()}scaleImage(myImage,c);myImage.css("width",varImageWidth);myImage.css("height",varImageHeight);myImage.css("left",varImagesLeft);myImage.css("top",varImagesTop);if(c==imgCount){$("#imagesList").css("width",(imgCount+1)*199);$("div#imagesList").css("marginLeft",-195);$(".loading").css("display","none");$("#imageSelectorControl").css("display","block");$("#tableProperties").css("display","block")}}}})}function GetImgProp(d){var a=d.lastIndexOf("_");var b=d.substring(a+1,d.length);var c=d.substring(d.indexOf("_")+1,a);return $("#imagesList").data(c+"_"+b)}function ArticlePicBackward(a){firstImageCounter-=1;if(firstImageCounter<0){firstImageCounter=imgCount}$("#imagesList DIV.artDiv:first").animate({marginLeft:0},700,"swing",function(c){var b=$("#imagesList div.artDiv:last").outerHTML();$(b).insertBefore("#imagesList div.artDiv:first");$("#imagesList div.artDiv:first").replaceWith($("#imagesList div.artDiv:last"));$("#imagesList div.artDiv").css("marginLeft",0);$("#imagesList div.artDiv:first").css("marginLeft",-195);updateProperties()});$("#imagesList img").each(function(b){scaleImage($(this),b+1);$(this).animate({left:varImagesLeft,width:varImageWidth,height:varImageHeight,top:varImagesTop},700,"swing")});updateModalPopup(0)}function ArticlePicForward(){firstImageCounter+=1;if(firstImageCounter>imgCount){firstImageCounter=0}var a=$("#imagesList div.artDiv:first").outerHTML();$(a).insertAfter("#imagesList div.artDiv:last");$("#imagesList div.artDiv:last").replaceWith($("#imagesList div.artDiv:first"));$("#imagesList div.artDiv").css("marginLeft",0);$("#imagesList div.artDiv:first").css("marginLeft",0);$("#imagesList DIV.artDiv:first").animate({marginLeft:-195},700,"swing",function(b){updateProperties()});$("#imagesList img").each(function(b){scaleImage($(this),b);$(this).animate({left:varImagesLeft,width:varImageWidth,height:varImageHeight,top:varImagesTop},700,"swing")});updateModalPopup(1)}function buildModalPopup(k,b){k.preventDefault();var i="#dialog";var a=b.attr("name");var l=$("#imagesList img:eq(4)");var j=GetImgProp(l.parent().parent().attr("id"));var c=b.attr("href");var g=$("#dialogImage");$("#dialogTitle").html(j.Naam);g.attr("src",c);g.attr("alt",j.Naam);$(i).css("height",parseInt(j.height)+40);$(i).css("width",parseInt(j.width)+30);var h=$(document).height();var d=$(window).width();$("#mask").css({width:d,height:h});$("#mask").fadeIn(1000);$("#mask").fadeTo("slow",0.8);var f=$(window).height();var n=$(window).width();$(i).css("top",f/2-$(i).height()/2);$(i).css("left",n/2-$(i).width()/2);$(i).fadeIn(2000);$("#PopupButtons .close").click(function(){o()});$("#PopupButtons .previous").click(function(){$("#thumbBackward").click()});$("#PopupButtons .next").click(function(){$("#thumbForward").click()});$("#mask").click(function(){o()});$("#PopupButtons").css("display","block");$("#PopupButtons").offset({top:100,left:100});var m=false;$(document).keyup(function(p){p.preventDefault();if(p.keyCode==13|p.keyCode==27){if(m==false){o()}}});function o(){$("#mask").hide();$(".window").hide();$("#PopupButtons A.previous").unbind("click");$("#PopupButtons A.next").unbind("click");$("#PopupButtons").css("display","none");m=true}}function updateModalPopup(b){if($("#dialogImage:visible").length>0){var f=$("#imagesList img:eq("+parseInt(3+b)+")");prop=GetImgProp(f.parent().parent().attr("id"));$("#dialogTitle").html(prop.Naam);$("#dialogImage").attr("src",prop.FotosGroot);$("#dialogImage").attr("alt","");var e=parseInt(prop.height+40)-$("#dialog").height();var d=parseInt(prop.width+30)-$("#dialog").width();var g=$(window).height();var a=$(window).width();var c=parseInt(($("#dialogImage").height()-prop.height)/2);var h=parseInt(($("#dialogImage").width()-prop.width)/2);$("#dialog").animate({height:"+="+e+"px",width:"+="+d+"px",top:"+="+c+"px",left:"+="+h+"px"},500,"swing")}}function initialScaling(){var a=new String;$("#imagesList img").each(function(c){var b=$(this).parent().parent().attr("id");if(c!=$("#imagesList img").length-1){a+=b.substring(b.lastIndexOf("_")+1,b.length)+","}else{a+=b.substring(b.lastIndexOf("_")+1,b.length)}});articleDataService(a)}function scaleImage(d,b){if(imgCount!=null){scaling=1;var a=1;var c=GetImgProp(d.parent().parent().attr("id"));switch(b){case 4:scaling=1;break;case 3:scaling=0.8;break;case 5:scaling=0.8;break;case 2:scaling=0.5;break;case 6:scaling=0.5;break;default:scaling=0.2}if((c.ThumbWidth/195)>(c.ThumbHeight/145)){a=195/c.ThumbWidth}else{a=145/c.ThumbHeight}varImageWidth=c.ThumbWidth*scaling*a;varImageHeight=c.ThumbHeight*scaling*a;varImagesTop=(145-varImageHeight)/2;varImagesLeft=(195-varImageWidth)/2}}function updateProperties(){var a=$("#imagesList img:eq(4)");prop=GetImgProp(a.parent().parent().attr("id"));$("#labelName").html("Naam: <strong>"+prop.Naam+"</strong>");$("#labelPrice").html("Prijs vanaf: "+prop.Prijs);$("#labelDescription").html("<b>Omschrijving: </b><br />"+prop.Omschrijving);$("#labelColors").html(" ");var d="";if(prop.Hoogte>0){d+="Hoogte: "+prop.Hoogte+" cm    "}if(prop.Breedte>0){d+="Breedte: "+prop.Breedte+" cm    "}if(prop.Diepte>0){d+="Diepte: "+prop.Diepte+" cm    "}$("#labelMeasures").html(d);if(prop.LinkedDocument!=""){$("#labelLinkedDocument").html("Voor productinformatie klik <a href='"+prop.LinkedDocument+"' target='_blank' >hier</a>")}else{$("#labelLinkedDocument").html("")}varCurNi=a.parent().parent().attr("id");$("a.jqbookmark").attr("href","http://"+window.location.hostname+window.location.pathname+"?Art="+prop.NodeId);var f=$("#labelColors");var b=prop.KleurNamen.split(",");var c=prop.KleurenImages.split(",");if(!prop.KleurNamen==""){for(col=0;col<b.length;col++){var e=new Image();e.src=c[col];e.title=b[col];f.append(e)}}$("#askmailart").attr("href",contactUrl+"?artid="+prop.NodeId)}jQuery.timer=function(c,e,b){var d={timer:setTimeout(e,c),callback:null};if(typeof(b)=="function"){d.callback=b}return d};jQuery.clearTimer=function(b){clearTimeout(b.timer);if(typeof(b.callback)=="function"){b.callback()}return this};var arrowimages={down:["downarrowclass","/myimages/menu_more.gif",7],right:["rightarrowclass","/myimages/menu_more.gif"]};var jquerycssmenu={fadesettings:{overduration:350,outduration:100},buildmenu:function(b,a){jQuery(document).ready(function(e){var f=e("#"+b+">ul");var c=f.find("ul").parent();c.each(function(k){var l=e(this);var j=e(this).find("ul:eq(0)");this._dimensions={w:this.offsetWidth,h:this.offsetHeight,subulw:j.outerWidth(),subulh:j.outerHeight()};this.istopheader=l.parents("ul").length==1?true:false;j.css({top:this.istopheader?this._dimensions.h+"px":0});l.children("a:eq(0)").css(this.istopheader?{paddingRight:a.down[2]}:{}).append('<img src="'+(this.istopheader?a.down[1]:a.right[1])+'" class="'+(this.istopheader?a.down[0]:a.right[0])+'" style="border:0;" />');l.hover(function(o){var n=e(this).children("ul:eq(0)");this._offsets={left:e(this).offset().left,top:e(this).offset().top};var m=this.istopheader?0:this._dimensions.w;m=(this._offsets.left+m+this._dimensions.subulw>e(window).width())?(this.istopheader?-this._dimensions.subulw+this._dimensions.w:-this._dimensions.w):m;n.css({left:m+"px"}).fadeIn(jquerycssmenu.fadesettings.overduration)},function(m){e(this).children("ul:eq(0)").fadeOut(jquerycssmenu.fadesettings.outduration)})});var h=location.pathname.toString();var d=h.split("/");var i=d[d.length-1];if(jQuery.browser.msie&&(jQuery.browser.version<7)){var d=h.split("\\");var i=d[d.length-1]}var g=e("#myjquerymenu a[href = /"+i+"]");if(i&&g){}e("#testmenu").click(function(){alert("hoi")});f.find("ul").css({display:"none",visibility:"visible"})})}};jquerycssmenu.buildmenu("myjquerymenu",arrowimages);
