

jQuery().ready(function(){$('.info-link').click(function(){var infobox=$(this).parent().parent().parent().find('.extra-info');$(this).toggleClass('info-link-on');$(infobox).slideToggle();});$('ul.form li, ul.form-reg li, ul.form-login li, ul.form-search li').addClass('clearfix');$('a').click(function(){this.blur();});$('a').focus(function(){this.blur();});$('a.external').each(function(){$(this).attr('target',"_blank");});$("#comment_body").blur(function(){$(this).val(replaceNewline(jQuery.trim($(this).val())));});$("#comment_body").charCounter(400,{container:"#comment_body_count",format:"Nog <b>%1</b> karakters over."});$("#shop_description").blur(function(){$(this).val(replaceNewline(jQuery.trim($(this).val())));});$("#shop_description").charCounter(400,{container:"#shop_description_count",format:"Nog <b>%1</b> karakters over.</b>"});$("#news_intro").blur(function(){$(this).val(replaceNewline(jQuery.trim($(this).val())));});$("#news_intro").charCounter(400,{container:"#news_intro_count",format:"Nog <b>%1</b> karakters over."});$("#news_body").blur(function(){$(this).val(replaceMultiNewline(jQuery.trim($(this).val())));});$("#news_body").charCounter(5000,{container:"#news_body_count",format:"Nog <b>%1</b> karakters over."});$("#keyword").focus(function(){$(this).val()!='Zoeken...'||$(this).val('');});$("#keyword").blur(function(){$(this).val()!=''||$(this).val('Zoeken...');});$("#shop_keywords, #news_keywords").blur(function(){$(this).val(cleanKeywords($(this).val()));});$("#newsletter_email").focus(function(){$(this).val()!='E-mail...'||$(this).val('');});$("#newsletter_email").blur(function(){$(this).val()!=''||$(this).val('E-mail...');});$("#btn_sub_newsletter").click(function(){var s=$("#newsletter-status");var e=$("#newsletter_email").val();$.getJSON("/news-letter/signup",{email:e},function(data){s.html(data.msg).show();if(data.success==1){s.removeClass('status-nok').addClass("status-ok");$("#newsletter_email").val("");}else{s.removeClass('status-ok').addClass("status-nok");}
$("#newsletter-status").delay(4000,function(){$(this).html('').hide("slow");});});});});$.fn.delay=function(time,callback){jQuery.fx.step.delay=function(){};return this.animate({delay:1},time,callback);}
function toggleKeywords(ref,id)
{$('#tags-'+id).toggle();$(ref).html($(ref).html()=='(+)'?'(-)':'(+)');}
function cleanKeywords(str)
{var s=str;var rExps=[/[\xC0-\xC2]/g,/[\xE0-\xE2]/g,/[\xC8-\xCA]/g,/[\xE8-\xEB]/g,/[\xCC-\xCE]/g,/[\xEC-\xEE]/g,/[\xD2-\xD4]/g,/[\xF2-\xF4]/g,/[\xD9-\xDB]/g,/[\xF9-\xFB]/g];var repChar=['A','a','E','e','I','i','O','o','U','u'];for(var i=0;i<rExps.length;i++)
s=s.replace(rExps[i],repChar[i]);s=s.replace(/[^a-z0-9\s-\.']/gi,'');return s;}
function replaceMultiNewline(str)
{s=str.replace(/\n{3,}/g,"\n\n");return s;}
function replaceNewline(str)
{s=str.replace(/\n/g,' ');s=s.replace(/\s/g,' ').replace(/  ,/g,' ');s=s.replace(/\s+/g," ");return s;}
function fav(){var newT=document.createTextNode('');var s=document.getElementById('fav');if(window.sidebar){s.appendChild(newT);s.style.cursor='pointer';s.onclick=function(){window.sidebar.addPanel(document.title,self.location,'')};}else if(window.external){s.appendChild(newT);s.style.cursor='pointer';s.onclick=function(){window.external.AddFavorite(self.location,document.title)};}else if(window.opera){s.appendChild(newT);s.style.cursor='pointer';s.onclick=function(){var e=document.createElement('a');e.setAttribute('href',self.location);e.setAttribute('title',document.title);e.setAttribute('rel','sidebar');e.click();}}}
var pageLoaded=0;window.onload=function(){pageLoaded=1;}
function loaded(i,f){if(document.getElementById&&document.getElementById(i)!=null)f();else if(!pageLoaded)setTimeout('loaded(\''+i+'\','+f+')',100);}
loaded('fav',fav);
