/**
 * Bootstrap.js - Bootstrap for all Javascript functionality
 * 
 * @author  Webstores <info at webstores dot nl>
 *           Copyright (c) Webstores internet totaalbureau <http://www.webstores.nl/>
 */

// Cufon.replace('#content-wrapper h1', { fontFamily: 'Futura Std' });
// Cufon.replace('#content-wrapper h2', { fontFamily: 'Futura Std' });
// Cufon.replace('#content-wrapper h3', { fontFamily: 'Futura Std' });
// Cufon.replace('#sidebar-content .contactgegevens h3', { fontFamily: 'Futura Std' });
// Cufon.replace('#content-wrapper h4', { fontFamily: 'Futura Std' });
// Cufon.replace('#content-wrapper h5', { fontFamily: 'Futura Std' });

WS.DOM.ready(function() {
	
	// External links
	var a=document.getElementsByTagName('a');for(var i=0;i<a.length;i++){if(/external/.test(a[i].rel)){a[i].target='_blank';}}
	
	// Toggle input values
	var inputs=WS.DOM.getElementsByClass('toggle-value');inputs.forEach(function(el){var v=el.value;WS.Event.addEvent(el,'focus',function(){if(this.value==v){this.value='';}WS.addClass(this,'focus');});WS.Event.addEvent(el,'blur',function(){if(this.value==''){this.value=v;WS.removeClass(this,'focus');}});});
	
	// IE6 hover
	if(WS.browser.IE6){var hoverEls=$('navigation').getElementsByTagName('li');for(var i=0;i<hoverEls.length;i++){WS.Event.addEvent(hoverEls[i],'mouseover',function(){WS.addClass(this,'iehover');});WS.Event.addEvent(hoverEls[i],'mouseout',function(){WS.removeClass(this,'iehover');});}}
	
	// Visual scroller
	if(jQuery('#visual .items img').length>1){jQuery('#visual').scrollable({speed:800,size:1,clickable:false,onSeek:function(){var slideEl=this.getItems()[this.getIndex()+1];}}).autoscroll({interval:5000}).circular().navigator({navi:'ol#visual-bullets',activeClass:'selected'});}else{jQuery('#photo-widget-controls').addClass('hidden');}
	jQuery("a[rel='colorbox']").colorbox({ iframe: true,width: "700px", height: "500px"});
	jQuery("a[rel='colorboxfull']").colorbox({opacity:0.8,current:'Afbeelding {current} van {total}',previous:'Vorige',next:'Volgende',close:'Sluiten',slideshowStart:'Diavoorstelling starten',slideshowStop:'Diavoorstelling stoppen'});


});
Cufon.replace('#content-wrapper h1', { fontFamily: 'Futura MdCn BT' });
Cufon.replace('#content-wrapper h2', { fontFamily: 'Futura MdCn BT' });
Cufon.replace('#content-wrapper h3', { fontFamily: 'Futura MdCn BT' });
Cufon.replace('#sidebar-content .contactgegevens h3', { fontFamily: 'Futura MdCn BT' });
Cufon.replace('#content-wrapper h4', { fontFamily: 'Futura MdCn BT' });
Cufon.replace('#content-wrapper h5', { fontFamily: 'Futura MdCn BT' });

