<style> #contentWrap #extra_series .contents { padding:0 14px 15px 0; width:782px; height:52px; } #contentWrap #extra_series h3 { height:52px;} #contentWrap #extra_series button { float:left; display:inline; width:13px; height:41px; overflow:hidden; cursor:pointer; font-size:1px; text-indent:-9999em; margin-top:3px; padding:0; } #contentWrap #extra_series button.off { cursor:default; } #contentWrap #extra_series button#slideLeft { background-position:0 0; } #contentWrap #extra_series button#slideLeft.off { background-position:-13px 0; } #contentWrap #extra_series button#slideRight { background-position:-26px 0; } #contentWrap #extra_series button#slideRight.off { background-position:-39px 0; } #contentWrap #extra_series #seriesListWrap { float:left; display:inline; position:relative; margin:0 0 0 9px; width:696px; height:52px; overflow:hidden; } #contentWrap #extra_series #seriesList { position:absolute; left:0; top:0; height:52px; width:9999px; } #contentWrap #extra_series #seriesList li { width:218px; height:52px; float:left; padding-right:14px; display:inline; } #contentWrap #extra_series #seriesList dt { margin-bottom:1px; } #contentWrap #extra_series #seriesList dt a { font-weight:bold; } #contentWrap #extra_series #seriesList dt img { margin-left:2px; } #contentWrap #extra_series #seriesList dt, #contentWrap #extra_series #seriesList dd.optcnt { float:right; width:140px; display:inline; } #contentWrap #extra_series #seriesList dd.optcnt { font-size:11px; font-family:돋움,dotum,sans-serif; color:#666; letter-spacing:-1px; } #contentWrap #extra_series #seriesList dd.optcnt strong { font-weight:bold; color:#7393e8; font-family:Tahoma,sans-serif; letter-spacing:0; } #contentWrap #extra_series #seriesList dd.img { width:68px; height:50px; border:1px solid #666; position:relative; float:left; display:inline; margin-right:8px; overflow:hidden; } #contentWrap #extra_series #seriesList dd.img img { width:68px; height:50px; border:none; } </style> <script> /* */ /* TERMS OF USE - EASING EQUATIONS Open source under the BSD License. Copyright 2001 Robert Penner All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ var userAgent = navigator.userAgent.toLowerCase(); var browser = { version: (userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1], safari: /webkit/.test(userAgent), opera: /opera/.test(userAgent), msie: /msie/.test(userAgent) && !/opera/.test(userAgent), mozilla: /mozilla/.test(userAgent) && !/(compatible|webkit)/.test(userAgent) }; var os ={ isXP : /nt 5.1/.test(userAgent), isVista : /nt 6.0/.test(userAgent) } var domHelper = { // Add event handler addEvent : function(elm, evType, fn, useCapture, obj, override) { if (typeof elm == 'string') elm = document.getElementById(elm); var scope = elm; if (override) { if (override === true) scope = obj; else scope = override; } var wrappedFn = function(e) { return fn.call(scope, domHelper.getEvent(e), obj); }; if (elm.addEventListener) elm.addEventListener(evType, wrappedFn, useCapture); else if (elm.attachEvent) elm.attachEvent('on' + evType, wrappedFn); else elm['on' + evType] = wrappedFn; return true; }, removeEvent : function(elm, evType, fn) { }, // getEvent getEvent: function(e, boundEl) { var ev = e || window.event; if (!ev) { var c = this.getEvent.caller; while (c) { ev = c.arguments[0]; if (ev && Event == ev.constructor) break; c = c.caller; } } return ev; }, // Get key getKey : function(e) { if (window.event) return window.event.keyCode; else if (e) return e.which; else return 0; }, // Stop event propagation stopBubble : function(e) { if (window.event && window.event.cancelBubble) { window.event.cancelBubble = true; } if (e && e.stopPropagation) { e.stopPropagation(); } }, // Prevent event default action stopDefault : function(e){ if(window.event && window.event.returnValue){ window.event.returnValue = false; } if (e && e.preventDefault){ e.preventDefault(); } }, // Stop event propagation + Prevent event default action cancelClick : function(e) { if (window.event) { window.event.cancelBubble = true; window.event.returnValue = false; } if (e && e.stopPropagation && e.preventDefault) { e.stopPropagation(); e.preventDefault(); } }, // Get event target getTarget : function(e) { var target = window.event ? window.event.srcElement : e ? e.target : null; if (!target) { return false; } while (target.nodeType != 1 && target.nodeName.toLowerCase() != 'body') { target = target.parentNode; } return target; }, // Get related event target getRelatedTarget : function(e) { var target = window.event ? window.event.fromElement : e ? e.relatedTarget : null; if (!target) { return false; } /* while (target.nodeType != 1 && target.nodeName.toLowerCase() != 'body') { target = target.parentNode; } */ return target; }, // Key related isPrintable : function(key) { return (key >= 32 && key < 127); }, // Dom Element navigation method lastSibling:function(node) { var tempObj=node.parentNode.lastChild; while(tempObj.nodeType!=1 && tempObj.previousSibling!=null){ tempObj=tempObj.previousSibling; } return (tempObj.nodeType==1)?tempObj:false; }, firstSibling:function(node) { var tempObj=node.parentNode.firstChild; while(tempObj.nodeType!=1 && tempObj.nextSibling!=null){ tempObj=tempObj.nextSibling; } return (tempObj.nodeType==1)?tempObj:false; }, getText:function(node){ if(!node.hasChildNodes()){return false;} var reg=/^\s+$/; var tempObj=node.firstChild; while(tempObj.nodeType!=3 && tempObj.nextSibling!=null || reg.test(tempObj.nodeValue)){ tempObj=tempObj.nextSibling; } return tempObj.nodeType==3||tempObj.nodeType==4?tempObj.nodeValue:false; }, setText:function(node,txt){ if(!node.hasChildNodes()){return false;} var reg=/^\s+$/; var tempObj=node.firstChild; while(tempObj.nodeType!=3 && tempObj.nextSibling!=null || reg.test(tempObj.nodeValue)){ tempObj=tempObj.nextSibling; } if(tempObj.nodeType==3){tempObj.nodeValue=txt}else{return false;} }, createLink:function(to,txt){ var tempObj=document.createElement('a'); tempObj.appendChild(document.createTextNode(txt)); tempObj.setAttribute('href',to); return tempObj; }, createTextElm:function(elm,txt){ var tempObj=document.createElement(elm); tempObj.appendChild(document.createTextNode(txt)); return tempObj; }, closestSibling:function(node,direction){ var tempObj; if(direction==-1 && node.previousSibling!=null){ tempObj=node.previousSibling; while(tempObj.nodeType!=1 && tempObj.previousSibling!=null){ tempObj=tempObj.previousSibling; } }else if(direction==1 && node.nextSibling!=null){ tempObj=node.nextSibling; while(tempObj.nodeType!=1 && tempObj.nextSibling!=null){ tempObj=tempObj.nextSibling; } } return tempObj.nodeType==1?tempObj:false; }, // class management cssjs:function(a,o,c1,c2) { switch (a){ case 'swap': o.className=!domHelper.cssjs('check',o,c1)?o.className.replace(c2,c1):o.className.replace(c1,c2); break; case 'add': if(!domHelper.cssjs('check',o,c1)){o.className+=o.className?' '+c1:c1;} break; case 'remove': var rep=o.className.match(' '+c1)?' '+c1:c1; o.className=o.className.replace(rep,''); break; case 'check': var found=false; var temparray=o.className.split(' '); for(var i=0;i<temparray.length;i++){ if(temparray[i]==c1){found=true;} } return found; break; } }, // get computed style value and set style - from http://www.elektronaut.no/articles/2006/06/07/computed-styles require test! getComputedStyle : function(element,cssRule) { if (document.defaultView && document.defaultView.getComputedStyle) { var value = document.defaultView.getComputedStyle(element, '').getPropertyValue( cssRule.replace(/[A-Z]/g, function(c) { return "-" + c.toLowerCase(); })); } else if (element.currentStyle) var value = element.currentStyle[cssRule]; else var value = false; return value; }, setStyle : function(element,cssRule,value) { element.style[cssRule] = value; return element; }, getElementsByClassName : function(element, className, tag) { tag = tag ? tag.toUpperCase() : '*'; if (element.getElementsByClassName) { var elms = element.getElementsByClassName(className); if (tag === '*') { return elms; } else { var res = []; for (var i=0; i < elms.length; i++) { if (elms[i].nodeName.toUpperCase() === tag) { res[res.length] = elms[i]; } } return res; } } else { var elms = element.getElementsByTagName(tag); var nodes = []; for (var i = 0; i < elms.length; i++) { if (domHelper.cssjs('check', elms[i], className)) nodes[nodes.length] = elms[i]; } } return nodes; }, // set & get acitve titled stylesheet(LINK) setActiveTitledCss : function(t) { var ls=document.getElementsByTagName("link"); for(var i=0;i<ls.length,l=ls[i];i++) { if (l.getAttribute("rel").indexOf("style")!=-1 && l.getAttribute("title")) { l.disabled = true; if (l.getAttribute("title")==t) l.disabled=false; } } }, getActiveTitledCss : function() { var ls=document.getElementsByTagName("link"),t; for(var i=0;i<ls.length,l=ls[i];i++) { t=l.getAttribute("title"); if (l.getAttribute("rel").indexOf("style")!=-1 && t && !l.disabled) return t; } return null; }, getPreferredCss : function() { var ls=document.getElementsByTagName("link"),t; for (var i=0;i<ls.length,l=ls[i];i++) { t=l.getAttribute("title"); if (l.getAttribute("rel").indexOf("style")!=-1 && l.getAttribute("rel").indexOf("alt")==-1 && t) return t; } return null; }, // inheritance from yui extend : function(subc, superc, overrides) { if (!superc||!subc) return; var F = function() {}; F.prototype=superc.prototype; subc.prototype=new F(); subc.prototype.constructor=subc; subc.superclass=superc.prototype; if (superc.prototype.constructor == Object.prototype.constructor) superc.prototype.constructor=superc; if (overrides) { for (var i in overrides) subc.prototype[i]=overrides[i]; } }, // get pageXOffset getPageXOffset : function() { if (window.innerWidth) { return window.pageXOffset; } else if (document.documentElement && document.documentElement.clientWidth) { return document.documentElement.scrollLeft; } else if (document.body.clientWidth) { return document.body.scrollLeft; } }, // get pageYOffset getPageYOffset : function() { if (window.innerWidth) { return window.pageYOffset; } else if (document.documentElement && document.documentElement.clientWidth) { return document.documentElement.scrollTop; } else if (document.body.clientWidth) { return document.body.scrollTop; } }, // get [pageXOffset,pageYOffset] getPageOffset : function() { return [domHelper.getPageXOffset(), domHelper.getPageYOffset()]; } } /* Custom event(from YUI) ===SAMPLE(from ydn)=== function TestObj(name) { this.name = name; this.event1 = new domHelper.customEvent("event1", this); } function Consumer(name, testObj) { this.name = name; this.testObj = testObj; this.testObj.event1.subscribe(this.onEvent1, this); } Consumer.prototype.onEvent1 = function(type, args, me) { alert(" this: " + this + "\n this.name: " + this.name + "\n type: " + type + "\n args[0].data: " + args[0].data + "\n me.name: " + me.name); } function TestData(data) { this.data = data; } // create an instance of our test object var t1 = new TestObj("mytestobj1"); // create the event consumer, passing in the custom // object so that it can subscribe to the custom event var c1 = new Consumer("mytestconsumer1", t1); // create a data object that will be passed to the consumer when the event fires var d1 = new TestData("mydata1"); // fire the test object's event1 event, passing the data object as a parameter t1.event1.fire(d1); === //SAMPLE(from ydn) === */ domHelper.customEvent = function(type, scope) { this.type = type; this.scope = scope || window; this.subscribers = []; } domHelper.customEvent.prototype = { subscribe : function(f,o,s) { this.subscribers[this.subscribers.length] = {fn:f,obj:o,scope:s}; }, fire : function() { var args=[].slice.call(arguments, 0); var subs=this.subscribers.slice(); for (var i=0;i<subs.length;i++) { if (subs[i]) { var s=this.scope; if (subs[i].scope) s=subs[i].scope; subs[i].fn.call(s,this.type,args,subs[i].obj); } } } } if(/msie/.test(navigator.userAgent.toLowerCase()) && !/opera/.test(navigator.userAgent.toLowerCase())){ var console ={ log : function(str){document.title += " , " + str} } } String.prototype.trim = function (){ return this.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); } var Easing = { easeNone: function (t, b, c, d) { return c*t/d + b; }, easeIn: function (t, b, c, d) { return c*(t/=d)*t + b; }, easeOut: function (t, b, c, d) { return -c *(t/=d)*(t-2) + b; }, easeBoth: function (t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t + b; return -c/2 * ((--t)*(t-2) - 1) + b; }, easeInStrong: function (t, b, c, d) { return c*(t/=d)*t*t*t + b; }, easeOutStrong: function (t, b, c, d) { return -c * ((t=t/d-1)*t*t*t - 1) + b; }, easeBothStrong: function (t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t*t + b; return -c/2 * ((t-=2)*t*t*t - 2) + b; }, elasticIn: function (t, b, c, d, a, p) { if (t == 0) return b; if ( (t /= d) == 1 ) return b+c; if (!p) p=d*.3; if (!a || a < Math.abs(c)) { a = c; var s = p/4; } else var s = p/(2*Math.PI) * Math.asin (c/a); return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; }, elasticOut: function (t, b, c, d, a, p) { if (t == 0) return b; if ( (t /= d) == 1 ) return b+c; if (!p) p=d*.3; if (!a || a < Math.abs(c)) { a = c; var s = p / 4; } else var s = p/(2*Math.PI) * Math.asin (c/a); return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; }, elasticBoth: function (t, b, c, d, a, p) { if (t == 0) return b; if ( (t /= d/2) == 2 ) return b+c; if (!p) p = d*(.3*1.5); if ( !a || a < Math.abs(c) ) { a = c; var s = p/4; } else var s = p/(2*Math.PI) * Math.asin (c/a); if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; }, backIn: function (t, b, c, d, s) { if (typeof s == 'undefined') s = 1.70158; return c*(t/=d)*t*((s+1)*t - s) + b; }, backOut: function (t, b, c, d, s) { if (typeof s == 'undefined') s = 1.70158; return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; }, backBoth: function (t, b, c, d, s) { if (typeof s == 'undefined') s = 1.70158; if ((t /= d/2 ) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; }, bounceIn: function (t, b, c, d) { return c - YAHOO.util.Easing.bounceOut(d-t, 0, c, d) + b; }, bounceOut: function (t, b, c, d) { if ((t/=d) < (1/2.75)) return c*(7.5625*t*t) + b; else if (t < (2/2.75)) return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; else if (t < (2.5/2.75)) return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; }, bounceBoth: function (t, b, c, d) { if (t < d/2) return YAHOO.util.Easing.bounceIn(t*2, 0, c, d) * .5 + b; return YAHOO.util.Easing.bounceOut(t*2-d, 0, c, d) * .5 + c*.5 + b; } }; var Anim = function(elm, attrs, duration, method) { this.init(elm, attrs, duration, method); } Anim.prototype = { init: function(elm, attrs, duration, method) { this.elm = elm; this.duration = duration || 1000; this.method = method || Easing.easeNone; this.attribute = attrs || {}; this.currentFrame = 0; this.totalFrames = MotionMgr.fps; this.useSeconds = true; this._startTime = null; this._isAnimated = false; // { width : { to : deltaW }, height: { to : deltaH } } var iw=parseInt(domHelper.getComputedStyle(elm,'width')); var ih=parseInt(domHelper.getComputedStyle(elm,'height')); var tw=iw,th=ih; if (typeof attrs.width !== 'undefined' && typeof attrs.width.to !== 'undefined') tw=attrs.width.to; if (typeof attrs.height !== 'undefined' && typeof attrs.height.to !== 'undefined') th=attrs.height.to; this.start = [iw, ih]; this.end = [tw, th]; var onStart=function() { this.onStart.fire(); this._isAnimated = true; this._startTime = new Date(); }; var onTween=function() { var wh = this.doMethod(this.start, this.end); this.elm.style.width = parseInt(wh[0]) + 'px'; this.elm.style.height = parseInt(wh[1]) + 'px'; }; var onComplete=function() { this._isAnimated = false; this.onComplete.fire(); }; this.onStart = new domHelper.customEvent('start', this); this._onStart = new domHelper.customEvent('_start', this); this._onTween = new domHelper.customEvent('_tween', this); this.onComplete = new domHelper.customEvent('complete', this); this._onComplete = new domHelper.customEvent('_complete', this); this._onStart.subscribe(onStart); this._onTween.subscribe(onTween); this._onComplete.subscribe(onComplete); }, animate : function() { if (this._isAnimated) return false; MotionMgr.addMotion(this); }, isAnimated : function() { return this._isAnimated; }, getStartTime : function() { return this._startTime; }, doMethod : function(start, end) { return [this.method(this.currentFrame, start[0], end[0]-start[0], this.totalFrames), this.method(this.currentFrame, start[1], end[1]-start[1], this.totalFrames)]; } } var Motion = function(elm, attrs, duration, method) { this.init(elm, attrs, duration, method); } Motion.prototype = { init : function(elm, attrs, duration, method) { this.elm = elm; this.duration = duration || 1000; this.method = method || Easing.easeNone; this.attribute = attrs || {}; this.currentFrame = 0; this.totalFrames = MotionMgr.fps; this.useSeconds = true; this._startTime = null; this._isAnimated = false; // {points: {by: [deltaX, deltaY]}} 형식만 지원 var offset = attrs.points.by; this.start = [parseInt(elm.style.left), parseInt(elm.style.top)]; this.end = [this.start[0] + offset[0], this.start[1] + offset[1]]; var onStart=function() { this.onStart.fire(); this._isAnimated = true; this._startTime = new Date(); }; var onTween=function() { var pt = this.doMethod(this.start, this.end); this.elm.style.left = parseInt(pt[0]) + 'px'; this.elm.style.top = parseInt(pt[1]) + 'px'; }; var onComplete=function() { this._isAnimated = false; this.onComplete.fire(); }; this.onStart = new domHelper.customEvent('start', this); this._onStart = new domHelper.customEvent('_start', this); this._onTween = new domHelper.customEvent('_tween', this); this.onComplete = new domHelper.customEvent('complete', this); this._onComplete = new domHelper.customEvent('_complete', this); this._onStart.subscribe(onStart); this._onTween.subscribe(onTween); this._onComplete.subscribe(onComplete); }, animate : function() { if (this._isAnimated) return false; MotionMgr.addMotion(this); }, isAnimated : function() { return this._isAnimated; }, getStartTime : function() { return this._startTime; }, doMethod : function(start, end) { return [this.method(this.currentFrame, start[0], end[0]-start[0], this.totalFrames), this.method(this.currentFrame, start[1], end[1]-start[1], this.totalFrames)]; } } var MotionMgr = new function() { this.delay = 1; this.fps = 1000; var queue = []; var thread = null; this.addMotion = function(tween) { queue[queue.length] = tween; tween._onStart.fire(); this.start(); }; this.removeMotion = function(tween, i) { i = i || getIndex(tween); if (i === -1) return false; tween._onComplete.fire(); queue.splice(i, 1); if (queue.length == 0) this.stop(); return true; }; this.start = function() { if (thread === null) thread = window.setInterval(this.run, this.delay); }; this.stop = function(tween) { if (tween) MotionMgr.removeMotion(tween); else { window.clearInterval(thread); for (var i = 0; i < queue.length; i++) this.removeMotion(queue[0], 0); queue = []; thread = null; } }; this.run = function(e) { for (var i = 0; i < queue.length; i++) { var t = queue[i]; if (t.currentFrame < t.totalFrames || t.totalFrames === null) { t.currentFrame++; if (t.useSeconds) correctFrame(t); t._onTween.fire(); } else MotionMgr.stop(t); } }; var getIndex = function(t) { for (var i = 0; i < queue.length; i++) { if (queue[i] == t) return i; } return -1; }; var correctFrame = function(tween) { var frames = tween.totalFrames; var frame = tween.currentFrame; var expected = (tween.currentFrame * tween.duration * 1000 / tween.totalFrames); var elapsed = (new Date() - tween.getStartTime()); var tweak = 0; if (elapsed < tween.duration * 1000) tweak = Math.round((elapsed / expected - 1) * tween.currentFrame); else tweak = frames - (frame + 1); if (tweak > 0 && isFinite(tweak)) { if (tween.currentFrame + tweak >= frames) tweak = frames - (frame + 1); tween.currentFrame += tweak; } }; } // options // className : item clasname, default:box_item // container : box container element id, default:parent node // slideWidth : visible slide width, default:container width // leftButton : left sliding button element id, default:slideLeft // rightButton : left sliding button element id, default:slideRight var SlidingBox = function(box, options) { options = options || {}; this.box = box; this.boxEl = document.getElementById(box); this.boxEl.style.position = 'absolute'; this.boxEl.style.left = '0'; this.boxEl.style.top = '0'; this.className = options.className || 'box_item'; this.container = document.getElementById(options.container) || this.boxEl.parentNode; var items = domHelper.getElementsByClassName(this.boxEl, this.className); this.itemWidth = items[0].offsetWidth; // margin은 고려안됨 this.maxWidth = 0; var selected = -1; // 선택된놈 for (var i = 0; i < items.length; i++) { this.maxWidth += items[i].offsetWidth; if (domHelper.cssjs('check', items[i], 'selected')) selected = i; } this.boxEl.style.width = this.maxWidth + 'px'; this.movedBy = 0; this.containerSize = Math.floor(this.container.offsetWidth / this.itemWidth); // 영역 내 출력 개수 this.slideWidth = options.slideWidth || this.containerSize; // 한번에 스라이딩되는 개수 this.slideWidth = 1; // 슬라이딩 개수 선택 // selected if (selected > 0) { var n = parseInt(selected / this.slideWidth); this.boxEl.style.left = -n * this.slideWidth * this.itemWidth + 'px'; //this.slideBy(); this.movedBy += n * this.slideWidth * this.itemWidth; } // event registration var left = options.leftButton ? document.getElementById(options.leftButton) : document.getElementById('slideLeft'); var right = options.rightButton ? document.getElementById(options.rightButton) : document.getElementById('slideRight'); if (left && right) { domHelper.addEvent(left, 'click', function(e) { if (this.anim && this.anim.isAnimated()) { domHelper.cancelClick(e); return; } if (!this.slideLeft()) { domHelper.cssjs('add', left, 'off'); left.setAttribute('disabled', 'disabled'); } domHelper.cssjs('remove', right, 'off'); right.removeAttribute('disabled'); domHelper.cancelClick(e); }, false, null, this); domHelper.addEvent(right, 'click', function(e) { if (this.anim && this.anim.isAnimated()) { domHelper.cancelClick(e); return; } if (!this.slideRight()) { domHelper.cssjs('add', right, 'off'); right.setAttribute('disabled', 'disabled'); } domHelper.cssjs('remove', left, 'off'); left.removeAttribute('disabled'); domHelper.cancelClick(e); }, false, null, this); } // button initialize if (this.movedBy >= this.slideWidth * this.itemWidth) { domHelper.cssjs('remove', left, 'off'); left.removeAttribute('disabled'); } else { domHelper.cssjs('add', left, 'off'); left.setAttribute('disabled', 'disabled'); } if (this.movedBy < this.maxWidth - this.slideWidth * this.itemWidth) { domHelper.cssjs('remove', right, 'off'); right.removeAttribute('disabled'); } else { domHelper.cssjs('add', right, 'off'); right.setAttribute('disabled', 'disabled'); } } SlidingBox.prototype = { slideBy: function(delta) { this.anim = new Motion(this.boxEl, {points: {by: [delta, 0]}}, 0.5, Easing.easeBoth); this.anim.animate(); }, slideLeft : function() { if (this.movedBy >= this.slideWidth * this.itemWidth) { this.slideBy(this.slideWidth * this.itemWidth); this.movedBy -= this.slideWidth * this.itemWidth; } return (this.movedBy >= this.slideWidth * this.itemWidth); }, slideRight : function() { if (this.movedBy < this.maxWidth - this.slideWidth * this.itemWidth) { this.slideBy(-this.slideWidth * this.itemWidth); this.movedBy += this.slideWidth * this.itemWidth; } return (this.movedBy < this.maxWidth - this.slideWidth * this.itemWidth); } } </script> <DIV class="G2rWrap theme theme_2795" id=contentWrap> <DIV class=extra id=extra_series> <DIV class=contents> <BUTTON class="" id=slideLeft>앞</BUTTON> <DIV id=seriesListWrap> <UL id=seriesList style="LEFT: -2088px; WIDTH: 10672px; POSITION: absolute; TOP: 0px"> <LI class=box_item> <DL> <DT><A href="링크">아무거나</A> </DT>
<DD class=img><A href="아무거나">이미지</A><SPAN class=theme>글귀</SPAN> </DD> <DD class=optcnt>부가글</DD></DL></LI> <LI class=box_item> <DL> <DT><A href="링크">아무거나</A> </DT> <DD class=img><A href="아무거나">이미지</A><SPAN class=theme>글귀</SPAN> </DD>
<DD class=optcnt>부가글</DD></DL></LI> <LI class=box_item> <DL> <DT><A href="링크">아무거나</A> </DT> <DD class=img><A href="아무거나">이미지</A><SPAN class=theme>글귀</SPAN> </DD> <DD class=optcnt>부가글</DD></DL></LI>
<LI class=box_item> <DL> <DT><A href="링크">아무거나</A> </DT> <DD class=img><A href="아무거나">이미지</A><SPAN class=theme>글귀</SPAN> </DD> <DD class=optcnt>부가글</DD></DL></LI> <LI class=box_item>
<DL> <DT><A href="링크">아무거나</A> </DT> <DD class=img><A href="아무거나">이미지</A><SPAN class=theme>글귀</SPAN> </DD> <DD class=optcnt>부가글</DD></DL></LI> <LI class=box_item> <DL>
<DT><A href="링크">아무거나</A> </DT> <DD class=img><A href="아무거나">이미지</A><SPAN class=theme>글귀</SPAN> </DD> <DD class=optcnt>부가글</DD></DL></LI> <LI class=box_item> <DL> <DT><A href="링크">아무거나</A> </DT>
<DD class=img><A href="아무거나">이미지</A><SPAN class=theme>글귀</SPAN> </DD> <DD class=optcnt>부가글</DD></DL></LI> <LI class=box_item> <DL> <DT><A href="링크">아무거나</A> </DT> <DD class=img><A href="아무거나">이미지</A><SPAN class=theme>글귀</SPAN> </DD>
<DD class=optcnt>부가글</DD></DL></LI> </UL></DIV><BUTTON class="" id=slideRight>뒤</BUTTON> </DIV></DIV> <SCRIPT type=text/javascript> // <![CDATA[ var slide = new SlidingBox('seriesList'); // ]]> </SCRIPT> </DIV>