if(typeof sIFR == "function"){
	sIFR.replaceElement(named({sSelector:"body h1", sFlashSrc:"myriad.swf", sColor:"#737373", sLinkColor:"#737373", sBgColor:"#ffffff", sHoverColor:"#FFFFFF", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left",sWmode: "transparent"}));
	
	//sIFR.replaceElement(named({sSelector:"h2", sFlashSrc:"thesans_bold.swf", sColor:"#FFFFFF", sLinkColor:"#737373", sBgColor:"#ffffff", sHoverColor:"#FFFFFF", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left",sWmode: "transparent"}));
	
	//sIFR.replaceElement(named({sSelector:"h3", sFlashSrc:"thesans.swf", sColor:"#000000", sLinkColor:"#737373", sBgColor:"#ffffff", sHoverColor:"#FFFFFF", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left",sWmode: "transparent"}));
	
		//sIFR.replaceElement(named({sSelector:"h4", sFlashSrc:"thesans.swf", sColor:"#ff6600", sLinkColor:"#737373", sBgColor:"#ffffff", sHoverColor:"#FFFFFF", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left",sWmode: "transparent"}));
};

$(document).ready(function(){
		
	$(".email").each(function(){
	    var ats, dots, address, i;
	    ats = [' (at) '];
	    dots = [' (dot) '];
	    address = $(this).html();
	    for ( i = 0; i < ats.length; i++ ) {
	        address = address.replace(ats[i], '@');
	    }
	    for ( i = 0; i < dots.length; i++ ) {
	        address = address.replace(dots[i], '.');
	        address = address.replace(dots[i], '.');
	        address = address.replace(dots[i], '.');
	    }
	    $(this).html('<a href="mailto:' + address + '">' + address + '</a>');
	});

		
	(function($) {
	  var cache = [];
	  // Arguments are image paths relative to the current page.
	  $.preLoadImages = function() {
	    var args_len = arguments.length;
	    for (var i = args_len; i--;) {
	      var cacheImage = document.createElement('img');
	      cacheImage.src = arguments[i];
	      cache.push(cacheImage);
	    }
	  }
	})(jQuery)
	
	$(".content_text_text a").attr('target','_blank');
	$(".content_text_text a").addClass("link_grijs_active");
	$(".content_text_text a[title=intern]").attr('target','_self');
	
	$(".content_text_text a[title=lightbox]").addClass("lightbox");
	
	$(".lightbox").lightBox();
	
	$(".case_img_klein").click(function(){
		var tmp = $(this).attr("id");
		var tmp_2 = tmp.split(",");
		var volgnr = tmp_2[0];
		var id = tmp_2[1];
		
		$(".case_img_groot").children("a").children("img").fadeOut('0.2', function() {
			$(".case_img_groot").children("a").children("img").attr('src','werk_pics/w_'+id+'.png');
			
			$(".case_img_groot").children("a").attr('href','werk_pics/g_'+id+'.png');
			
			$(".case_img_groot").children("a").children("img").fadeIn('0.2');
		});
		
		var destination = ((volgnr*70)-465);
		$(".case_img_pijl_pic").attr('style','margin-left:'+destination+'px');
	})
	
	/*
	$(".werk_img_klein").click(function(){
		var tmp = $(this).attr("id");
		var tmp_2 = tmp.split(",");
		var volgnr = tmp_2[0];
		var id = tmp_2[1];
		var soort = tmp_2[2];
		
		alert(soort);
		
		
		$(".werk_img_groot").children("a").children("img").fadeOut('0.2', function() {
			$(".werk_img_groot").children("a").children("img").attr('src','werk_pics/w_'+id+'.png');
			
			$(".werk_img_groot").children("a").attr('href','werk_pics/g_'+id+'.png');
			
			$(".werk_img_groot").children("a").children("img").fadeIn('0.2');
		});

		var destination = ((volgnr*75)-909);
		$(".werk_img_pijl_pic").attr('style','margin-left:'+destination+'px');

	})
	*/
		
	$(".search_input_grijs").focus(function(){	
		$(this).attr("value","");
		$(this).removeClass();
		$(this).addClass("search_input");
	})
	
	$(".search_input_grijs").blur(function(){	
		if($(this).attr("value")==""){
			$(this).attr("value","zoeken");
			$(this).removeClass();
			$(this).addClass("search_input_grijs");
		}
	})
	
	$(".pijltje").children("a").mouseover(function(){
		$(this).animate({
			fontSize: '15px'
		},100);
	});
	
	$(".pijltje").children("a").mouseout(function(){
		$(this).animate({
			fontSize: '12px'
		},100);
	});
	
	$(".pijltje_actief").children("a").mouseover(function(){
		$(this).animate({
			fontSize: '15px'
		},100);
	});
	
	$(".pijltje_actief").children("a").mouseout(function(){
		$(this).animate({
			fontSize: '12px'
		},100);
	});
	
	$(".image").lazyload({
	    effect : "fadeIn",
	    placeholder: "images/grey.gif"
	});
	
	var  hoogte = $("#inspiratie_hoogte").attr("value");
	$("#inspiratie_container").attr("style","height:"+hoogte+"px")
	
	$(".zwartglas").mouseenter(function(){
		$(".zwartglas").fadeIn(200);
		$(this).fadeOut(200);	
	})
	
	$(".image").mouseout(function(){
		$(".zwartglas").fadeIn(200);
	})
})
