function keywebgallery(ispc) { $(window).load(function () { dokeywebgallery(ispc); settimeout(function () { $(".firstbannerimg").css("visibility", "hidden") }, 500); });; } $(window).resize(function () { dokeywebgallery(); }); var banner; function dokeywebgallery(ispc) { if ($(window).width() < 768 && ispc == 'true') { return; } if ($(window).width() >= 768 && ispc == 'false') { return; } $("#html5zoo-pc-box").css("width", "100%"); $("#html5zoo-mobile-box").css("width", "100%"); var scripts = document.getelementsbytagname("script"); var jsfolder = ""; for (var i = 0; i < scripts.length; i++) { if (scripts[i].src && scripts[i].src.match(/keywebgallery\.js/i)) jsfolder = scripts[i].src.substr(0, scripts[i].src.lastindexof("/") + 1); } $("#html5zoo-mobile > div").remove(); $("#html5zoo-pc > div").remove(); var bannerid = $(window).width() < 768 ? "#html5zoo-mobile" : "#html5zoo-pc"; var banner_width = $(bannerid + "-box").find(".firstbannerimg img").width(); var banner_height = $(bannerid + "-box").find(".firstbannerimg img").height(); $(bannerid + "-box").width(banner_width); //alert($(bannerid+"-box").find(".firstbannerimg img").width()) var arrowwidth = $(bannerid).find("li").length > 1 ? 48 : 0; var navwidth = 0; if ($(bannerid).find("li").length > 1) navwidth = 24; banner = jquery(bannerid).html5zoo({ jsfolder: jsfolder, width: banner_width, height: banner_height, skinsfoldername: "", loadimageondemand: false, isresponsive: false, autoplayvideo: false, pauseonmouseover: true, addmargin: true, randomplay: false, slideinterval: 5000, // 控制时间 enabletouchswipe: true, transitiononfirstslide: false, loop: 0, autoplay: true, navplayvideoimage: "../images/play-32-32-0.png", navpreviewheight: 60, timerheight: 2, shownumbering: false, skin: "frontpage", navshowplaypause: true, navshowplayvideo: true, navshowplaypausestandalonemarginx: 8, navshowplaypausestandalonemarginy: 8, navbuttonradius: 0, navthumbnavigationarrowimageheight: 32, navmarginy: -30, showshadow: false, navfeaturedarrowimagewidth: 16, navpreviewwidth: 120, textpositionmarginright: 24, bordercolor: "#ffffff", navthumbnavigationarrowimagewidth: 32, navthumbtitlehovercss: "text-decoration:underline;", navcolor: "#999999", arrowwidth: arrowwidth, texteffecteasing: "easeoutcubic", texteffect: "fade", navspacing: 0, playvideoimage: "../images/playvideo-64-64-0.png", ribbonimage: "../images/ribbon_topleft-0.png", navwidth: navwidth, showribbon: false, arrowimage: "../images/arrows-48-48-3.png", timeropacity: 0.6, navthumbnavigationarrowimage: "../images/carouselarrows-32-32-0.png", navshowplaypausestandalone: false, navpreviewbordercolor: "#ffffff", ribbonposition: "topleft", navthumbdescriptioncss: "display:block;position:relative;padding:2px 4px;text-align:left;font:normal 12px arial,helvetica,sans-serif;color:#333;", arrowstyle: "mouseover", navthumbtitleheight: 20, textpositionmargintop: 24, navswitchonmouseover: false, navarrowimage: "../images/navarrows-28-28-0.png", arrowtop: 50, textstyle: "static", playvideoimageheight: 64, navfonthighlightcolor: "#666666", showbackgroundimage: false, navpreviewborder: 4, navopacity: 0.8, shadowcolor: "#aaaaaa", navbuttonshowbgimage: true, navbuttonbgimage: "../images/navbuttonbgimage-28-28-0.png", textbgcss: "display:block; position:absolute; top:0px; left:0px; width:100%; height:100%; background-color:#333333; opacity:0.6; filter:alpha(opacity=60);", navdirection: "horizontal", navborder: 4, bottomshadowimagewidth: 110, showtimer: false, navradius: 0, navshowpreview: true, navpreviewarrowheight: 8, navmarginx: 16, navfeaturedarrowimage: "../images/featuredarrow-16-8-0.png", navfeaturedarrowimageheight: 8, navstyle: "bullets", textpositionmarginleft: 24, descriptioncss: "display:block; position:relative; margin-top:4px; font:14px inder,arial,tahoma,helvetica,sans-serif; color:#fff;", navplaypauseimage: "../images/navplaypause-28-28-0.png", backgroundimagetop: -10, timercolor: "#ffffff", numberingformat: "%num/%total ", navfontsize: 12, navhighlightcolor: "#333333", navimage: "../images/bullet-24-24-4.png", navheight: 24, navshowplaypausestandaloneautohide: false, navbuttoncolor: "#999999", navshowarrow: true, navshowfeaturedarrow: false, titlecss: "display:block; position:relative; font:16px inder,arial,tahoma,helvetica,sans-serif; color:#fff;", ribbonimagey: 0, ribbonimagex: 0, navshowplaypausestandaloneposition: "bottomright", shadowsize: 5, arrowhideonmouseleave: banner_width, navshowplaypausestandalonewidth: 28, navshowplaypausestandaloneheight: 28, backgroundimagewidth: 120, textautohide: false, navthumbtitlewidth: 120, navpreviewposition: "top", playvideoimagewidth: 64, arrowheight: 48, arrowmargin: 50, texteffectduration: banner_width, bottomshadowimage: "../images/bottomshadow-110-100-5.png", border: 0, timerposition: "bottom", navfontcolor: "#333333", navthumbnavigationstyle: "arrow", borderradius: 0, navbuttonhighlightcolor: "#333333", textpositionstatic: "bottom", navthumbstyle: "imageonly", textcss: "display:block; padding:12px; text-align:left;", navbordercolor: "#ffffff", navpreviewarrowimage: "../images/previewarrow-16-8-0.png", showbottomshadow: false, textpositionmarginstatic: 0, backgroundimage: "", navposition: "bottom", navpreviewarrowwidth: 16, bottomshadowimagetop: 100, textpositiondynamic: "bottomleft", navshowbuttons: false, navthumbtitlecss: "display:block;position:relative;padding:2px 4px;text-align:left;font:bold 14px arial,helvetica,sans-serif;color:#333;", textpositionmarginbottom: 24, ribbonmarginy: 0, ribbonmarginx: 0, slide: { duration: banner_width / 2.5, easing: "easeoutcubic", checked: true }, crossfade: { duration: banner_width, easing: "easeoutcubic", checked: true }, threedhorizontal: { checked: true, bgcolor: "#222222", perspective: banner_width, slicecount: 1, duration: 1500, easing: "easeoutcubic", fallback: "slice", scatter: 5, perspectiveorigin: "bottom" }, slice: { duration: 1500, easing: "easeoutcubic", checked: true, effects: "up,down,updown", slicecount: 10 }, fade: { duration: banner_width, easing: "easeoutcubic", checked: true }, blocks: { columncount: 5, checked: true, rowcount: 5, effects: "topleft,bottomright,top,bottom,random", duration: 1500, easing: "easeoutcubic" }, blinds: { duration: 2000, easing: "easeoutcubic", checked: true, slicecount: 3 }, shuffle: { duration: 1500, easing: "easeoutcubic", columncount: 5, checked: true, rowcount: 5 }, threed: { checked: true, bgcolor: "#222222", perspective: banner_width, slicecount: 5, duration: 1500, easing: "easeoutcubic", fallback: "slice", scatter: 5, perspectiveorigin: "right" }, transition: "slide" }); }