/*! * jQuery JavaScript Library v1.4.4 * http://jquery.com/ * * Copyright 2010, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * Includes Sizzle.js * http://sizzlejs.com/ * Copyright 2010, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * * Date: Thu Nov 11 19:04:53 2010 -0500 */ $(document).ready(function(){ }); /** * ¹è³Ê ¿­±â/´Ý±â */ var ALWAYS_OPEN = true; // ¹è³Ê Ç×»ó ¿­·ÁÀÖ´Â »óŸé true ·Î ¹Ù²ã ÁÖ¼¼¿ä. var REMEMBER_CLOSE = true; // ÇϷ絿¾È º¸Áö ¾Ê±â¸¦ Áö¿øÇÒ·Á¸é true ·Î ¹Ù²ã ÁÖ¼¼¿ä. var REMEMBER_DATE = 1; // ³¯Â¥ ´ÜÀ§. ÇÏ·ç¸é 1. function showBanner() { if (ALWAYS_OPEN) { return; } $('#BANNER_CLOSE').show(); $('#BANNER_OPEN').hide(); var el = $('#BANNER_WRAP'); el.animate({ marginTop: 0 }, 600); }; function hideBanner(animated) { if (ALWAYS_OPEN) { return; } $('#BANNER_CLOSE').hide(); $('#BANNER_OPEN').show(); var el = $('#BANNER_WRAP'); if (animated) { el.animate({ marginTop: '-300px' }, 600); } else { el.css('marginTop', '-300px'); } }; $('#BANNER_CLOSE').click(function() { hideBanner(true); // ¿À´Ã ÇÏ·ç ¿­Áö ¾Ê±â $.cookie('TODAY_BANNER_CLOSE', '1', { expires: REMEMBER_DATE }); return false; }); $('#BANNER_OPEN').click(function() { showBanner(); return false; }); /** * ¹è³Ê ·Ñ¸µ */ var carouseling = false; function leftCarousel() { if (carouseling) { return; } carouseling = true; var active = $('#BANNER_WRAP .carousel_inner .item.active'); // ¸¶Áö¸· ¹è³Ê¸¦ óÀ½À¸·Î °¡Á®¿Â ÈÄ¿¡ ¾Ö´Ï¸ÞÀÌ¼Ç var last = $('#BANNER_WRAP .carousel_inner .item').last(); active.before(last); var width = last.width(); $('#BANNER_WRAP .carousel_inner').css('left', '-'+width+'px'); $('#BANNER_WRAP .carousel_inner').animate({ 'left': 0 }, 500, function() { active.removeClass('active').prev().addClass('active'); carouseling = false; }); }; function rightCarousel() { if (carouseling) { return; } carouseling = true; var active = $('#BANNER_WRAP .carousel_inner .item.active'); var width = active.width(); $('#BANNER_WRAP .carousel_inner').animate({ 'left': '-=' + width }, 500, function() { active.removeClass('active').next().addClass('active'); // ¾Ö´Ï¸ÞÀÌ¼Ç ³¡³ª°í óÀ½ ¹è³Ê¸¦ ¸¶Áö¸·À¸·Î À̵¿ ½ÃÅ´ $('#BANNER_WRAP .carousel_inner').css('left', '0').append(active); carouseling = false; }); }; function autoCarousel() { setTimeout(function() { rightCarousel(); autoCarousel(); }, 3000); }; function initCarousel() { $('#BANNER_WRAP .carousel-control.left').click(function(event) { event.preventDefault(); leftCarousel(); return false; }); $('#BANNER_WRAP .carousel-control.right').click(function(event) { event.preventDefault(); rightCarousel(); return false; }); autoCarousel(); }; $(document).ready(function() { initCarousel(); if (!ALWAYS_OPEN) { if (REMEMBER_CLOSE && '1' == $.cookie('TODAY_BANNER_CLOSE')) { hideBanner(false); } else { setTimeout(function() { showBanner(); }, 1000); } } else { $('#BANNER_WRAP').css('margin', 0); } }); /*! * jQuery Cookie Plugin v1.3 * https://github.com/carhartl/jquery-cookie * * Copyright 2011, Klaus Hartl * Dual licensed under the MIT or GPL Version 2 licenses. * http://www.opensource.org/licenses/mit-license.php * http://www.opensource.org/licenses/GPL-2.0 */ (function ($, document, undefined) { var pluses = /\+/g; function raw(s) { return s; } function decoded(s) { return decodeURIComponent(s.replace(pluses, ' ')); } var config = $.cookie = function (key, value, options) { // write if (value !== undefined) { options = $.extend({}, config.defaults, options); if (value === null) { options.expires = -1; } if (typeof options.expires === 'number') { var days = options.expires, t = options.expires = new Date(); t.setDate(t.getDate() + days); } value = config.json ? JSON.stringify(value) : String(value); return (document.cookie = [ encodeURIComponent(key), '=', config.raw ? value : encodeURIComponent(value), options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE options.path ? '; path=' + options.path : '', options.domain ? '; domain=' + options.domain : '', options.secure ? '; secure' : '' ].join('')); } // read var decode = config.raw ? raw : decoded; var cookies = document.cookie.split('; '); for (var i = 0, l = cookies.length; i < l; i++) { var parts = cookies[i].split('='); if (decode(parts.shift()) === key) { var cookie = decode(parts.join('=')); return config.json ? JSON.parse(cookie) : cookie; } } return null; }; config.defaults = {}; $.removeCookie = function (key, options) { if ($.cookie(key) !== null) { $.cookie(key, null, options); return true; } return false; }; })(jQuery, document); /** * ¿òÁ÷ÀÌ´Â ¹è³Ê Jquery Plug-in * @author cafe24 */ ;(function($){ $.fn.floatBanner = function(options) { options = $.extend({}, $.fn.floatBanner.defaults , options); return this.each(function() { var aPosition = $(this).position(); var node = this; $(window).scroll(function() { var _top = $(document).scrollTop(); _top = (aPosition.top < _top) ? _top : aPosition.top; setTimeout(function () { $(node).stop().animate({top: _top}, options.animate); }, options.delay); }); }); }; $.fn.floatBanner.defaults = { 'animate' : 500, 'delay' : 500 }; })(jQuery); /** * ¹®¼­ ±¸µ¿ÈÄ ½ÃÀÛ */ $(document).ready(function(){ $('#quickR, #quickL').floatBanner(); }); //window popup script function winPop(url) { window.open(url, "popup", "width=300,height=300,left=10,top=10,resizable=no,scrollbars=no"); } /** * document.location.href split * return array Param */ function getQueryString(sKey) { var sQueryString = document.location.search.substring(1); var aParam = {}; if (sQueryString) { var aFields = sQueryString.split("&"); var aField = []; for (var i=0; i'+sPage+''); } else { var sHref = $(this).attr('href'); $(this).parent().html(''+sPage+''); } }); } /** * jQuery Masonry v2.1.05 * A dynamic layout plugin for jQuery * The flip-side of CSS Floats * http://masonry.desandro.com * * Licensed under the MIT license. * Copyright 2012 David DeSandro */ /*jshint browser: true, curly: true, eqeqeq: true, forin: false, immed: false, newcap: true, noempty: true, strict: true, undef: true */ /*global jQuery: false */ (function( window, $, undefined ){ 'use strict'; /* * smartresize: debounced resize event for jQuery * * latest version and complete README available on Github: * https://github.com/louisremi/jquery.smartresize.js * * Copyright 2011 @louis_remi * Licensed under the MIT license. */ var $event = $.event, resizeTimeout; $event.special.smartresize = { setup: function() { $(this).bind( "resize", $event.special.smartresize.handler ); }, teardown: function() { $(this).unbind( "resize", $event.special.smartresize.handler ); }, handler: function( event, execAsap ) { // Save the context var context = this, args = arguments; // set correct event type event.type = "smartresize"; if ( resizeTimeout ) { clearTimeout( resizeTimeout ); } resizeTimeout = setTimeout(function() { $.event.handle.apply( context, args ); }, execAsap === "execAsap"? 0 : 100 ); } }; $.fn.smartresize = function( fn ) { return fn ? this.bind( "smartresize", fn ) : this.trigger( "smartresize", ["execAsap"] ); }; // ========================= Masonry =============================== // our "Widget" object constructor $.Mason = function( options, element ){ this.element = $( element ); this._create( options ); this._init(); }; $.Mason.settings = { isResizable: true, isAnimated: false, animationOptions: { queue: false, duration: 500 }, gutterWidth: 0, isRTL: false, isFitWidth: false, containerStyle: { position: 'relative' } }; $.Mason.prototype = { _filterFindBricks: function( $elems ) { var selector = this.options.itemSelector; // if there is a selector // filter/find appropriate item elements return !selector ? $elems : $elems.filter( selector ).add( $elems.find( selector ) ); }, _getBricks: function( $elems ) { var $bricks = this._filterFindBricks( $elems ) .css({ position: 'absolute' }) .addClass('masonry-brick'); return $bricks; }, // sets up widget _create : function( options ) { this.options = $.extend( true, {}, $.Mason.settings, options ); this.styleQueue = []; // get original styles in case we re-apply them in .destroy() var elemStyle = this.element[0].style; this.originalStyle = { // get height height: elemStyle.height || '' }; // get other styles that will be overwritten var containerStyle = this.options.containerStyle; for ( var prop in containerStyle ) { this.originalStyle[ prop ] = elemStyle[ prop ] || ''; } this.element.css( containerStyle ); this.horizontalDirection = this.options.isRTL ? 'right' : 'left'; this.offset = { x: parseInt( this.element.css( 'padding-' + this.horizontalDirection ), 10 ), y: parseInt( this.element.css( 'padding-top' ), 10 ) }; this.isFluid = this.options.columnWidth && typeof this.options.columnWidth === 'function'; // add masonry class first time around var instance = this; setTimeout( function() { instance.element.addClass('masonry'); }, 0 ); // bind resize method if ( this.options.isResizable ) { $(window).bind( 'smartresize.masonry', function() { instance.resize(); }); } // need to get bricks this.reloadItems(); }, // _init fires when instance is first created // and when instance is triggered again -> $el.masonry(); _init : function( callback ) { this._getColumns(); this._reLayout( callback ); }, option: function( key, value ){ // set options AFTER initialization: // signature: $('#foo').bar({ cool:false }); if ( $.isPlainObject( key ) ){ this.options = $.extend(true, this.options, key); } }, // ====================== General Layout ====================== // used on collection of atoms (should be filtered, and sorted before ) // accepts atoms-to-be-laid-out to start with layout : function( $bricks, callback ) { // place each brick for (var i=0, len = $bricks.length; i < len; i++) { this._placeBrick( $bricks[i] ); } // set the size of the container var containerSize = {}; containerSize.height = Math.max.apply( Math, this.colYs ); if ( this.options.isFitWidth ) { var unusedCols = 0; i = this.cols; // count unused columns while ( --i ) { if ( this.colYs[i] !== 0 ) { break; } unusedCols++; } // fit container to columns that have been used; containerSize.width = (this.cols - unusedCols) * this.columnWidth - this.options.gutterWidth; } this.styleQueue.push({ $el: this.element, style: containerSize }); // are we animating the layout arrangement? // use plugin-ish syntax for css or animate var styleFn = !this.isLaidOut ? 'css' : ( this.options.isAnimated ? 'animate' : 'css' ), animOpts = this.options.animationOptions; // process styleQueue var obj; for (i=0, len = this.styleQueue.length; i < len; i++) { obj = this.styleQueue[i]; obj.$el[ styleFn ]( obj.style, animOpts ); } // clear out queue for next time this.styleQueue = []; // provide $elems as context for the callback if ( callback ) { callback.call( $bricks ); } this.isLaidOut = true; }, // calculates number of columns // i.e. this.columnWidth = 200 _getColumns : function() { var container = this.options.isFitWidth ? this.element.parent() : this.element, containerWidth = container.width(); // use fluid columnWidth function if there this.columnWidth = this.isFluid ? this.options.columnWidth( containerWidth ) : // if not, how about the explicitly set option? this.options.columnWidth || // or use the size of the first item this.$bricks.outerWidth({margin:true}) || // if there's no items, use size of container containerWidth; this.columnWidth += this.options.gutterWidth; this.cols = Math.floor( ( containerWidth + this.options.gutterWidth ) / this.columnWidth ); this.cols = Math.max( this.cols, 1 ); }, // layout logic _placeBrick: function( brick ) { var $brick = $(brick), colSpan, groupCount, groupY, groupColY, j; //how many columns does this brick span colSpan = Math.ceil( $brick.outerWidth({margin:true}) / this.columnWidth ); colSpan = Math.min( colSpan, this.cols ); if ( colSpan === 1 ) { // if brick spans only one column, just like singleMode groupY = this.colYs; } else { // brick spans more than one column // how many different places could this brick fit horizontally groupCount = this.cols + 1 - colSpan; groupY = []; // for each group potential horizontal position for ( j=0; j < groupCount; j++ ) { // make an array of colY values for that one group groupColY = this.colYs.slice( j, j+colSpan ); // and get the max value of the array groupY[j] = Math.max.apply( Math, groupColY ); } } // get the minimum Y value from the columns var minimumY = Math.min.apply( Math, groupY ), shortCol = 0; // Find index of short column, the first from the left for (var i=0, len = groupY.length; i < len; i++) { if ( groupY[i] === minimumY ) { shortCol = i; break; } } // position the brick var position = { top: minimumY + this.offset.y }; // position.left or position.right position[ this.horizontalDirection ] = this.columnWidth * shortCol + this.offset.x; this.styleQueue.push({ $el: $brick, style: position }); // apply setHeight to necessary columns var setHeight = minimumY + $brick.outerHeight({margin:true}), setSpan = this.cols + 1 - len; for ( i=0; i < setSpan; i++ ) { this.colYs[ shortCol + i ] = setHeight; } }, resize: function() { var prevColCount = this.cols; // get updated colCount this._getColumns(); if ( this.isFluid || this.cols !== prevColCount ) { // if column count has changed, trigger new layout this._reLayout(); } }, _reLayout : function( callback ) { // reset columns var i = this.cols; this.colYs = []; while (i--) { this.colYs.push( 0 ); } // apply layout logic to all bricks this.layout( this.$bricks, callback ); }, // ====================== Convenience methods ====================== // goes through all children again and gets bricks in proper order reloadItems : function() { this.$bricks = this._getBricks( this.element.children() ); }, reload : function( callback ) { this.reloadItems(); this._init( callback ); }, // convienence method for working with Infinite Scroll appended : function( $content, isAnimatedFromBottom, callback ) { if ( isAnimatedFromBottom ) { // set new stuff to the bottom this._filterFindBricks( $content ).css({ top: this.element.height() }); var instance = this; setTimeout( function(){ instance._appended( $content, callback ); }, 1 ); } else { this._appended( $content, callback ); } }, _appended : function( $content, callback ) { var $newBricks = this._getBricks( $content ); // add new bricks to brick pool this.$bricks = this.$bricks.add( $newBricks ); this.layout( $newBricks, callback ); }, // removes elements from Masonry widget remove : function( $content ) { this.$bricks = this.$bricks.not( $content ); $content.remove(); }, // destroys widget, returns elements and container back (close) to original style destroy : function() { this.$bricks .removeClass('masonry-brick') .each(function(){ this.style.position = ''; this.style.top = ''; this.style.left = ''; }); // re-apply saved container styles var elemStyle = this.element[0].style; for ( var prop in this.originalStyle ) { elemStyle[ prop ] = this.originalStyle[ prop ]; } this.element .unbind('.masonry') .removeClass('masonry') .removeData('masonry'); $(window).unbind('.masonry'); } }; // ======================= imagesLoaded Plugin =============================== /*! * jQuery imagesLoaded plugin v1.1.0 * http://github.com/desandro/imagesloaded * * MIT License. by Paul Irish et al. */ // $('#my-container').imagesLoaded(myFunction) // or // $('img').imagesLoaded(myFunction) // execute a callback when all images have loaded. // needed because .load() doesn't work on cached images // callback function gets image collection as argument // `this` is the container $.fn.imagesLoaded = function( callback ) { var $this = this, $images = $this.find('img').add( $this.filter('img') ), len = $images.length, blank = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==', loaded = []; function triggerCallback() { callback.call( $this, $images ); } function imgLoaded( event ) { var img = event.target; if ( img.src !== blank && $.inArray( img, loaded ) === -1 ){ loaded.push( img ); if ( --len <= 0 ){ setTimeout( triggerCallback ); $images.unbind( '.imagesLoaded', imgLoaded ); } } } // if no images, trigger immediately if ( !len ) { triggerCallback(); } $images.bind( 'load.imagesLoaded error.imagesLoaded', imgLoaded ).each( function() { // cached images don't fire load sometimes, so we reset src. var src = this.src; // webkit hack from http://groups.google.com/group/jquery-dev/browse_thread/thread/eee6ab7b2da50e1f // data uri bypasses webkit log warning (thx doug jones) this.src = blank; this.src = src; }); return $this; }; // helper function for logging errors // $.error breaks jQuery chaining var logError = function( message ) { if ( window.console ) { window.console.error( message ); } }; // ======================= Plugin bridge =============================== // leverages data method to either create or return $.Mason constructor // A bit from jQuery UI // https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.widget.js // A bit from jcarousel // https://github.com/jsor/jcarousel/blob/master/lib/jquery.jcarousel.js $.fn.masonry = function( options ) { if ( typeof options === 'string' ) { // call method var args = Array.prototype.slice.call( arguments, 1 ); this.each(function(){ var instance = $.data( this, 'masonry' ); if ( !instance ) { logError( "cannot call methods on masonry prior to initialization; " + "attempted to call method '" + options + "'" ); return; } if ( !$.isFunction( instance[options] ) || options.charAt(0) === "_" ) { logError( "no such method '" + options + "' for masonry instance" ); return; } // apply method instance[ options ].apply( instance, args ); }); } else { this.each(function() { var instance = $.data( this, 'masonry' ); if ( instance ) { // apply options & init instance.option( options || {} ); instance._init(); } else { // initialize new instance $.data( this, 'masonry', new $.Mason( options, this ) ); } }); } return this; }; })( window, jQuery ); function findCurrentCateNo() { var query = (window.location.search || '?').substr(1), map = {}; query.replace(/([^&=]+)=?([^&]*)(?:&+|$)/g, function(match, key, value) { (map[key] = map[key] || []).push(value); }); return map.cate_no ? map.cate_no : false; }; function findCategoryDescription(cate_no) { if (0 == cate_no) { return '\ it is sample.\ '; } else if (12 == cate_no) { return '\ ¿©±â¿¡ Ä«Å×°í¸® ¼³¸íÀ» ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù. JNY ½ºÅ²¸¸ÀÌ °¡´ÉÇÕ´Ï´Ù.\ '; } else if (7 == cate_no) { return '\ ¿©±â¿¡ Ä«Å×°í¸® ¼³¸íÀ» ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù. JNY ½ºÅ²¸¸ÀÌ °¡´ÉÇÕ´Ï´Ù.\ '; } else if (4 == cate_no) { return '\ ¿©±â¿¡ Ä«Å×°í¸® ¼³¸íÀ» ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù. JNY ½ºÅ²¸¸ÀÌ °¡´ÉÇÕ´Ï´Ù.\ '; } else if (26 == cate_no) { return '\ ¿©±â¿¡ Ä«Å×°í¸® ¼³¸íÀ» ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù. JNY ½ºÅ²¸¸ÀÌ °¡´ÉÇÕ´Ï´Ù.\ '; } else if (27 == cate_no) { return '\ ¿©±â¿¡ Ä«Å×°í¸® ¼³¸íÀ» ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù. JNY ½ºÅ²¸¸ÀÌ °¡´ÉÇÕ´Ï´Ù.\ '; } else if (24 == cate_no) { return '\ ¿©±â¿¡ Ä«Å×°í¸® ¼³¸íÀ» ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù. JNY ½ºÅ²¸¸ÀÌ °¡´ÉÇÕ´Ï´Ù.\ '; } else if (25 == cate_no) { return '\ ¿©±â¿¡ Ä«Å×°í¸® ¼³¸íÀ» ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù. JNY ½ºÅ²¸¸ÀÌ °¡´ÉÇÕ´Ï´Ù.\ '; } else if (28 == cate_no) { return '\ ¿©±â¿¡ Ä«Å×°í¸® ¼³¸íÀ» ÀÔ·ÂÇÒ ¼ö ÀÖ½À´Ï´Ù. JNY ½ºÅ²¸¸ÀÌ °¡´ÉÇÕ´Ï´Ù.\ '; } else { return false; } }; function initCategoryDescription() { var cate_no = findCurrentCateNo(); var html = findCategoryDescription(cate_no); if (html) { $('#CATEGORY_DESCRIPTION').html(html); } }; function initSquare(repeat_cycle) { $('#columns .product').each(function(index){ if (repeat_cycle-1 == index % repeat_cycle) { $(this).addClass('square2'); } else { $(this).addClass('square1'); } }); }; function initMasonry() { var container = $('#columns'); if ($.browser.webkit) { // webkit ºê¶ó¿ìÀú¿¡¼­´Â À̹ÌÁö ·ÎµùÀÌ ¿Ï·áµÇ±â Àü¿¡ ³ôÀ̸¦ ¾ËÁö ¸øÇϱ⠶§¹®¿¡ ¹Ú½º°¡ °ãÄ¡´Â ¹®Á¦ ¶§¹®¿¡ µô·¹À̸¦ ÁÝ´Ï´Ù. container.imagesLoaded(function() { container.masonry({ itemSelector: '.product', isFitWidth: true, isAnimated: true }); }); } else { container.masonry({ itemSelector: '.product', isFitWidth: true, isAnimated: true }); } } function initHoverEffect() { $('#columns .product').hover( function() { $(this).find('.overlay').show().animate({opacity: '0.4'}, 300); }, function() { $(this).find('.overlay').animate({opacity: '0'}, 300, function() { $(this).hide(); }); } ); } function initDiscountRate() { $('.discount_rate').each(function() { var el = $(this); var price = el.attr('data-price'); el.removeAttr('data-price'); var sale = el.attr('data-sale'); el.removeAttr('data-sale'); price = parseInt(price.replace(/,/g, '')); sale = parseInt(sale.replace(/,/g, '')); var rate = 0; if (!isNaN(price) && !isNaN(sale) && 0 < price) { rate = Math.round((price - sale) / price * 100); } el.html(rate+'%
Off'); rate = Math.ceil(rate / 10) * 10; el.removeClass('rate0').addClass('rate' + rate); }); } function initTargetLink() { /* * ƯÁ¤ Á¶°Ç¿¡ ÀÇÇØ ¸µÅ© °¢ ¸®½ºÆ® ¾ÆÀÌÅÛÀÇ ÁÖ¼Ò¸¦ ¹Ù²ß´Ï´Ù. */ $('#columns .product a').each(function(index) { var name = $(this).attr('data-name'); if (name) { var regexp1 = /^\[a\]/; // ù ¹ø° °Ë»ç var regexp2 = /^\[b\]/; // µÎ ¹ø° °Ë»ç var regexp3 = /^\[c\]/; // ¼¼ ¹ø° °Ë»ç var regexp = /^\[.+\]/; // ¸¶Áö¸· °Ë»ç if (regexp1.test(name)) { // ù ¹ø° °Ë»ç var url = $(this).attr('href'); url = url.replace('http://ecdemo84314.cafe24.com/product/detail.html?', 'http://ecdemo84314.cafe24.com/product/detaila.html?'); $(this).attr('href', url); } else if (regexp2.test(name)) { // µÎ ¹ø° °Ë»ç var url = $(this).attr('href'); url = url.replace('http://ecdemo84314.cafe24.com/product/detail.html?', 'http://ecdemo84314.cafe24.com/product/detailb.html?'); $(this).attr('href', url); } else if (regexp3.test(name)) { // ¼¼ ¹ø° °Ë»ç var url = $(this).attr('href'); url = url.replace('http://ecdemo84314.cafe24.com/product/detail.html?', 'http://ecdemo84314.cafe24.com/product/detailc.html?'); $(this).attr('href', url); } else if (regexp.test(name)) { // ¸¶Áö¸· °Ë»ç var url = $(this).attr('href'); url = url.replace('http://ecdemo84314.cafe24.com/product/detail.html?', 'http://ecdemo84314.cafe24.com/product/detailz.html?'); $(this).attr('href', url); } } }); } $(function() { /* * Ä«Å×°í¸® ¼³¸í */ initCategoryDescription(); /* * masonry */ var IS_SQUARE = false; // Á¤»ç°¢ÇüÀÏ °æ¿ì true ·Î ¹Ù²ã ÁÖ¼¼¿ä. var SQUARE_REPEAT_CYCLE = 5; // Å« »ç°¢Çü ³ª¿À´Â Áֱ⸦ ¼³Á¤ÇÕ´Ï´Ù. 5¸é 5¹ø¿¡ Çѹø¾¿ Å« »ç°¢ÇüÀÌ ³ª¿É´Ï´Ù. if (IS_SQUARE) { initSquare(SQUARE_REPEAT_CYCLE); } initMasonry(); /* * ¸¶¿ì½º ¿À¹ö È¿°ú */ var USE_MOUSE_HOVER_EFFECT = true; // ¸¶¿ì½º ¿À¹ö È¿°ú¸¦ »ç¿ëÇÏÁö ¾Ê±â À§Çؼ­´Â false ·Î ¹Ù²ã ÁÖ¼¼¿ä. if (USE_MOUSE_HOVER_EFFECT) { initHoverEffect(); } /* * ÇÒÀÎÀ² Ç¥½Ã */ initDiscountRate(); /* * Ÿ°Ù ¸µÅ© */ initTargetLink(); /* * °íÁ¤ ¸Þ´º */ var USE_FIXED_MENU_NAV = true; // »ó´Ü °íÁ¤ ³×ºñ°ÔÀ̼ÇÀ» »ç¿ëÇϱâ À§Çؼ­´Â true ·Î ¹Ù²ã ÁÖ¼¼¿ä. var USE_FIXED_DETAIL_OPTION = true; // »ó¼¼º¸±â ¿À¸¥ÂÊ ¿É¼ÇÀ» °íÁ¤½ÃÅ°±â À§Çؼ­´Â true ·Î ¹Ù²ã ÁÖ¼¼¿ä. if (USE_FIXED_MENU_NAV || USE_FIXED_DETAIL_OPTION) { var fixedNav = $('#menu_navigation'); // »ó´Ü ¸Þ´º var fixedOption = $('#product_option'); // ¿À¸¥ÂÊ ¸Þ´º var nextEl = $('#container'); var nextEl_margin_top = nextEl.css('marginTop'); $(window).scroll(function() { if ($(window).scrollTop() > $('#header').height()) { if (USE_FIXED_MENU_NAV) { fixedNav.addClass('fixed'); nextEl.css('marginTop', fixedNav.height()); } if (USE_FIXED_DETAIL_OPTION) { fixedOption.addClass('fixed'); } } else { if (USE_FIXED_MENU_NAV) { fixedNav.removeClass('fixed'); nextEl.css('marginTop', nextEl_margin_top); } if (USE_FIXED_DETAIL_OPTION) { fixedOption.removeClass('fixed'); } } }); } }); /** * Ä«Å×°í¸® ¸¶¿ì½º ¿À¹ö À̹ÌÁö * Ä«Å×°í¸® ¼­ºê ¸Þ´º Ãâ·Â */ $(document).ready(function(){ var methods = { aCategory : [], aSubCategory : {}, get: function() { $.ajax({ url : '/exec/fronthttp://ecdemo84314.cafe24.com/product/SubCategory', dataType: 'json', success: function(aData) { if (aData == null || aData == 'undefined') return; for (var i=0; i'); aHtml.push(''); var offset = $(overNode).offset(); $('
') .appendTo(overNode) .html(aHtml.join('')) .find('li').mouseover(function(e) { $(this).addClass('over'); }).mouseout(function(e) { $(this).removeClass('over'); }); }, close: function() { $('.sub-category').remove(); } }; methods.get(); $('.xans-layout-category li').mouseenter(function(e) { $(this).addClass('on') var node = $(this).find('img'); if (node.length > 0) { var src = node.attr('src'); if (src.indexOf('_on.gif') === -1) { $(this).find('img').attr('src', src.replace('.gif', '_on.gif')); } } var iCateNo = Number(methods.getParam($(this).find('a').attr('href'), 'cate_no')); if (!iCateNo) { return; } methods.show(this, iCateNo); }).mouseleave(function(e) { $(this).removeClass('on') var node = $(this).find('img'); if (node.length > 0) { var src = node.attr('src'); if (src.indexOf('_on.gif') > -1) { $(this).find('img').attr('src', src.replace('_on.gif', '.gif')); } } methods.close(); }); }); /* * ±âº»À¸·Î Áö¿øµÇÁö ¾Ê´Â Ãß°¡ ¼­ºê Ä«Å×°í¸®¸¦ º¸¿©ÁÝ´Ï´Ù. */ function showMenu1() { $('#board_list').show(); }; function hideMenu1() { $('#board_list').hide(); }; $('li.board').hover( function () { showMenu1(); }, function () { hideMenu1(); } );