(function($){$.fn.extend({plusOne:function(opts){var win=window,doc=win.document;var options=$.extend({count:true,href:doc.location.href,lang:'en-US',size:'standard'},opts||{});return this.each(function(){var self=this,o=options,allowedSizes=['small','medium','standard','tall'];if($.inArray(o.size,allowedSizes)===-1){throw new Error('No valid button size given.');}
$(self).addClass('g-plusone').attr({'data-size':o.size,'data-lang':o.lang,'data-href':o.href,'data-count':o.count});(function(d,t){var g=d.createElement(t);g.async=1;if(!d.all||d.all&&d.addEventListener){g.innerHTML='{"lang":"'+o.lang+'"}';}
g.src='https://apis.google.com/js/plusone.js';self.parentNode.appendChild(g);})(doc,'script');});}});})(jQuery);;(function($){$.fn.lightBox=function(settings){settings=jQuery.extend({overlayBgColor:'#000',overlayOpacity:0.8,fixedNavigation:false,imageLoading:'images/lightbox-ico-loading.gif',imageBtnPrev:'images/lightbox-btn-prev.gif',imageBtnNext:'images/lightbox-btn-next.gif',imageBtnClose:'images/lightbox-btn-close.gif',imageBlank:'images/lightbox-blank.gif',containerBorderSize:10,containerResizeSpeed:400,txtImage:'Image',txtOf:'of',keyToClose:'c',keyToPrev:'p',keyToNext:'n',imageArray:[],activeImage:0},settings);var jQueryMatchedObj=this;function _initialize(){_start(this,jQueryMatchedObj);return false;}
function _start(objClicked,jQueryMatchedObj){$('embed, object, select').css({'visibility':'hidden'});_set_interface();settings.imageArray.length=0;settings.activeImage=0;if(jQueryMatchedObj.length==1){settings.imageArray.push(new Array(objClicked.getAttribute('href'),objClicked.getAttribute('title')));}else{for(var i=0;i<jQueryMatchedObj.length;i++){settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),jQueryMatchedObj[i].getAttribute('title')));}}
while(settings.imageArray[settings.activeImage][0]!=objClicked.getAttribute('href')){settings.activeImage++;}
_set_image_to_view();}
function _set_interface(){$('body').append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="'+settings.imageLoading+'"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="'+settings.imageBtnClose+'"></a></div></div></div></div>');var arrPageSizes=___getPageSize();$('#jquery-overlay').css({backgroundColor:settings.overlayBgColor,opacity:settings.overlayOpacity,width:arrPageSizes[0],height:arrPageSizes[1]}).fadeIn();var arrPageScroll=___getPageScroll();$('#jquery-lightbox').css({top:arrPageScroll[1]+(arrPageSizes[3]/10),left:arrPageScroll[0]}).show();$('#jquery-overlay,#jquery-lightbox').click(function(){_finish();});$('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function(){_finish();return false;});$(window).resize(function(){var arrPageSizes=___getPageSize();$('#jquery-overlay').css({width:arrPageSizes[0],height:arrPageSizes[1]});var arrPageScroll=___getPageScroll();$('#jquery-lightbox').css({top:arrPageScroll[1]+(arrPageSizes[3]/10),left:arrPageScroll[0]});});}
function _set_image_to_view(){$('#lightbox-loading').show();if(settings.fixedNavigation){$('#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();}else{$('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();}
var objImagePreloader=new Image();objImagePreloader.onload=function(){$('#lightbox-image').attr('src',settings.imageArray[settings.activeImage][0]);_resize_container_image_box(objImagePreloader.width,objImagePreloader.height);objImagePreloader.onload=function(){};};objImagePreloader.src=settings.imageArray[settings.activeImage][0];};function _resize_container_image_box(intImageWidth,intImageHeight){var intCurrentWidth=$('#lightbox-container-image-box').width();var intCurrentHeight=$('#lightbox-container-image-box').height();var intWidth=(intImageWidth+(settings.containerBorderSize*2));var intHeight=(intImageHeight+(settings.containerBorderSize*2));var intDiffW=intCurrentWidth-intWidth;var intDiffH=intCurrentHeight-intHeight;$('#lightbox-container-image-box').animate({width:intWidth,height:intHeight},settings.containerResizeSpeed,function(){_show_image();});if((intDiffW==0)&&(intDiffH==0)){if($.browser.msie){___pause(250);}else{___pause(100);}}
$('#lightbox-container-image-data-box').css({width:intImageWidth});$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({height:intImageHeight+(settings.containerBorderSize*2)});};function _show_image(){$('#lightbox-loading').hide();$('#lightbox-image').fadeIn(function(){_show_image_data();_set_navigation();});_preload_neighbor_images();};function _show_image_data(){$('#lightbox-container-image-data-box').slideDown('fast');$('#lightbox-image-details-caption').hide();if(settings.imageArray[settings.activeImage][1]){$('#lightbox-image-details-caption').html(settings.imageArray[settings.activeImage][1]).show();}
if(settings.imageArray.length>1){$('#lightbox-image-details-currentNumber').html(settings.txtImage+' '+(settings.activeImage+1)+' '+settings.txtOf+' '+settings.imageArray.length).show();}}
function _set_navigation(){$('#lightbox-nav').show();$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({'background':'transparent url('+settings.imageBlank+') no-repeat'});if(settings.activeImage!=0){if(settings.fixedNavigation){$('#lightbox-nav-btnPrev').css({'background':'url('+settings.imageBtnPrev+') left 15% no-repeat'}).unbind().bind('click',function(){settings.activeImage=settings.activeImage-1;_set_image_to_view();return false;});}else{$('#lightbox-nav-btnPrev').unbind().hover(function(){$(this).css({'background':'url('+settings.imageBtnPrev+') left 15% no-repeat'});},function(){$(this).css({'background':'transparent url('+settings.imageBlank+') no-repeat'});}).show().bind('click',function(){settings.activeImage=settings.activeImage-1;_set_image_to_view();return false;});}}
if(settings.activeImage!=(settings.imageArray.length-1)){if(settings.fixedNavigation){$('#lightbox-nav-btnNext').css({'background':'url('+settings.imageBtnNext+') right 15% no-repeat'}).unbind().bind('click',function(){settings.activeImage=settings.activeImage+1;_set_image_to_view();return false;});}else{$('#lightbox-nav-btnNext').unbind().hover(function(){$(this).css({'background':'url('+settings.imageBtnNext+') right 15% no-repeat'});},function(){$(this).css({'background':'transparent url('+settings.imageBlank+') no-repeat'});}).show().bind('click',function(){settings.activeImage=settings.activeImage+1;_set_image_to_view();return false;});}}
_enable_keyboard_navigation();}
function _enable_keyboard_navigation(){$(document).keydown(function(objEvent){_keyboard_action(objEvent);});}
function _disable_keyboard_navigation(){$(document).unbind();}
function _keyboard_action(objEvent){if(objEvent==null){keycode=event.keyCode;escapeKey=27;}else{keycode=objEvent.keyCode;escapeKey=objEvent.DOM_VK_ESCAPE;}
key=String.fromCharCode(keycode).toLowerCase();if((key==settings.keyToClose)||(key=='x')||(keycode==escapeKey)){_finish();}
if((key==settings.keyToPrev)||(keycode==37)){if(settings.activeImage!=0){settings.activeImage=settings.activeImage-1;_set_image_to_view();_disable_keyboard_navigation();}}
if((key==settings.keyToNext)||(keycode==39)){if(settings.activeImage!=(settings.imageArray.length-1)){settings.activeImage=settings.activeImage+1;_set_image_to_view();_disable_keyboard_navigation();}}}
function _preload_neighbor_images(){if((settings.imageArray.length-1)>settings.activeImage){objNext=new Image();objNext.src=settings.imageArray[settings.activeImage+1][0];}
if(settings.activeImage>0){objPrev=new Image();objPrev.src=settings.imageArray[settings.activeImage-1][0];}}
function _finish(){$('#jquery-lightbox').remove();$('#jquery-overlay').fadeOut(function(){$('#jquery-overlay').remove();});$('embed, object, select').css({'visibility':'visible'});}
function ___getPageSize(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=window.innerWidth+window.scrollMaxX;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
var windowWidth,windowHeight;if(self.innerHeight){if(document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth;}else{windowWidth=self.innerWidth;}
windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
if(xScroll<windowWidth){pageWidth=xScroll;}else{pageWidth=windowWidth;}
arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight);return arrayPageSize;};function ___getPageScroll(){var xScroll,yScroll;if(self.pageYOffset){yScroll=self.pageYOffset;xScroll=self.pageXOffset;}else if(document.documentElement&&document.documentElement.scrollTop){yScroll=document.documentElement.scrollTop;xScroll=document.documentElement.scrollLeft;}else if(document.body){yScroll=document.body.scrollTop;xScroll=document.body.scrollLeft;}
arrayPageScroll=new Array(xScroll,yScroll);return arrayPageScroll;};function ___pause(ms){var date=new Date();curDate=null;do{var curDate=new Date();}
while(curDate-date<ms);};return this.unbind('click').click(_initialize);};})(jQuery);;(function($){$.fn.equalizeCols=function(){var height=0,reset=!window.XMLHttpRequest?"1%":"auto";return this.css("height",reset).each(function(){height=Math.max(height,this.offsetHeight);}).css("height",height).each(function(){var h=this.offsetHeight;if(h>height){$(this).css("height",height-(h-height));};});};})(jQuery);;(function($,doc,outside){'$:nomunge';$.map('click dblclick mousemove mousedown mouseup mouseover mouseout change select submit keydown keypress keyup'.split(' '),function(event_name){jq_addOutsideEvent(event_name);});jq_addOutsideEvent('focusin','focus'+outside);jq_addOutsideEvent('focusout','blur'+outside);$.addOutsideEvent=jq_addOutsideEvent;function jq_addOutsideEvent(event_name,outside_event_name){outside_event_name=outside_event_name||event_name+outside;var elems=$(),event_namespaced=event_name+'.'+outside_event_name+'-special-event';$.event.special[outside_event_name]={setup:function(){elems=elems.add(this);if(elems.length===1){$(doc).bind(event_namespaced,handle_event);}},teardown:function(){elems=elems.not(this);if(elems.length===0){$(doc).unbind(event_namespaced);}},add:function(handleObj){var old_handler=handleObj.handler;handleObj.handler=function(event,elem){event.target=elem;old_handler.apply(this,arguments);};}};function handle_event(event){$(elems).each(function(){var elem=$(this);if(this!==event.target&&!elem.has(event.target).length){elem.triggerHandler(outside_event_name,[event.target]);}});};};})(jQuery,document,"outside");;(function($){(function setRequiredFields(){var labels=document.getElementsByTagName('label'),i=labels.length;while(i--){if(labels[i].innerHTML.indexOf('*')!==-1){$(labels[i]).next('input, select, textarea').addClass('required');}}})();function isRequired(elem){return elem.hasClass('required');}
function isValidInput(type,input){var patterns={'email':'^[_a-z0-9&+-]+(\\.[_a-z0-9&+-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,6})$','date':'^([1-9]|0[1-9]|[12][0-9]|3[01])[- /.]([1-9]|0[1-9]|1[012])[- /.](19[0-9]{2}|20[0-9]{2})$','numeric':'^[0-9]+$','phone':'^([a-z0-9 +()-/:,]{9,})$','hexvalue':'^#?([a-f0-9]{6}|[a-f0-9]{3})$','url':'^(https?:\\/\\/)?([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\\/\\w \\.-]*)*\\/?$','ip':'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'},regex=new RegExp(patterns[type],'i');return regex.test(input);}
jQuery.fn.chkFrm=function(event,options){var err=[],frm=$(this),req=frm.find('.required').not(':disabled, :hidden'),index=req.length,errorMessages={},specific=['email','phone'];var o=$.extend({container:true,containerClass:'p.error',errorMessages:{},headMsg:'Niet alle verplichte velden zijn correct ingevuld',defaultMsg:'Het veld "%" is niet correct ingevuld',footMsg:'Deze velden zijn rood gemarkeerd.',onSuccess:{},excludedValues:[]},options||{});if(typeof o.errorMessages=='string'){errorMessages=(typeof window.JSON!='undefined'?JSON.parse(o.errorMessages):eval('('+o.errorMessages+')'));}else{errorMessages={'name':'Uw naam is niet ingevuld','email':'U dient een geldig e-mail adres op te geven','firstname':'Uw voornaam is niet ingevuld','lastname':'Uw achternaam is niet ingevuld','businessname':'Uw bedrijfsnaam is niet ingevuld','street':'U heeft geen straat ingevuld','postal':'Uw postcode is niet correct ingevuld','city':'U heeft geen plaats ingevuld','country':'U heeft uw land van herkomst niet ingevuld','phone':'Uw telefoonnummer is niet correct ingevuld'};}
frm.find('label, input, textarea, select').removeClass('error');while(index--){var frmEl=$(req[index]),frmElKey=frmEl.attr('name');if(!errorMessages.hasOwnProperty(frmElKey)){errorMessages[frmElKey]=o.defaultMsg.replace('%',frmElKey);}
if(frmEl.attr('type')==='radio'||frmEl.attr('type')==='checkbox'){if(!$('input[name='+frmEl.attr('name')+']').is(':checked')){err.push(frmElKey);if(frmEl.attr('type')==='checkbox'){$('label[for='+frmEl.attr('id')+']').addClass('error');}else{frmEl.prev('label').addClass('error');}}}
else if($.trim(frmEl.val())===''||$.inArray(frmEl.val(),o.excludedValues)!==-1){err.push(frmElKey);frmEl.addClass('error').prev('label').addClass('error');}}
for(var i=0,m=specific.length;i<m;i++){var item=$(frm).find('[name='+specific[i]+']');if(item.length>0&&isRequired(item)){var itemVal=item.val();if(specific[i]==='postal'){itemVal=item.val().replace(/\s+/g,'');}
if($.trim(itemVal)!==''&&!isValidInput(specific[i],itemVal)||$.inArray(itemVal,o.excludedValues)!==-1){err.push(specific[i]);item.addClass('error').prev('label').addClass('error');}}}
errorMessages['klantAfleverBedrijfBtwNummer']='Het ingevoerde btw nummer is ongeldig.';var item=$(frm).find('input[name=klantAfleverBedrijfBtwNummer]');if(item.length>0&&item.val().length>0){var itemVal=item.val();var countrySelect=$(frm).find('select[name=klantFactuurLand]');if(countrySelect.length>0&&countrySelect.val().length>0){var countrySelectVal=countrySelect.val();var regexString='';if(countrySelectVal=='nl'){regexString='^NL[0-9a-zA-Z]{12}$';}else if(countrySelectVal=='be'){regexString='^BE0[0-9a-zA-Z]{9}';}
if(regexString!=''){var regex=new RegExp(regexString,'i');if(!regex.test(itemVal)){err.push('klantAfleverBedrijfBtwNummer');item.addClass('error').prev('label').addClass('error');}}}}
if(err.length>0){var html=o.headMsg+'<br>',messages=[];for(var a=0,j=err.length;a<j;a++){if(errorMessages.hasOwnProperty(err[a])){messages.push(errorMessages[err[a]]);}}
messages=$.unique(messages);for(var msg in messages){if(messages.hasOwnProperty(msg)){html+='&nbsp;&nbsp;- '+messages[msg]+'<br>';}}
if($.trim(o.footMsg)!==''){html+='<br>'+o.footMsg;}
if(o.container){$(frm).prevAll(o.containerClass).html(html).fadeIn('medium');}else{$('<p>'+html+'</p>').insertBefore(frm);}
event.preventDefault();}else{if(o.onSuccess!=null&&$.isFunction(o.onSuccess)){o.onSuccess.call(this);}}};}(jQuery));;jQuery.fn.extend({scrollTo:function(speed,easing){return this.each(function(){var targetOffset=$(this).offset().top-10;$('html, body').animate({scrollTop:targetOffset},speed,easing);});}});;jQuery.fn.tooltip=function(){function remove(){$(document).unbind('click');$('#tooltip').remove();}
return this.each(function(){var self=$(this),xOffset=150,yOffset=35,html=$.trim(self.attr('title')).split('[').join('<').split(']').join('>'),timer;if(html!==''){self.data('html',self.attr('title')).removeAttr('title').bind({click:function(e){var visible=$('#tooltip:visible').length;remove();e.preventDefault();self.blur();if(visible)return;$('body').append('<div id="tooltip" style="top:'+(e.pageY-xOffset)+'px; left:'+(e.pageX+yOffset)+'px;"><div id="tooltipArrow"></div><div id="tooltipInner">'+html+'</div></div>');$('#tooltip').bind('click',function(f){f.stopPropagation();}).fadeIn('fast');setTimeout(function(){$(document).bind({click:remove,keyup:function(e){if(e.keyCode==27){remove();}}});},10);}});}});};;var addthis_config;String.prototype.reverse=function(){return this.split("").reverse().join("");};String.prototype.toFloat=function(){return parseFloat(this.replace(',','.').replace('€',''));};Number.prototype.withCommas=function(){var x=6,y=parseFloat(this).toFixed(2).toString().reverse();while(x<y.length){y=y.substring(0,x)+","+y.substring(x);x+=4;}
return y.reverse().replace(/,/g,':').replace(/\./g,',').replace(/:/g,'.');};Number.prototype.toCurrency=function(){return(arguments[0]?arguments[0]:"€ ")+this.withCommas();};jQuery.fn.tabs=function(){return this.each(function(){var self=$(this),tabs=self.find('.tab'),tabIdx=jQuery('#tabIdx ol');tabs.not('.top').children('.inner').hide();jQuery('#tabIdx a').bind('click',function(e){var link=$(this),index=$('#tabIdx a').index(link);jQuery('#tabIdx .active').removeClass('active');jQuery('#tabIdx li').eq(index).addClass('active');tabs.children('.inner').fadeOut('fast').end().removeClass('top');tabs.eq(index).addClass('top').children('.inner').fadeIn();link.blur();e.preventDefault();});jQuery('.tab').equalizeCols();});};function setExtLinks(){this.target='_blank';}
jQuery.fn.togglePaymentFields=function(){return this.each(function(){var self=$(this),extraFields=$('#'+self.attr('id')+'Wrapper');self.bind('change',function(){if(self.val()==='Automatische incasso'||self.val()==='Vooruitbetalen'){extraFields.show();}
else{extraFields.hide();}}).change();});};jQuery.fn.toggleExtraFields=function(){return this.each(function(){var input=$(this),extraFields=$('.'+input.attr('id')+'Wrapper');input.bind('click',function(){extraFields.toggle();});if(input.is(':checked')){extraFields.show();}else{extraFields.hide();}});};function initShippingOptions(){var list=$('#optionList');$('#shippingOptions').hover(function(){list.show();},function(){list.hide();});$('#optionList li').bind('click',function(e){var self=$(this),id=self.attr('id'),price=self.attr('class').toFloat().toCurrency();$('#shippingSelect').val(id);$('#current').html(self.html());list.hide();$('#pr-ship').text(price);togglePhoneContact();});}
function updateCosts(e){var self=$(e.target),row=self.closest('tr'),rows=row.parent().children('tr'),lastCell=row.find('td:last'),formData=$('#orderOverviewFrm').serialize(),hasDiscount=false,rowPrice,discountCode=$('#discountCode'),discountCodeLbl=discountCode.next(),subtotal=$('#pr-sub'),totalDiscount=$('#pr-discount'),subtotalAfterDiscount=$('#pr-subtotalAfterDiscount'),discountSet=$('#pr-discountountLbl, #pr-subtotalAfterDiscountLbl').add(totalDiscount).add(subtotalAfterDiscount);lastCell.addClass('loading');$.ajax({type:'POST',url:'/php/updatemandje.php',data:formData,success:function(response){if(typeof response==='object'){var regels=response.regels;if(regels!==[]){for(var i=0,j=regels.length;i<j;i++){var info=regels[i],currRow=rows.eq(i+1);if(info.regelDiscount===true){hasDiscount=true;rowPrice='<del>'+info.regelPrijsNoDiscount+'</del><br><span class="afterDiscount">Na korting</span>'+info.regelPrijs;}else{rowPrice=info.regelPrijs;}
currRow.find('td:eq(2)').text(info.eenheidsPrijs);currRow.find('td:eq(3)').children('input').val(info.aantal);currRow.find('td:eq(4)').html(rowPrice);}}
if($.trim(discountCode.val())===''){discountCodeLbl.html('');}else{if(hasDiscount){discountCodeLbl.html('<span style="color:green;">Goed!</span>');}else{discountCodeLbl.html('<span style="color:red;">Fout!</span>');}}
if(hasDiscount){subtotal.text(response.subtotaalNoDiscount);totalDiscount.html(response.totalDiscount+'<br>');subtotalAfterDiscount.html(response.subtotaal+'<br>');discountSet.show();subtotalAfterDiscount.css('display','block');}else{discountSet.hide();subtotal.text(response.subtotaal);}
$('#pr-ship').text(response.verzendkosten);$('#pr-btw').text(response.btw);$('#pr-total').text(response.totaal);remboursCheck(response.subtotaal,response.btw);}
lastCell.removeClass('loading');},dataType:'json'});}
function togglePhoneContact(){var shippingType=$('#shippingSelect').val(),phoneContact=$('#phoneContact');if(shippingType==='option5'||shippingType==='option6'){phoneContact.fadeIn();}else{phoneContact.fadeOut();}}
function adjustShapes(e){var self=$(e.target),val=self.val().toLowerCase(),shapeWrapper=$('#shapeWrapper'),finishWrapper=$('#finishWrapper'),finishBannerWrapper=$('#finishBannerWrapper');shapeWrapper.show();finishWrapper.hide();switch(val){case'full colour':fillShapeSelect('Vierkant','Rechthoek','Rond','Ovaal','Contour');finishBannerWrapper.hide();finishWrapper.show();break;case'plakletter':case'snijvinyl':finishBannerWrapper.hide();shapeWrapper.hide();break;case'canvas':finishBannerWrapper.hide();fillShapeSelect('Staand','Liggend');break;case'spandoek':shapeWrapper.hide();finishWrapper.hide();finishBannerWrapper.show();break;default:fillShapeSelect('Kies eerst de materiaalsoort');}}
function fillShapeSelect(){var j=arguments.length,options='<option value="">Maak een keuze</option>';if(j){for(var i=0;i<j;i++){options+='<option value="'+arguments[i]+'">'+arguments[i]+'</option>';}}
$('#shape').html(options);}
function remboursCheck(subtotal,btw){var subtotal=subtotal.split('.').join('').split(',').join('.').toFloat(),total=subtotal,remboursOption=$('#optionList #option2');if(total<50){remboursOption.hide();}else{remboursOption.show();}}
function toggleBusinessFields(){var self=$(this),id=self.attr('id'),wrapper=$('.businessWrapper');if(id==='business'){wrapper.show();}else{wrapper.hide();}}
function reloadPage(){if(confirm('Zeker weten dat je opnieuw wilt beginnen?')){location=window.location;}}
function resizeElement(resize){var w=(resize?975:642),f=642/720,h=w/f;$("#wizardFlashElement").css({width:w+'px',height:h+'px'});$("#wizardFlashPlaceHolder").css({height:h+'px'});}
function faceBookSharer(domain){var u='http://www.drsticker.nl?fb',t='Dr. Sticker - Online stickers bestellen!';window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');}
function initAsyncAddthis(){var self=this,username='drsticker',gaProfile='UA-3990588-1',times=40;addthis_config={username:username,services_compact:'email,facebook,twitter,hyves,print,favorites,blogger,google,delicious,netvibes,hotmail,gmail,bitly,more',data_ga_tracker:null,data_track_clickback:true,ui_language:'en'};_gaq.push(function(){addthis_config.data_ga_tracker=_gat._getTracker(gaProfile);});this.init=function(){if(typeof addthis==='object'){addthis.init();}else{if(!times)return;setTimeout(self.init,25);times--;}}
$.getScript('http://s7.addthis.com/js/250/addthis_widget.js#domready=1&async=1&username='+username,self.init);};$(function(){if(!window.XMLHttpRequest&&typeof DD_belatedPNG!=='undefined'){DD_belatedPNG.fix('.icon, .success, #fit li');}
if($('#tabs').length){$('#tabs').tabs();}
$('#sitemap .parentLi').equalizeCols();$('#paymentMethod').togglePaymentFields();if($('#shippingOptions').length){initShippingOptions();}
$('[name=customerType]').bind('click',toggleBusinessFields);$('#sameAddress').toggleExtraFields();$('[name=klantFactuurType]').bind('click',toggleBusinessFields);$('[rel*=external]').bind('click',setExtLinks);$('form').not('#quickSearch').bind('submit',function(e){return $(this).chkFrm(e);});$('#shoppingCart .text').bind('blur',updateCosts);$('#optionList li').bind('click',updateCosts);$('#fabric').bind('change',adjustShapes);$('#fabric').change();$('#productVariants .submit').bind('click',function(e){var self=$(e.target),select=self.closest('tr').find('select'),selects=self.closest('table').find('select');selects.removeClass('required');select.addClass('required');});$('#catChoice').bind('change',function(){$('#catSelectionFrm').submit();});$('.tooltip').tooltip();var defaultSearchValue='Zoekwoord';$("#catSelection form input#s2").bind('focus',function(){if(this.value===defaultSearchValue){this.value='';}}).val(defaultSearchValue).bind('blur',function(){if(this.value===''){this.value=defaultSearchValue;}});$('.exampleList li a').lightBox({imageBtnPrev:'/images/lightbox/lightbox-btn-prev.gif',imageBtnNext:'/images/lightbox/lightbox-btn-next.gif',imageBtnClose:'/images/lightbox/close_button.png',imageLoading:'/images/lightbox/lightbox-ico-loading.gif',imageBlank:'/images/misc/pixel.gif',txtImage:'Voorbeeld',txtOf:'van'});if($('.addthis_toolbox').length&&window.XMLHttpRequest){initAsyncAddthis();}
if($('#plusone').length&&window.XMLHttpRequest){$('#plusone').plusOne({size:'small',count:false});}
if($('#plusoneMedium').length&&window.XMLHttpRequest){$('#plusoneMedium').plusOne({size:'medium',count:true});}
$('.shareIcon.fb').bind('click',function(e){var domain=document.domain;faceBookSharer(domain);e.preventDefault();});$('#differentInvoiceAddress').change(function(){if(this.checked==true){$('#toggleAddress').slideDown();$('#invoice').scrollTo(500);}else{$('#toggleAddress').slideUp();}});$('#sameAddress').change(function(){if(this.checked==true){$('#differentAddress').slideDown();}else{$('#differentAddress').slideUp();}});$('#orderView .code, #orderView .btn').click(function(){var elem=$(this).closest('tr'),detail=elem.next(),open=elem.parent().find('.open'),wasOpen=elem.hasClass('open');open.removeClass('open').next().hide();if(wasOpen){detail.hide();elem.removeClass('open');}else{elem.addClass('open');detail.fadeIn();}});(function(){var login=$('#login'),link=login.find('.button a'),ul=login.find('ul');if(ul.length){ul.width(link.width()+20);link.css('min-width','134px');}})();$('#login').delegate('div.button','click',function(){$(this).parent().addClass('active');$('.loginBlock').toggle();$(this).parents('#login').bind('clickoutside',function(){$('#login').removeClass('active').find('.loginBlock').hide();});return false;});});$(window).bind('load',function(){if($('#references').length){$('#references').load('/php/referencesList.php');}});
