function abrePopUp(url) {
	var width  = 900;
	var height = 500;
	var left   = (screen.width  - width)/2;
	var top    = (screen.height - height)/2;
	var params = 'width='+width+', height='+height;
	params += ', top='+top+', left='+left;
	params += ', directories=no';
	params += ', location=no';
	params += ', menubar=no';
	params += ', resizable=no';
	params += ', scrollbars=no';
	params += ', status=no';
	params += ', toolbar=no';
	newwin=window.open(url,'window1', params);
	if (window.focus) {newwin.focus()}
	return false;
}


function abrePopUpBig(url) {
	var width  = 1200;
	var height = 600;
	var left   = (screen.width  - width)/2;
	var top    = (screen.height - (height + 100))/2;
	var params = 'width='+width+', height='+height;
	params += ', top='+top+', left='+left;
	params += ', directories=no';
	params += ', location=no';
	params += ', menubar=no';
	params += ', resizable=no';
	params += ', scrollbars=no';
	params += ', status=no';
	params += ', toolbar=no';
	newwin=window.open(url,'window1', params);
	if (window.focus) {newwin.focus()}
	return false;
}






// função searchbox clickclear ( clear and unclear )
function clickclear(thisfield, defaulttext) {
	if (thisfield.value == defaulttext) {
		thisfield.value = "";
	}
}

    
function clickrecall(thisfield, defaulttext) {
	if (thisfield.value == "") {
		thisfield.value = defaulttext;
	}
}
// EO função searchbox clickclear
	
	
	


// função searchbox validaP ( verifica se "", se "pesquisa rápida..." e  )
function validaP(thisform, Elemento, msg) {
	with (thisform) {
		if (checkP(Elemento, msg)==false) {
			Elemento.value="";
			Elemento.focus();
			return false;
		}
		if (lingua1.value == "" && thisform.lingua2.value == "" && thisform.lingua3.value == "") {
			alert("Não escolheu qualquer lingua !! Assumimos pt-PT");
		}
	}
}

function checkP(field,alerttxt) {
	with (field) {
		if (value==null||value==""||value=="pesquisa rápida..."||value=="pesquisar...") {
			alert(alerttxt);return false;
		} else {
			return true;
		}
	}
}
// EO função searchbox validaP
	
	
$(document).ready(function() {
	$("#enviar_filmeThumb").hover(function() {
		$(this).css({'z-index' : '10'}); /*Add a higher z-index value so this image stays on top*/ 
		$(this).find('img').addClass("hover").stop() /* Add class of "hover", then stop animation queue buildup*/
			.animate({
				marginTop: '-50px', /* The next 4 lines will vertically align this image */ 
				marginLeft: '-50px',
				width: '214px', /* Set new width */
				padding: '10px'
			}, 200); /* this value of "200" is the speed of how fast/slow this hover animates */

		} , function() {
		$(this).css({'z-index' : '0'}); /* Set z-index back to 0 */
		$(this).find('img').removeClass("hover").stop()  /* Remove the "hover" class , then stop animation queue buildup*/
			.animate({
				marginTop: '0', /* Set alignment back to default */
				marginLeft: '0',
				width: '100px', /* Set width back to default */
				padding: '5px'
			}, 400);
	});
});
