/* Hear, O Israel: The LORD our God is one LORD: And thou shalt love the LORD thy God with all thine heart, and with all thy soul, and with all thy might. That ye love one another; as I have loved you, that ye also love one another. P.o.L. : pol623@naver.com http://www.pol27.com Copyright (c) 2016 - Path of Life */ var map, aNumber = 0;; var myLatLng = {lat: 37.511455, lng: 127.104941}; var tag = document.createElement('script'); tag.src = "https://www.youtube.com/iframe_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); var filter = "win16|win32|win64|mac"; var player, mv01 = 0; $(function() { $('.icon-bar').css("transition", ".4s"); // if($(document).width() <= 768 ) $(".navbar-default .navbar-collapse").css("background", "#f8f8f8"); $(".navbar-default .navbar-brand").css("color", "#fff"); $(".navbar-default .navbar-nav>li>a").css("color", "#fff"); $('.navbar-toggle').on("click", function() { if(!$('.navbar-collapse').hasClass('in')) { $('.icon-bar:nth-child(2)').css("transform","rotate(-30deg)"); } else { $('.icon-bar:nth-child(2)').css("transform","rotate(0deg)"); } }); $(".nav>li>a").on("click", function() { if($('.navbar-collapse').hasClass('in')) { $('.navbar-toggle').trigger('click'); $('.navbar-collapse').removeClass('in'); } }); if($('#topslider').length) { $('#topslider').slidesjs({ play : { active: false, effect : "fade", interval: 8000, auto: true, swap: false, }, effect: { fade : { speed: 1000, crossfade: true } }, pagination : { effect : "fade", active: true }, navigation : { effect : "fade", active: true }, callback : { loaded : function(number) { setLoadMain(number); }, start : function(number) { setStartMain(number); }, complete : function(number) { setComMain(number); } } }); } if($('#aboutus').length) { $('#aboutus').slidesjs({ play : { auto: false, swap: false }, pagination : { active: false }, callback : { loaded : function(number) { aNumber = number; setHeightJs($('#aboutus'), $('#aboutus .slidesjs-container'), $('#aboutus .slidesjs-control'), $('#aboutus .slidesjs-slide:nth-child(' + number + ')')); }, start : function(number) { }, complete : function(number) { aNumber = number; if(number != 5) { setHeightJs($('#aboutus'), $('#aboutus .slidesjs-container'), $('#aboutus .slidesjs-control'), $('#aboutus .slidesjs-slide:nth-child(' + number + ')')); } else { var orgHeight = $('.org .director').height() + $('.org .subdirector').height() + $('.org .departments').height(); setHeightChat($('#aboutus'), $('#aboutus .slidesjs-container'), $('#aboutus .slidesjs-control'), orgHeight); } } } }); } if($('#snotice>tbody').length) { $('#snotice').addClass("swiper-container"); $('#snotice>tbody').addClass("swiper-wrapper"); $('#snotice>tbody>tr').addClass("swiper-slide"); var sNotice = new Swiper('.swiper-container', { direction : 'vertical', loop: true, autoplay: 4000, autoplayDisableOnInteraction: false, nextButton: '.swiper-button-next', prevButton: '.swiper-button-prev' }); } $(".navbar a, a[href='#body'], a[href='#cornerstone'], a[title='ABOUT'], a[title='PRODUCT']").on('click', function(event) { if (this.hash !== "") { event.preventDefault(); var hash = this.hash; $('html, body').animate({ scrollTop: $(hash).offset().top }, 900, function(){ window.location.hash = hash; }); } }); if($('.board_output_gallery_img').length) { $('.board_output_gallery_img>a').removeAttr("href"); } var aboutTop = $('#about').offset().top - 100, pieRowTop = $('.pie-row').offset().top - 600, intShowChart = 0, intPieChart = 0; $(window).scroll(function() { var winTop = $(window).scrollTop(); if(winTop == 0) { $('.navbar-default').addClass("trans-background"); $(".navbar-default .navbar-brand").css("color", "#fff"); $(".navbar-default .navbar-nav>li>a").css("color", "#fff"); } else { $('.navbar-default').removeClass("trans-background"); $(".navbar-default .navbar-brand").css("color", "#777"); $(".navbar-default .navbar-nav>li>a").css("color", "#777"); } if(winTop > 768) { $('#updown').css("display", "block"); } else { $('#updown').css("display", "none"); } $(".slideanim").each(function(){ var pos = $(this).offset().top; if (pos < winTop + 600) { $(this).addClass("slide"); } }); if(!intShowChart && $('#container').length && aboutTop < winTop) { $('#container').highcharts({ chart: { type: 'column' }, colors: [ '#7cb5ec', '#10386c' ], title: { text: '' }, subtitle: { text: '' }, xAxis: { categories: ['Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug'] }, yAxis: { title: { text: '' } }, plotOptions: { line: { dataLabels: { enabled: true }, enableMouseTracking: false }, series: { animation: { duration: 2000 } } }, series: [{ name: 'In', data: [9.5, 14.5, 18.4, 21.5, 25.2, 26.5] }, { name: 'Out', data: [5.7, 8.5, 11.9, 15.2, 17.0, 16.6] }], exporting: { enabled: false } }); intShowChart++; } if(!intPieChart && ('#piechart').length && pieRowTop < winTop) { $('#piechart').highcharts({ chart: { type: 'pie', backgroundColor: '#f6f6f6' }, colors: [ '#90ed7d', '#7cb5ec', '#434348', '#f7a35c', '#8085e9' ], title: { text: '' }, series: [{ name: 'Brands', colorByPoint: true, data: [{ name: 'Cafe24', y: 56.33 }, { name: 'PoL27', y: 24.03, sliced: true, selected: true }, { name: 'Dontknow', y: 10.38 }, { name: 'Maptri', y: 4.77 }, { name: 'Gori', y: 0.91 }, { name: 'Unknown', y: 0.2 }] }], exporting: { enabled: false } }); intPieChart++; } }); $(window).resize(function() { if($('#aboutus').length) { if(aNumber != 5) { setHeightJs($('#aboutus'), $('#aboutus .slidesjs-container'), $('#aboutus .slidesjs-control'), $('#aboutus .slidesjs-slide:nth-child(' + aNumber + ')')); } else { var orgHeight = $('.org .director').height() + $('.org .subdirector').height() + $('.org .departments').height(); setHeightChat($('#aboutus'), $('#aboutus .slidesjs-container'), $('#aboutus .slidesjs-control'), orgHeight); } } if(mv01) { var w = $('#ser02 .modal-body').width() - 30; var h = w/1.77; setPlayerSize(w, h); } }); $('.familysite').change(function() { window.open($('.familysite option:selected').val(), "_blank"); }); $("div[data-target='#ser02']").on('click', function() { if(player === undefined) { player = new YT.Player('mv01', { height : '100%', width : '100%', playerVars : { 'autoplay' : 0, 'controls' : 1, 'loop' : 0, 'showinfo' : 0, 'rel' : 0, 'disablekb' : 1, 'modestbranding' : 1 }, events : { 'onReady' : onPlayerReady, 'onStateChange' : onPlayerStateChange } }); } }); $('#ser02').on('show.bs.modal', function() { mv01 = 1; }); $('#ser02').on('hide.bs.modal', function() { pauseVideo(); mv01 = 0; }); $('#coll01').on("show.bs.collapse", function() { $('#coll02').collapse('hide'); $('#coll03').collapse('hide'); gotoThe('.last-product img'); }); $('#coll02').on("show.bs.collapse", function() { $('#coll01').collapse('hide'); $('#coll03').collapse('hide'); gotoThe('.last-product img'); }); $('#coll03').on("show.bs.collapse", function() { $('#coll01').collapse('hide'); $('#coll02').collapse('hide'); gotoThe('.last-product img'); }); if($('#tfaq').length) { $('#tfaq>tbody').addClass("panel-group"); $('#tfaq>tbody').attr("id", "accordion"); $('#tfaq>tbody').attr("role", "tablist"); $('#tfaq>tbody').attr("aria-multiselectable", "true"); $('#tfaq>tbody>tr').removeClass('board_output_2_tr'); $('#tfaq>tbody>tr').addClass('panel panel-default'); $('#tfaq>tbody>tr>td:nth-child(2)').addClass("panel-heading"); $('#tfaq>tbody>tr>td:nth-child(2)').attr("role", "tab"); $('#tfaq>tbody>tr>td:nth-child(2)').removeClass('bd_out1'); $('#tfaq>tbody>tr>td:nth-child(2)').removeAttr('width'); $('#tfaq>tbody>tr>td:nth-child(2)').removeAttr('style'); $('#tfaq>tbody>tr>td:nth-child(2)>a').attr("role", "button"); $('#tfaq>tbody>tr>td:nth-child(2)>a').attr("data-toggle", "collapse"); $('#tfaq>tbody>tr>td:nth-child(2)>a').attr("data-parent", "#accordinon"); $('#tfaq>tbody>tr>td:nth-child(2)>a').attr("aria-expanded", "false"); $('#tfaq>tbody>tr>td:nth-child(3)').removeAttr("width"); $('#tfaq>tbody>tr>td:nth-child(3)').removeAttr("style"); $('#tfaq>tbody>tr>td:nth-child(3)').attr("role", "tabpanel"); $('#tfaq>tbody>tr>td:nth-child(3)').addClass("panel-collapse collapse"); $('#tfaq>tbody>tr>td:nth-child(3)').css({"height" : "0", "overflow" : "hidden"}); $('#tfaq>tbody>tr:nth-child(1)>td:nth-child(2)').attr("id", "headingOne"); $('#tfaq>tbody>tr:nth-child(1)>td:nth-child(2)>a').attr("href", "#collapseOne"); $('#tfaq>tbody>tr:nth-child(1)>td:nth-child(2)>a').attr("aria-controls", "collapseOne"); $('#tfaq>tbody>tr:nth-child(1)>td:nth-child(3)').attr("id", "collapseOne"); $('#tfaq>tbody>tr:nth-child(1)>td:nth-child(3)').attr("aria-labelledby", "headingOne"); $('#tfaq>tbody>tr:nth-child(2)>td:nth-child(2)').attr("id", "headingTwo"); $('#tfaq>tbody>tr:nth-child(2)>td:nth-child(2)>a').attr("href", "#collapseTwo"); $('#tfaq>tbody>tr:nth-child(2)>td:nth-child(2)>a').attr("aria-controls", "collapseTwo"); $('#tfaq>tbody>tr:nth-child(2)>td:nth-child(3)').attr("id", "collapseTwo"); $('#tfaq>tbody>tr:nth-child(2)>td:nth-child(3)').attr("aria-labelledby", "headingTwo"); $('#tfaq>tbody>tr:nth-child(3)>td:nth-child(2)').attr("id", "headingThree"); $('#tfaq>tbody>tr:nth-child(3)>td:nth-child(2)>a').attr("href", "#collapseThree"); $('#tfaq>tbody>tr:nth-child(3)>td:nth-child(2)>a').attr("aria-controls", "collapseThree"); $('#tfaq>tbody>tr:nth-child(3)>td:nth-child(3)').attr("id", "collapseThree"); $('#tfaq>tbody>tr:nth-child(3)>td:nth-child(3)').attr("aria-labelledby", "headingThree"); $('#tfaq>tbody>tr:nth-child(4)>td:nth-child(2)').attr("id", "headingFour"); $('#tfaq>tbody>tr:nth-child(4)>td:nth-child(2)>a').attr("href", "#collapseFour"); $('#tfaq>tbody>tr:nth-child(4)>td:nth-child(2)>a').attr("aria-controls", "collapseFour"); $('#tfaq>tbody>tr:nth-child(4)>td:nth-child(3)').attr("id", "collapseFour"); $('#tfaq>tbody>tr:nth-child(4)>td:nth-child(3)').attr("aria-labelledby", "headingFour"); } if($('#inside').length) { $('#inside>tbody').attr("id", "inside-block"); // $('#inside>tbody').attr("data-interval", "false"); $('#inside>tbody').attr("data-ride", "carousel"); $('#inside>tbody').addClass("carousel slide"); $('#inside>tbody>tr').attr("role", "listbox"); $('#inside>tbody>tr').addClass("carousel-inner"); $('#inside>tbody>tr>td').addClass('item'); $('#inside>tbody>tr>td:first-child').addClass('active'); } if($('#contact').length) { $('#contact input').addClass('form-control'); $('#contact textarea').addClass('form-control'); $('#contact input[name="name"]').attr("placeholder", "NAME"); $('#contact input[name="receiver_email"]').attr("placeholder", "E-MAIL"); $('#contact textarea').attr("placeholder", "CONTENTS"); } $('#collapseOne, #collapseTwo, #collapseThree, #collapseFour').on("show.bs.collapse", function() { $(this).addClass("setHeightColl"); }); $('#collapseOne, #collapseTwo, #collapseThree, #collapseFour').on("hide.bs.collapse", function() { $(this).removeClass("setHeightColl"); }); setTimeout(initMap(), 7000); }); function initMap() { if(document.getElementById('googleMap')) { map = new google.maps.Map(document.getElementById('googleMap'), { center: myLatLng, zoom: 12, scrollwheel: false }); var marker = new google.maps.Marker({ icon: '/bizdemo36713/img/pol/img/maptip.png', position: myLatLng, animation: google.maps.Animation.BOUNCE, map: map, title: 'Path of Life' }); } } function setHeightJs(a, b, c , d) { a.height(d.height()); b.height(d.height()); c.height(d.height()); } function setHeightChat(a, b, c, d) { a.height(d); b.height(d); c.height(d); } function onYouTubeIframeAPIReady() { } function onPlayerReady(event) { var w = $('#mv01').width(); var h = w/1.77; setPlayerSize(w, h); player.loadVideoById({'videoId': 'saJUhDbeHGQ', 'startSeconds' : 0, 'endSeconds' : 126, 'suggestedQuality' : 'highres'}); } var done = false; function onPlayerStateChange(event) { if(event.data == YT.PlayerState.BUFFERING) { } if(event.data == YT.PlayerState.ENDED) { event.target.seekTo(0, true); } } function stopVideo() { player.stopVideo(); } function pauseVideo() { player.pauseVideo(); } function setPlayerSize(w, h) { player.setSize(w, h); } function gotoThe(a) { var hereiam = $(a).offset().top + $(a).height(); $('html, body').animate({ scrollTop: hereiam }, 900, function(){ }); } function setLoadMain(number) { dh(number, 1) } function setStartMain(number) { dh(number, 0); } function setComMain(number) { dh(number, 1); } function dh(number, f) { switch(number) { case 1: if(f) { $('#topslider .slidesjs-slide:nth-child(1)>#p').addClass('showfirstp').delay(1000).queue(function() { $('#topslider .slidesjs-slide:nth-child(1)>.string').addClass('showfirsts'); $(this).dequeue(); }); } else { $('#topslider .slidesjs-slide:nth-child(1)>#p').removeClass('showfirstp'); $('#topslider .slidesjs-slide:nth-child(1)>.string').removeClass('showfirsts'); } break; case 2: if(f) { $('#topslider .slidesjs-slide:nth-child(2)>#p').addClass('showsecondp').delay(1000).queue(function() { $('#topslider .slidesjs-slide:nth-child(2)>.string').addClass('showseconds'); $(this).dequeue(); }); } else { $('#topslider .slidesjs-slide:nth-child(2)>#p').removeClass('showsecondp'); $('#topslider .slidesjs-slide:nth-child(2)>.string').removeClass('showseconds'); } break; case 3: if(f) { $('#topslider .slidesjs-slide:nth-child(3)>#p').addClass('showthirdp').delay(1000).queue(function() { $('#topslider .slidesjs-slide:nth-child(3)>.string').addClass('showthirds'); $(this).dequeue(); }); } else { $('#topslider .slidesjs-slide:nth-child(3)>#p').removeClass('showthirdp'); $('#topslider .slidesjs-slide:nth-child(3)>.string').removeClass('showthirds'); } break; } }