(function(s){function i(s){s=s||500;$("html,body").stop().animate({scrolltop:0},s)}function n(i){function n(){$(s).scrolltop()>0?t.addclass("isfixed"):t.removeclass("isfixed")}var t=$(i);$(function(){n()}),$(s).on("scroll",n),$(s).on("load",n),$(s).on("resize",n)}function t(s){function i(){$(".ys_hd_pc").hover(function(){n.addclass("ishovered")},function(){n.removeclass("ishovered")})}var n=$(s);$(function(){i()}),$(".ys_hd_pc").on("hover",i)}function e(i){var n=$(i),t=!0;if($(s).width()>1200&&n.find("video").length>0){function e(){o(),l(),a()}function o(){var s=n.find(".slick-slide[data-slick-index=0]"),i=s.find("video");i.length>0?(n.slick("slickpause"),n.get(0).slick.slidecount<2&&i.attr("loop","loop"),i.get(0).paused&&settimeout(function(){i.get(0).play()},100)):n.slick("slickplay")}function a(){n.on("afterchange",function(s,i,e){n.find("video").each(function(){var s=$(this).get(0);s.pause(),s.currenttime=0});var o=$(i.$slides[e]),a=o.find("video");a.length>0?(n.slick("slickpause"),a.get(0).play()):t&&n.slick("slickplay")})}function l(){n.find("video").each(function(){var s=$(this).get(0);s.onended=function(){t&&(n.slick("next"),n.slick("slickplay"))}})}e()}else n.slick("play");var c={play:function(){n.slick("slickplay"),t=!0},pause:function(){t=!1,n.slick("slickpause")}};return c}function o(s,i){var n=$(s);n.find(".ys_select_li").each(function(){var s=$(this).index();null==$(this).attr("data-id")&&$(this).attr("data-id",s),$(this).attr("data-value",$(this).text())}),n.find(".ys_select_hd").click(function(s){if(s.stoppropagation(),$(this).toggleclass("on"),$(this).parents(".ys_select").hasclass("zindex"))$(this).siblings(".ys_select_bd").removeclass("showscroll"),$(this).siblings(".ys_select_bd").stop().slideup(function(){$(this).parents(".ys_select").removeclass("zindex")});else{var i=this;settimeout(function(){$(i).parents(".ys_select").addclass("zindex")},200),$(this).siblings(".ys_select_bd").stop().slidedown(function(){$(this).mcustomscrollbar("update"),$(this).addclass("showscroll")})}$(".ys_select_hd").not(this).removeclass("on"),$(".ys_select_hd").not(this).siblings(".ys_select_bd").removeclass("showscroll").stop().slideup();i=this;settimeout(function(){$(".ys_select_hd").not(i).parents(".ys_select").removeclass("zindex")},200)}),n.find(".ys_select_bd").on("click",".ys_select_li",function(){var s=$(this).text(),n=$(this).data("value"),t=$(this).data();$(this).parents(".ys_select_bd").siblings(".ys_select_hd").find(".ys_select_show").val(s),$(this).parents(".ys_select_bd").siblings(".ys_select_hd").find(".ys_select_real").attr("data-id",t.id).val(n).trigger("change"),$(this).addclass("on").siblings().removeclass("on"),i&&i(t)}),$("body").click(function(){$(".ys_select_hd").removeclass("on"),$(".ys_select_bd").removeclass("showscroll").stop().slideup(function(){$(this).parents(".ys_select").removeclass("zindex")})}),n.find(".ys_select_bd").mcustomscrollbar({axis:"y",scrollinertia:500,theme:"dark",scrollbarposition:"outside"})}function a(s,i,n,t){var e=$(i);$("body").on("click",s,function(){var s=$(this);if(e.stop().fadein(),t){function i(i){$.each(i,function(i,n){var t=n[2],o=s.find(n[0]).length>0?s.find(n[0]):s;"text"!=t&&t||e.find(n[1]).text(o.text()),"img"==t&&e.find(n[1]).attr({src:o.attr("src")}),"attr"==t&&(console.log(n[3],o),e.find(n[1]).html(o.attr(n[3]))),"html"==t&&e.find(n[1]).html(o.html())})}i(t)}x.hide()}),$("body").on("click",".ys_modal_close",function(){$(this).parents(i).stop().fadeout(function(){x.show(),t&&$.each(t,function(s,i){e.find(i[1]).empty()})})});n=n||".ys_modal_content";"noscroll"!=n?e.find(n).mcustomscrollbar({axis:"y",scrollinertia:500,theme:"dark"}):e.find(".ys_modal_content").addclass("noscroll")}function l(i,n){var t;if($(".ys_videom").length>0)t=$(".ys_videom");else{var e='
';t=$(e),$("body").append(t)}var o={$self:t,close:function(){x.show(),t.hide(),t.find(".ys_videom_video").remove(),t.find(".ys_videom_iframebox").hide().find("iframe").remove()},show:function(){x.hide(),t.show()}};$("body").on("click",i,function(){var i=$(this).attr("data-type"),e=$(this).attr("data-src");if("video"==i){t.find(".ys_videom_video").length>0&&t.find(".ys_videom_video").remove();var a=$(this).data("poster"),l=$('');$(s).width()<767&&-1!=e.indexof("http")&&(l=$(''),l.get(0).muted=!1),l.append($("