/**************************************************/ /** Document ready **/ /**************************************************/ $(document).ready(function(){ $("#product_login").click(function() { toggle_popup(); }); $("#product_login2").click(function() { toggle_popup(); }); /* ·Î±×ÀÎ ÆË¾÷°ü·Ã */ $("#btn_login").click(function() { toggle_popup(); }); $("#btn_login_other").click(function() { toggle_popup(); }); var mywidth=$("body").width(); var wid_set=(mywidth-$("#login").width())/2; $("#login").css("left",wid_set); $("#overflow").click(function(e) { toggle_popup(); e.stopPropagation(); }); $("#login").click(function(e) { e.stopPropagation(); }); $("#btn_close").click(function(e) { e.stopPropagation(); toggle_popup(); }); //===========================CUSTOMER CENTER EVENT======================================== var currentTab="#tab-1"; $('#tabs .tab').css("display","none"); $('#tabs div#tab-1').css("display","block"); $('#tabs #controller div a').click(function() { $('#tabs #controller div').removeClass('active'); $(this).parent().addClass('active'); currentTab = $(this).attr('href'); $('#tabs .tab').css("display","none"); $(currentTab).css("display","block"); return false; }); //Tab right var currentTab="#tabr-1"; $('#tab_right .tab').css("display","none"); $('#tab_right div#tabr-1').css("display","block"); $('#tab_right #controller div a').click(function() { $('#tab_right #controller div').removeClass('active'); $(this).parent().addClass('active'); currentTab = $(this).attr('href'); $('#tab_right .tab').css("display","none"); $(currentTab).css("display","block"); return false; }); //tabsss tabs var currentTab="#tab-1"; $('#tabsss .tab').css("display","none"); $('#tabsss div#tab-1').css("display","block"); $('#tabsss #controller div a').click(function() { $('#tabsss #controller div').removeClass('active'); $(this).parent().addClass('active'); currentTab = $(this).attr('href'); $('#tabsss .tab').css("display","none"); $('#tabsss div'+currentTab).css("display","block"); return false; }); }); //FUNTION TO OPEN/CLOSE POPUP function toggle_popup() { var status=$("#login").attr("class"); if(status!="active") { $("#overflow").show(); $("#login").fadeIn(400).addClass("active"); } else { $("#login").fadeOut().removeClass("active"); $("#overflow").hide(); } } function show_BaBo_Popup(elemID, isCenter){ // get current modal poup var $modal = $('#'+ elemID); // create div overlay var $overlay = $('
'); // remove all overlay, insert before modal $overlay.remove().insertBefore($modal); // calculator width, height, center screen var $window = $(window); if(isCenter === true){ $modal.css({ 'position' : 'absolute', 'top' : Math.abs((($window.height() - $modal.outerHeight()) / 2) + $window.scrollTop()), 'left' : Math.abs((($window.width() - $modal.outerWidth()) / 2) + $window.scrollLeft()) }); } // show modal popup $modal.show(); // bind event when overlay click $overlay.click(function(){ $(this).remove(); $modal.fadeOut(); }); // bind close event button $modal.children('.close').click(function(){ $overlay.remove(); $modal.fadeOut(); }); } function show_product_Popup(elemID){ // get current modal poup var $modal = $('#'+ elemID); // create div overlay var $overlay = $(''); // remove all overlay, insert before modal $overlay.remove().insertBefore($modal); // calculator width, height, center screen var $window = $(window); var $contents = $('#contents'); $modal.css({ 'position' : 'absolute', 'top' : ((($window.height() - $modal.outerHeight()) / 2) + $window.scrollTop())- 250, 'left' : Math.abs((($contents.width() - $modal.outerWidth()) / 2) + $contents.scrollLeft()) }); // show modal popup $modal.show(); // bind event when overlay click $overlay.click(function(){ $(this).remove(); $modal.fadeOut(); }); // bind close event button $modal.children('.close').click(function(){ $overlay.remove(); $modal.fadeOut(); return; }); } function hide_BaBo_Popup(elemID){ // get current modal poup var $modal = $('#'+ elemID); var $overlay = $('.overlay'); $overlay.remove(); // hide modal popup $modal.fadeOut(); }