//document.writeln("");
// JavaScript Document
$(function () {
var srcl="",simg="";
$(".video_button").click(function(e){
srcl=$(this).data("video");
simg=$(this).data("img");
$(".video_appbox").fadeIn();
$(".video_appbox h5").text($(this).attr("title"));
$(".video_appbox p").text($(this).attr("video-data"));
video();
})
$(".video_appbox .mask,.video_appbox > a").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()})
}
/*
var srcl="",simg=''
video(jQuery(".video_appbox").width() * 0.8);
if (jQuery(".nav_btn").is(":visible") && jQuery(window).width() <= jQuery(window).height()) {
jQuery(".video_appbox").css({ "top": "50%", "marginTop": (jQuery(window).height()/2-(jQuery(".video_appbox").height()) / 2) * -1, "width": jQuery(window).width() * 0.9, "marginLeft": (jQuery(".video_appbox").width()) / 2 * -1 });
} else {
jQuery(".video_appbox").css({ "top": "50%", "marginTop": (jQuery(window).height()/2-(jQuery(".video_appbox").height()) / 2) * -1, "width": jQuery(window).width() * 0.5, "marginLeft": (jQuery(".video_appbox").width()) / 2 * -1 });
}
jQuery(".video_appbox .video_t").css({ "left": "50%", "marginLeft": (jQuery(".video_appbox").width() * 0.8) / 2 * -1 });
jQuery(".video_appbox h5,.video_appbox p").width(jQuery(".video_appbox").width() * 0.8);
jQuery(".video_appbox h5").css({ "paddingTop": 70 + jQuery(".video_appbox").width() * 0.8 * 0.61 });
var isSupportTouch = "ontouchend" in document ? true : false;
jQuery(document).on("click",".video_button",function(e){
srcl=jQuery(this).data("video");
simg=jQuery(this).data("img");
jQuery(".video_appbox").fadeIn();
jQuery(".video_appbox_bg").fadeIn();
jQuery(".video_appbox h5").text(jQuery(this).attr("title"));
jQuery(".video_appbox p").text(jQuery(this).attr("video-data"));
if (jQuery(".nav_btn").is(":visible") && jQuery(window).width() <= jQuery(window).height()) {
jQuery(".video_appbox").css({ "top": "50%", "marginTop": (jQuery(window).height()/2-(jQuery(".video_appbox").height()) / 2) * -1, "width": jQuery(window).width() * 0.9, "marginLeft": (jQuery(".video_appbox").width()) / 2 * -1 });
} else {
jQuery(".video_appbox").css({ "top": "50%", "marginTop": (jQuery(window).height()/2-(jQuery(".video_appbox").height()) / 2) * -1, "width": jQuery(window).width() * 0.5, "marginLeft": (jQuery(".video_appbox").width()) / 2 * -1 });
}
jQuery(".video_appbox .video_t").css({ "left": "50%", "marginLeft": (jQuery(".video_appbox").width() * 0.8) / 2 * -1 });
jQuery(".video_appbox h5,.video_appbox p").width(jQuery(".video_appbox").width() * 0.8);
jQuery(".video_appbox h5").css({ "paddingTop": 70 + jQuery(".video_appbox").width() * 0.8 * 0.61 });
video(jQuery(".video_appbox").width()*0.8)
})
jQuery(".video_appbox > a ,.video_appbox_bg").click(function () {
jQuery(".video_appbox").fadeOut();
jQuery(".video_appbox_bg").fadeOut();
jQuery(".video_t").html("")
})
function video(width){
if(isSupportTouch) {
jQuery(".video_t").html("")
jQuery(".video_t video").attr({ "width": width, "height": width * 0.61 })
jQuery("#player1").css({"width":width,"height":width*0.61});
} else {
videoBox(width, width*0.61 , srcl, 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");
}*/
})