(function($){Cufon.replace('div.leftBoxContent h3, h1, div.ocassionsList h2, form.form h3, div.newsSide h3, div#carDetails h2',{hover:true,fontFamily:"Corbel"});Cufon.replace('ul#menu li ul li a',{hover:true,fontFamily:"Aller"});EYE.slideshow=function(){var current=false,newCurrent=0,total,timer,images;var show=function(){if(current!==false){images.eq(current).stop()
.animate({'opacity':0},600,function(){$(this).css('display','none');});}
current=newCurrent;images.eq(current).css('display','block').stop().animate({'opacity':1},600);timer=setTimeout(goTo,slideshowSpeed*1000);};var goTo=function(ev){clearTimeout(timer);newCurrent=current+1;if(newCurrent>=total){newCurrent=0;}else if(newCurrent<0){newCurrent=total-1;}
show();}
return{init:function(){images=$('#visual img');total=images.size();if(total>0){images.css({'opacity':0,'display':'none'});show();}}};}();EYE.register(EYE.slideshow.init,'init');EYE.map=function(){var mapEl,mapObj,markers={};var showLabel=function(){this.label.labelDiv_.style.display='block';this.label.labelDiv_.style.zIndex=4000;this.setIcon('http://www.vetosnl.nl/images/marker_highlight.png');$('#dealer'+this.dealer).addClass('highlight');};var hideLabel=function(){this.label.labelDiv_.style.display='none';this.setZIndex();this.setIcon('http://www.vetosnl.nl/images/marker.png');$('#dealer'+this.dealer).removeClass('highlight');};var showDealer=function(){showLabel.apply(markers[parseInt($(this).attr('rel'),10)]);};var hideDealer=function(){hideLabel.apply(markers[parseInt($(this).attr('rel'),10)]);};return{init:function(){mapEl=document.getElementById('map');if(mapEl){var center=new google.maps.LatLng(52.21,5.53);mapObj=new google.maps.Map(mapEl,{zoom:7,center:center,mapTypeId:google.maps.MapTypeId.ROADMAP});if(EYE.map.coordinates){var i,dealers=$('#dealers strong');var marker;for(i=0,cnt=EYE.map.coordinates.length;i<cnt;i++){marker=new MarkerWithLabel({position:new google.maps.LatLng(EYE.map.coordinates[i].lat,EYE.map.coordinates[i].lng),draggable:false,raiseOnDrag:true,map:mapObj,labelContent:dealers.eq(i).text(),labelAnchor:new google.maps.Point(68,0),labelClass:"labels",labelStyle:{opacity:0.8},icon:'http://www.vetosnl.nl/images/marker.png',labelVisible:false});marker.dealer=EYE.map.coordinates[i].id;markers[EYE.map.coordinates[i].id]=marker;google.maps.event.addListener(marker,"mouseover",showLabel);google.maps.event.addListener(marker,"mouseout",hideLabel);}
$('#dealers a')
.bind('mouseenter',showDealer)
.bind('mouseleave',hideDealer);}}}}}();EYE.register(EYE.map.init,'init');})(jQuery);$(document).ready(function(){$("ul.mceEYEGalleryPart li a, a[rel^='gallery']").prettyPhoto({theme:'light_square',show_title:false,default_width:800,default_height:600,iframe_markup:'<iframe src ="{path}" width="{width}" height="{height}" frameborder="no" scrolling="no"></iframe>'});$('input.calendarfield').each(function(){$(this).datepicker({showButtonPanel:true,dateFormat:'yy-mm-dd',minDate:0});$(this).datepicker("option",$.datepicker.regional['nl']);});});
