function openpopupwindow(fileName, width, height){
	try{           
		wndParam = 'width=' + width + ',height=' + height + ',directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=no';
	  	hlhppwWnd = window.open(fileName, 'hlhppWnd', wndParam); 	
		hlhppwWnd.focus();

	}catch (e) { }
}

$(function(){
	$("#infomenu LI").filter(":first, :last").addClass('pink');
	$('a.lightbox').lightBox();
	/*$('#blog').click(function() {
		alert("Bientôt, le blog de Homelike Home\r\nSoon, Homelike Home\'s blog");
		return false;
	});*/
	
	//Contact form link
	$('div.fc a').click(function(){
		openpopupwindow(baseUrl + $(this).attr('href') + '/default/info/contact', 550, 450);
		return false;
	});

	// Only for homepage
	$('#page_home').each(function() {
		var d = new Date();
		var h = d.getHours();

		if ((h <= 6) || (h >= 20)) {
			$('body').addClass('night');
		}
	});

	// Temporarily disables the language selectors, commented css rules too in all.css and night.css
	$('div#lang li#it, div#lang li#es').find('a').css('cursor','default').click(function() {
		return false;
	});
});
