var banner_video = { 'flashplayer': 'http://image.wanda.cn/statics/js/plug/jwplayer/player.swf', 'file': "", 'image': '', 'provider': 'http', 'http.startparam': 'start', 'skin': 'http://image.wanda.cn/statics/js/plug/jwplayer/skin/beelden.zip', 'wmode': 'opaque', 'autostart': 'true', 'frontcolor': '000000', 'lightcolor': 'cc9900', 'screencolor': '000000', 'controlbar': 'none', 'width': '1000', 'height': '292' }; var index_video = { 'flashplayer': 'http://image.wanda.cn/statics/js/plug/jwplayer/player.swf', 'file': "", 'image': '', 'provider': 'http', 'http.startparam': 'start', 'skin': 'http://image.wanda.cn/statics/js/plug/jwplayer/skin/beelden.zip', 'wmode': 'opaque', 'autostart': 'true', 'frontcolor': '000000', 'lightcolor': 'cc9900', 'screencolor': '000000', 'controlbar': 'bottom', 'width': '720', 'height': '420' }; $(function() { //顶部下拉 $(".top-bar span").bind({ click: function() { $(".top-bar span").removeclass('cur'); $(".top-bar span").find("div").hide(); $(this).addclass('cur'); $(this).find("div").show(); } }); $(".top-bar span").hover(function() { }, function() { $(".top-bar span").removeclass('cur'); $(".top-bar span").find("div").hide(); }) //顶部搜索 $("#hd-sch").bind({ focus: function() { if($(this).val() == "输入关键字") { $(this).val("") } }, blur: function() { if($(this).val() == "") { $(this).val("输入关键字") } } }); //首页视频弹窗开启 $(".js-source-video").click(function() { var video_play_url = $(this).attr("video-src"); index_video.file = video_play_url; $(".js-tar-video").show(); jwplayer('playercon2').setup(index_video); }); //首页视频弹窗关闭 $(".float-layer .close").click(function() { $(this).parent().parent().parent().fadeout(); jwplayer('playercon2').stop(); }); // 图片背景 bg_center(); $(".foot-link a").hover(function() { var src = $(this).find("img").attr("hover-src"); $(this).find("b").css({ "background": "url(" + src + ") no-repeat center center" }) }, function() { var src = $(this).find("img").attr("src"); $(this).find("b").css({ "background": "url(" + src + ") no-repeat center center" }) }); $(".js-tab-tit li").click(function() { var idx = $(this).index(); $(this).closest('div').find("li").removeclass('z-crt'); $(this).addclass('z-crt'); $(".js-tab-con>div").hide(); $(".js-tab-con>div").eq(idx).show(); }); //首页banner视频关闭 $(".index-focus .close").click(function() { jwplayer('playercon1').stop(); $(".banner-video").hide(); $(this).hide(); }); //index-cultural-begin function setcontentsize() { $('.swiper-content-cultural').css({ //height: $(window).height() - $('.swiper-nav-cultural').height() }) } setcontentsize() $(window).resize(function() { setcontentsize() }); //swiper content var contentswiper = $('.swiper-content-cultural').swiper({ autoplay: 5000, loop: true, onslidechangestart: function() { updatenavposition() }, onslidechangeend: function(swiper) { if(swiper.isend) { alert("最后一页了") } } }); //nav var navswiper = $('.swiper-nav-cultural').swiper({ visibilityfullfit: true, slidesperview: 'auto', loop: true, //thumbnails clicks onslideclick: function() { contentswiper.swipeto(navswiper.clickedslideindex-1) } }); //update nav position function updatenavposition() { $('.swiper-nav-cultural .active-nav').removeclass('active-nav') var activenav = $('.swiper-nav-cultural .swiper-slide').eq(contentswiper.activeindex).addclass('active-nav') console.log(contentswiper.activeloopindex) if(!activenav.hasclass('swiper-slide-visible')) { if(activenav.index() > navswiper.activeindex) { var thumbspernav = math.floor(navswiper.width / activenav.width()) - 3 navswiper.swipeto(activenav.index() - thumbspernav) } else { navswiper.swipeto(activenav.index() - 1) } } }; $('.swiper-cultural .arrow-left').on('click', function(e) { e.preventdefault() contentswiper.swipeprev() }) $('.swiper-cultural .arrow-right').on('click', function(e) { e.preventdefault() contentswiper.swipenext() }); //index-cultural-end }) // 顶部搜索 function mysearch() { if((document.getelementbyid("hd-sch").value == "") || (document.getelementbyid("hd-sch").value == "输入关键字")) { alert("请输入关键词进行搜索"); document.getelementbyid("hd-sch").focus(); return false; } return true; } // 首页banner视频播放 function banner_video_play(obj) { console.log(banner_video) var video_play_url = $(obj).attr("video-src"); banner_video.file = video_play_url; $(".banner-video").show(); jwplayer('playercon1').setup(banner_video); jwplayer('playercon1').oncomplete(function() { $(".banner-video").fadeout(); }); $(obj).next(".close").show(); }; //图片变背景 function bg_center() { //图片换背景 $(".js-bg-center").each(function() { var src = $(this).find("img").attr("src"); var hover_src = $(this).find("img").attr("hover-src"); $(this).css({ "background": "url(" + src + ") no-repeat center center" }).find("img").hide(); }); }; //query function getquerystring(name) { var reg = new regexp('(^|&)' + name + '=([^&]*)(&|$)', 'i'); var r = window.location.search.substr(1).match(reg); if(r != null) { return unescape(r[2]); } return null; } //# sourcemappingurl=../maps/js.js.map