/*
 * $Id: common.js 216 2009-10-16 14:17:34Z joris $ 
 */
function newWindow(mypage,myname,w,h,features) {
	if(screen.width){
		var winl = (screen.width-w)/2;
		var wint = (screen.height-h)/2;
	}
	else{winl = 0;wint =0;}
	if (winl < 0) winl = 0;
	if (wint < 0) wint = 0;
	
	var settings = 'height=' + h + ',';
	settings += 'width=' + w + ',';
	settings += 'top=' + wint + ',';
	settings += 'left=' + winl + ',';
	settings += features;
	win = window.open(mypage,myname,settings);
	win.window.focus();
}

$(document).ready(function() {
	
	$('ul.dropMenu li.hasChildren ul').addClass('hide');
	
//	Cufon.replace('#bodyColumn h2, ul#clubMenu a', {
//		fontFamily : 'Modaerne'
//	});
//	
//	Cufon.replace('#body h3', {
//		fontFamily : 'Modaerne',
//		fontSize: '16px'
//	});
	
	
//	Cufon.replace('#shopCategories div.productOverlay h4, #shopCategories div.productOverlay a', {
//		fontFamily : 'ModaerneLight'
//	});
	
	$('a.submit').click(function() {
		$(this).parents('form').submit();
	});
	
/*	Cufon.replace('.cufon, .cufon-normal, .homepage h3, #bflexPakketBlock h3, div.infoText, .shopTitle, div.processedContent h2.title, #bflexDemoRoom div#loginBox h3, #playerBox h2', {
		fontFamily : 'ModaerneLight',
		textShadow: '0px 0px grey'
	});

	Cufon.replace('#profileBlock h3, #documentList h3, .cufon-bold, #bflexPakketBlock div.infoButton, ul#clubMenu a', {
		fontFamily : 'Modaerne'
	});

	Cufon.replace('#bflexPakketBlock a.infoButton', {
		fontFamily : 'Modaerne',
		textShadow : '2px 1px grey',
			hover  : false
	});

	Cufon.replace('div.targetAudience div.processedContent h2.title, #shopCategories a.productLink, #shopCategories a.orderLink, .cufon-white', {
		fontFamily	: 'ModaerneLight',
		textShadow: '0px 0px white'
	});
	
	Cufon.replace('div.split-page div.processedContent h2.title, #shopCategories div.productOverlay h4', {
		fontFamily	: 'ModaerneLight'
	});*/
});

function setMainImage(id, imageFile,productId,imageNr) {
	var im = document.getElementById('mainImage');
	im.src = "/shop/afbeelding/large/"+id+"/"+imageFile;
//	im.href = "/shopimage.php?id="+productId+"&nr="+imageNr+"&amp;height=501&amp;width=507&amp;modal=true";
}

