/* lang/nl.js (96%) */
var Config={"language":"nl","site_id":"2","languages":{"nl":"Nederlands","fr":"frans"}};

/* main.js (80%) */
$(function(){$('.fancybox').fancybox();$('.custom-select .selected').click(function(){var self=this;$(self).closest('.custom-select').find('.dropdown').show();$(self).closest('.custom-select').addClass('open');$('body').bind('click',function(){$(self).closest('.custom-select').removeClass('open');$(self).closest('.custom-select').find('.dropdown').hide();$('body').unbind();});return false;});$('.custom-select .dropdown a').bind('click',function(){var self=$(this);$('.custom-select .dropdown a').removeClass('active');$(this).addClass('active');$(this).closest('.custom-select').find('> a.selected .item').html($(this).html());$(this).closest('.custom-select').find('.dropdown').hide();$(this).closest('.custom-select').removeClass('open');$(".custom-select select option").each(function(){if($(this).attr('value')==$(self).attr('data-value')){$(this).attr('selected',true);}});return false;});$('#eyecatcher').jcarousel({scroll:1,auto:3,wrap:'both',initCallback:eyecatcher_initCallback,itemVisibleInCallback:{onBeforeAnimation:eyecatcher_itemVisibleInCallbackBeforeAnimation}});function eyecatcher_itemVisibleInCallbackBeforeAnimation(carousel,item,idx,state){$('.eyecatcher .controls li').removeClass('active');$('.eyecatcher .controls li.item'+idx).addClass('active');};function eyecatcher_initCallback(carousel){$('.eyecatcher .controls a').bind('click',function(){carousel.scroll(jQuery.jcarousel.intval($(this).text()));return false;});};$('.wizard .step1 .radio input').change(function(){$('.wizard .step1 label').removeClass('active');$(this).parent().parent().find('label').addClass('active');if($("input[@name='step1']:checked").val()){$('.wizard .step2').show();}});$('.wizard .step2 .radio input').change(function(){$('.wizard .step2 label').removeClass('active');$(this).parent().parent().find('label').addClass('active');if($("input[@name='step2']:checked").val()){$('.wizard .submit').show();}});var lastref;$('.references .js-category-select').click(function(){$('.references .js-category-select').removeClass('active');$(this).addClass('active');$('#'+lastref).addClass('hidden');$('.js-references-caclulate').addClass('hidden');var subcategory=$(this).attr('data-category-id');lastref=subcategory;$('#subcategory').removeClass('hidden');$('#'+subcategory).removeClass('hidden');});$('.js-reference-pick').click(function(){$('.js-reference-pick').removeClass('active');$(this).addClass('active');$('#subcategory').removeClass('hidden');var reference=$(this).attr('data-reference-id');$('#js-calculate-button a').attr('href',$('.js-base-url').text()+reference);$('#js-calculate-button').removeClass('hidden');});if(!Modernizr.input.placeholder){$("input, textarea").each(function(){if($(this).val()==""&&$(this).attr("placeholder")!=""){$(this).val($(this).attr("placeholder"));$(this).focus(function(){if($(this).val()==$(this).attr("placeholder"))$(this).val("");});$(this).blur(function(){if($(this).val()=="")$(this).val($(this).attr("placeholder"));});}});$("form").submit(function(){$("input, textarea").each(function(){if($(this).attr("placeholder")!=""){if($(this).val()==$(this).attr("placeholder"))$(this).val("");}});});}
$('.js-distributor-form').click(function(){$.ajax({'type':'get','url':"/ajax/"+Config.language+"/distributors/getpage/"+$(this).val(),'dataType':'json','success':function(data){$('.js-distributor-search').attr('action',data.Node.path);}});});function get_info(xid){$.ajax({'type':'get','url':"/_direct/distributors/getDistributorDetails/"+xid,'dataType':'json','success':function(data){var point=new google.maps.LatLng(data.point.lat,data.point.lang);if(infowindow)infowindow.close();infowindow=new google.maps.InfoWindow();infowindow.setContent(data.html);infowindow.setPosition(point);infowindow.open(map);}});}
$(".distributor_map").click(function(){id=this.id
get_info(id);return false;});$(".originator_map").click(function(){id=this.id
get_info(id);return false;});$('.js-occupation').click(function(){if($(this).val()==0){$('.js-occupation-other').removeClass('visuallyhidden');}else{$('.js-occupation-other').addClass('visuallyhidden');}});});

/* init.js (78%) */
$().ready(function(){$('.fancybox').fancybox();$('.js-cm-submit').click(function(){return send_form('js-cm-subscribe');});});$('#js-searchbutton').click(function(){var q='';q=$('#js-searchfield').val();if(q){location.href='/nl/search/?q='+q;}
return false;});$('.page.faq a.question').click(function(){$(this).parent().find('div.answer').toggle();$(this).toggleClass('open');return false;});function send_form(domID){var data='';$('#'+domID+' :input').each(function(){if(this.name){data+=this.name+'='+this.value+'&';}});$.ajax({type:'post',data:data,url:'/ajax/'+Config.language+'/forms/subscribe',dataType:'json',success:function(json){if(json.success){$('#js-message').hide();$('#js-subscribe').hide();$('#js-message').html(json.html);$('#js-message').fadeIn();$('#'+domID+' :input').each(function(){if(this.name){$(this).val('');}});if(_gaq){_gaq.push(['_trackPageview','/'+Config.language+'/SIGNUP_FOR_NEWSLETTER'])}}
else{$('#js-message').hide();$('#js-message').html(json.html);$('#js-message').fadeIn();}}})
return false;}
