if($(document).ready(function(){var e,i,t,s,a,n,l={autoplay:!0,dots:!0,arrows:!1,speed:1500,adaptiveHeight:!0};if($("#filter-car").length>0&&(void 0==$("#manufacturer_select").data("options")&&($("#manufacturer_select").data("options",$("#makes_select option").clone()),$("#makes_select").html('')),$("#manufacturer_select").change(function(){var e=$(this).find("option:selected").attr("mainchat");if(parseInt(e)>0){var i=$(this).data("options").filter("[producer="+e+"]");$("#makes_select").html(i)}else $("#makes_select").html('')}),window.initAutocomplete=function(){(autocomplete=new google.maps.places.Autocomplete(document.getElementById("autocomplete"),{types:["geocode"]})).addListener("place_changed",function(){var e=autocomplete.getPlace();$("#autocomplete").value=e})},$("#autocomplete").focus(function e(){navigator.geolocation&&navigator.geolocation.getCurrentPosition(function(e){var i={lat:e.coords.latitude,lng:e.coords.longitude},t=new google.maps.Circle({center:i,radius:e.coords.accuracy});autocomplete.setBounds(t.getBounds())})}),$("body").append('')),$(".carousel-on").length>0&&$(".lazy-carousel-6").each(function(e,i){var t="carousel"+e;$(this).attr("ID",t),$(this).slick({slide:"#"+t+" .moving-ad",lazyLoad:"ondemand",slidesToShow:5,slidesToScroll:1,autoplay:!0,autoplaySpeed:3e3})}),$(".living-full-slideshow").length>0){var r=$.extend(!0,{},l);$(".living-full-slideshow .slide").hasClass("fade_out")&&(r.fade=!0,r.cssEase="linear"),$(".living-full-slideshow .slide .list").slick(r)}if($(".living-health-slideshow").length>0){var r=$.extend(!0,{},l);r.arrows=!0,$(".living-health-slideshow .slide").hasClass("fade_out")&&(r.fade=!0,r.cssEase="linear"),$(".living-health-slideshow .slide .list").slick(r)}if($(".living-slideshow").length>0){var r=$.extend(!0,{},l);r.customPaging=function(e,i){return' '},$(".living-slideshow .slide").hasClass("fade_out")&&(r.fade=!0,r.cssEase="linear"),$(".living-slideshow .slide .list").slick(r)}if($(".living-street-photo").length>0&&($(".living-street-photo .lists.page1").addClass("focus_photos"),$(".living-street-photo .lists_pagination .btn_pagination_photos").each(function(e){$(this).on("click",function(){var e=$(this).data("pageclass");return $(".living-street-photo .lists."+e).siblings(".focus_photos").removeClass("focus_photos").hide(),$(".living-street-photo .lists."+e).addClass("focus_photos").show(),$(".living-street-photo .lists.focus_photos").show(),!1})})),$(".living-header select").length>0&&$(".living-header select").change(function(){return -1!==$(this).val().indexOf("https://")&&window.open($(this).val(),"_blank").focus(),!1}),$(".living-header .date").length>0&&$(".living-header .date").text((e=!0,i=new Date,t=new Date,s=i.getDate(),a=i.getMonth()+1,n=i.getFullYear(),(i=e?n+"年"+a+"月"+s+"日 ":a+"月"+s+"日 ")+["星期日","星期一","星期二","星期三","星期四","星期五","星期六"][t.getDay()])),$(".living-america-topic-list").length>0){var o=$(".living-america-topic-list").attr("data-left-padding"),d=100-parseInt(o)+"%";$(".living-america-topic-list .featured-post .content").css("width",d);var c=$(".living-america-topic-list").width()-$(".living-america-topic-list .right-column").width();$(".living-america-topic-list .left-column").css("width",c-1),$(window).resize(function(){c=$(".living-america-topic-list").width()-$(".living-america-topic-list .right-column").width(),$(".living-america-topic-list .left-column").css("width",c-1)})}function h(){var e=0,i=0,t=0;$(".living-street-photo-posts-list article").each(function(){var s=parseInt($(this).css("height")),a=Math.min(e,i,t);$(this).css("position","absolute"),e==a?($(this).css("left","0"),$(this).css("top",e+"px"),e+=s):i==a?($(this).css("left","34%"),$(this).css("top",i+"px"),i+=s):($(this).css("left","68%"),$(this).css("top",t+"px"),t+=s)}),$(".living-street-photo-posts-list").css("height",Math.max(e,i,t))}if($(".living-navigation").length>0&&($(".search_button").click(function(e){$(this).parent().siblings(".search_area").toggle()}),$(".search_hide").click(function(e){$(this).parent(".search_area").hide()})),$(".living-street-photo-posts-list").length>0){h();var v=2;$(".living-street-photo-content .more a").click(function(){var e=window.location.href;e=e.substring(0,e.length-4)+"_"+v+".htm",$.ajax({type:"GET",url:e,success:function(e){v++;var i=$(e).find(".living-street-photo-posts-list").html();i&&($(".living-street-photo-posts-list").append(i),window.setTimeout(function(){$(window).trigger("resize")},50))},complete:function(){$.fn.laziestloader&&$("img.lazy").laziestloader({threshold:500})}})}),$(window).resize(function(){h()})}window.recaptchaCallback=function(){$("#widget_email_recaptcha").length&&grecaptcha.render("widget_email_recaptcha",{sitekey:"6LdrgQkUAAAAAJzsI1Dc6_TNAffK4rkThcnJtWzL"})};var g=!1,p=function(){g||(g=!0,$("body").append(""))};if($(".living-newsletter-mailchimp .input-signup").click(p),$(".living_article_revive_ads").length>0&&$("body.single-template-living-article").length>0){for(var u=$(".living_article_revive_ads").data("firstads"),f=$(".living_article_revive_ads").data("interval"),m=$("#artbody > p, #artbody > figure").length,y=$(".living_article_revive_ads .living_revive_ads").length,b=u,C=0;m>=b&&C p, #artbody > figure").eq(b).after(w),b+=f,C++}$(".living_article_revive_ads").empty()}if($(".living_category_list_revive_ads").length>0){var k=$(".living_category_list_revive_ads").data("target_list_widget");if($.inArray(k,["living-cat-posts-list","living-food-posts-list","inspired-ranking-posts","living-image-post"])>-1&&$("."+k).length>0){for(var u=$(".living_category_list_revive_ads").data("firstads"),f=$(".living_category_list_revive_ads").data("interval"),m=$("."+k+" li").length,_=$(".living_category_list_revive_ads .living_revive_ads").length,b=u-1,C=0;m>=b&&C<_;){var x=$(".living_category_list_revive_ads .living_revive_ads").get(C).outerHTML.replace(/catlist_ins/g,"ins");$("."+k+" li").eq(b).after("
  • "+x+"
  • "),C++,b=b+f+1}$(".living_category_list_revive_ads").empty()}}if($(".living_revive_ads").length>0){var j={das_epochtimes_delivery:"//das.epochtimes.com/www/delivery/asyncjs.php"},T=[];$(".living_revive_ads").each(function(){var e=$(this).data("jssrc");-1==T.indexOf(e)&&T.push(e)});for(var z=0;z')}if($(".living_article_global_ads").length>0&&$("body.single-template-living-article").length>0){for(var u=$(".living_article_global_ads").data("firstads"),f=$(".living_article_global_ads").data("interval"),m=$("#artbody > p, #artbody > figure").length,y=$(".living_article_global_ads .djy_global_ads").length,b=u,A=0;m>=b&&A p, #artbody > figure").eq(b).after(w),b+=f,A++}$(".living_article_global_ads").empty(),window.setTimeout(function(){$(window).trigger("scroll")},500)}if($(".djy_global_ads").length>0&&"undefined"!=typeof googletag){var q=1;$(".djy_global_ads").each(function(){for(var e=$(this).data("adsunit"),i=$(this).data("adsize"),t=[],s=i.split("|"),a=0;a");var r=function(){var i=googletag.defineSlot("/5965368/"+e,t,l).addService(googletag.pubads()).setCollapseEmptyDiv(!0,!0);"undefined"!=typeof refresh_slots&&"undefined"!=typeof refresh_units&&(refresh_slots.push(i),refresh_units.push(l)),googletag.display(l),googletag.pubads().refresh([i],{changeCorrelator:!1})};n?add_lazy_load_section("#"+l,function(){googletag.cmd.push(r)}):googletag.cmd.push(r),q++})}if($(".inspired-mega-menu").length>0){$("head").append(''),setTimeout(function(){$(".inspired-mega-menu").css("visibility","visible")},100);var E=$(".inspired-mega-menu").width();function D(){$(".cd-nav-trigger").removeClass("nav-is-visible"),$(".cd-main-header").removeClass("nav-is-visible"),$(".cd-primary-nav").removeClass("nav-is-visible"),$(".has-children ul").addClass("is-hidden"),$(".has-children a").removeClass("selected"),$(".moves-out").removeClass("moves-out"),$(".cd-main-content").removeClass("nav-is-visible").one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){$("body").removeClass("overflow-hidden")})}function L(e){"close"==e?($(".cd-search").removeClass("is-visible"),$(".cd-search-trigger").removeClass("search-is-visible")):($(".cd-search").toggleClass("is-visible"),$(".cd-search-trigger").toggleClass("search-is-visible"),$(window).width()>1010&&$(".cd-search").hasClass("is-visible")&&$(".cd-search").find('input[type="search"]').focus())}function S(e){e.next("ul").hasClass("is-hidden")?(e.addClass("selected").next("ul").removeClass("is-hidden").end().parent(".has-children").parent("ul").addClass("moves-out"),e.parent(".has-children").siblings(".has-children").children("ul").addClass("is-hidden").end().children("a").removeClass("selected")):e.removeClass("selected").next("ul").addClass("is-hidden").end().parent(".has-children").parent("ul").removeClass("moves-out"),L("close")}function B(){var e=window,i="inner";return"innerWidth"in window||(i="client",e=document.documentElement||document.body),e[i+"Width"]>=1010}function H(){var e=$(".cd-nav");B()?(e.detach(),e.insertBefore(".cd-header-buttons")):(e.detach(),e.insertAfter(".cd-main-content"))}$(window).scroll(function(){$(this).scrollTop()>$(".inspired-mega-menu").offset().top?($("body").addClass("nav-is-fixed"),$(".inspired-mega-menu .cd-main-header").width(E),$(".inspired-mega-menu .cd-search").width(E)):$("body").removeClass("nav-is-fixed")}),$("#cd-primary-nav > li > a").each(function(){var e=$(this).data("term-id");if(location.pathname.search(e)>=0)return $(this).css({color:"#ffffff","border-top":"3px solid #ff7d0e"}),!1}),H(),$(window).on("resize",function(){window.requestAnimationFrame?window.requestAnimationFrame(H):setTimeout(H,300)}),$(".cd-nav-trigger").on("click",function(e){e.preventDefault(),$(".cd-main-content").hasClass("nav-is-visible")?D():($(this).addClass("nav-is-visible"),$(".cd-primary-nav").addClass("nav-is-visible"),$(".cd-main-header").addClass("nav-is-visible"),$(".cd-main-content").addClass("nav-is-visible").one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){$("body").addClass("overflow-hidden")}),L("close"))}),$(".cd-search-trigger").on("click",function(e){e.preventDefault(),L(),D()}),$(".has-children").children("a").on("click",function(e){B()||e.preventDefault();var i=$(this);i.next("ul").hasClass("is-hidden")?(i.addClass("selected").next("ul").removeClass("is-hidden").end().parent(".has-children").parent("ul").addClass("moves-out"),i.parent(".has-children").siblings(".has-children").children("ul").addClass("is-hidden").end().children("a").removeClass("selected")):i.removeClass("selected").next("ul").addClass("is-hidden").end().parent(".has-children").parent("ul").removeClass("moves-out"),L("close")}),$(".has-children").children("a").hover(function(e){B()?S($(this)):e.preventDefault()}),$("#cd-primary-nav .cd-nav-gallery").hover(function(e){B()&&S($(this).prev("a"))}),$("#cd-primary-nav .cd-nav-item").hover(function(){$(this).children("h3").toggleClass("hover-title")}),$(".go-back").on("click",function(){$(this).parent("ul").addClass("is-hidden").parent(".has-children").parent("ul").removeClass("moves-out")})}if($(".live-telecast-playlist").length>0){function I(e){var i=$(e).data("video-src"),t=$(e).data("video-title");$(".live-telecast-playlist .video_holder").empty().append(''),$(".live-telecast-playlist .video_title").text(t)}I($(".live-telecast-playlist .video_list a").first()),$(".live-telecast-playlist .video_list a").click(function(){return I(this),!1})}if($(".live_telecast_category_posts_list .pagination a").click(function(){var e=$(this);return $.ajax({type:"GET",url:$(this).data("url"),success:function(i){var t=$(i).find(".live_telecast_category_posts_list .qacards").html();if(t){$(".live_telecast_category_posts_list .qacards").empty().append(t),e.parent().find(".current").removeClass("current"),e.addClass("current");var s=$(".live_telecast_category_posts_list .pagination").eq(0==e.parent().index()?1:0);void 0!==s&&(s.find(".current").removeClass("current"),s.children("a").eq(e.index()).addClass("current"))}},complete:function(){$.fn.laziestloader&&$("img.lazy").laziestloader({threshold:500})}}),!1}),$(".single-template-living-article").length>0&&$(".living-header").length>0&&($("#main .row").css("max-width",$(".living-header").width()+"px"),$("div.large-8.medium-8.small-12.bgcolor.column.left").css("max-width","66%")),$(".djy-global-header").length>0&&($(".top-bar-section li.has-dropdown").hover(function(){$(this).children("ul").toggleClass("is-visible")}),$(window).scroll(function(){$(this).scrollTop()>$(".djy-global-header .top-half").height()?$(".djy-global-header .sticky-sub-menu").addClass("is-fix"):$(".djy-global-header .sticky-sub-menu").removeClass("is-fix")})),$(".living-tab-pane").length>0&&($(".living-tab-pane .tab-group").each(function(){$(this).find("li:first").addClass("active"),$(this).find("section:first").show()}),$(".living-tab-pane .tab-group label").on("click",function(){$(this).parents(".tab-group").find("section").hide(),$(".living-tab-pane .tab-group section:eq("+$("label").index($(this))+")").show(),$(this).parent("li").siblings().removeClass("active"),$(this).parent("li").addClass("active")})),$(".living_posts_marquee").length>0&&$(".living_posts_marquee marquee").hover(function(){this.stop()},function(){this.start()}),$(".living-posts-carousel").length>0&&$(".living-posts-carousel").slick({dots:!1,infinite:!1,speed:300}),$(".history-navigation").length>0){var M=0,O=0;$(".history-navigation .arrow-container a").on("click",function(){var e=$(this).parents(".history-navigation").find("ul");0==M&&(M=e.height(),O=e.css("height","auto").height()),O>M?e.height(M).animate({height:O},1e3):e.animate({height:$(e).data("height")},1e3);var i=O;return O=M,M=i,$(this).toggleClass("expanded"),!1})}}),$(".djy_disqus").length>0){var e=function(){var e=$(".djy_disqus").data("switch_source"),i=$(".djy_disqus").data("identifier");""!=i.trim()&&("b5-version"==e?(i=i.replace("/gb/","/b5/"),this.page.identifier=i):("gb-version"==e&&(i=i.replace("/b5/","/gb/")),this.page.identifier=i))};!function(){var e=document,i=e.createElement("script");i.src="/load/view.php?a=aHR0cDovL2Rhaml5dWFuLmRpc3F1cy5jb20vZW1iZWQuanM",i.setAttribute("data-timestamp",+new Date),(e.head||e.body).appendChild(i)}()}