var vergroting_breedte = 800;
var vergroting_hoogte = 600;
var slider_interval = 10000;


function bevestigUrl(vraag,url) {
	if (confirm(vraag)) {
		window.open(url, '_self');
	}
}

function initChoosables() {
	$('.onClickSelectRadioButton').click(function(){
		$(this).find('input').attr('checked','checked');
	});
}

function initTooltip() {
	$('.info-btn').mouseover(function(){
		$(this).parent().parent().find('.tooltip').show('fast');
	}).mouseout(function(){
		$(this).parent().parent().find('.tooltip').hide('fast');
	});
}

function initDetailSlider() {
	// Standaard hoofdfoto kiezen
	var src = $('.grootste').attr('src');
	$('.overflower a:first img:first').addClass('gekozenAfbeelding');

	// Standaard opacity meegeven
	$('.overflower a img').css('opacity', 0.5);
	$('.gekozenAfbeelding').css('opacity', 1);

	// Kleine fotos aanklikbaar maken
	$('.overflower a').click(function(){
		$('.overflower').stop();
		$('#ajax-loader').fadeIn(250);

		var gekozen_afbeelding = $(this).find('img');
		$('.gekozenAfbeelding').removeClass('gekozenAfbeelding');
		gekozen_afbeelding.addClass('gekozenAfbeelding');

		$('.overflower a img').css('opacity', 0.5);
		$('.gekozenAfbeelding').css('opacity', 1);

		$('.grootste').attr('src', $(this).find('img').parent('a').attr('href'));
		$('.grootste').attr('title', $(this).find('img').attr('title'));

		$('#btn-scroll-rechts, #btn-scroll-links').css('visibility','visible');
		if ($(gekozen_afbeelding).parent().prev().find('img').length == 0) {
			$('#btn-scroll-links').css('visibility','hidden');
		}
		if ($(gekozen_afbeelding).parent().next().find('img').length == 0) {
			$('#btn-scroll-rechts').css('visibility','hidden');
		}
		return false;
	});

	// Scroll knoppen
	$('#btn-scroll-rechts').click(function(){
		$('.overflower').stop();
		$('#ajax-loader').fadeIn(250);

		var huidige_afbeelding = $('.gekozenAfbeelding:first');
		var volgende_afbeelding = $(huidige_afbeelding).parent().next().find('img');
		var offset = volgende_afbeelding.outerWidth();

		huidige_afbeelding.removeClass('gekozenAfbeelding');
		volgende_afbeelding.addClass('gekozenAfbeelding');

		$('.overflower a img').css('opacity', 0.5);
		$('.gekozenAfbeelding').css('opacity', 1);

		var vergroting_href = $(volgende_afbeelding).parent('a').attr('href');
		$('.grootste').attr('src', vergroting_href).attr('title', vergroting_href);

		$('#fotonummer').text(($(volgende_afbeelding).parent('a:first').index() + 1));

		$('#btn-scroll-links').css('visibility','visible');
		if (volgende_afbeelding.parent().next().find('img').length == 0) {
			$('#btn-scroll-rechts').css('visibility','hidden');
		}
	});

	$('#btn-scroll-links').click(function(){
		$('.overflower').stop();
		$('#ajax-loader').fadeIn(250);

		var huidige_afbeelding = $('.gekozenAfbeelding:first');
		var vorige_afbeelding = $(huidige_afbeelding).parent().prev().find('img');
		var offset = vorige_afbeelding.outerWidth();

		huidige_afbeelding.removeClass('gekozenAfbeelding');
		vorige_afbeelding.addClass('gekozenAfbeelding');

		$('.overflower a img').css('opacity', 0.5);
		$('.gekozenAfbeelding').css('opacity', 1);

		var vergroting_href = $(vorige_afbeelding).parent('a').attr('href');
		$('.grootste').attr('src', vergroting_href).attr('title', vergroting_href);

		$('#fotonummer').text(($(vorige_afbeelding).parent('a:first').index() + 1));

		$('#btn-scroll-rechts').css('visibility','visible');
		if (vorige_afbeelding.parent().prev().find('img').length == 0) {
			$('#btn-scroll-links').css('visibility','hidden');
		}
	});

	// Vergroting openen
	$('.btn-vergroting, .grootste').click(function(){
		var src = $('.grootste').attr('title');
		if (src.match(/\?/)) {
			var pieces = src.split('?');
			src = pieces[0];
		}
		var source = src+'?w='+vergroting_breedte+'&h='+vergroting_hoogte;
		$('#foto-vergroting').attr('src', source);
		$('#canvas, #canvas-ontop').fadeIn(350);
		$('#btn-sluiten').css('left',$('#foto-vergroting').position().left);
	});

	// Vergroting sluiten
	$('#btn-sluiten').click(function(){
		$('#canvas, #canvas-ontop').fadeOut(250);
	});
}

function hideAjaxLoader() {
	$('#ajax-loader').fadeOut(200);
}

function initesetOnClick(selector) {
	$(selector).focus(function(){
		if (!$(this).hasClass('did-reset')) {
			$(this).addClass('did-reset');
			$(this).val('');
		}
	});
}

function initGroteSlider() {
	setSliderOpacity();
	slideGroteSlider();
}

function setSliderOpacity() {
	$('#grote-slider .box-nummering span').css('opacity', 0.5);
	$('#grote-slider .box-nummering span.active').css('opacity', 1);
}

function slideGroteSlider() {
	window.setTimeout(function(){
		var volgendeNummer = $('#grote-slider .box-nummering span.active').removeClass('active').next()
		if (volgendeNummer.length == 0) {
			$('#grote-slider .box-nummering span:first').addClass('active');
			setSliderOpacity();
			$('#grote-slider .actual-slider').hide().css('margin-left','0px').show();
		} else {
			volgendeNummer.addClass('active');
			setSliderOpacity();
			$('#grote-slider .actual-slider').animate({
				marginLeft: '-=960px'
			}, 950);
		}
		slideGroteSlider();
	}, slider_interval);
}

