$(document).ready(function() { $("#foto-video-dettagli-corso").click(function(){ var nome_del_video = $("#PopupVideo").attr("name"); //CENTER POPUP /*var windowWidth = document.documentElement.clientWidth; var windowHeight = document.documentElement.clientHeight; var popupHeight = $("#PopupVideo").height(); var popupWidth = $("#PopupVideo").width(); $("#PopupVideo").css({ "position": "absolute", "top": windowHeight/2-popupHeight/2, "left": windowWidth/2-popupWidth/2 }); $("#backgroundPopup").css({ //necessario per ie6 "height": windowHeight });*/ //MOSTRA POPUP $("#backgroundPopup").css({ "opacity": "0.7" }); $("#PopupVideoIframe").html(""); $("#backgroundPopup").fadeIn("slow",function(){ $("#PopupVideo").fadeIn("slow"); }); /*$("#div_flash_player").css({ "visibility": "hidden" });*/ }); $("#PopupVideo a.chiudi_popup_video,#backgroundPopup").click(function(){ //RISOLVO IL PROBLEMA IN IE CHE MI FACEVA DIVENTARE NERO COMPLETO LO SFONDO E POI LO SFUMAVA VIA $("#backgroundPopup").css({"opacity": "0.7"}); $("#backgroundPopup").fadeOut("slow"); $("#PopupVideo").fadeOut("slow",function(){ $("#PopupVideoIframe").html(""); /*$("#div_flash_player").css({ "visibility": "visible" });*/ }); }); });