
$(function()
{$('li a.open').mouseover(function()
{$(this).parent().find('div').show();as.action($(this).parent().find('a:first').text()+':toggle:icon mouseover:open');$(this).unbind('mouseover');});$('li a.open').parent().find('a:first').mouseover(function()
{$(this).parent().find('div').show();as.action($(this).text()+':toggle:link mouseover:open');$(this).unbind('mouseover');});$('li a.open').click(function()
{if($(this).parent().find('div').css('display')=='none')
{$(this).parent().find('div').show();as.action($(this).parent().find('a:first').text()+':toggle:icon click:open');}
else
{$(this).parent().find('div').hide();as.action($(this).parent().find('a:first').text()+':toggle:icon click:dicht');}});$('li div.link_info p input.code').focus(function()
{$(this).select();as.action($(this).parent().parent().parent().find('a:first').text()+':code click');});$('div.feed_product').mouseover(function()
{hide_feed_product_layers();var id=$(this).attr('id').substring(13);$("div#feed_product_"+id+"_border").show();$("div#feed_product_"+id+"_underlay").show();$("div#feed_product_"+id+"_overlay").show();});$('div.feed_product_underlay').mouseout(function()
{hide_feed_product_layers();});$('div.feed_product_border').mouseout(function()
{hide_feed_product_layers();});$('body').click(function()
{hide_feed_product_layers();});function hide_feed_product_layers()
{$('div.feed_product_border').hide();$('div.feed_product_underlay').hide();$('div.feed_product_overlay').hide();}
if(document.location.toString().match('#'))
{id=get_anchor(document.location.toString());if(id)
{highlight_block(id);}}
if((LMSvariant=="auto_occasions.versie-a")||(LMSvariant=="vakantie_camping.versie-a"))
{if(googleQuery!="")
{highlight_google_query();}}});function highlight_block(id)
{var highest_block_position=10000;var highlight_blok_title=id.substring(0,id.lastIndexOf('_'));$('.contentblock_anchored').removeClass('contentblock_anchored').addClass('contentblock');$("h2[id^='"+highlight_blok_title+"']").each(function()
{if($(this).parent().parent().attr('class')=='contentblock')
{$(this).parent().parent().removeClass('contentblock').addClass('contentblock_anchored');if($(this).offset().top<=highest_block_position)
{highest_block_position=$(this).offset().top;}}});if(highest_block_position!=10000)
{setTimeout("window.scrollTo(0, "+highest_block_position+" - 35);",100);}}
function get_anchor(href)
{var anchor=false;if(href.match('#'))
{anchor=href.split('#')[1];}
return anchor;}
function highlight_google_query()
{$("div.contentblock ul li a").each(function(){highlight_linktitle($(this));});$("div.contentblock_highlight ul li a").each(function(){highlight_linktitle($(this));});}
function highlight_linktitle(obj)
{var found=false;var link_keywords;var text=obj.text();var keywords=googleQuery.toLowerCase();keywords=keywords.split(' ');if((text!=null)&&(text!=''))
{link_keywords=text.split(' ');for(i=0;i<keywords.length;i++)
{var keyword_length=keywords[i].length;for(j=0;j<link_keywords.length;j++)
{var keyword_pos=link_keywords[j].toLowerCase().indexOf(keywords[i]);if(keyword_pos!=-1)
{link_keywords[j]=link_keywords[j].substr(0,keyword_pos)+'<span style="font-weight:bold;">'+link_keywords[j].substr(keyword_pos,keyword_length)+'</span>'+
link_keywords[j].substr(keyword_pos+keyword_length);found=true;}}}}
if(found)
{obj.html(link_keywords.join(' '));}}