// javascript document
$(function(){
$(".vide0_close").click(function() {
$(this).parents(".video_appbox").hide();
$(".video_t").html("");
});
var srcl="",simg='',src2="";
//高度计算
var issupporttouch = "ontouchend" in document ? true : false;
$(".video_button").click(function(e){
srcl=$(this).data("video");
src2=$(this).data("video1");
simg=$(this).data("img");
$(".video_appbox").fadein();
video()
})
$(".video_appbox .mask").click(function(){
$(".video_appbox").fadeout();
$(".video_t").html("")
})
function video(){
$(".video_t").html("")
$(".video_t video").attr({width:$(".video_t").width(),height:$(".video_t").height()})
if(issupporttouch) {
$(".video_t").html("")
//
$(".video_t video").attr({width:$(".video_t").width(),height:$(".video_t").height()})
} else {
videobox($(".video_t").width(), $(".video_t").height(), src2,simg);
}
}
function videobox(width, height, url,img) {
var s1 = new swfobject("../flash/flvplayer.swf","single",width,height,"7");
s1.addparam("allowfullscreen","true");
s1.addparam("wmode","transparent");
s1.addvariable("file",url);
s1.addvariable("autostart","true");
s1.addvariable("width",width);
s1.addvariable("backcolor",0x000000);
s1.addvariable("frontcolor",0xffffff);
s1.addvariable("lightcolor",0x000000);
s1.addvariable("height",height);
s1.write("player1");
}
})