﻿
$(document).ready(function() {
    //http://www.adobe.com/go/EN_US-H-GET-FLASH


    video_overlay2 =
		new YAHOO.widget.Panel("tvSpotVideoLayer",
			{ width: "359px",
			    height: "288px",
			    fixedcenter: true,
			    close: false,
			    draggable: false,
			    zindex: 500,
			    modal: true,
			    visible: false,
			    iframe: false
			}
		);
    video_overlay2.render();
    $("#tvSpotVideoLayer").css("display", "block");
    $(document).pngFix();

});
function showVideo2(videoId) {
    currentVideoId2 = videoId;
    currentVideoId = -1;
    video_overlay2.show();
    var flashvars2 = {
        account: s_account        
    };
    var params2 = {
        allowscriptaccess: "always", 'wmode': 'transparent'
    };
    var attributes2 = {
        //id: "myContent",
    name: "myTVContent"
    };
    $('#myTVContent').css("display", "block");
    swfobject.embedSWF("../media/new_video.swf", "myTVContent", "359", "288", "9.0.0", "expressInstall.swf", flashvars2, params2, attributes2, objectLoaded2);
    try{
		    myMovie2.playVideo(currentVideoId2);
	}catch(ex){}
}
function objectLoaded2(e) {
		myMovie2 = e.ref;	
}
function closeTVSpotMovie() { 

	if(myMovie2)
	    myMovie2.closeFlash();
	$('#myTVContent').css("display", "none");
	//swfobject.removeSWF("myTVContent");
	//if(swfobject.hasFlashPlayerVersion("9.0.0"))
	//    $('#myTVFlashContentWrapper').html("<div id='myTVContent'></div>");
    video_overlay2.hide();
}
	