/*! modernizr 3.6.0 (Custom Build) | MIT * * https://modernizr.com/download/?-addtest-atrule-domprefixes-hasevent-mq-prefixed-prefixedcss-prefixedcssvalue-prefixes-setclasses-shiv-testallprops-testprop-teststyles !*/ !function(e,t,n){function r(e,t){return typeof e===t}function o(){var e,t,n,o,i,a,s;for(var l in _)if(_.hasOwnProperty(l)){if(e=[],t=_[l],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;nc;c++)if(m=e[c],h=A.style[m],d(m,"-")&&(m=l(m)),A.style[m]!==n){if(i||r(o,"undefined"))return a(),"pfx"==t?m:!0;try{A.style[m]=o}catch(y){}if(A.style[m]!=h)return a(),"pfx"==t?m:!0}return a(),!1}function y(e,t,n,o,i){var a=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+z.join(a+" ")+a).split(" ");return r(t,"string")||r(t,"undefined")?g(s,t,o,i):(s=(e+" "+P.join(a+" ")+a).split(" "),m(s,t,n))}function C(e,t,r){return y(e,n,n,t,r)}var S=[],_=[],b={_version:"3.6.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){_.push({name:e,fn:t,options:n})},addAsyncTest:function(e){_.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=b,Modernizr=new Modernizr;var E=b._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];b._prefixes=E;var x=t.documentElement,w="svg"===x.nodeName.toLowerCase(),N="Moz O ms Webkit",P=b._config.usePrefixes?N.toLowerCase().split(" "):[];b._domPrefixes=P;var j;!function(){var e={}.hasOwnProperty;j=r(e,"undefined")||r(e.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(t,n){return e.call(t,n)}}(),b._l={},b.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),Modernizr.hasOwnProperty(e)&&setTimeout(function(){Modernizr._trigger(e,Modernizr[e])},0)},b._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout(function(){var e,r;for(e=0;ea;a++){var s=E[a],l=s.toUpperCase()+"_"+r;if(l in i)return"@-"+s.toLowerCase()+"-"+t}return!1};b.atRule=T;var k=function(){function e(e,t){var o;return e?(t&&"string"!=typeof t||(t=s(t||"div")),e="on"+e,o=e in t,!o&&r&&(t.setAttribute||(t=s("div")),t.setAttribute(e,""),o="function"==typeof t[e],t[e]!==n&&(t[e]=n),t.removeAttribute(e)),o):!1}var r=!("onblur"in t.documentElement);return e}();b.hasEvent=k;var F=function(e,t){var n=!1,r=s("div"),o=r.style;if(e in o){var i=P.length;for(o[e]=t,n=o[e];i--&&!n;)o[e]="-"+P[i]+"-"+t,n=o[e]}return""===n&&(n=!1),n};b.prefixedCSSValue=F;var M=function(){var t=e.matchMedia||e.msMatchMedia;return t?function(e){var n=t(e);return n&&n.matches||!1}:function(t){var n=!1;return c("@media "+t+" { #modernizr { position: absolute; } }",function(t){n="absolute"==(e.getComputedStyle?e.getComputedStyle(t,null):t.currentStyle).position}),n}}();b.mq=M;var L=(b.testStyles=c,{elem:s("modernizr")});Modernizr._q.push(function(){delete L.elem});var A={style:L.elem.style};Modernizr._q.unshift(function(){delete A.style});b.testProp=function(e,t,r){return g([e],n,t,r)};b.testAllProps=y;var q=b.prefixed=function(e,t,n){return 0===e.indexOf("@")?T(e):(-1!=e.indexOf("-")&&(e=l(e)),t?y(e,t,n):y(e,"pfx"))};b.prefixedCSS=function(e){var t=q(e);return t&&u(t)};b.testAllProps=C;w||!function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=C.elements;return"string"==typeof e?e.split(" "):e}function o(e,t){var n=C.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),C.elements=n+" "+e,u(t)}function i(e){var t=y[e[v]];return t||(t={},g++,e[v]=g,y[g]=t),t}function a(e,n,r){if(n||(n=t),c)return n.createElement(e);r||(r=i(n));var o;return o=r.cache[e]?r.cache[e].cloneNode():h.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!o.canHaveChildren||m.test(e)||o.tagUrn?o:r.frag.appendChild(o)}function s(e,n){if(e||(e=t),c)return e.createDocumentFragment();n=n||i(e);for(var o=n.frag.cloneNode(),a=0,s=r(),l=s.length;l>a;a++)o.createElement(s[a]);return o}function l(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return C.shivMethods?a(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(C,t.frag)}function u(e){e||(e=t);var r=i(e);return!C.shivCSS||f||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),c||l(e,r),e}var f,c,d="3.7.3",p=e.html5||{},m=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,h=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",g=0,y={};!function(){try{var e=t.createElement("a");e.innerHTML="",f="hidden"in e,c=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){f=!0,c=!0}}();var C={elements:p.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:d,shivCSS:p.shivCSS!==!1,supportsUnknownElements:c,shivMethods:p.shivMethods!==!1,type:"default",shivDocument:u,createElement:a,createDocumentFragment:s,addElements:o};e.html5=C,u(t),"object"==typeof module&&module.exports&&(module.exports=C)}("undefined"!=typeof e?e:this,t),o(),i(S),delete b.addTest,delete b.addAsyncTest;for(var O=0;OmaxLeft&&(leftValue=maxLeft),widthValue=100*(leftValue+g/2-i)/j+"%",a(".ba-draggable").css("left",widthValue),a(".ba-resizable").css("width",widthValue)}).on("mouseup.ba-events touchend.ba-events touchcancel.ba-events",function(){b.removeClass("ba-draggable"),c.removeClass("ba-resizable"),a(this).off(".ba-events")}),e.preventDefault()})}a.fn.beforeAfter=function(){var c=this,d=c.width()+"px";c.find(".resize img").css("width",d),b(c.find(".handle"),c.find(".resize"),c),a(window).resize(function(){var a=c.width()+"px";c.find(".resize img").css("width",a)})}}(jQuery); /* Plugin Name: jQuery plugin incremental counter Plugin URI: https://github.com/MikhaelGerbet/jquery-incremental-counter Description: jQuery plugin incremental counter is a simple counter animated Author: GERBET Mikhael Author URI: https://github.com/MikhaelGerbet License: MIT */ (function($){ $.fn.incrementalCounter = function(options){ //default options var defauts = { "digits": 4 }, pad = function(n, width, z) { z = z || '0'; n = n + ''; return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n; }, start = function(element){ var current_value = parseInt($(element).data('current_value')), end_value = parseInt($(element).data('end_value')), current_speed = 20; if(end_value === 0) { return false; } if (end_value - current_value < 5){ current_speed = 200; current_value += 1; } else if(end_value - current_value < 15){ current_speed = 50; current_value += 1 } else if(end_value - current_value < 50){ current_speed = 25; current_value += 3 } else{ current_speed = 25; current_value += parseInt((end_value - current_value)/24) } $(element).data({ current_value:current_value }); if(current_speed){ setTimeout(function(){ display($(element),current_value); },current_speed); }else{ display($(element),current_value); } }, display = function(element,value){ var padedNumber = pad(value, element.data('digits')), exp = padedNumber.split(""), end_value = $(element).data('end_value'), nums = $(element).find('.num'); $(exp).each(function(i,e){ $(nums[i]).text(exp[i]); }); if(end_value != value){ start(element); } }, //merge options options = $.extend(defauts, options); this.each(function(index, element){ var default_digits = options.digits , digits = element.getAttribute('data-digits') ? element.getAttribute('data-digits') : default_digits , end_value = parseInt( element.getAttribute('data-value')); digits = digits === 'auto' || digits < String(end_value).length ? String(end_value).length : digits; //get value $(element).data({ current_value : 0, end_value : end_value, digits : digits, current_speed : 0 }); //add number container for(var i=0 ; i < digits ; i++){ $(element).append('
0
'); } start($(element)); }); return this; }; })(jQuery); var Countstart = false; $(function(){ init_tint(); //change_count('get'); custom_file(); $('.mb-menu button').click(function(e){ e.preventDefault(); var b = $("body").hasClass('menu-open'); if ( b ){ $("body").removeClass('menu-open'); }else{ $("body").addClass('menu-open'); } }); $(".Fn_scroll").click(function(e){ e.preventDefault(); var tgt = $(this).attr("href"); scroll_down(tgt); }); $('.ba-slider').each(function(){ var cur = $(this); // Adjust the slider var width = cur.width()+'px'; cur.find('.resize img').css('width', width); // Bind dragging events drags(cur.find('.handle'), cur.find('.resize'), cur); }); $(window).resize(function(){ $('.ba-slider').each(function(){ var cur = $(this); // Adjust the slider var width = cur.width()+'px'; cur.find('.resize img').css('width', width); }); }); //init_graph(); // $(window).scroll(function(){ // var win = $( window ).scrollTop(); // var winHeight = $( window ).height() * 0.75; // var $counter = $( '.section-countdown' ); // var itemtop = $counter.offset().top; // if( win + winHeight > itemtop && !Countstart) { // //init_count(); // Countstart = true; // } // // }); /* $("#LIPOcel_Inquiry").click(set_INQUIRY); var ht = $('#hooking').height(); $('#header').affix({ offset: ht }); $('.hook-control').click(function(e){ e.preventDefault(); ht = 0; var b = $("body").hasClass('hook-close'); if ( b ){ $("body").removeClass('hook-close'); }else{ $("body").addClass('hook-close'); } }); initSliders(); $('.g-before-after').beforeafter(); eqalsH(); _setMediaQuery( $(window).width() ); //map_card($(".card-wrap")); face(); */ }); function custom_file(){ $( '.inputfile' ).each( function(idx) { var $input = $( this ), $label = $input.next( 'label' ), labelVal = $label.html(); $input.on( 'change', function( e ) { var fileName = ''; if( this.files && this.files.length > 1 ) fileName = ( this.getAttribute( 'data-multiple-caption' ) || '' ).replace( '{count}', this.files.length ); else if( e.target.value ) fileName = e.target.value.split( '\\' ).pop(); if( fileName ) $label.find( 'span' ).html( fileName ); else $label.html( labelVal ); }); // Firefox bug fix $input .on( 'focus', function(){ $input.addClass( 'has-focus' ); }) .on( 'blur', function(){ $input.removeClass( 'has-focus' ); }); }); } function init_count(n){ if (n) { $('.incremental-counter').attr('data-value', n); }else{ return; } $(".incremental-counter").empty(); n = ''+n; html = ''; for (var i = 0, max= n.length; i < max ; i++) { html += '
'+n.substr(i,1)+'
'; } $(".incremental-counter").html(html); // $(".incremental-counter").incrementalCounter( // { digits: 'auto' } // ); } function init_tint(){ $(window).scroll(function(){ var scT = $(window).scrollTop(); if ( scT > 100 ){ $("#header").addClass('tint'); }else{ $("#header").removeClass('tint'); } }); } function scroll_down(t){ var posT = $(t).offset().top; var wt = $(window).scrollTop(); var posT = $(t).position().top - $('#header').outerHeight(); $("html, body").animate({ "scroll-top" : posT },350,function(){ $("body").removeClass('menu-open'); }); } var s_root = "http://balc.co.kr/"; var post_url = "./admin/write_info.php"; //var post_url = "http://diddazoau8.cafe24.com/hk/admin/write_info.php"; var get_count_url = s_root+"hk_event2018/admin/get_count.php"; var set_count_url = s_root+"hk_event2018/admin/count.php"; var busy = false; function set_INQUIRY(){ if ( busy ) return false; var form = $("#sendForm"); var f_name = form.find('#name').val(); var f_job = form.find('#job').val(); var f_email = form.find('#email').val(); var f_age = form.find('#age').val(); var f_phone = form.find('#phone').val(); var f_address = form.find('#address').val(); var f_message = form.find('#message').val(); var f_file1 = form.find('#file1').val(); var f_file2 = form.find('#file2').val(); var re_mail = /^([\w\.-]+)@([a-z\d\.-]+)\.([a-z\.]{2,6})$/; // 이메일 검사식 var re_tel = /^[0-9]{8,11}$/; // 전화번호 검사식 //console.log(f_name.length); if (f_name.length < 1 || f_name.length > 254 ) { alert('check name'); form.find('#name').focus(); return false; } if(re_mail.test(f_email) != true) { // 이메일 검사 alert('check email'); form.find('#email').focus(); return false; } if (f_address.length < 2 || f_address.length > 254 ) { form.find('#address').focus(); return false; } if (f_file1 == "" ) { alert('check file'); form.find('#file1').focus(); return false; } if (f_file2 == "" ) { alert('check file'); form.find('#file2').focus(); return false; } // if(re_tel.test(f_phone) != true) { // 전화번호 검사 // alert('check phone number'); // form.find('#phone').focus(); // return false; // } var formdata = false; if (window.FormData){ formdata = new FormData(form[0]); } formdata.append('name', f_name); formdata.append('job', f_job); formdata.append('email', f_email); formdata.append('age', f_age); formdata.append('phone', f_phone); formdata.append('address', f_address); formdata.append('message', f_message); formdata.append('file1', form.find('#file1').prop("files")[0] ); formdata.append('file2', form.find('#file2').prop("files")[0] ); /* formdata.append('file3', form.find('#file3').prop("files")[0] ); formdata.append('file4', form.find('#file4').prop("files")[0] ); formdata.append('file5', form.find('#file5').prop("files")[0] ); formdata.append('file6', form.find('#file6').prop("files")[0] ); */ busy = true; show_loading(); $.ajax({ url: post_url, data: formdata, type: "POST", contentType: false, // NEEDED, DON'T OMIT THIS (requires jQuery 1.6+) processData: false, success: function(data){ var result = data; if ($.trim(result) == "success"){ change_count('set'); $(':input','#sendForm') .not(':button, :submit, :reset, :hidden') .val('') .removeAttr('checked') .removeAttr('selected'); $('#sendForm').find('label > span').text(''); scroll_down('.section-countdown'); /* ga */ gtag('event', 'submit'); }else{ alert(result); } hide_loading(); busy = false; }, error: function(request, status, error){ //console.log(request); console.log("code:"+request.status + "\n" + "message:" + request.responseText + "\n" + "error:" + error); busy = false; //alert('error'); hide_loading(); } }); } function show_loading(){ $('#loading').addClass('active'); } function hide_loading(){ $('#loading').removeClass('active'); } function change_count(t){ var url = ''; if ( t == 'get') { url = get_count_url; }else if( t == 'set' ){ url = set_count_url; } $.ajax({ url: url, success: function(data){ //console.log(data); var result = $.trim(data); init_count(result); }, error: function(request, status, error){ console.log(request); } }); } /* equalheight = function(container){ var wW = $(window).width(); var currentTallest = 0, currentRowStart = 0, rowDivs = new Array(), $el, topPosition = 0; $(container).each(function() { $el = $(this); $($el).height('auto') //topPostion = $el.position().top; topPostion = $el.offset().top; if (currentRowStart != topPostion) { for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) { rowDivs[currentDiv].height(currentTallest); } rowDivs.length = 0; // empty the array currentRowStart = topPostion; currentTallest = $el.height(); rowDivs.push($el); } else { rowDivs.push($el); currentTallest = (currentTallest < $el.height()) ? ($el.height()) : (currentTallest); } for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) { if (wW < 990){ rowDivs[currentDiv].height('auto'); }else{ rowDivs[currentDiv].height(currentTallest); } } }); } */ /* var mqStatus = ""; var mqXS = 320; var mqSM = 768; var mqMD = 980; var _setMediaQuery = function (windowWidth) { var mq = null; if (windowWidth > 0 && windowWidth < mqSM) { mq = 'xs'; }else if (windowWidth >= mqSM && windowWidth < mqMD ) { mq = 'sm'; } else if(windowWidth >= mqMD) { mq = 'lg'; } if (mqStatus !== mq) { mqStatus = mq; //media_change(mqStatus); } }; */ function drags(dragElement, resizeElement, container) { // Initialize the dragging event on mousedown. dragElement.on('mousedown touchstart', function(e) { dragElement.addClass('ba-draggable'); resizeElement.addClass('resizable'); // Check if it's a mouse or touch event and pass along the correct value var startX = (e.pageX) ? e.pageX : e.originalEvent.touches[0].pageX; // Get the initial position var dragWidth = dragElement.outerWidth(), posX = dragElement.offset().left + dragWidth - startX, containerOffset = container.offset().left, containerWidth = container.outerWidth(); // Set limits minLeft = containerOffset + 10; maxLeft = containerOffset + containerWidth - dragWidth - 10; // Calculate the dragging distance on mousemove. dragElement.parents().on("mousemove touchmove", function(e) { // Check if it's a mouse or touch event and pass along the correct value var moveX = (e.pageX) ? e.pageX : e.originalEvent.touches[0].pageX; leftValue = moveX + posX - dragWidth; // Prevent going off limits if ( leftValue < minLeft) { leftValue = minLeft; } else if (leftValue > maxLeft) { leftValue = maxLeft; } // Translate the handle's left value to masked divs width. widthValue = (leftValue + dragWidth/2 - containerOffset)*100/containerWidth+'%'; // Set the new values for the slider and the handle. // Bind mouseup events to stop dragging. $('.ba-draggable').css('left', widthValue).on('mouseup touchend touchcancel', function () { $(this).removeClass('ba-draggable'); resizeElement.removeClass('resizable'); }); $('.resizable').css('width', widthValue); }).on('mouseup touchend touchcancel', function(){ dragElement.removeClass('ba-draggable'); resizeElement.removeClass('resizable'); }); e.preventDefault(); }).on('mouseup touchend touchcancel', function(e){ dragElement.removeClass('ba-draggable'); resizeElement.removeClass('resizable'); }); }