//<![CDATA[ 
$(document).ready(function(){
//function AutoPopulate
function populateElement(selector, defvalue) {
$(selector).each(function() {
if($.trim(this.value) == "") {
this.value = defvalue;
}
});
  
$(selector).focus(function() {
if(this.value == defvalue) {
this.value = "";
}
});
    
$(selector).blur(function() {
if($.trim(this.value) == "") {
this.value = defvalue;
}
});
}
//--- valore di default nel campo di testo
populateElement('#query', 'cerca nei brani...');
//populateElement('#sito', 'http://');

//Show link to FFOX if Navigator is IE
init();
	
//-----------------
function segnala() 
  { 
    mail_str = "mailto:?subject= Amnesia Vivace - Web Magazine"; 
    mail_str += "&body=Ti segnalo la rivista on line: http://www.amnesiavivace.it"+"\n\n"; 
    location.href = mail_str; 
  } 

function init(){
var ff=document.getElementById("fflink");
if(navigator.userAgent.indexOf("Gecko")!=(-1)){
if (ff) document.getElementById("fflink").style.display="none";
}}

//http://flash.html.it/guide/lezione/2921/apertura-di-una-popup
//Code: http://html.it/guide/img/negatyve_javascript/apriPopup/html004txt.html
function avClip(nome){
        var finestra='../../../media/media.asp?vid='+nome
		var wdt = screen.width;
        var hgt = screen.height;
		var lar = 432;
        var alt = 310;
        var x = Math.round( (wdt / 2) - (lar / 2) );
        var y = Math.round( (hgt / 2) - (alt / 2) );
        window.open(finestra, 'v'+nome, 'width=' + lar + ',height=' + alt + ',left=' + x + ',screenX=' + x + ',top=' + y + ',screenY=' + y);
}
});
//]]>