var ps_time=0,is_modal=0;function close_modal(){$(".modal_default3").modal("hide").remove()}function setCookie(e,t,a){var n=new Date;n.setDate(n.getDate()+a),document.cookie=e+"="+escape(t)+"; path=/;expires="+n.toGMTString()+";"}function getCookie(e){for(var t=e+"=",a=0;a<=document.cookie.length;){var n=a+t.length;if(document.cookie.substring(a,n)==t)return-1==(endOfCookie=document.cookie.indexOf(";",n))&&(endOfCookie=document.cookie.length),unescape(document.cookie.substring(n,endOfCookie));if(0==(a=document.cookie.indexOf(" ",a)+1))break}return""}function popupquit(e,t){var a=1;setCookie(e,"no",a=parseInt(a,10)),"close"==t&&window.close(),"modal"==t&&$(".modal").modal("hide")}function check_width(){$(".modal_default3").css("width",window.outerWidth+"px"),$(".modal_default3>iframe").css("width","100%")}function iOS(){var e=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"];if(navigator.platform)for(;e.length;)if(navigator.platform===e.pop())return!0;return!1}window.history&&window.history.pushState&&window.history.replaceState&&(window.onpopstate=function(e){e&&e.state&&e.state.url?ps_time>0&&(e.state.url.toLowerCase().indexOf("/card"),$("#modal_default3").modal("show")):ps_time>0&&(close_modal(),ps_time=0)}),$(document).on("click",".modal-backdrop",function(e){return e.preventDefault(),close_modal(),!1}),$(document).ready(function(){$(window).load(function(){$(".sticky").sticky({topSpacing:0})})}),$(document).ready(function(){new WOW({boxClass:"wow",animateClass:"animated",offset:100,mobile:!1}).init()}),$(document).ready(function(){$(window).stellar({horizontalScrolling:!1,responsive:!0})}),$(document).ready(function(){$("#main-top-issue-1").owlCarousel({items:3,itemsCustom:!1,itemsDesktop:[1199,2],itemsDesktopSmall:[980,2],itemsTablet:[768,3],itemsTabletSmall:!1,itemsMobile:[479,2],singleItem:!1,startDragging:!0,autoPlay:7e3}),$("#main-top-issue-2").owlCarousel({items:6,itemsCustom:!1,itemsDesktop:[1199,3],itemsDesktopSmall:[980,3],itemsTablet:[768,3],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!1,startDragging:!0,autoPlay:7e3}),$("#main-carousel-3").owlCarousel({items:1,loop:!0,margin:10,responsive:{479:{items:1},768:{items:2},980:{items:3}}}),$("#collection_mv1").owlCarousel({items:2,itemsCustom:!1,itemsDesktop:[1199,2],itemsDesktopSmall:[980,2],itemsTablet:[768,2],itemsTabletSmall:!1,itemsMobile:[479,1],autoHeight:!0,startDragging:!0,autoPlay:7e3}),$("#collection-section-2").owlCarousel({items:3,itemsCustom:!1,itemsTablet:[768,1],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!1,startDragging:!0,autoPlay:5e3})}),jQuery(document).ready(function(e){e(".counter").counterUp({delay:100,time:800})}),$(document).ready(function(){$(".show-image").magnificPopup({type:"image"})}),$(document).ready(function(){$(".main-flex-slider,.testi-slide").flexslider({slideshowSpeed:5e3,directionNav:!1,animation:"fade"})}),$(document).ready(function(){$("#clients-slider").owlCarousel({autoPlay:3e3,pagination:!1,items:4,itemsDesktop:[1199,3],itemsDesktopSmall:[991,2]})}),$(document).ready(function(){$("[data-toggle=popover]").popover(),$("[data-toggle=tooltip]").tooltip()}),$(document).ready(function(){jQuery(function(){jQuery(".player").mb_YTPlayer()})}),$(document).ready(function(){$(window).scroll(function(){$(this).scrollTop()>100?$(".transparent-header").css("background","#252525"):$(".transparent-header").css("background","transparent")}),$(".owl_box .btn_next").click(function(){$(this).parent().children(".owl-carousel").trigger("next.owl.carousel")}),$(".owl_box .btn_prev").click(function(){$(this).parent().children(".owl-carousel").trigger("prev.owl.carousel")})}),$(document).on("click",".keep_layer",function(e){e.stopPropagation()}),$(document).on("click",".index_login",function(e){$(".box_signup").addClass("hide"),$(".box_login").removeClass("hide")}),$(document).on("click",".btn_show_signup",function(){$(".dropdown_login .dropdown-menu").addClass("hide"),$(".box_signup").removeClass("hide")}),$(document).on("click",".btn_show_login",function(){$(".dropdown_login .dropdown-menu").addClass("hide"),$(".box_login").removeClass("hide")}),$(document).on("click",".btn_show_mypage",function(){$(".dropdown_login .dropdown-menu").addClass("hide"),$(".box_mypage").removeClass("hide")}),$(document).on("click",".tag_recommend",function(){return $("#tagWidget").tagit({tags:{0:$(this).attr("data-tag")}}),!1}),$(document).on("change",".tag_select",function(){var e=$(this).val(),t=$(this).attr("data-target");return e&&$("#"+t).tagit({tags:{0:e}}),!1}),$(document).on("change",".select_go",function(){var e=$(this).val();return e&&"#"!=e&&(self.location.href=e),!1}),$(document).on("click",".clickpic",function(){var e=$(this).attr("src");return window.open(e,"_blank"," status=yes,menubar=yes,scrollbars=yes,resizable=yes "),!1}),$(document).on("click",".windowopen",function(){var e=$(this).attr("href");return window.open(e,"_blank"," status=yes,menubar=yes,scrollbars=yes,resizable=yes "),!1}),$(document).on("click",".windowopen2",function(){var e=$(this).attr("href");return window.open(e,"_blank"," status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=780,height=600"),!1}),$(document).on("click",".modal_image",function(e){e.preventDefault();var t=$(this).attr("data-target"),a=$(this).attr("href");return $("#"+t).html()?$("#"+t).modal("show"):jQuery.ajax({type:"POST",dataType:"html",url:a,success:function(e){return $("body").append(e),$("#"+t).modal("show"),!1},error:function(e){return!1}}),!1}),$(document).on("click",".btn_work_in_progress_right",function(e){e.preventDefault();var t=$(this).parent().children(".inner").children(".work_in_progress"),a=$(t).scrollLeft()+270;return a-=a%270,$(t).animate({scrollLeft:a},600),!1}),$(document).on("click",".btn_work_in_progress_left",function(e){e.preventDefault();var t=$(this).parent().children(".inner").children(".work_in_progress"),a=$(t).scrollLeft()-270;return a-=a%90,$(t).animate({scrollLeft:a},600),!1}),$(document).on("click",".btn_check_use_image",function(e){e.preventDefault();var t=$(this).parent().parent().parent();$(t).children(".check_use").children(".btn_check_use").click()}),$(document).on("click",".btn_get_image_url",function(e){e.preventDefault();var t=$(".get_image_url").val();if(!t)return $(".get_image_url").focus(),!1;var a=$(this).attr("href");a=a+"?url="+encodeURIComponent(t);var n="modal_getimage";return $("#"+n).html()&&$("#"+n).remove(),$(".get_image_loading").show(),jQuery.ajax({type:"GET",dataType:"html",url:a,success:function(e){return $("body").append(e),$("#"+n).modal("show"),$(".get_image_loading").hide(),GetImageFromUrl(),!1},error:function(e){return $(".get_image_loading").hide(),!1}}),!1}),$(document).on("click",".btn_check_use",function(e){return e.preventDefault(),!1}),$(document).on("change",".select_collection_type",function(){var e=$(this).val(),t=$(this).attr("data-target");return $("#"+t+" .area_option").hide(),$("#"+t+" .area_option_"+e).show(),!1}),$(document).on("change",".select_collection_size",function(){var e=$(this).val(),t=$(this).parent().parent().parent().children(".area_select_collection_size");return"none"==e?$(t).hide():$(t).show(),!1}),$(document).ready(function(){$(".check_area_option").each(function(){var e=$(this).attr("id"),t=$("#"+e+"_type").val();$("#"+e+" .area_option").hide(),$("#"+e+" .area_option_"+t).show(),$("#"+e+" .area_option_hide_"+t).hide()})}),$(document).on("click",".btn_check_main",function(e){return e.preventDefault(),"Y"==$(this).attr("data-check")?($(this).attr("data-check","N"),$(this).children("i").removeClass("fa-square-o").addClass("fa-check-square-o")):($(this).attr("data-check","Y"),$(this).children("i").removeClass("fa-check-square-o").addClass("fa-square-o")),!1}),$(document).on("click",".btn_like",function(e){e.preventDefault();var t=$(this).attr("href"),a=$(this).children(".count"),n=$(this).children("i");return jQuery.ajax({type:"POST",dataType:"json",url:t,success:function(e){"OK"==e.response?($(a).html(1*$(a).html()+1),$(n).removeClass("fa-heart-o"),$(n).addClass("fa-heart")):"CANCEL"==e.response&&($(a).html(1*$(a).html()-1),$(n).removeClass("fa-heart"),$(n).addClass("fa-heart-o"))},error:function(e){return alert(e.responseText),477==e.status&&(top.location.href="/user/login?returnUrl="+self.location.href),!1}}),!1}),$(document).on("click",".btn_share",function(){var e=$(this).attr("href");window.open(e,"_blank"," status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=800,height=600");var t=$(this).attr("data-href");return jQuery.ajax({type:"POST",dataType:"json",url:t,success:function(e){e&&e.response},error:function(e){alert(e.responseText)}}),!1}),$(document).on("click",".btn_share_email",function(){$(this).attr("href");var e=$(this).attr("data-href");return jQuery.ajax({type:"POST",dataType:"json",url:e,success:function(e){e&&e.response},error:function(e){alert(e.responseText)}}),!1}),$(document).on("click",".btn_share_kakaostory",function(){$(this).attr("href");var e=$(this).attr("data-href");return shareStory(),jQuery.ajax({type:"POST",dataType:"json",url:e,success:function(e){e&&e.response},error:function(e){alert(e.responseText)}}),!1}),$(document).on("click",".btn_request",function(){$(this).attr("href");return!1}),$(document).on("click",".btn_join",function(){var e=$(this).attr("href");return window.open(e,"_blank"," status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=1000,height=700"),!1}),$(document).on("click",".btn_new_window",function(){var e=$(this).attr("href");return window.open(e,"_blank"),!1}),$(document).on("click",".btn_follow",function(e){e.preventDefault();var t=$(this).attr("href"),a=$(this).children("img");return jQuery.ajax({type:"POST",dataType:"json",url:t,success:function(e){"OK"==e.response?$(a).attr("src",$(a).attr("src").replace("icon_plus.png","icon_check.png")):"OK_UNFOLLOW"==e.response&&($(a).attr("src",$(a).attr("src").replace("icon_check.png","icon_plus.png")),alert(e.responseText))},error:function(e){return alert(e.responseText),!1}}),!1}),$(document).on("click",".btn_unfollow",function(e){e.preventDefault();var t=$(this).attr("href");return jQuery.ajax({type:"POST",dataType:"json",url:t,success:function(e){"OK"==e.response&&(alert(e.responseText),self.location.href=self.location.href)},error:function(e){return alert(e.responseText),!1}}),!1}),$(document).on("click",".btn_delete",function(e){e.preventDefault();var t=$(this).attr("href"),a=$(this).attr("data-message");return confirm(a)&&jQuery.ajax({type:"POST",dataType:"json",url:t,success:function(e){if("OK"==e.response)return self.location.href=e.returnUrl,!1},error:function(e){return alert(e.responseText),!1}}),!1}),$(document).on("click",".btn_cancel_online",function(e){e.preventDefault();var t=$(this).attr("href"),a=$(this).attr("data-message");return confirm(a)&&jQuery.ajax({type:"POST",dataType:"json",url:t,success:function(e){if("OK"==e.response)return self.location.href=e.returnUrl,!1},error:function(e){return alert(e.responseText),!1}}),!1}),$(document).on("click",".btn_join_online",function(e){e.preventDefault();var t=$(this).attr("href");$(this).attr("data-message");return jQuery.ajax({type:"POST",dataType:"json",url:t,success:function(e){if("OK"==e.response)return e.message&&alert(e.message),self.location.href=e.returnUrl,!1},error:function(e){return alert(e.responseText),top.location.href="/user/login?returnUrl="+self.location.href,!1}}),!1}),$(document).on("click",".btn_view_password",function(e){e.preventDefault();var t=$(this).attr("data-href"),a=$(".view_password").val();return jQuery.ajax({type:"POST",dataType:"json",url:t,data:{password:a},success:function(e){return console.log(e.response),"OK"==e.response?($(".errorMessage").html(""),self.location.href=e.returnUrl,!1):"ERROR"==e.response?($(".errorMessage").html("").html(e.message),!1):void 0},error:function(e){return alert(e.responseText),!1}}),!1}),$(document).on("click",".btn_close",function(e){return e.preventDefault(),self.close(),!1}),$(document).on("click",".btn_close_parent_modal",function(e){e.preventDefault();var t=parent.document.getElementById("modal_default2");return $(t).find(".close").click(),!1}),$(document).on("click",".filter_btn",function(e){return e.preventDefault(),$(".area_filter_btn_sub").toggle(),!1}),$(document).on("click",".btn_modal",function(e){e.preventDefault();var t=$(this).attr("href"),a=$(this).attr("data-target");return jQuery.ajax({type:"GET",dataType:"html",url:t,success:function(e){$("#"+a+" .modal-body").html("").append(e),$("#"+a).modal("show")},error:function(e){}}),!1}),$(document).on("click",".btn_modal2",function(e){e.preventDefault();var t=$(this).attr("href"),a=$(this).attr("data-target");return a||(a="modal_default2"),jQuery.ajax({type:"GET",dataType:"html",url:t,success:function(e){return $("#"+a).length||$("body").append('