/**
 * Behavior of the searchfield
*/
$(document).ready(function($) {
	

	
	$('#s').bind('click',function(e){
		$(e.target).val('');
	});
	$('#s').bind('blur',function(e){
		if($(e.target).val()==''){
			$(e.target).val('Zoeken...');
		}
	});
	$('#searchsubmit').bind('click',function(e){
		if($('#s').val == ''){
			$('#s').animate( { color: '#EC1C24'}, 1000 ); 
		}
	});
});

$(document).ready(function($)  {	
	$('img').each(function() {
		if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) {
			// image was broken, replace with your new image
	//		this.src = "/images/affiliates/default.gif";
		}
	});
});
$(document).ready(function() {
	function imgErr(obj, name){
		var sURL = '';
		switch(name){
			case 'top-aanbiedingen':
			sURL = '/wp-content/themes/vakantieshop/images/defaultphotosmall.jpg';
			break;
			case 'supplier':
			sURL = '/images/affiliates/default.gif';
			break;
			case 'productfeed':
			sURL = ' /wp-content/themes/vakantieshop/images/defaultphoto.jpg';
			break;
			case 'vliegtickets':
			sURL = ' /wp-content/themes/vakantieshop/images/defaultvliegen.jpg';
			break;
		}
		obj.src = sURL;	
	}
});