/*
LaatHetMeWeten version 4.1.2

Copyright © 2007-2010 Laat Het Me Weten B.V.
All rights reserved.

No part of this code may be used, reproduced, transmitted, or stored in any
retrieval system of any nature, without the written permission of Laat Het
Me Weten B.V.
*/
(function(a){a.fn.setfeatured=function(b){a.ajax({type:"POST",url:"/services/action.aspx?action=setfeatured&id="+b.id,success:function(c,d){},error:function(c,e,d){}});};}(jQuery));(function(a){a.fn.log=function(b){if(window.console){console.debug(b);}};}(jQuery));(function(a){a.fn.cookie=function(c,k,n){var f,g,j,m,h,b,e,l,d;if(typeof k!=="undefined"){n=n||{};if(k===null){k="";n.expires=-1;}f="";if(n.expires&&(typeof n.expires==="number"||n.expires.toUTCString)){if(typeof n.expires==="number"){g=new Date();g.setTime(g.getTime()+(n.expires*24*60*60*1000));}else{g=n.expires;}f="; expires="+g.toUTCString();}m=n.path?"; path="+(n.path):"; path=/";h=n.domain?"; domain="+(n.domain):"";b=n.secure?"; secure":"";document.cookie=[c,"=",encodeURIComponent(k),f,m,h,b].join("");}else{e=null;if(document.cookie&&document.cookie!==""){l=document.cookie.split(";");for(j=0;j<l.length;j++){d=jQuery.trim(l[j]);if(d.substring(0,c.length+1)===(c+"=")){e=decodeURIComponent(d.substring(c.length+1));break;}}}return e;}};}(jQuery));(function(a){a.fn.query=function(c){var b,e,d;c=c.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");b="[\\?&]"+c+"=([^&#]*)";e=new RegExp(b);d=e.exec(window.location.href);if(d===null){return"";}else{return decodeURIComponent(d[1].replace(/\+/g," "));}};}(jQuery));(function(a){a.fn.zebra=function(c){var b={odd:"",even:"striped"};if(c){a.extend(b,c);}this.each(function(){a("tbody",this).find("tr:odd").removeClass(b.odd).addClass(b.even);a("tbody",this).find("tr:even").removeClass(b.even).addClass(b.odd);});return this;};}(jQuery));(function(a){a.fn.googlemaps=function(c){var b={};if(c){a.extend(b,c);}this.each(function(){var h,f,i,g,d,e;h=a(this);h.html('<div class="map"></div>');h.append('<div class="googlemaps"></div>');i=new google.maps.LatLng(googlemapsdata.latitude,googlemapsdata.longitude);e={zoom:15,center:i,mapTypeId:google.maps.MapTypeId.ROADMAP,scrollwheel:false,mapTypeControl:false,mapTypeControlOptions:{style:google.maps.MapTypeControlStyle.DROPDOWN_MENU},navigationControlOptions:{style:google.maps.NavigationControlStyle.SMALL}};g=new google.maps.Map(a(".googlemaps").get(0),e);infoWindow=new google.maps.InfoWindow();d=new google.maps.Marker({position:i,map:g});f=new google.maps.LatLngBounds();f.extend(i);a.each(googlemapsdata.publishers,function(j,k){i=new google.maps.LatLng(k.latitude,k.longitude);d=new google.maps.Marker({position:i,icon:new google.maps.MarkerImage(k.image,new google.maps.Size(32,32),null,null,new google.maps.Size(32,32)),map:g,title:k.name});d.set("publisher",k);f.extend(i);google.maps.event.addListener(d,"click",function(l){k=this.get("publisher");infoWindow.setContent("<b>"+k.name+"</b><br />"+k.address+"<br />"+k.postcode+" "+k.city);infoWindow.open(g,this);});});g.fitBounds(f);a(".map").click(function(){a(".googlemaps").slideToggle();a(this).toggleClass("show");a.fn.cookie("hidemap",a(this).hasClass("show"),{path:"/"});});if(a.fn.cookie("hidemap")==="true"){a(".map").click();}});return this;};}(jQuery));(function(a){a.fn.tablesorter=function(c){var b={};if(c){a.extend(b,c);}this.each(function(){var e,d;e=a(this);if(e.is(".sortable")){a("th",e).each(function(f){a(this).click(function(){var h,g;h=(a(this).is(".sort-ascending")?-1:1);a("th",e).removeClass("sort-ascending").removeClass("sort-descending");if(h===-1){a(this).addClass("sort-descending");a.fn.cookie("sort",a("th",e).index(this)+"|sort-ascending",{path:window.location.pathname});}else{a(this).addClass("sort-ascending");a.fn.cookie("sort",a("th",e).index(this)+"|sort-descending",{path:window.location.pathname});}g=e.find("tbody > tr").get();g.sort(function(l,j){var k,i;if(a(l).children("td").eq(f).attr("sort")){k=a(l).children("td").eq(f).attr("sort");}else{k=a(l).children("td").eq(f).text().toUpperCase();}if(a(j).children("td").eq(f).attr("sort")){i=a(j).children("td").eq(f).attr("sort");}else{i=a(j).children("td").eq(f).text().toUpperCase();}if(k<i){return -1*h;}if(k>i){return 1*h;}return 0;});a.each(g,function(i,j){e.children("tbody").append(j);});if(e.is(".zebra")){e.zebra();}});});d=(a.fn.cookie("sort")?a.fn.cookie("sort").split("|"):"0|sort-descending");a("th",e).eq(d[0]).addClass(d[1]);a("th",e).eq(d[0]).click();}});return this;};}(jQuery));(function(a){a.fn.nomoreie6=function(){if(a.browser.msie&&a.browser.version==="6.0"&&!a.fn.nomoreie6.seen()){a("body").prepend('<div id="nomoreie6" style="background-color:#FFF;border-bottom:solid 1px #FF0000;height:47px;margin:0;overflow:hidden;padding:0;position:relative;"><img src="/scripts/no-more-ie6/nl/warning.png" alt="Waarschuwing" height="47" width="188" /><img src="/scripts/no-more-ie6/nl/text.png" alt="U gebruikt een verouderde browser. Upgrade naar een van deze moderne browsers voor een betere en veiligere gebruikservaring." height="47" width="282" /><a href="http://www.microsoft.com/windows/internet-explorer/"><img src="/scripts/no-more-ie6/browsers/ie.png" alt="Microsoft Internet Explorer" title="Microsoft Internet Explorer" height="47" width="47" /></a><a href="http://www.getfirefox.com/"><img src="/scripts/no-more-ie6/browsers/firefox.png" alt="Mozilla Firefox" title="Mozilla Firefox" height="47" width="47" /></a><a href="http://www.google.com/chrome/"><img src="/scripts/no-more-ie6/browsers/chrome.png" alt="Google Chrome" title="Google Chrome" height="47" width="47" /></a><a href="http://www.apple.com/safari/download/"><img src="/scripts/no-more-ie6/browsers/safari.png" alt="Apple Safari" title="Apple Safari" height="47" width="47" /></a><a href="http://www.opera.com/download/"><img src="/scripts/no-more-ie6/browsers/opera.png" alt="Opera" title="Opera" height="47" width="47" /></a><img src="/scripts/no-more-ie6/browsers/close.png" alt="Sluiten" title="Sluiten" height="47" width="47" style="cursor:pointer;position:absolute;right:0;" onclick="javascript:$.fn.nomoreie6.hide();" /></div>');}};a.fn.nomoreie6.hide=function(){a("#nomoreie6").slideUp();a.fn.cookie("nomoreie6","true",{expires:14,path:"/"});};a.fn.nomoreie6.seen=function(){return a.fn.cookie("nomoreie6")==="true";};}(jQuery));$(document).ready(function(){$("#popup").dialog({autoOpen:false,modal:true,height:400,width:800,bgiframe:true});$(".compare").click(function(){$("#popup #content").load("/services/internal.svc/compare/"+$(this).attr("id"),function(){$("#popup .list").zebra();});$("#popup").dialog({title:"Vergelijk aanbiedingen"});$("#popup").dialog("open");});$("input[placeholder]").focus(function(){if($(this).val()===$(this).attr("placeholder")){$(this).removeClass("deemphasize");$(this).val("");$(this).keyup();}});$("input[placeholder]").blur(function(){if($(this).val().length===0){$(this).addClass("deemphasize");$(this).val($(this).attr("placeholder"));$(this).keyup();}});$.each($("input[placeholder]"),function(){$(this).blur();});$("input[validator]").blur(function(){if($(this).attr("validator").indexOf("required")>-1){if($(this).val()===""){$(this).addClass("inputerror");$(this).siblings("label").eq(0).addClass("error").html($(this).attr("message"));}else{$(this).removeClass("inputerror");$(this).siblings("label").eq(0).removeClass("error");}}if($(this).attr("validator").indexOf("email")>-1){var a=/^([a-zA-Z0-9_.\-])+@([a-zA-Z0-9_.\-])+\.([a-zA-Z])+([a-zA-Z])+/;if(!a.test($(this).val())){$(this).addClass("inputerror");$(this).siblings("label").eq(0).addClass("error").html("Vul een geldig emailadres in");}else{$(this).removeClass("inputerror");$(this).siblings("label").eq(0).removeClass("error");}}});$("input[type=submit]").click(function(a){$(".inputerror").removeClass("inputerror");$("input[validator]").blur();if($(".inputerror").length>0){a.preventDefault();}});$(".list tbody tr .action").hide();$(".list tbody tr").hover(function(){$(this).find(".action").show();},function(){$(this).find(".action").hide();});$(".list.zebra").zebra();$("table.list").tablesorter();$(".help .answer").toggle();$(".help .title").click(function(a){$(this).parent().find(".answer").slideToggle();a.preventDefault();});$("#googlemaps").googlemaps();$(".mysearchhistorylink a").click(function(){$("#mysearchhistory").slideUp();$("#myshoppinglist").slideDown();$.fn.cookie("panelstate","shoppinglist");});$(".myshoppinglistlink a").click(function(){$("#myshoppinglist").slideUp();$("#mysearchhistory").slideDown();$.fn.cookie("panelstate","searchhistory");});if($.fn.cookie("panelstate")==="shoppinglist"){$("#mysearchhistory").hide();$("#myshoppinglist").show();}$(".accordion .header").click(function(){$.fn.cookie("categorylist",$(this).attr("id"),{expires:356});$(".accordion .header").next().slideUp();$(this).next().slideDown("slow");return false;});$(".accordion .header").next().hide();if($.fn.cookie("categorylist")){$(".accordion .header[id="+$.fn.cookie("categorylist")+"]").next().show();}else{$(".accordion .header:first").next().show();}$.fn.nomoreie6();});