/* -- /assets/lightbox/lightbox.min.js -- */ /*! * Lightbox v2.11.0 * by Lokesh Dhakar * * More info: * http://lokeshdhakar.com/projects/lightbox2/ * * Copyright Lokesh Dhakar * Released under the MIT license * https://github.com/lokesh/lightbox2/blob/master/LICENSE * * @preserve */ !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.lightbox=b(a.jQuery)}(this,function(a){function b(b){this.album=[],this.currentImageIndex=void 0,this.init(),this.options=a.extend({},this.constructor.defaults),this.option(b)}return b.defaults={albumLabel:"Image %1 of %2",alwaysShowNavOnTouchDevices:!1,fadeDuration:600,fitImagesInViewport:!0,imageFadeDuration:600,positionFromTop:50,resizeDuration:700,showImageNumberLabel:!0,wrapAround:!1,disableScrolling:!1,sanitizeTitle:!1},b.prototype.option=function(b){a.extend(this.options,b)},b.prototype.imageCountLabel=function(a,b){return this.options.albumLabel.replace(/%1/g,a).replace(/%2/g,b)},b.prototype.init=function(){var b=this;a(document).ready(function(){b.enable(),b.build()})},b.prototype.enable=function(){var b=this;a("body").on("click","a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]",function(c){return b.start(a(c.currentTarget)),!1})},b.prototype.build=function(){if(!(a("#lightbox").length>0)){var b=this;a('
').appendTo(a("body")),this.$lightbox=a("#lightbox"),this.$overlay=a("#lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".lb-outerContainer"),this.$container=this.$lightbox.find(".lb-container"),this.$image=this.$lightbox.find(".lb-image"),this.$nav=this.$lightbox.find(".lb-nav"),this.containerPadding={top:parseInt(this.$container.css("padding-top"),10),right:parseInt(this.$container.css("padding-right"),10),bottom:parseInt(this.$container.css("padding-bottom"),10),left:parseInt(this.$container.css("padding-left"),10)},this.imageBorderWidth={top:parseInt(this.$image.css("border-top-width"),10),right:parseInt(this.$image.css("border-right-width"),10),bottom:parseInt(this.$image.css("border-bottom-width"),10),left:parseInt(this.$image.css("border-left-width"),10)},this.$overlay.hide().on("click",function(){return b.end(),!1}),this.$lightbox.hide().on("click",function(c){"lightbox"===a(c.target).attr("id")&&b.end()}),this.$outerContainer.on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$lightbox.find(".lb-prev").on("click",function(){return 0===b.currentImageIndex?b.changeImage(b.album.length-1):b.changeImage(b.currentImageIndex-1),!1}),this.$lightbox.find(".lb-next").on("click",function(){return b.currentImageIndex===b.album.length-1?b.changeImage(0):b.changeImage(b.currentImageIndex+1),!1}),this.$nav.on("mousedown",function(a){3===a.which&&(b.$nav.css("pointer-events","none"),b.$lightbox.one("contextmenu",function(){setTimeout(function(){this.$nav.css("pointer-events","auto")}.bind(b),0)}))}),this.$lightbox.find(".lb-loader, .lb-close").on("click",function(){return b.end(),!1})}},b.prototype.start=function(b){function c(a){d.album.push({alt:a.attr("data-alt"),link:a.attr("href"),title:a.attr("data-title")||a.attr("title")})}var d=this,e=a(window);e.on("resize",a.proxy(this.sizeOverlay,this)),this.sizeOverlay(),this.album=[];var f,g=0,h=b.attr("data-lightbox");if(h){f=a(b.prop("tagName")+'[data-lightbox="'+h+'"]');for(var i=0;ik||g.height>j)&&(g.width/k>g.height/j?(i=k,h=parseInt(g.height/(g.width/i),10),f.width(i),f.height(h)):(h=j,i=parseInt(g.width/(g.height/h),10),f.width(i),f.height(h)))),c.sizeContainer(f.width(),f.height())},g.src=this.album[b].link,this.currentImageIndex=b},b.prototype.sizeOverlay=function(){var b=this;setTimeout(function(){b.$overlay.width(a(document).width()).height(a(document).height())},0)},b.prototype.sizeContainer=function(a,b){function c(){d.$lightbox.find(".lb-dataContainer").width(g),d.$lightbox.find(".lb-prevLink").height(h),d.$lightbox.find(".lb-nextLink").height(h),d.showImage()}var d=this,e=this.$outerContainer.outerWidth(),f=this.$outerContainer.outerHeight(),g=a+this.containerPadding.left+this.containerPadding.right+this.imageBorderWidth.left+this.imageBorderWidth.right,h=b+this.containerPadding.top+this.containerPadding.bottom+this.imageBorderWidth.top+this.imageBorderWidth.bottom;e!==g||f!==h?this.$outerContainer.animate({width:g,height:h},this.options.resizeDuration,"swing",function(){c()}):c()},b.prototype.showImage=function(){this.$lightbox.find(".lb-loader").stop(!0).hide(),this.$lightbox.find(".lb-image").fadeIn(this.options.imageFadeDuration),this.updateNav(),this.updateDetails(),this.preloadNeighboringImages(),this.enableKeyboardNav()},b.prototype.updateNav=function(){var a=!1;try{document.createEvent("TouchEvent"),a=!!this.options.alwaysShowNavOnTouchDevices}catch(a){}this.$lightbox.find(".lb-nav").show(),this.album.length>1&&(this.options.wrapAround?(a&&this.$lightbox.find(".lb-prev, .lb-next").css("opacity","1"),this.$lightbox.find(".lb-prev, .lb-next").show()):(this.currentImageIndex>0&&(this.$lightbox.find(".lb-prev").show(),a&&this.$lightbox.find(".lb-prev").css("opacity","1")),this.currentImageIndex1&&this.options.showImageNumberLabel){var c=this.imageCountLabel(this.currentImageIndex+1,this.album.length);this.$lightbox.find(".lb-number").text(c).fadeIn("fast")}else this.$lightbox.find(".lb-number").hide();this.$outerContainer.removeClass("animating"),this.$lightbox.find(".lb-dataContainer").fadeIn(this.options.resizeDuration,function(){return a.sizeOverlay()})},b.prototype.preloadNeighboringImages=function(){if(this.album.length>this.currentImageIndex+1){(new Image).src=this.album[this.currentImageIndex+1].link}if(this.currentImageIndex>0){(new Image).src=this.album[this.currentImageIndex-1].link}},b.prototype.enableKeyboardNav=function(){a(document).on("keyup.keyboard",a.proxy(this.keyboardAction,this))},b.prototype.disableKeyboardNav=function(){a(document).off(".keyboard")},b.prototype.keyboardAction=function(a){var b=a.keyCode;27===b?this.end():37===b?0!==this.currentImageIndex?this.changeImage(this.currentImageIndex-1):this.options.wrapAround&&this.album.length>1&&this.changeImage(this.album.length-1):39===b&&(this.currentImageIndex!==this.album.length-1?this.changeImage(this.currentImageIndex+1):this.options.wrapAround&&this.album.length>1&&this.changeImage(0))},b.prototype.end=function(){this.disableKeyboardNav(),a(window).off("resize",this.sizeOverlay),this.$lightbox.fadeOut(this.options.fadeDuration),this.$overlay.fadeOut(this.options.fadeDuration),this.options.disableScrolling&&a("body").removeClass("lb-disable-scrolling")},new b}); ////# sourceMappingURL=lightbox.min.map /* -- /assets/js/common.js -- */ function leftNaviSubToggle($o) { $o.toggleClass("left_menu_active"); } $(function() { $(".category_head").click(function() { $(this).next(".menu_category_list").slideToggle(0); $(this).children(".category_extend").toggleClass("expanded"); }); $(".category_head").click(function() { $(this).next(".menu_category_list").slideToggle(0); $(this).children(".category_extend").toggleClass("expanded"); }); $(".btn_contact, #btn_close_qna").click(function() { if ($("#google_recaptcha").prop("src") == '' || typeof($("#google_recaptcha").prop("src")) == 'undefined') { var gs = $("#google_recaptcha").data("src"); $("#google_recaptcha").attr("src", gs) } if ($("#google_recaptcha").prop("src")) {} // $(".contactform_form").toggle(); $("#company").focus(); }); $("a.select_btn").click(function() { $(".select_list").toggle(); $(".select_list").toggleClass("outgrow"); $("a.select_btn").toggleClass("outgrow"); }); $(".category_extend").click(function() { $(this).toggleClass('on'); leftNaviSubToggle($(this).closest("li")); }); // $(".category_head > a, .subcategory_head > a").mouseover(function() { // $(this).closest("li").addClass("left_menu_active"); // }); }); /* -- /assets/js/qlight.js -- */ $(function () { //policy $(".pop_policy").click(function () { p = $(this).data("policy"); if (p == "privacy" || p == "privacy2") { w = "width=620px,height=560px"; } else { w = "width=620px,height=560px"; } window.open($(this).attr("href"), p, w); return false; }); $("#id_close").click(function () { window.close(); }); }); function isMobile() { var UserAgent = navigator.userAgent; if (UserAgent.match(/iPhone|iPod|Android|Windows CE|BlackBerry|Symbian|Windows Phone|webOS|Opera Mini|Opera Mobi|POLARIS|IEMobile|lgtelecom|nokia|SonyEricsson/i) != null || UserAgent.match(/LG|SAMSUNG|Samsung/) != null) { return true; } else { return false; } } var wm; function popmap(n) { url = "/_widgets/map/?lang=" + zlang + "&loc=" + n; var tg = "popmap"; if (isMobile()) { tg = "_blank"; } var wm = window.open(url, tg, 'width=630,height=550,scrollbars=no,location=no,toolbar=no'); wm.focus(); } // function checkPosition() // { // // if($(window).width() < 1024) // // { // // // $('.mtop_menu').attr('id', 'menu_nav_sb'); // // } else { // // // $('.mtop_menu').removeAttr('id'); // // } // } $(window).resize(function () { var isMo = $('.moshow').is(":visible"); if (isMo === false) { // console.log('pc'); $('#menu_nav_sb > ul').css('width', '100%'); // $('#menu_nav_sb').css('top', '100px'); } else { // console.log('mo'); $('#menu_nav_sb > ul').css('width', '90%'); // $('#menu_nav_sb').css('top', '60px'); } }); (function () { var $menu_nav = $('#menu_nav_sb'); var menu_active = $('#menu_nav_sb .active').attr('data-item'); $menu_nav.sly({ horizontal: true, itemNav: 'centered', smart: true, mouseDragging: true, touchDragging: true, releaseSwing: true, startAt: menu_active, activateMiddle: true, speed: 0, elasticBounds: true, dragHandle: true, dynamicHandle: true, // swingSpeed: 0 }); $(window).resize(function (e) { $('#menu_nav_sb').sly('reload'); }); // // // var menu_nav_sb = new Swiper("#menu_nav_sb", { // // slidesPerView: 4, // // spaceBetween: 30, // // freeMode: true // loop: false, // loopedSlides: 2, // centeredSlides: false, // slidesPerView: 2, // touchRatio: 1, // spaceBetween: 20, // freeMode: true, // on : { // init : function () { // }, // imagesReady : function () { // 氇摖 雮措秬 鞚措歆€臧€ 搿滊摐 霅 歆來泟 鞚措菠韸戈皜 鞁滌瀾霅╇媹雼? // // $(".product_new_wrap").css("visibility","visible"); // }, // }, // }); // $(window).resize(function () { // var isMo = $('.moshow').is(":visible"); // // var prodview = $('.body_prodview').is(":visible"); // $(window).scroll(function () { // if ($(document).scrollTop() >= 0) { // //console.log($(document).scrollTop(), 100); // $('#menu_nav_sb').addClass('page-scroll-fixed'); // // $('.header').css('box-shadow', '0px 0px 0px #ddd'); // // if (isMo === true) { // // // if(prodview === false) { // $('.content_area .content_body').css('margin-top', '60px'); // // } // // } else { // // $('.content_area .content_body').css('margin-top', '0px'); // // } // } else { // $('#menu_nav_sb').removeClass('page-scroll-fixed'); // $('.content_area .content_body').css('margin-top', '0px'); // // $('.header').css('box-shadow', '0px 2px 5px #ddd'); // } // }); // }); var menu_nav_chk= $('#menu_nav_sb .tab_nv li').is(":visible"); if(menu_nav_chk === true){ $('.header_mo').css('box-shadow','none'); $('.header').css('box-shadow','none'); $('#menu_nav_sb').css('box-shadow','0px 2px 5px #ddd'); $('#menu_nav_sb').css('border-top','1px solid #D8D8D8'); $('.content_area .page_title, .contact_tit').css('padding-top', '120px'); } $(window).resize(function () { var menu_nav_chk= $('#menu_nav_sb .tab_nv li').is(":visible"); if(menu_nav_chk === true){ $('.header_mo').css('box-shadow','none'); $('#menu_nav_sb').css('border-top','1px solid #D8D8D8'); $('#menu_nav_sb').css('box-shadow','0px 2px 5px #ddd'); } else { // console.log('22'); $('.header').css('box-shadow','0px 2px 5px #ddd'); } }); $(window).scroll(function () { if ($(document).scrollTop() >= 0) { $('#menu_nav_sb').addClass('page-scroll-fixed'); //頇橁步氚╈龚 氚半剤 氍胳牅搿 鞝滉卑 content_body //$('.content_area .content_body').css('margin-top', '50px'); var menu_nav_chk= $('#menu_nav_sb .tab_nv li').is(":visible"); if(menu_nav_chk === false){ // $('.content_area .page_title, .contact_tit').css('padding-top', '50px'); $('.content_area .page_title, .contact_tit').css('padding-top', '50px'); $('.content_area .content_body').css('margin-top', '0px'); } else { $('.content_area .page_title, .contact_tit').css('padding-top', '100px'); // $('.content_area .page_title, .contact_tit').css('padding-top', '70px'); //頇橁步氚╈龚 氚半剤 氍胳牅搿 鞝滉卑 content_body //$('.content_area .content_body').css('margin-top', '50px'); } } else { $('#menu_nav_sb').removeClass('page-scroll-fixed'); $('.content_area .content_body').css('margin-top', '0px'); } }); }()); /* -- /assets/js/ellipsis.js -- */ (function($) { $.fn.ellipsis = function(tosize) { return this.each(function() { var el = $(this); //alert(el.html() + " \n" + el.css("overflow-x")); if(el.css("overflow") == "hidden" || el.css("overflow-x") == "hidden") { var text = el.html(); var multiline = el.hasClass('multiline'); if(multiline){ el.css('white-space', 'normal'); el.css('overflow-y', 'hidden'); } var t = $(this.cloneNode(true)) .hide() .css('position', 'absolute') .css('overflow', 'visible') .css('min-height', '0px') /*.css('max-height', '0px')*/ .width(multiline ? el.width() : 'auto') .height(multiline ? 'auto' : el.height()) ; el.after(t); function height() { if(typeof(tosize) == "undefined") { return t.height() > el.height(); }else{ return t.height() > tosize; } }; function width() { if(typeof(tosize) == "undefined") { return t.width() > el.width(); }else{ return t.width() > tosize; } }; var func = multiline ? height : width; //alert(func()); while (text.length > 0 && func()) { text = text.substr(0, text.length - 2); t.html(text + "..."); } el.html(t.html()).css("overflow","hidden"); t.remove(); } }); }; })(jQuery); (function($){ $(document).ready(function () { $(".ellipsis").ellipsis(); }); })(jQuery);