function initCufon() {
	/*
	 * Copyright (c) 2009 Simo Kinnunen.
	 * Licensed under the MIT license.
	 *
	 * @version 1.09i
	 */
	var Cufon=(function(){var m=function(){return m.replace.apply(null,arguments)};var x=m.DOM={ready:(function(){var C=false,E={loaded:1,complete:1};var B=[],D=function(){if(C){return}C=true;for(var F;F=B.shift();F()){}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",D,false);window.addEventListener("pageshow",D,false)}if(!window.opera&&document.readyState){(function(){E[document.readyState]?D():setTimeout(arguments.callee,10)})()}if(document.readyState&&document.createStyleSheet){(function(){try{document.body.doScroll("left");D()}catch(F){setTimeout(arguments.callee,1)}})()}q(window,"load",D);return function(F){if(!arguments.length){D()}else{C?F():B.push(F)}}})(),root:function(){return document.documentElement||document.body}};var n=m.CSS={Size:function(C,B){this.value=parseFloat(C);this.unit=String(C).match(/[a-z%]*$/)[0]||"px";this.convert=function(D){return D/B*this.value};this.convertFrom=function(D){return D/this.value*B};this.toString=function(){return this.value+this.unit}},addClass:function(C,B){var D=C.className;C.className=D+(D&&" ")+B;return C},color:j(function(C){var B={};B.color=C.replace(/^rgba\((.*?),\s*([\d.]+)\)/,function(E,D,F){B.opacity=parseFloat(F);return"rgb("+D+")"});return B}),fontStretch:j(function(B){if(typeof B=="number"){return B}if(/%$/.test(B)){return parseFloat(B)/100}return{"ultra-condensed":0.5,"extra-condensed":0.625,condensed:0.75,"semi-condensed":0.875,"semi-expanded":1.125,expanded:1.25,"extra-expanded":1.5,"ultra-expanded":2}[B]||1}),getStyle:function(C){var B=document.defaultView;if(B&&B.getComputedStyle){return new a(B.getComputedStyle(C,null))}if(C.currentStyle){return new a(C.currentStyle)}return new a(C.style)},gradient:j(function(F){var G={id:F,type:F.match(/^-([a-z]+)-gradient\(/)[1],stops:[]},C=F.substr(F.indexOf("(")).match(/([\d.]+=)?(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)/ig);for(var E=0,B=C.length,D;E<B;++E){D=C[E].split("=",2).reverse();G.stops.push([D[1]||E/(B-1),D[0]])}return G}),quotedList:j(function(E){var D=[],C=/\s*((["'])([\s\S]*?[^\\])\2|[^,]+)\s*/g,B;while(B=C.exec(E)){D.push(B[3]||B[1])}return D}),recognizesMedia:j(function(G){var E=document.createElement("style"),D,C,B;E.type="text/css";E.media=G;try{E.appendChild(document.createTextNode("/**/"))}catch(F){}C=g("head")[0];C.insertBefore(E,C.firstChild);D=(E.sheet||E.styleSheet);B=D&&!D.disabled;C.removeChild(E);return B}),removeClass:function(D,C){var B=RegExp("(?:^|\\s+)"+C+"(?=\\s|$)","g");D.className=D.className.replace(B,"");return D},supports:function(D,C){var B=document.createElement("span").style;if(B[D]===undefined){return false}B[D]=C;return B[D]===C},textAlign:function(E,D,B,C){if(D.get("textAlign")=="right"){if(B>0){E=" "+E}}else{if(B<C-1){E+=" "}}return E},textShadow:j(function(F){if(F=="none"){return null}var E=[],G={},B,C=0;var D=/(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)|(-?[\d.]+[a-z%]*)|,/ig;while(B=D.exec(F)){if(B[0]==","){E.push(G);G={};C=0}else{if(B[1]){G.color=B[1]}else{G[["offX","offY","blur"][C++]]=B[2]}}}E.push(G);return E}),textTransform:(function(){var B={uppercase:function(C){return C.toUpperCase()},lowercase:function(C){return C.toLowerCase()},capitalize:function(C){return C.replace(/\b./g,function(D){return D.toUpperCase()})}};return function(E,D){var C=B[D.get("textTransform")];return C?C(E):E}})(),whiteSpace:(function(){var D={inline:1,"inline-block":1,"run-in":1};var C=/^\s+/,B=/\s+$/;return function(H,F,G,E){if(E){if(E.nodeName.toLowerCase()=="br"){H=H.replace(C,"")}}if(D[F.get("display")]){return H}if(!G.previousSibling){H=H.replace(C,"")}if(!G.nextSibling){H=H.replace(B,"")}return H}})()};n.ready=(function(){var B=!n.recognizesMedia("all"),E=false;var D=[],H=function(){B=true;for(var K;K=D.shift();K()){}};var I=g("link"),J=g("style");function C(K){return K.disabled||G(K.sheet,K.media||"screen")}function G(M,P){if(!n.recognizesMedia(P||"all")){return true}if(!M||M.disabled){return false}try{var Q=M.cssRules,O;if(Q){search:for(var L=0,K=Q.length;O=Q[L],L<K;++L){switch(O.type){case 2:break;case 3:if(!G(O.styleSheet,O.media.mediaText)){return false}break;default:break search}}}}catch(N){}return true}function F(){if(document.createStyleSheet){return true}var L,K;for(K=0;L=I[K];++K){if(L.rel.toLowerCase()=="stylesheet"&&!C(L)){return false}}for(K=0;L=J[K];++K){if(!C(L)){return false}}return true}x.ready(function(){if(!E){E=n.getStyle(document.body).isUsable()}if(B||(E&&F())){H()}else{setTimeout(arguments.callee,10)}});return function(K){if(B){K()}else{D.push(K)}}})();function s(D){var C=this.face=D.face,B={"\u0020":1,"\u00a0":1,"\u3000":1};this.glyphs=D.glyphs;this.w=D.w;this.baseSize=parseInt(C["units-per-em"],10);this.family=C["font-family"].toLowerCase();this.weight=C["font-weight"];this.style=C["font-style"]||"normal";this.viewBox=(function(){var F=C.bbox.split(/\s+/);var E={minX:parseInt(F[0],10),minY:parseInt(F[1],10),maxX:parseInt(F[2],10),maxY:parseInt(F[3],10)};E.width=E.maxX-E.minX;E.height=E.maxY-E.minY;E.toString=function(){return[this.minX,this.minY,this.width,this.height].join(" ")};return E})();this.ascent=-parseInt(C.ascent,10);this.descent=-parseInt(C.descent,10);this.height=-this.ascent+this.descent;this.spacing=function(L,N,E){var O=this.glyphs,M,K,G,P=[],F=0,J=-1,I=-1,H;while(H=L[++J]){M=O[H]||this.missingGlyph;if(!M){continue}if(K){F-=G=K[H]||0;P[I]-=G}F+=P[++I]=~~(M.w||this.w)+N+(B[H]?E:0);K=M.k}P.total=F;return P}}function f(){var C={},B={oblique:"italic",italic:"oblique"};this.add=function(D){(C[D.style]||(C[D.style]={}))[D.weight]=D};this.get=function(H,I){var G=C[H]||C[B[H]]||C.normal||C.italic||C.oblique;if(!G){return null}I={normal:400,bold:700}[I]||parseInt(I,10);if(G[I]){return G[I]}var E={1:1,99:0}[I%100],K=[],F,D;if(E===undefined){E=I>400}if(I==500){I=400}for(var J in G){if(!k(G,J)){continue}J=parseInt(J,10);if(!F||J<F){F=J}if(!D||J>D){D=J}K.push(J)}if(I<F){I=F}if(I>D){I=D}K.sort(function(M,L){return(E?(M>=I&&L>=I)?M<L:M>L:(M<=I&&L<=I)?M>L:M<L)?-1:1});return G[K[0]]}}function r(){function D(F,G){if(F.contains){return F.contains(G)}return F.compareDocumentPosition(G)&16}function B(G){var F=G.relatedTarget;if(!F||D(this,F)){return}C(this,G.type=="mouseover")}function E(F){C(this,F.type=="mouseenter")}function C(F,G){setTimeout(function(){var H=d.get(F).options;m.replace(F,G?h(H,H.hover):H,true)},10)}this.attach=function(F){if(F.onmouseenter===undefined){q(F,"mouseover",B);q(F,"mouseout",B)}else{q(F,"mouseenter",E);q(F,"mouseleave",E)}}}function u(){var C=[],D={};function B(H){var E=[],G;for(var F=0;G=H[F];++F){E[F]=C[D[G]]}return E}this.add=function(F,E){D[F]=C.push(E)-1};this.repeat=function(){var E=arguments.length?B(arguments):C,F;for(var G=0;F=E[G++];){m.replace(F[0],F[1],true)}}}function A(){var D={},B=0;function C(E){return E.cufid||(E.cufid=++B)}this.get=function(E){var F=C(E);return D[F]||(D[F]={})}}function a(B){var D={},C={};this.extend=function(E){for(var F in E){if(k(E,F)){D[F]=E[F]}}return this};this.get=function(E){return D[E]!=undefined?D[E]:B[E]};this.getSize=function(F,E){return C[F]||(C[F]=new n.Size(this.get(F),E))};this.isUsable=function(){return !!B}}function q(C,B,D){if(C.addEventListener){C.addEventListener(B,D,false)}else{if(C.attachEvent){C.attachEvent("on"+B,function(){return D.call(C,window.event)})}}}function v(C,B){var D=d.get(C);if(D.options){return C}if(B.hover&&B.hoverables[C.nodeName.toLowerCase()]){b.attach(C)}D.options=B;return C}function j(B){var C={};return function(D){if(!k(C,D)){C[D]=B.apply(null,arguments)}return C[D]}}function c(F,E){var B=n.quotedList(E.get("fontFamily").toLowerCase()),D;for(var C=0;D=B[C];++C){if(i[D]){return i[D].get(E.get("fontStyle"),E.get("fontWeight"))}}return null}function g(B){return document.getElementsByTagName(B)}function k(C,B){return C.hasOwnProperty(B)}function h(){var C={},B,F;for(var E=0,D=arguments.length;B=arguments[E],E<D;++E){for(F in B){if(k(B,F)){C[F]=B[F]}}}return C}function o(E,M,C,N,F,D){var K=document.createDocumentFragment(),H;if(M===""){return K}var L=N.separate;var I=M.split(p[L]),B=(L=="words");if(B&&t){if(/^\s/.test(M)){I.unshift("")}if(/\s$/.test(M)){I.push("")}}for(var J=0,G=I.length;J<G;++J){H=z[N.engine](E,B?n.textAlign(I[J],C,J,G):I[J],C,N,F,D,J<G-1);if(H){K.appendChild(H)}}return K}function l(D,M){var C=D.nodeName.toLowerCase();if(M.ignore[C]){return}var E=!M.textless[C];var B=n.getStyle(v(D,M)).extend(M);var F=c(D,B),G,K,I,H,L,J;if(!F){return}for(G=D.firstChild;G;G=I){K=G.nodeType;I=G.nextSibling;if(E&&K==3){if(H){H.appendData(G.data);D.removeChild(G)}else{H=G}if(I){continue}}if(H){D.replaceChild(o(F,n.whiteSpace(H.data,B,H,J),B,M,G,D),H);H=null}if(K==1){if(G.firstChild){if(G.nodeName.toLowerCase()=="cufon"){z[M.engine](F,null,B,M,G,D)}else{arguments.callee(G,M)}}J=G}}}var t=" ".split(/\s+/).length==0;var d=new A();var b=new r();var y=new u();var e=false;var z={},i={},w={autoDetect:false,engine:null,forceHitArea:false,hover:false,hoverables:{a:true},ignore:{applet:1,canvas:1,col:1,colgroup:1,head:1,iframe:1,map:1,optgroup:1,option:1,script:1,select:1,style:1,textarea:1,title:1,pre:1},printable:true,selector:(window.Sizzle||(window.jQuery&&function(B){return jQuery(B)})||(window.dojo&&dojo.query)||(window.Ext&&Ext.query)||(window.YAHOO&&YAHOO.util&&YAHOO.util.Selector&&YAHOO.util.Selector.query)||(window.$$&&function(B){return $$(B)})||(window.$&&function(B){return $(B)})||(document.querySelectorAll&&function(B){return document.querySelectorAll(B)})||g),separate:"words",textless:{dl:1,html:1,ol:1,table:1,tbody:1,thead:1,tfoot:1,tr:1,ul:1},textShadow:"none"};var p={words:/\s/.test("\u00a0")?/[^\S\u00a0]+/:/\s+/,characters:"",none:/^/};m.now=function(){x.ready();return m};m.refresh=function(){y.repeat.apply(y,arguments);return m};m.registerEngine=function(C,B){if(!B){return m}z[C]=B;return m.set("engine",C)};m.registerFont=function(D){if(!D){return m}var B=new s(D),C=B.family;if(!i[C]){i[C]=new f()}i[C].add(B);return m.set("fontFamily",'"'+C+'"')};m.replace=function(D,C,B){C=h(w,C);if(!C.engine){return m}if(!e){n.addClass(x.root(),"cufon-active cufon-loading");n.ready(function(){n.addClass(n.removeClass(x.root(),"cufon-loading"),"cufon-ready")});e=true}if(C.hover){C.forceHitArea=true}if(C.autoDetect){delete C.fontFamily}if(typeof C.textShadow=="string"){C.textShadow=n.textShadow(C.textShadow)}if(typeof C.color=="string"&&/^-/.test(C.color)){C.textGradient=n.gradient(C.color)}else{delete C.textGradient}if(!B){y.add(D,arguments)}if(D.nodeType||typeof D=="string"){D=[D]}n.ready(function(){for(var F=0,E=D.length;F<E;++F){var G=D[F];if(typeof G=="string"){m.replace(C.selector(G),C,true)}else{l(G,C)}}});return m};m.set=function(B,C){w[B]=C;return m};return m})();Cufon.registerEngine("vml",(function(){var e=document.namespaces;if(!e){return}e.add("cvml","urn:schemas-microsoft-com:vml");e=null;var b=document.createElement("cvml:shape");b.style.behavior="url(#default#VML)";if(!b.coordsize){return}b=null;var h=(document.documentMode||0)<8;document.write(('<style type="text/css">cufoncanvas{text-indent:0;}@media screen{cvml\\:shape,cvml\\:rect,cvml\\:fill,cvml\\:shadow{behavior:url(#default#VML);display:block;antialias:true;position:absolute;}cufoncanvas{position:absolute;text-align:left;}cufon{display:inline-block;position:relative;vertical-align:'+(h?"middle":"text-bottom")+";}cufon cufontext{position:absolute;left:-10000in;font-size:1px;}a cufon{cursor:pointer}}@media print{cufon cufoncanvas{display:none;}}</style>").replace(/;/g,"!important;"));function c(i,j){return a(i,/(?:em|ex|%)$|^[a-z-]+$/i.test(j)?"1em":j)}function a(l,m){if(m==="0"){return 0}if(/px$/i.test(m)){return parseFloat(m)}var k=l.style.left,j=l.runtimeStyle.left;l.runtimeStyle.left=l.currentStyle.left;l.style.left=m.replace("%","em");var i=l.style.pixelLeft;l.style.left=k;l.runtimeStyle.left=j;return i}function f(l,k,j,n){var i="computed"+n,m=k[i];if(isNaN(m)){m=k.get(n);k[i]=m=(m=="normal")?0:~~j.convertFrom(a(l,m))}return m}var g={};function d(p){var q=p.id;if(!g[q]){var n=p.stops,o=document.createElement("cvml:fill"),i=[];o.type="gradient";o.angle=180;o.focus="0";o.method="sigma";o.color=n[0][1];for(var m=1,l=n.length-1;m<l;++m){i.push(n[m][0]*100+"% "+n[m][1])}o.colors=i.join(",");o.color2=n[l][1];g[q]=o}return g[q]}return function(ac,G,Y,C,K,ad,W){var n=(G===null);if(n){G=K.alt}var I=ac.viewBox;var p=Y.computedFontSize||(Y.computedFontSize=new Cufon.CSS.Size(c(ad,Y.get("fontSize"))+"px",ac.baseSize));var y,q;if(n){y=K;q=K.firstChild}else{y=document.createElement("cufon");y.className="cufon cufon-vml";y.alt=G;q=document.createElement("cufoncanvas");y.appendChild(q);if(C.printable){var Z=document.createElement("cufontext");Z.appendChild(document.createTextNode(G));y.appendChild(Z)}if(!W){y.appendChild(document.createElement("cvml:shape"))}}var ai=y.style;var R=q.style;var l=p.convert(I.height),af=Math.ceil(l);var V=af/l;var P=V*Cufon.CSS.fontStretch(Y.get("fontStretch"));var U=I.minX,T=I.minY;R.height=af;R.top=Math.round(p.convert(T-ac.ascent));R.left=Math.round(p.convert(U));ai.height=p.convert(ac.height)+"px";var F=Y.get("color");var ag=Cufon.CSS.textTransform(G,Y).split("");var L=ac.spacing(ag,f(ad,Y,p,"letterSpacing"),f(ad,Y,p,"wordSpacing"));if(!L.length){return null}var k=L.total;var x=-U+k+(I.width-L[L.length-1]);var ah=p.convert(x*P),X=Math.round(ah);var O=x+","+I.height,m;var J="r"+O+"ns";var u=C.textGradient&&d(C.textGradient);var o=ac.glyphs,S=0;var H=C.textShadow;var ab=-1,aa=0,w;while(w=ag[++ab]){var D=o[ag[ab]]||ac.missingGlyph,v;if(!D){continue}if(n){v=q.childNodes[aa];while(v.firstChild){v.removeChild(v.firstChild)}}else{v=document.createElement("cvml:shape");q.appendChild(v)}v.stroked="f";v.coordsize=O;v.coordorigin=m=(U-S)+","+T;v.path=(D.d?"m"+D.d+"xe":"")+"m"+m+J;v.fillcolor=F;if(u){v.appendChild(u.cloneNode(false))}var ae=v.style;ae.width=X;ae.height=af;if(H){var s=H[0],r=H[1];var B=Cufon.CSS.color(s.color),z;var N=document.createElement("cvml:shadow");N.on="t";N.color=B.color;N.offset=s.offX+","+s.offY;if(r){z=Cufon.CSS.color(r.color);N.type="double";N.color2=z.color;N.offset2=r.offX+","+r.offY}N.opacity=B.opacity||(z&&z.opacity)||1;v.appendChild(N)}S+=L[aa++]}var M=v.nextSibling,t,A;if(C.forceHitArea){if(!M){M=document.createElement("cvml:rect");M.stroked="f";M.className="cufon-vml-cover";t=document.createElement("cvml:fill");t.opacity=0;M.appendChild(t);q.appendChild(M)}A=M.style;A.width=X;A.height=af}else{if(M){q.removeChild(M)}}ai.width=Math.max(Math.ceil(p.convert(k*P)),0);if(h){var Q=Y.computedYAdjust;if(Q===undefined){var E=Y.get("lineHeight");if(E=="normal"){E="1em"}else{if(!isNaN(E)){E+="em"}}Y.computedYAdjust=Q=0.5*(a(ad,E)-parseFloat(ai.height))}if(Q){ai.marginTop=Math.ceil(Q)+"px";ai.marginBottom=Q+"px"}}return y}})());Cufon.registerEngine("canvas",(function(){var b=document.createElement("canvas");if(!b||!b.getContext||!b.getContext.apply){return}b=null;var a=Cufon.CSS.supports("display","inline-block");var e=!a&&(document.compatMode=="BackCompat"||/frameset|transitional/i.test(document.doctype.publicId));var f=document.createElement("style");f.type="text/css";f.appendChild(document.createTextNode(("cufon{text-indent:0;}@media screen,projection{cufon{display:inline;display:inline-block;position:relative;vertical-align:middle;"+(e?"":"font-size:1px;line-height:1px;")+"}cufon cufontext{display:-moz-inline-box;display:inline-block;width:0;height:0;overflow:hidden;text-indent:-10000in;}"+(a?"cufon canvas{position:relative;}":"cufon canvas{position:absolute;}")+"}@media print{cufon{padding:0;}cufon canvas{display:none;}}").replace(/;/g,"!important;")));document.getElementsByTagName("head")[0].appendChild(f);function d(p,h){var n=0,m=0;var g=[],o=/([mrvxe])([^a-z]*)/g,k;generate:for(var j=0;k=o.exec(p);++j){var l=k[2].split(",");switch(k[1]){case"v":g[j]={m:"bezierCurveTo",a:[n+~~l[0],m+~~l[1],n+~~l[2],m+~~l[3],n+=~~l[4],m+=~~l[5]]};break;case"r":g[j]={m:"lineTo",a:[n+=~~l[0],m+=~~l[1]]};break;case"m":g[j]={m:"moveTo",a:[n=~~l[0],m=~~l[1]]};break;case"x":g[j]={m:"closePath"};break;case"e":break generate}h[g[j].m].apply(h,g[j].a)}return g}function c(m,k){for(var j=0,h=m.length;j<h;++j){var g=m[j];k[g.m].apply(k,g.a)}}return function(V,w,P,t,C,W){var k=(w===null);if(k){w=C.getAttribute("alt")}var A=V.viewBox;var m=P.getSize("fontSize",V.baseSize);var B=0,O=0,N=0,u=0;var z=t.textShadow,L=[];if(z){for(var U=z.length;U--;){var F=z[U];var K=m.convertFrom(parseFloat(F.offX));var I=m.convertFrom(parseFloat(F.offY));L[U]=[K,I];if(I<B){B=I}if(K>O){O=K}if(I>N){N=I}if(K<u){u=K}}}var Z=Cufon.CSS.textTransform(w,P).split("");var E=V.spacing(Z,~~m.convertFrom(parseFloat(P.get("letterSpacing"))||0),~~m.convertFrom(parseFloat(P.get("wordSpacing"))||0));if(!E.length){return null}var h=E.total;O+=A.width-E[E.length-1];u+=A.minX;var s,n;if(k){s=C;n=C.firstChild}else{s=document.createElement("cufon");s.className="cufon cufon-canvas";s.setAttribute("alt",w);n=document.createElement("canvas");s.appendChild(n);if(t.printable){var S=document.createElement("cufontext");S.appendChild(document.createTextNode(w));s.appendChild(S)}}var aa=s.style;var H=n.style;var j=m.convert(A.height);var Y=Math.ceil(j);var M=Y/j;var G=M*Cufon.CSS.fontStretch(P.get("fontStretch"));var J=h*G;var Q=Math.ceil(m.convert(J+O-u));var o=Math.ceil(m.convert(A.height-B+N));n.width=Q;n.height=o;H.width=Q+"px";H.height=o+"px";B+=A.minY;H.top=Math.round(m.convert(B-V.ascent))+"px";H.left=Math.round(m.convert(u))+"px";var r=Math.max(Math.ceil(m.convert(J)),0)+"px";if(a){aa.width=r;aa.height=m.convert(V.height)+"px"}else{aa.paddingLeft=r;aa.paddingBottom=(m.convert(V.height)-1)+"px"}var X=n.getContext("2d"),D=j/A.height;X.scale(D,D*M);X.translate(-u,-B);X.save();function T(){var x=V.glyphs,ab,l=-1,g=-1,y;X.scale(G,1);while(y=Z[++l]){var ab=x[Z[l]]||V.missingGlyph;if(!ab){continue}if(ab.d){X.beginPath();if(ab.code){c(ab.code,X)}else{ab.code=d("m"+ab.d,X)}X.fill()}X.translate(E[++g],0)}X.restore()}if(z){for(var U=z.length;U--;){var F=z[U];X.save();X.fillStyle=F.color;X.translate.apply(X,L[U]);T()}}var q=t.textGradient;if(q){var v=q.stops,p=X.createLinearGradient(0,A.minY,0,A.maxY);for(var U=0,R=v.length;U<R;++U){p.addColorStop.apply(p,v[U])}X.fillStyle=p}else{X.fillStyle=P.get("color")}T();return s}})());
	/*!
	 * The following copyright notice may not be removed under any circumstances.
	 * 
	 * Copyright:
	 * Copyright (c) Scangraphic Prepress Technology GmbH, 1988 - 2003. Veronika
	 * Elsner, Guenther Flake GbR, Hamburg 2004
	 * 
	 * Trademark:
	 * Today Sans Serif is a Trademark or Registered Trademark of Scangraphic Prepress
	 * Technology GmbH
	 * 
	 * Manufacturer:
	 * Veronika Elsner, Guenther Flake GbR, Hamburg
	 * 
	 * Vendor URL:
	 * www.elsner-flake.com
	 */
	Cufon.registerFont({"w":50,"face":{"font-family":"TodaySHOP-XLightItalic","font-weight":400,"font-style":"italic","font-stretch":"normal","units-per-em":"360","panose-1":"2 0 5 6 3 0 0 2 0 3","ascent":"288","descent":"-72","x-height":"4","bbox":"-54 -294 340 100","underline-thickness":"8.28","underline-position":"-38.88","stemh":"10","stemv":"10","unicode-range":"U+0020-U+017E"},"glyphs":{" ":{"w":61},"\u00e9":{"d":"103,-32v-27,54,-95,48,-95,-25v0,-54,33,-104,69,-104v21,0,33,12,32,30v-2,32,-55,58,-91,69v-6,64,52,73,78,24xm19,-70v29,-10,79,-37,79,-64v0,-11,-8,-18,-21,-18v-28,0,-52,34,-58,82xm100,-244r14,2r-48,48r-8,-1","w":111},"\u0178":{"d":"82,-121r91,-117r10,4r-96,123r-17,111r-11,0r16,-111r-52,-123r10,-4xm78,-267v-1,-11,16,-17,17,-4v1,11,-16,18,-17,4xm128,-267v-1,-12,15,-17,16,-4v1,10,-16,18,-16,4","w":159},"\u0160":{"d":"110,-60v16,-35,-96,-82,-83,-123v-1,-51,68,-75,107,-40r-5,10v-32,-28,-85,-18,-90,28v-5,48,83,68,83,124v0,65,-87,86,-128,39r2,-14v31,44,115,38,114,-24xm142,-292r-45,49r-5,0r-23,-49r9,-2r19,40r36,-40","w":134},"\u017d":{"d":"37,-236r148,0r2,4r-179,222r150,0r-1,10r-165,0r-2,-4r180,-222r-135,0xm161,-292r-45,49r-5,0r-23,-49r9,-2r19,40r36,-40","w":171},"\u0161":{"d":"66,-42v9,-20,-57,-53,-50,-79v-1,-34,41,-50,71,-33r-1,10v-24,-13,-59,-8,-59,21v0,29,50,50,50,80v0,46,-58,61,-87,31r3,-11v24,27,73,23,73,-19xm107,-242r-45,49r-4,0r-23,-49r9,-2r18,40r36,-40","w":89},"\u017e":{"d":"105,-156r3,4r-101,143r82,0r-2,9r-93,0r-2,-4r101,-143r-73,0r1,-9r84,0xm113,-242r-45,49r-4,0r-23,-49r9,-2r18,40r36,-40","w":100},"!":{"d":"48,-236r14,0r-32,191r-8,0xm12,-8v-1,-13,18,-17,18,-3v1,14,-19,20,-18,3","w":55},"\"":{"d":"62,-243r10,1v-6,32,-20,57,-44,84r-8,-3v23,-27,35,-51,42,-82xm100,-243r9,1v-6,32,-19,57,-43,84r-8,-3v23,-27,35,-51,42,-82","w":95},"#":{"d":"168,-90r-2,7r-38,0r-26,83r-7,0r26,-83r-53,0r-26,83r-7,0r26,-83r-38,0r2,-7r38,0r18,-57r-39,0v2,-13,27,-5,40,-7r26,-82r7,0r-25,82r52,0r26,-82r7,0r-26,82r38,0r-2,7r-38,0r-17,57r38,0xm140,-147r-53,0r-17,57r53,0","w":197},"$":{"d":"37,-175v0,50,75,64,75,113v0,34,-22,58,-57,61r-5,32r-10,0r5,-32v-22,-3,-31,-7,-50,-24r2,-13v30,42,104,34,104,-23v0,-15,-5,-25,-19,-38v-5,-4,8,4,-33,-28v-39,-31,-26,-95,28,-99r5,-29r9,0r-4,29v16,2,22,5,37,15r-6,9v-28,-28,-81,-15,-81,27","w":123},"%":{"d":"24,-112v-22,-37,4,-115,45,-118v47,-4,35,81,15,109v-16,22,-46,32,-60,9xm68,-221v-21,1,-39,35,-41,77v-3,51,44,42,57,4v8,-25,18,-83,-16,-81xm169,-232r8,2r-125,232r-9,-2xm149,0v-49,0,-31,-80,-12,-110v21,-32,65,-27,65,20v0,40,-17,90,-53,90xm168,-122v-21,1,-39,34,-41,77v-3,50,44,43,56,5v8,-24,19,-84,-15,-82","w":208},"&":{"d":"26,-66v6,39,37,59,77,59v69,0,123,-64,130,-142r-48,0r2,-9r100,0r-1,9r-42,0v-8,86,-67,150,-144,153v-95,4,-109,-126,-55,-183v17,-19,35,-29,56,-31v22,-2,38,13,38,34v0,60,-59,85,-113,110xm24,-74v51,-22,104,-53,104,-101v0,-16,-12,-26,-29,-24v-46,5,-81,62,-75,125","w":278},"(":{"d":"95,-255v-69,55,-91,187,-41,274r-9,3v-30,-54,-42,-135,-13,-202v13,-31,30,-56,56,-80","w":72},")":{"d":"-11,18v68,-57,94,-187,41,-274r9,-4v31,53,42,135,13,202v-13,31,-30,56,-56,80","w":73},"*":{"d":"98,-255r-10,54r52,-14r1,11r-52,10r27,47r-9,4r-24,-46r-37,40r-7,-8r39,-37r-50,-25r5,-10r48,28r6,-55","w":131},"+":{"d":"21,-118r70,0r11,-70r7,0r-11,70r71,0r-1,7r-71,0r-10,71r-8,0r11,-71r-71,0","w":177},",":{"d":"10,-37r10,1v-6,32,-21,63,-46,90r-8,-4v24,-29,37,-54,44,-87","w":37,"k":{"1":18}},"-":{"d":"77,-89r-1,9r-66,0r2,-9r65,0","w":86,"k":{"z":10,"Y":42,"W":35,"V":35,"T":49,"J":28,"A":14}},".":{"d":"1,-8v-1,-13,18,-17,18,-3v1,14,-19,20,-18,3","w":40,"k":{"1":18}},"\/":{"d":"132,-256r10,2r-141,273r-9,-3","w":121},"0":{"d":"155,-150v1,64,-29,155,-88,154v-37,0,-58,-37,-54,-94v6,-83,42,-142,87,-142v36,0,55,29,55,82xm68,-6v52,0,76,-84,76,-145v0,-46,-16,-71,-46,-71v-38,0,-69,57,-74,133v-3,52,13,83,44,83","w":158},"1":{"d":"102,-230r-35,230r-10,0r32,-217v-27,16,-51,29,-69,37r-4,-8r82,-45","w":100},"2":{"d":"138,-175v-3,66,-87,123,-128,165r127,0r-3,10r-140,0r-3,-5r52,-49v54,-58,70,-57,83,-121v0,-52,-65,-62,-92,-22r-6,-9v32,-45,112,-29,110,31","w":150,"k":{"7":10}},"3":{"d":"109,-65v0,-40,-32,-57,-76,-52r2,-9v47,7,79,-20,80,-53v2,-48,-61,-55,-87,-24r-4,-10v34,-34,104,-23,102,32v0,28,-17,50,-45,59v68,21,39,126,-33,126v-22,0,-40,-8,-57,-22r4,-11v34,41,114,24,114,-36","w":130,"k":{"7":14}},"4":{"d":"144,-231r-22,147r40,0r-1,9r-40,0r-12,75r-10,0r11,-75r-106,0r-2,-4r138,-155xm111,-84r20,-129r-112,129r92,0","w":163,"k":{"7":14,"1":14}},"5":{"d":"114,-74v-2,-39,-30,-61,-77,-61r27,-93r80,0r-3,10r-68,0r-22,75v45,1,74,29,75,68v4,71,-87,103,-135,58r3,-11v42,42,123,20,120,-46","w":134,"k":{"7":7}},"6":{"d":"73,4v-76,0,-74,-116,-31,-170v28,-36,62,-60,114,-73r-2,10v-66,22,-98,45,-124,110v39,-41,113,-23,113,41v0,49,-27,82,-70,82xm132,-75v0,-62,-82,-70,-105,-31v-16,49,5,98,48,100v36,2,57,-30,57,-69","w":152,"k":{"7":7}},"7":{"d":"24,-228r136,0r2,4r-147,228r-10,-4r141,-218r-123,0","w":141,"k":{":":21,"8":7,"6":21,"4":35,"2":7,".":21,",":21}},"8":{"d":"146,-181v0,31,-26,51,-59,61v26,26,41,36,45,68v4,31,-25,56,-61,56v-37,0,-65,-25,-65,-59v0,-33,28,-54,64,-65v-24,-20,-39,-31,-39,-62v0,-27,25,-50,56,-50v34,0,59,23,59,51xm81,-125v32,-14,53,-24,53,-57v0,-22,-21,-40,-47,-40v-44,1,-63,50,-27,78xm76,-113v-35,11,-58,26,-58,58v0,28,23,49,54,49v54,-1,64,-59,25,-89v-3,-4,-18,-16,-21,-18","w":144,"k":{"7":10}},"9":{"d":"5,9r2,-12v61,-10,106,-51,124,-110v-37,41,-111,21,-111,-42v0,-44,26,-77,64,-77v97,0,70,145,16,193v-29,25,-56,42,-95,48xm32,-156v0,63,80,67,104,27v12,-48,-11,-97,-53,-93v-31,3,-51,28,-51,66","w":150,"k":{"7":14}},":":{"d":"10,-10v-1,-13,19,-19,19,-4v1,14,-19,20,-19,4xm30,-144v-1,-14,18,-16,19,-3v1,15,-19,20,-19,3"},";":{"d":"24,-37r10,1v-6,32,-21,63,-46,90r-8,-4v24,-29,37,-54,44,-87xm30,-144v-1,-13,18,-17,18,-3v1,14,-19,20,-18,3"},"<":{"d":"111,-144r4,8r-51,58r34,58r-7,8r-38,-66xm66,-144r4,8r-51,58r34,58r-7,8r-38,-66","w":116},"=":{"d":"17,-141r145,0r-1,7r-146,0xm9,-94r146,0r-1,7r-146,0","w":177},">":{"d":"5,-12r-4,-9r50,-58r-33,-57r6,-8r39,65xm50,-12r-4,-9r50,-58r-33,-57r6,-8r39,65","w":116},"?":{"d":"33,-220r-1,-9v36,-25,90,-5,89,37v0,20,-11,38,-34,60v-41,39,-46,48,-49,87r-11,0v-4,-74,80,-87,82,-147v1,-35,-47,-49,-76,-28xm21,-8v-1,-14,18,-16,19,-3v1,15,-19,20,-19,3","w":114},"A":{"d":"143,-91r-97,0r-50,91r-12,0r135,-243r5,0r48,243r-11,0xm141,-100r-23,-123r-67,123r90,0","w":179,"k":{"y":14,"w":14,"v":14,"t":7,"s":-7,"Y":39,"W":31,"V":31,"U":7,"T":45,"Q":10,"O":10,"G":10,"C":10,"-":7,"*":35}},"B":{"d":"142,-66v1,61,-65,74,-133,63r35,-233v57,-9,95,5,95,52v0,29,-17,49,-45,58v33,9,48,28,48,60xm39,-130v50,6,88,-15,88,-54v0,-34,-32,-49,-73,-43xm22,-13v50,11,108,-3,108,-52v0,-46,-40,-61,-92,-56","w":153,"k":{"Y":21,"X":7,"W":14,"V":14,"T":28}},"C":{"d":"14,-95v0,-89,91,-186,179,-127r-5,10v-80,-56,-162,31,-162,118v0,84,91,112,145,62r-1,13v-65,49,-156,17,-156,-76","w":181,"k":{"y":21,"o":7,"e":7,"a":7,"O":14,"A":-4}},"D":{"d":"203,-127v0,96,-82,146,-194,124r35,-233v90,-12,160,27,159,109xm22,-13v95,21,166,-24,169,-114v2,-70,-55,-107,-137,-99","w":208,"k":{"Y":28,"X":21,"W":14,"V":14,"T":35,"A":7}},"E":{"d":"54,-226r-14,96r82,0r-2,9r-82,0r-16,111r115,0r-3,10r-125,0r35,-236r104,0r-2,10r-92,0","w":147,"k":{"y":10,"w":10,"v":10,"q":7,"d":7,"c":7,"Y":10,"W":7,"V":7,"T":14,"Q":14,"G":14,"C":14}},"F":{"d":"54,-226r-15,99r81,0r-2,10r-80,0r-18,117r-11,0r35,-236r102,0r-2,10r-90,0","w":124,"k":{"u":7,"r":7,"o":7,"e":7,"a":7,"A":21,".":28,",":28}},"G":{"d":"14,-96v4,-67,53,-144,124,-144v25,0,46,8,65,23r-5,10v-80,-67,-172,23,-172,113v0,81,88,114,143,67r11,-73r-64,0r1,-10r76,0r-13,89v-64,52,-172,22,-166,-75","w":207,"k":{"Y":18,"V":10,"T":18}},"H":{"d":"40,-130r137,0r16,-106r11,0r-35,236r-12,0r19,-121r-138,0r-18,121r-11,0r35,-236r11,0","w":201},"I":{"d":"55,-236r-35,236r-11,0r35,-236r11,0","w":52},"J":{"d":"105,-236r-34,211v-9,31,-54,36,-81,20r2,-13v35,23,66,15,75,-41r27,-177r11,0","w":101},"K":{"d":"55,-236r-18,116r130,-120r8,5r-110,102r92,133r-14,0r-86,-126r-22,20r-16,106r-11,0r35,-236r12,0","w":164,"k":{"y":24,"u":7,"o":10,"e":14,"a":7,"W":7,"V":7,"T":7,"O":21,"G":21,"C":21,"-":21}},"L":{"d":"55,-236r-33,226r99,0r-3,10r-109,0r35,-236r11,0","w":131,"k":{"y":21,"u":7,"o":7,"e":7,"Y":49,"W":53,"V":53,"U":21,"T":53,"O":28,"G":28,"C":28,"-":28}},"M":{"d":"126,-36v1,6,2,28,5,15r110,-222r6,0r6,243r-11,0r-5,-218v-29,70,-73,148,-107,218r-9,0r-34,-219r-83,219r-11,0r94,-243r6,0","w":270,"k":{"Y":18,"W":14,"V":14,"O":7}},"N":{"d":"181,-16r32,-220r10,0r-35,237r-7,2r-130,-223r-32,220r-10,0r35,-237r6,-2","w":219},"O":{"d":"14,-93v1,-67,50,-147,115,-147v49,0,81,37,81,93v1,73,-41,153,-116,151v-50,-1,-81,-39,-80,-97xm97,-7v66,0,101,-75,101,-140v0,-49,-29,-82,-71,-82v-60,0,-101,76,-101,138v0,51,28,84,71,84","w":213,"k":{"Y":28,"X":24,"W":14,"V":14,"T":28,"M":10,"A":10}},"P":{"d":"9,0r35,-236v54,-9,103,9,103,59v0,54,-49,77,-111,69r-16,108r-11,0xm54,-227r-16,108v52,9,97,-11,97,-58v0,-40,-35,-57,-81,-50","w":139,"k":{"o":14,"e":14,"a":18,"Y":7,"A":28,".":35,",":35}},"Q":{"d":"147,-12v23,24,56,40,96,53r-12,9v-42,-15,-69,-31,-93,-56v-63,30,-128,-13,-124,-87v3,-67,49,-147,115,-147v49,0,81,37,81,93v0,58,-24,108,-63,135xm97,-7v66,0,101,-75,101,-140v0,-49,-29,-82,-71,-82v-60,0,-101,76,-101,138v0,51,28,84,71,84","w":213},"R":{"d":"9,0r35,-236v56,-9,100,8,99,58v0,32,-20,55,-55,65r68,113r-14,0r-65,-111r-40,0r-17,111r-11,0xm131,-177v0,-40,-30,-56,-77,-50r-16,106v52,6,93,-12,93,-56","w":163,"k":{"y":18,"u":7,"o":10,"e":10,"a":7,"Y":28,"W":21,"V":21,"U":14,"T":35,"O":21,"N":7,"G":21,"C":21,"-":21}},"S":{"d":"110,-60v16,-35,-96,-82,-83,-123v-1,-51,68,-75,107,-40r-5,10v-32,-28,-85,-18,-90,28v-5,48,83,68,83,124v0,65,-87,86,-128,39r2,-14v31,44,115,38,114,-24","w":134,"k":{"y":10,"t":10,"Y":14,"T":10}},"T":{"d":"114,-226r-34,226r-12,0r34,-226r-78,0r2,-10r168,0r-2,10r-78,0","w":172,"k":{"y":56,"w":56,"v":56,"u":56,"s":56,"r":56,"o":56,"i":7,"g":56,"e":56,"c":56,"a":56,"T":21,"O":28,"G":28,"C":28,"A":42,";":28,":":28,".":35,"-":35,",":35}},"U":{"d":"55,-236v-7,58,-21,114,-24,176v-3,62,102,70,124,22v21,-47,25,-137,37,-198r12,0v-23,93,0,241,-111,240v-57,-1,-80,-38,-71,-97r21,-143r12,0","w":199,"k":{"A":7,".":7,",":7}},"V":{"d":"33,-238r43,226r123,-226r9,4r-129,234r-10,0r-46,-234","w":184,"k":{"y":14,"u":24,"r":18,"o":28,"g":28,"e":28,"a":31,"O":14,"M":21,"G":14,"C":14,"A":35,";":14,":":14,".":28,"-":28,",":28}},"W":{"d":"136,-238r36,226r118,-226r10,4r-125,234r-9,0r-24,-138r-68,138r-9,0r-41,-234r11,-4r37,225r68,-138r-14,-83","w":276,"k":{"y":14,"u":21,"r":21,"o":28,"e":28,"a":31,"O":14,"M":21,"G":14,"C":14,"A":35,";":14,":":14,".":28,"-":28,",":28}},"X":{"d":"96,-134r85,-105r9,5r-89,109r64,123r-11,5r-60,-120r-95,120r-10,-5r101,-123r-57,-109r11,-5","w":176,"k":{"y":21,"u":7,"o":10,"e":10,"a":7,"Q":24,"O":24,"G":24,"C":24,"-":21}},"Y":{"d":"82,-121r91,-117r10,4r-96,123r-17,111r-11,0r16,-111r-52,-123r10,-4","w":159,"k":{"u":28,"r":28,"p":28,"o":53,"n":28,"m":28,"g":49,"e":53,"a":53,"O":21,"M":18,"G":21,"C":21,"A":39,";":21,":":21,".":35,"-":35,",":35}},"Z":{"d":"37,-236r148,0r2,4r-179,222r150,0r-1,10r-165,0r-2,-4r180,-222r-135,0","w":171,"k":{"y":21}},"[":{"d":"100,-255r-2,8r-43,0r-38,257r42,0r-2,9r-52,0r41,-274r54,0","w":77},"]":{"d":"-11,19r3,-9r42,0r39,-257r-43,0r2,-8r52,0r-41,274r-54,0","w":78},"^":{"d":"143,-91r-97,0r-50,91r-12,0r135,-243r5,0r48,243r-11,0xm141,-100r-23,-123r-67,123r90,0xm76,-234v-1,-12,17,-18,17,-3v0,12,-17,18,-17,3xm148,-234v-1,-12,17,-18,17,-3v1,13,-17,17,-17,3","w":179},"_":{"d":"-18,42r143,0r-2,9r-143,0","w":142},"a":{"d":"124,-156r-18,132v-2,13,7,19,17,15v-1,5,-1,13,-8,10v-27,2,-20,-35,-16,-56v-16,36,-27,53,-59,59v-57,-1,-29,-107,-4,-136v20,-23,49,-34,88,-24xm101,-72r11,-76v-67,-20,-95,51,-95,108v0,55,51,37,69,-3v4,-7,5,-9,15,-29","w":133,"k":{"z":-7,"y":4,"w":4,"v":4,"t":4,"f":4}},"b":{"d":"125,-116v1,63,-47,151,-116,109r37,-248r10,0r-24,155v22,-44,38,-60,59,-60v23,0,34,14,34,44xm31,-84r-11,71v60,31,94,-42,94,-107v0,-20,-12,-33,-28,-30v-18,3,-31,18,-55,66","w":131,"k":{"t":4,"f":4}},"c":{"d":"8,-53v0,-56,52,-147,101,-91r-8,7v-18,-30,-53,-11,-66,17v-16,33,-28,114,13,114v17,0,30,-8,41,-25r6,7v-25,44,-87,37,-87,-29","w":103,"k":{"s":-4,"o":7,"k":7,"h":7,"e":7,"c":7,"a":7,"-":14,"\u00e9":7}},"d":{"d":"139,-255r-33,231v-2,13,7,19,17,15v-1,5,-1,13,-8,10v-27,2,-20,-35,-16,-56v-18,36,-25,55,-59,59v-24,3,-38,-18,-34,-54v8,-75,46,-124,107,-107r15,-98r11,0xm101,-72r11,-76v-66,-20,-95,50,-95,108v0,55,51,37,69,-3v4,-7,5,-9,15,-29","w":133},"e":{"d":"103,-32v-27,54,-95,48,-95,-25v0,-54,33,-104,69,-104v21,0,33,12,32,30v-2,32,-55,58,-91,69v-6,64,52,73,78,24xm19,-70v29,-10,79,-37,79,-64v0,-11,-8,-18,-21,-18v-28,0,-52,34,-58,82","w":111},"f":{"d":"85,-156r-1,9r-36,0v-10,62,-17,172,-34,216v-9,21,-33,34,-59,27r1,-10v47,13,56,-32,61,-76r20,-157r-29,0r1,-9r30,0v7,-59,9,-108,73,-99r-1,10v-54,-10,-55,33,-62,89r36,0","w":71,"k":{"t":7,"o":10,"e":10,"c":10,"a":10,"\u00e9":10}},"g":{"d":"12,-86v0,-62,62,-104,91,-51v20,-20,22,-26,38,-23r-1,12v-15,-3,-21,3,-36,17v8,50,-22,103,-67,87v-18,15,-20,21,-1,32v26,15,73,19,73,54v0,32,-32,57,-72,57v-35,0,-59,-19,-59,-45v0,-28,31,-45,59,-54v-28,-10,-36,-28,-6,-46v-13,-9,-19,-22,-19,-40xm66,-151v-24,0,-43,28,-43,65v0,21,10,34,26,35v24,2,43,-23,46,-60v2,-24,-9,-40,-29,-40xm45,3v-36,16,-56,18,-56,51v0,20,21,36,49,36v45,0,80,-41,47,-68v-3,-3,-27,-13,-40,-19","w":123,"k":{"t":7,"o":7,"a":7,",":-28}},"h":{"d":"57,-255r-25,159v16,-31,31,-60,61,-65v29,-4,31,28,27,57r-16,104r-11,0r18,-125v3,-39,-36,-28,-50,-6v-9,15,-22,33,-30,52r-12,79r-11,0r38,-255r11,0","w":134,"k":{"y":7,"w":7,"v":7,"t":4}},"i":{"d":"42,-156r-24,156r-10,0r23,-156r11,0xm37,-217v-1,-12,17,-18,17,-3v1,13,-17,17,-17,3"},"j":{"d":"42,-156r-23,150v-7,47,-9,56,-15,71v-10,23,-29,33,-58,31r0,-10v52,7,55,-42,62,-89r23,-153r11,0xm37,-217v-1,-12,17,-18,17,-3v1,13,-17,17,-17,3"},"k":{"d":"57,-255r-25,161v23,-46,42,-65,64,-66v17,-1,29,9,29,26v0,22,-20,43,-61,66r45,68r-12,0r-46,-69v45,-24,64,-45,63,-66v-11,-32,-45,-11,-60,15v-8,12,-13,20,-24,41r-12,79r-10,0r38,-255r11,0","w":124,"k":{"-":4}},"l":{"d":"57,-255r-39,255r-10,0r38,-255r11,0"},"m":{"d":"93,-161v28,-1,31,28,25,57v14,-33,49,-78,81,-46v12,46,-11,103,-14,150r-10,0r18,-125v2,-37,-34,-29,-49,-8v-9,12,-14,19,-28,46r-13,87r-11,0r17,-127v0,-18,-6,-25,-19,-24v-20,1,-34,17,-58,64r-13,87r-10,0r13,-90v4,-32,10,-46,1,-66v13,-7,15,1,14,23r-2,29v22,-41,36,-56,58,-57","w":215,"k":{"y":7,"w":7,"v":7,"t":7,"f":4}},"n":{"d":"23,-156r10,-4v8,15,3,40,1,62v19,-41,37,-60,60,-63v29,-4,30,28,26,57r-15,104r-11,0r18,-125v3,-39,-36,-28,-50,-6v-9,15,-22,34,-31,52r-12,79r-10,0r13,-90v4,-32,10,-46,1,-66","w":135,"k":{"z":7,"y":4,"w":4,"v":4,"t":7,"f":4}},"o":{"d":"49,4v-30,-1,-42,-28,-40,-62v2,-46,22,-103,69,-103v30,0,43,21,42,58v-1,47,-20,107,-71,107xm51,-6v43,0,58,-58,58,-99v0,-32,-11,-47,-34,-47v-36,0,-56,56,-56,95v0,32,6,51,32,51","w":128,"k":{"z":7,"y":4,"x":7,"t":4,"f":4}},"p":{"d":"37,-98v17,-31,30,-62,61,-62v24,0,36,18,33,51v-4,59,-39,135,-106,106r-16,103r-10,0r16,-107v-13,-9,-26,-9,-21,-28v8,8,11,11,23,18r23,-158r10,-2xm37,-84r-10,72v58,29,92,-45,94,-101v1,-25,-8,-38,-26,-37v-20,1,-31,13,-58,66","w":137,"k":{"x":7,"t":7,"f":4}},"q":{"d":"124,-156r-38,256r-11,0r24,-155v-16,34,-27,52,-59,59v-57,-2,-31,-109,-4,-136v16,-25,48,-34,88,-24xm101,-72r11,-76v-66,-20,-95,50,-95,107v0,55,50,38,69,-2","w":132},"r":{"d":"23,-156r9,-4v9,16,4,41,1,66v30,-54,32,-68,67,-65r-3,11v-36,-7,-49,43,-66,70r-12,78r-10,0v4,-48,24,-111,14,-156","w":86,"k":{"o":10,"g":7,"e":10,"d":10,"c":10,"a":10,".":21,"-":21,",":21,"\u00e9":10}},"s":{"d":"66,-42v9,-20,-57,-53,-50,-79v-1,-34,41,-50,71,-33r-1,10v-24,-13,-59,-8,-59,21v0,29,50,50,50,80v0,46,-58,61,-87,31r3,-11v24,27,73,23,73,-19","w":89},"t":{"d":"89,-156r-1,9r-39,0r-17,121v-1,27,28,23,46,12r2,9v-24,14,-62,12,-59,-21v4,-42,12,-81,18,-121r-33,0v-1,-18,39,4,38,-20r5,-28r7,0r-6,39r39,0","w":86,"k":{"z":-7,"y":4,"t":10,"o":7,"g":7,"f":10,"e":7,"c":7,"a":7,"\u00e9":7}},"u":{"d":"99,-59v-20,38,-25,57,-60,63v-27,5,-29,-29,-25,-56r16,-104r11,0v-6,43,-16,83,-18,130v0,12,7,20,18,20v19,0,37,-20,61,-71r11,-79r11,0r-19,136v0,11,7,13,17,12v0,6,-2,12,-9,9v-27,0,-16,-36,-14,-60","w":132,"k":{"z":-7}},"v":{"d":"22,-158r21,143r72,-143r9,4r-80,154r-7,0r-25,-154","w":113,"k":{"o":4,"e":4,"a":10,".":21,"-":7,",":21,"\u00e9":4}},"w":{"d":"91,-158r21,143r72,-143r9,4r-80,154r-7,0r-15,-90r-46,90r-8,0r-25,-154r10,-4r22,145v17,-38,29,-57,46,-91r-9,-50","w":182,"k":{"o":4,"e":4,"c":7,"a":10,".":21,"-":7,",":21,"\u00e9":4}},"x":{"d":"55,-91r49,-67r8,4r-53,71r36,81r-9,4r-33,-76r-55,76r-9,-4r60,-81r-32,-71r9,-4","w":107,"k":{"o":7,"e":7,"c":7,"a":7,"\u00e9":7}},"y":{"d":"22,-158r27,144r68,-144r9,4r-73,150v-43,82,-58,110,-106,99r0,-10v55,8,50,-11,95,-86r-30,-153","w":114,"k":{"o":4,"e":4,"c":4,"a":7,".":14,"-":7,",":14,"\u00e9":4}},"z":{"d":"105,-156r3,4r-101,143r82,0r-2,9r-93,0r-2,-4r101,-143r-73,0r1,-9r84,0","w":100,"k":{"o":4,"e":4,"c":4,"-":10,"\u00e9":4}},"~":{"d":"-16,0r111,-200v-16,-21,0,-55,26,-55v26,0,32,42,12,56r39,199r-11,0r-18,-91r-97,0r-50,91r-12,0xm103,-194r-52,94r90,0r-18,-93v-7,2,-13,1,-20,-1xm120,-247v-24,0,-31,46,-6,47v12,1,21,-9,22,-23v1,-13,-6,-24,-16,-24","w":179},"'":{"d":"62,-243r10,1v-6,32,-20,57,-44,84r-8,-3v23,-27,35,-51,42,-82","w":57},"`":{"d":"10,-243r17,48r-6,1r-23,-48","w":0},"\u0152":{"d":"193,-226r-15,96r82,0r-1,9r-82,0r-17,111r116,0r-3,10r-126,0r2,-9v-71,37,-140,-8,-134,-93v5,-83,77,-171,166,-126r2,-8r103,0r-1,10r-92,0xm150,-20r30,-196v-42,-26,-93,-14,-122,24v-43,55,-47,184,37,186v19,1,40,-4,55,-14","w":285},"\u0131":{"d":"42,-156r-24,156r-10,0r23,-156r11,0"},"\u0153":{"d":"48,4v-30,-1,-41,-28,-40,-62v1,-44,28,-103,70,-103v25,0,39,15,39,45v10,-27,31,-44,55,-45v20,-1,33,12,32,30v-2,32,-55,58,-91,69v-7,64,54,73,78,24r7,6v-16,25,-33,36,-54,36v-23,0,-41,-20,-39,-48v-10,32,-30,48,-57,48xm50,-6v44,0,57,-57,58,-99v0,-32,-11,-47,-34,-47v-36,0,-55,56,-55,95v0,33,5,51,31,51xm114,-70v29,-10,79,-37,79,-64v0,-11,-8,-18,-21,-18v-28,0,-52,34,-58,82","w":206},"@":{"d":"222,-11v67,1,108,-42,107,-99v0,-78,-58,-116,-131,-116v-84,0,-156,69,-156,154v0,126,124,161,225,115r4,10v-31,13,-60,19,-93,19v-96,0,-147,-47,-147,-144v0,-91,77,-163,167,-163v78,0,142,41,142,125v0,69,-50,115,-132,110r5,-34v-12,20,-37,34,-60,34v-33,0,-43,-27,-43,-56v-2,-68,54,-130,134,-104xm231,-152v-67,-21,-109,38,-109,96v0,72,77,43,93,5","w":367},"{":{"d":"14,-93v1,-67,50,-147,115,-147v49,0,81,37,81,93v1,73,-41,153,-116,151v-50,-1,-81,-39,-80,-97xm97,-7v66,0,101,-75,101,-140v0,-49,-29,-82,-71,-82v-60,0,-101,76,-101,138v0,51,28,84,71,84xm53,-234v-1,-12,17,-18,16,-3v1,12,-16,18,-16,3xm193,-234v-1,-12,17,-18,17,-3v0,12,-17,18,-17,3","w":213},"}":{"d":"55,-236v-7,58,-21,114,-24,176v-3,62,102,70,124,22v21,-47,25,-137,37,-198r12,0v-23,93,0,241,-111,240v-57,-1,-80,-38,-71,-97r21,-143r12,0xm80,-234v-1,-12,17,-18,17,-3v1,13,-17,17,-17,3xm147,-234v-1,-12,17,-18,16,-3v1,12,-16,18,-16,3","w":199},"\u00a0":{"w":61}}});
	Cufon.replace('#usps-cufon li.cufon-me, #artikel-titel-cufon');
}

function valideer(selector) {
	var mag_submitten = true;
	$(selector).find('.vergeten').removeClass('vergeten');

	$(selector).find('.verplicht-kiezen').each(function(){
		var gekozen = false;
		$(this).find('input').each(function(){
			if ($(this).attr('checked')) {
				gekozen = true;
			}
		});
		if (gekozen != true) {
			$(this).addClass('vergeten');
			mag_submitten = false;
		}
	});

	$(selector).find('.verplicht-invoeren').each(function(){
		if ($(this).val().length <= 0) {
			$(this).addClass('vergeten');
			mag_submitten = false;
		}
		if ($(this).attr('name').match(/emailadres/) && !$(this).val().match(/\@/)) {
			$(this).addClass('vergeten');
			mag_submitten = false;
		}
	});
	return mag_submitten;
}

function checkVarianten(selector) {
	var mag_submitten = true;
	var vergeten_varianten = new Array();
	$(selector).find('.onChangeRemember').each(function(){
		var waarde = $(this).val();
		if (isNaN(waarde) || parseInt(waarde) <= 0) {
			mag_submitten = false;
			vergeten_varianten.push($(this).parent().find('strong').text());
		}
	});
	if (!mag_submitten) {
		alert('Selecteer de gewenste optie(s)');
		$('#detail-opties').css('background','#cc0000').effect('shake');
		window.setTimeout(function(){
			$('#detail-opties').animate({
				backgroundColor: '#ffffff'
			}, 750);
		}, 2000);
	}
	return mag_submitten;
}

function onChangeShowPrijs() {
	$('.onChangeRemember').change(function(){
		$('#replacer').html('');

		var ga_zoeken = true;
		var opties = new Array();
		$('.onChangeRemember').each(function(){
			var value = $(this).val();
			if (value != 0 && value >= 1) {
				opties.push(value);
			} else {
				ga_zoeken = false;
			}
		});
		if (ga_zoeken && opties.length >= 1) {
			$.ajax({
				type: 'POST',
				beforeSend: function(){
					$('#replacer').html('<img src="/static/img/ajax-loader.gif" alt="Laden ..." />');
					$('#artikel-nummer-target').html('<img src="/static/img/ajax-loader.gif" alt="Laden ..." />');
				},
				url: '/process.php',
				dataType: 'json',
				data: {
					'actie': 'haal-variant-prijs',
					'artikel_id': $('#artikel_id').val(),
					'opties': opties
				},
				success: function(variant) {
					$('#replacer').html(variant.prijs_voor);
					$('#artikel-nummer-target').html(variant.publiek_artikel_nummer);
					$('#variant_id').val(variant.variant_id);
				},
				error: function(reponse) {
					alert('Fout tijdens ophalen van informatie: '+reponse);
				}
			});
		}
	});
}

function toggleAfleveradresFields() {
	$('#afleveradres_keuze').click(function(){
		if ($(this).attr('checked')) {
			$('#velden-voor-afleveradres').show();
		} else {
			$('#velden-voor-afleveradres').hide();
		}
	});
}
