/* REGULAR EXPRESSIONS */
telRegExp = /([0-9-]+){11}|([0-9]+){10}/; 
timeRegExp = /^(\d{1,2}):(\d{2})$/;
emailRegExp = /^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.([a-zA-Z]){2,4})$/;
postcodeRegExp = /^([0-9]){4}([a-zA-Z]){2}$/;


var sitebase = "http://www.lancelotkids.nl/";

/* LANCELOT KIDS */
function goTo(url) {
	window.location = url;
}

function confirm_goto(question, url) {
	var cbox = confirm(question);
	if(cbox == true) {
		window.location = url;
	}
}

function setOpacity(divId,layerId) {
	document.getElementById(divId).style.display = 'block';
	document.getElementById(layerId).style.cursor = 'pointer';
}

function resetOpacity(divId,layerId) {
	document.getElementById(divId).style.display = 'none';
	document.getElementById(layerId).style.cursor = 'default';
}
/* ======== CUFON ======== */
Cufon.replace('.content_wrapper h1',{ fontFamily: 'Helvetica Neue LT Pro', hover: true});
Cufon.replace('.content_wrapper h2',{ fontFamily: 'Helvetica Neue LT Pro', hover: true});
Cufon.replace('.content_wrapper h3',{ fontFamily: 'Helvetica Neue LT Pro', hover: true});

//webwinkel
Cufon.replace('.filter_vertical_maintop',{ fontFamily: 'Helvetica Neue LT Pro', hover: true});
Cufon.replace('.filtercolkop',{ fontFamily: 'Helvetica Neue LT Pro', hover: true});
Cufon.replace('.scwe_filter_submit_btn',{ fontFamily: 'Helvetica Neue LT Pro', hover: true});
Cufon.replace('.producttoptitle',{ fontFamily: 'Helvetica Neue LT Pro', hover: true});
Cufon.replace('.productordertoptitle',{ fontFamily: 'Helvetica Neue LT Pro', hover: true});


$(document).ready(function(){
	$('.offer').hover(function(){
		$(this).find('h1').stop().css('color', '#fff');
		$(this).find('h2').stop().css('color', '#fff');
		$(this).find('h3').stop().css('color', '#fff');
		$(this).find('div').stop().hide();
		Cufon.refresh();
	}, function(){
		$(this).find('h1').stop().css('color', '#3f3f3f');
		$(this).find('h2').stop().css('color', '#3f3f3f');
		$(this).find('h3').stop().css('color', '#1e829f');
		$(this).find('div').stop().show();
		Cufon.refresh();
	});
	
	
/* ======== IMG GRAYSCALE =====*/
	$('.product').hover(function(){
		var id 	= $(this).attr('id');
		$(this).find("img").attr('src', ''+sitebase+'images/tiles/'+id+'.jpg' ); 
	}, function(){
		var id 	= $(this).attr('id');
		var img = "image_grayscale.php?image="+id;
		$(this).find("img").attr('src', ''+sitebase+''+img+''); 
	});
});
