/*
 * Glow JavaScript Library
 * Copyright (c) 2008 British Broadcasting Corporation
 */
/*@cc_on @*//*@if (@_jscript_version > 5.1)@*/;glow.module("glow.tweens","0.3.0",{require:[],implementation:function(){function A(B){return function(C){return 1-B(1-C);};}return{linear:function(){return function(B){return B;};},easeIn:function(B){B=B||2;return function(C){return Math.pow(1,B-1)*Math.pow(C,B);};},easeOut:function(B){return A(this.easeIn(B));},easeBoth:function(B){return this.combine(this.easeIn(B),this.easeOut(B));},overshootIn:function(B){return A(this.overshootOut(B));},overshootOut:function(B){B=B||1.70158;return function(C){if(C==0||C==1){return C;}return((C-=1)*C*((B+1)*C+B)+1);};},overshootBoth:function(B){return this.combine(this.overshootIn(B),this.overshootOut(B));},bounceIn:function(){return A(this.bounceOut());},bounceOut:function(){return function(B){if(B<(1/2.75)){return 7.5625*B*B;}else{if(B<(2/2.75)){return(7.5625*(B-=(1.5/2.75))*B+0.75);}else{if(B<(2.5/2.75)){return(7.5625*(B-=(2.25/2.75))*B+0.9375);}else{return(7.5625*(B-=(2.625/2.75))*B+0.984375);}}}};},bounceBoth:function(){return this.combine(this.bounceIn(),this.bounceOut());},elasticIn:function(B,C){return A(this.elasticOut(B,C));},elasticOut:function(B,C){return function(D){if(D==0||D==1){return D;}if(!C){C=0.3;}if(!B||B<1){B=1;var E=C/4;}else{var E=C/(2*Math.PI)*Math.asin(1/B);}return B*Math.pow(2,-10*D)*Math.sin((D-E)*(2*Math.PI)/C)+1;};},elasticBoth:function(B,C){C=C||0.45;return this.combine(this.elasticIn(B,C),this.elasticOut(B,C));},combine:function(C,B){return function(D){if(D<0.5){return C(D*2)/2;}else{return B((D-0.5)*2)/2+0.5;}};}};}});;glow.module("glow.anim","0.3.0",{require:["glow.tweens","glow.events","glow.dom"],implementation:function(){var manager,events=glow.events,dom=glow.dom,get=dom.get,debug=glow.debug,hasUnits=/width|height|top$|bottom$|left$|right$|spacing$|indent$|font-size/,noNegatives=/width|height|padding|opacity/,usesYAxis=/height|top/,getUnit=/[\d\.]+(\D+)/,testElement=dom.create('<div style="position:absolute;visibility:hidden"></div>');(function(){var queue=[],queueLen=0,intervalTime=1,interval;manager={addToQueue:function(anim){queue[queueLen++]=anim;anim._playing=true;anim._timeAnchor=anim._timeAnchor||new Date().valueOf();if(!interval){this.startInterval();}},removeFromQueue:function(anim){for(var i=0;i<queueLen;i++){if(queue[i]==anim){queue.splice(i,1);anim._timeAnchor=null;anim._playing=false;if(--queueLen==0){this.stopInterval();}return ;}}},startInterval:function(){interval=window.setInterval(this.processQueue,intervalTime);},stopInterval:function(){window.clearInterval(interval);interval=null;},processQueue:function(){var anim,i,now=new Date().valueOf();for(i=0;i<queueLen;i++){anim=queue[i];if(anim.position==anim.duration){manager.removeFromQueue(anim);i--;events.fire(anim,"complete");continue;}if(anim.useSeconds){anim.position=(now-anim._timeAnchor)/1000;if(anim.position>anim.duration){anim.position=anim.duration;}}else{anim.position++;}anim.value=anim.tween(anim.position/anim.duration);events.fire(anim,"frame");}}};})();function convertCssUnit(element,fromValue,toUnit,axis){var elmStyle=testElement[0].style,axisProp=(axis=="x")?"width":"height",startPixelValue,toUnitPixelValue;elmStyle.margin=elmStyle.padding=elmStyle.border="0";startPixelValue=testElement.css(axisProp,fromValue).insertAfter(element)[axisProp]();toUnitPixelValue=testElement.css(axisProp,10+toUnit)[axisProp]()/10;testElement.remove();return startPixelValue/toUnitPixelValue;}function keepWithinRange(num,start,end){if(start!==undefined&&num<start){return start;}if(end!==undefined&&num>end){return end;}return num;}function buildAnimFunction(element,spec){var cssProp,r=["a=(function(){"],rLen=1,fromUnit,unitDefault=[0,"px"],to,from,unit,a;for(cssProp in spec){r[rLen++]='element.css("'+cssProp+'", ';to=spec[cssProp].to;if((from=spec[cssProp].from)===undefined){if(cssProp=="font-size"||cssProp=="background-position"){throw new Error("From value must be set for "+cssProp);}from=element.css(cssProp);}if(hasUnits.test(cssProp)){unit=(getUnit.exec(spec[cssProp].to)||unitDefault)[1];fromUnit=(getUnit.exec(from)||unitDefault)[1];from=parseFloat(from)||0;to=parseFloat(to)||0;if(from&&unit!=fromUnit){if(cssProp=="font-size"){throw new Error("Units must be the same for font-size");}from=convertCssUnit(element,from+fromUnit,unit,usesYAxis.test(cssProp)?"y":"x");}if(noNegatives.test(cssProp)){r[rLen++]="keepWithinRange(("+(to-from)+" * this.value) + "+from+', 0) + "'+unit+'"';}else{r[rLen++]="("+(to-from)+" * this.value) + "+from+' + "'+unit+'"';}}else{if(!(isNaN(from)||isNaN(to))){from=Number(from);to=Number(to);r[rLen++]="("+(to-from)+" * this.value) + "+from;}else{if(cssProp.indexOf("color")!=-1){to=dom.parseCssColor(spec[cssProp].to);if(!glow.lang.hasOwnProperty(from,"r")){from=dom.parseCssColor(from);}r[rLen++]='"rgb(" + keepWithinRange(Math.round('+(to.r-from.r)+" * this.value + "+from.r+'), 0, 255) + "," + keepWithinRange(Math.round('+(to.g-from.g)+" * this.value + "+from.g+'), 0, 255) + "," + keepWithinRange(Math.round('+(to.b-from.b)+" * this.value + "+from.b+'), 0, 255) + ")"';}else{if(cssProp=="background-position"){var vals={},fromTo=["from","to"],unit=(getUnit.exec(from)||unitDefault)[1];vals.fromOrig=from.toString().split(/\s/);vals.toOrig=to.toString().split(/\s/);if(vals.fromOrig[1]===undefined){vals.fromOrig[1]="50%";}if(vals.toOrig[1]===undefined){vals.toOrig[1]="50%";}for(var i=0;i<2;i++){vals[fromTo[i]+"X"]=parseFloat(vals[fromTo[i]+"Orig"][0]);vals[fromTo[i]+"Y"]=parseFloat(vals[fromTo[i]+"Orig"][1]);vals[fromTo[i]+"XUnit"]=(getUnit.exec(vals[fromTo[i]+"Orig"][0])||unitDefault)[1];vals[fromTo[i]+"YUnit"]=(getUnit.exec(vals[fromTo[i]+"Orig"][1])||unitDefault)[1];}if((vals.fromXUnit!==vals.toXUnit)||(vals.fromYUnit!==vals.toYUnit)){throw new Error("Mismatched axis units cannot be used for "+cssProp);}r[rLen++]="("+(vals.toX-vals.fromX)+" * this.value + "+vals.fromX+') + "'+vals.fromXUnit+' " + ('+(vals.toY-vals.fromY)+" * this.value + "+vals.fromY+') + "'+vals.fromYUnit+'"';}}}}r[rLen++]=");";}r[rLen++]="})";return eval(r.join(""));}var r={};r.css=function(element,duration,spec,opts){element=get(element);var anim=new r.Animation(duration,opts),cssProp;events.addListener(anim,"frame",buildAnimFunction(element,spec));return anim;};r.Animation=function(duration,opts){opts=glow.lang.apply({useSeconds:true,tween:glow.tweens.linear()},opts);this._playing=false;this._timeAnchor=null;this.duration=duration;this.useSeconds=opts.useSeconds;this.tween=opts.tween;this.position=0;this.value=0;};r.Animation.prototype={start:function(){if(this._playing){this.stop();}var e=events.fire(this,"start");if(e.defaultPrevented()){return this;}this.position=0;manager.addToQueue(this);return this;},stop:function(){if(this._playing){var e=events.fire(this,"stop");if(e.defaultPrevented()){return this;}manager.removeFromQueue(this);}return this;},resume:function(){if(!this._playing){var e=events.fire(this,"resume");if(e.defaultPrevented()){return this;}this._timeAnchor=new Date().valueOf()-(this.position*1000);manager.addToQueue(this);}return this;},isPlaying:function(){return this._playing;},goTo:function(pos){this._timeAnchor=new Date().valueOf()-((this.position=pos)*1000);this.value=this.tween(this.duration&&this.position/this.duration);events.fire(this,"frame");return this;}};r.Timeline=function(channels,opts){this._channels=(channels[0]&&channels[0].push)?channels:[channels];this._channelPos=[];this._playing=false;this.loop=!!(opts&&opts.loop);var i,j,iLen,jLen,channel,allChannels=this._channels,totalDuration=0,channelDuration;for(i=0,iLen=allChannels.length;i<iLen;i++){channel=allChannels[i];channelDuration=0;for(j=0,jLen=channel.length;j<jLen;j++){if(typeof channel[j]=="number"){channel[j]=new r.Animation(channel[j]);}if(channel[j] instanceof r.Animation){if(!channel[j].useSeconds){throw new Error("Timelined animations must be timed in seconds");}channel[j]._timelineOffset=channelDuration*1000;channelDuration+=channel[j].duration;channel[j]._channelIndex=i;}}totalDuration=Math.max(channelDuration,totalDuration);}this._controlAnim=new r.Animation(totalDuration);events.addListener(this._controlAnim,"frame",this._processFrame,this);events.addListener(this._controlAnim,"complete",this._complete,this);};r.Timeline.prototype={_advanceChannel:function(i){var currentAnim=this._channels[i][this._channelPos[i]],nextAnim=this._channels[i][++this._channelPos[i]];if(currentAnim&&currentAnim._playing){currentAnim._playing=false;events.fire(currentAnim,"complete");}if((nextAnim)!==undefined){if(typeof nextAnim=="function"){nextAnim();this._advanceChannel(i);}else{nextAnim.position=0;nextAnim._channelIndex=i;events.fire(nextAnim,"start");nextAnim._playing=true;}}},_complete:function(){if(this.loop){this.start();return ;}events.fire(this,"complete");},_processFrame:function(){var i,len,anim,controlAnim=this._controlAnim,msFromStart=(new Date().valueOf())-controlAnim._timeAnchor;for(i=0,len=this._channels.length;i<len;i++){if(!(anim=this._channels[i][this._channelPos[i]])){continue;}anim.position=(msFromStart-anim._timelineOffset)/1000;if(anim.position>anim.duration){anim.position=anim.duration;}anim.value=anim.tween(anim.position/anim.duration);events.fire(anim,"frame");if(anim.position==anim.duration){this._advanceChannel(i);}}},start:function(){var e=events.fire(this,"start");if(e.defaultPrevented()){return this;}var i,iLen,j,jLen,anim;this._playing=true;for(i=0,iLen=this._channels.length;i<iLen;i++){this._channelPos[i]=-1;this._advanceChannel(i);for(j=this._channels[i].length;j;j--){anim=this._channels[i][j];if(anim instanceof r.Animation){anim.goTo(0);}}}this._controlAnim.start();},stop:function(){if(this._playing){var e=events.fire(this,"stop");if(e.defaultPrevented()){return this;}this._playing=false;var anim;for(var i=0,len=this._channels.length;i<len;i++){anim=this._channels[i][this._channelPos[i]];if(anim instanceof r.Animation&&anim._playing){events.fire(anim,"stop");anim._playing=false;}}this._controlAnim.stop();}},resume:function(){if(!this._playing){var e=events.fire(this,"resume");if(e.defaultPrevented()){return this;}this._playing=true;var anim;for(var i=0,len=this._channels.length;i<len;i++){anim=this._channels[i][this._channelPos[i]];if(anim instanceof r.Animation&&!anim._playing){events.fire(anim,"resume");anim._playing=true;}}this._controlAnim.resume();}},isPlaying:function(){return this._playing;}};return r;}});;glow.module("glow.dragdrop","0.3.0",{require:["glow.tweens","glow.events","glow.dom","glow.anim"],implementation:function(){var C=glow.events,I=C.addListener,R=C.fire,G=C.removeListener,P=glow.dom,H=P.get;var L={},S=1000,A=(document.compatMode=="CSS1Compat"&&glow.env.ie>=5)?true:false,T=(document.compatMode!="CSS1Compat"&&glow.env.ie>=5)?true:false,D=glow.env.ie>=5;function B(U,W){var X=U.prototype[W];var V="cached_"+W;U.prototype[W]=function(){if(V in this){return this[V];}return this[V]=X.apply(this,arguments);};}function F(U,V){var X=U.prototype[V];var W="cached_"+V;U.prototype[V]=function(Y){if(!this[W]){this[W]={};}if(Y in this[W]){return this[W][Y];}return this[W][Y]=X.apply(this,arguments);};}function Q(X,W){for(var V=0,U=W.length;V<U;V++){delete X["cached_"+W[V]];}}function K(Z,V,Y){var W=Z["cached_"+V];if(!W){return ;}for(var X=0,U=Y.length;X<U;X++){delete W[Y[X]];}}var N=function(U){this.el=U;};N.prototype={val:function(U){var V=parseInt(this.el.css(U));return isNaN(V)?0:V;},width:function(){return this.borderWidth()-this.val("border-left-width")-this.val("padding-left")-this.val("padding-right")-this.val("border-right-width");},height:function(){return this.borderHeight()-this.val("border-top-width")-this.val("padding-top")-this.val("padding-bottom")-this.val("border-bottom-width");},offsetTop:function(){var U=0,V=this.el[0],X,W;if(glow.env.ie){do{W=V.offsetTop;if(!isNaN(W)){U+=W;}V=V.offsetParent;if(V){X=H(V).css("position");}}while(V&&!(X=="absolute"||X=="fixed"||X=="relative"));}else{U=V.offsetTop;}return U;},offsetLeft:function(){var U=0,V=this.el[0],X,W;if(glow.env.ie){do{W=V.offsetLeft;if(!isNaN(W)){U+=W;}V=V.offsetParent;if(V){X=H(V).css("position");}}while(V&&!(X=="absolute"||X=="fixed"||X=="relative"));}else{U=V.offsetLeft;}return U;},borderWidth:function(){var U=this.el[0].offsetWidth;if(glow.env.khtml){U-=this.val("margin-left")+this.val("margin-right")+this.val("border-left-width")+this.val("border-right-width");}return U;},borderHeight:function(){if(this._logicalBottom){return this._logicalBottom-this.offsetTop();}var U=this.el[0].offsetHeight;if(glow.env.khtml){U-=this.val("margin-top")+this.val("margin-bottom")+this.val("border-top-width")+this.val("border-bottom-width");}return U;},outerWidth:function(){return this.borderWidth()+this.val("margin-left")+this.val("margin-right");},outerHeight:function(){return this.borderHeight()+this.val("margin-top")+this.val("margin-bottom");},innerLeftPos:function(){return this.offsetLeft()+this.val("border-left-width")+this.val("padding-left");},innerTopPos:function(){return this.offsetTop()+this.val("border-top-width")+this.val("padding-top");},surroundWidth:function(){return this.val("margin-left")+this.val("border-left-width")+this.val("padding-left")+this.val("padding-right")+this.val("border-right-width")+this.val("margin-right");},surroundHeight:function(){return this.val("margin-top")+this.val("border-top-width")+this.val("padding-top")+this.val("padding-bottom")+this.val("border-bottom-width")+this.val("margin-bottom");},verticalCenter:function(){return this.offsetTop()+(this.outerHeight()/2);},horizontalCenter:function(){return this.offsetTop()+(this.outerWidth()/2);}};for(var O in N.prototype){if(O=="val"){F(N,O);}else{B(N,O);}}glow.lang.apply(N.prototype,{resetPosition:function(){Q(this,["offsetTop","offsetLeft","borderTopPos","borderLeftPos","innerTopPos","innerLeftPos","verticalCenter","horizontalCenter"]);},setLogicalBottom:function(U){this._logicalBottom=U;},boundsFor:function(W){var V=this.innerTopPos(),U=this.innerLeftPos();return[V,U+this.width()-W.outerWidth(),V+this.height()-W.outerHeight(),U];},outerBounds:function(){var V=this.offsetLeft(),U=this.offsetTop();return[U,V+this.borderWidth(),U+this.borderHeight(),V];},intersectSize:function(W){var V=this.outerBounds(),U=W.outerBounds();return(V[2]<U[0]?0:U[2]<V[0]?0:V[0]<U[0]?(V[2]<U[2]?V[2]-U[0]:U[2]-U[0]):U[2]<V[2]?U[2]-V[0]:V[2]-V[0])*(V[1]<U[3]?0:U[1]<V[3]?0:V[3]<U[3]?(V[1]<U[1]?V[1]-U[3]:U[1]-U[3]):U[1]<V[1]?U[1]-V[3]:V[1]-V[3]);},sizePlaceholder:function(Z,a,X,V){var Y=new N(Z),W=this.el,U=a||W.css("position");Z.css("display","none");W.after(Z);Z.css("width",(this.outerWidth()-Y.surroundWidth())+"px");Z.css("height",(this.outerHeight()-Y.surroundHeight())+"px");Z.remove();Z.css("display","block");if(U!="static"){Z.css("left",X+"px");Z.css("top",V+"px");}Z.css("position",U);},contains:function(V){var U=this.boundsFor(V),X=V.offsetTop(),W=V.offsetLeft();return X>=U[0]&&W<=U[1]&&X<=U[2]&&W>=U[3];},containsPoint:function(V){var U=this.el.offset();return V.x>=U.x&&V.y>=U.y&&V.x<=U.x+this.borderWidth()&&V.y<=U.y+this.borderHeight();},positionedAncestorBox:function(){var U=this.el.parent(),V;while(U[0]){V=U.css("position")||"static";if(V=="relative"||V=="absolute"||V=="fixed"){return new N(U);}U=U.parent();}return null;}});function E(V){var U=V[0].tagName.toLowerCase()=="li"?"li":"div";var W=create("<"+U+"></"+U+">");if(U=="li"){W.css("list-style-type","none");}return W;}L.Draggable=function(X,Y){this.element=H(X);this._opts=Y=glow.lang.apply({dragPrevention:["input","textarea","button","select","option","a"],placeholder:"spacer",placeholderClass:"glow-dragdrop-placeholder"},Y||{});this._preventDrag=[];for(var V=0,U=Y.dragPrevention.length;V>U;V++){this._preventDrag[V]=Y.dragPrevention[V].toLowerCase();}if(Y.container){this.container=H(Y.container);}this._handle=Y.handle&&this.element.get(Y.handle)||this.element;if(Y.dropTargets){this.dropTargets=H(Y.dropTargets);}var W=this._listeners=[],V=0;if(Y.onDrag){W[V++]=I(this,"drag",this._opts.onDrag,this);}if(Y.onEnter){W[V++]=I(this,"enter",this._opts.onEnter,this);}if(Y.onLeave){W[V++]=I(this,"leave",this._opts.onLeave,this);}if(Y.onDrop){W[V++]=I(this,"drop",this._opts.onDrop,this);}this._dragListener=I(this._handle,"mousedown",this._startDragMouse,this);return ;};var M=glow.env.ie;L.Draggable.prototype={_createPlaceholder:function(){var U=this.element,W,V=this._box;if(this._opts.placeholder=="clone"){W=U.clone();}else{W=E(U);}if(this._opts.placeholderClass){W.addClass(this._opts.placeholderClass);}V.sizePlaceholder(W,null,this._startLeft,this._startTop);U.after(W);this._placeholder=W;},_removePlaceholder:function(){this._placeholder.remove();},_resetPosition:function(){var V=this._preDragPosition,X=this.element,Y=this._box,U=this._startOffset,a=X.css("position");Y.resetPosition();var Z={x:Y.offsetLeft()-Y.val("margin-left"),y:Y.offsetTop()-Y.val("margin-top")};if(this._placeholder||this._dropIndicator){X.remove();}if(V=="static"&&Z.y==U.y&&Z.x==U.x){X.css("position","static");X.css("left","");X.css("top","");}else{X.css("z-index",this._preDragZIndex);X.css("position",V=="static"?"relative":V);if(V=="static"){X.css("left",(Z.x-U.x)+"px");X.css("top",(Z.y-U.y)+"px");}else{if(V=="relative"&&a!="relative"){X.css("left",(this._startLeft+(Z.x-U.x))+"px");X.css("top",(this._startTop+(Z.y-U.y))+"px");}}}if(this._dropIndicator){var W=this._dropIndicator.parent()[0];if(W){W.replaceChild(X[0],this._dropIndicator[0]);}delete this._dropIndicator;if(this._placeholder){this._placeholder.remove();delete this._placeholder;}}else{if(this._placeholder){var W=this._placeholder.parent()[0];if(W){W.replaceChild(X[0],this._placeholder[0]);}delete this._placeholder;}}},_startDragMouse:function(m){var g=this._preventDrag,d=m.source,n=d.tagName.toLowerCase();for(var k=0,f=g.length;k<f;k++){if(g[k]==n){return ;}}if(this._dragging==1){return this.endDrag();}else{if(this._dragging){return ;}}this._dragging=1;var g=this._preventDrag,U=this.element,b=this.container,X=this._preDragPosition=U.css("position"),c=this._opts,Z=this._box=new N(U);if(b){this._containerBox=new N(b);this._bounds=this._containerBox.boundsFor(Z);}else{delete this._bounds;}this._mouseStart={x:m.pageX,y:m.pageY};var j=this._startOffset={x:Z.offsetLeft(),y:Z.offsetTop()};this._preDragStyle=U.attr("style");this._preDragZIndex=U.css("z-index");U.css("z-index",S++);this._startLeft=U[0].style.left?parseInt(U[0].style.left):0;this._startTop=U[0].style.top?parseInt(U[0].style.top):0;if(this._opts.placeholder&&this._opts.placeholder!="none"){this._createPlaceholder();}U.css("position","absolute");U.css("left",j.x+"px");U.css("top",j.y+"px");if(A){this._scrollY=document.documentElement.scrollTop;this._innerHeight=document.documentElement.clientHeight;}else{if(T){this._scrollY=document.body.scrollTop;this._innerHeight=document.body.clientHeight;}else{this._scrollY=window.scrollY;this._innerHeight=window.innerHeight;}}var a=H(document).height();this._bodyHeight=a<this._innerHeight?this._innerHeight:a;var Y=R(this,"drag");var V=function(){return false;},o=document.documentElement;if(this.dropTargets){var h=new C.Event();h.draggable=this;for(var k=0,f=this.dropTargets.length;k<f;k++){R(this.dropTargets[k],"active",h);}this._mousePos={x:m.pageX,y:m.pageY};var W=this;this._testForDropTargets();}this._dragListeners=[I(o,"selectstart",V),I(o,"dragstart",V),I(o,"mousedown",V),I(o,"mousemove",this._dragMouse,this),I(o,"mouseup",this._releaseElement,this)];},_dragMouse:function(X){var U=this.element,Y=this._opts.axis=="y"?this._startOffset.x:(this._startOffset.x+X.pageX-this._mouseStart.x),W=this._opts.axis=="x"?this._startOffset.y:(this._startOffset.y+X.pageY-this._mouseStart.y),V=this._bounds;if(V){Y=Y<V[3]?V[3]:Y>V[1]?V[1]:Y;W=W<V[0]?V[0]:W>V[2]?V[2]:W;}U[0].style.left=Y+"px";U[0].style.top=W+"px";if(this.dropTargets){this._mousePos={x:X.pageX,y:X.pageY};}if(D&&X.nativeEvent.button==0){this._releaseElement(X);return false;}return false;},_testForDropTargets:function(e){if(!this._lock){this._lock=0;}if(e){this._lock--;}else{if(this.lock){return ;}}if(this._dragging!=1){return ;}var W=this.activeTarget,V,r=this.dropTargets,s,Z,c=this._box,h=this._mousePos;c.resetPosition();var a=0;for(var j=0,g=r.length;j<g;j++){s=r[j];Z=s._box;if(s._opts.tolerance=="contained"){if(Z.contains(c)){V=s;break;}}else{if(s._opts.tolerance=="cursor"){if(Z.containsPoint(h)){V=s;break;}}else{var k;if((k=Z.intersectSize(c))>a){a=k;V=s;}}}}this.activeTarget=V;if(V!==W){if(V){var f=new C.Event();f.draggable=this;R(V,"enter",f);var U=new C.Event();U.dropTarget=V;R(this,"enter",U);}if(W){var b=new C.Event();b.draggable=this;R(W,"leave",b);var d=new C.Event();d.dropTarget=W;R(this,"leave",d);}}if(V&&V._opts.dropIndicator!="none"){var p,m=V._childBoxes,X=V._children;c.resetPosition();var q=V._box.innerTopPos();var o=c.verticalCenter();var n=0;for(var j=0,g=m.length;j<g;j++){if(X[j]==this.element[0]){continue;}p=m[j];q+=p.outerHeight();if(o<=q){if(V._dropIndicatorAt!=j){H(p.el).before(V._dropIndicator);V._dropIndicatorAt=j;}n=1;break;}}if(!n){if(p){H(p.el).after(V._dropIndicator);V._dropIndicatorAt=j+1;}else{V.element.append(V._dropIndicator);V._dropIndicatorAt=0;}}}this._lock++;var Y=this;setTimeout(function(){Y._testForDropTargets(1);},100);},_releaseElement:function(Z){if(this._dragging!=1){return ;}this._dragging=2;var W,U;var b=this.dropTargets,a=this.activeTarget;if(b){for(W=0,U=b.length;W<U;W++){var Y=new C.Event();Y.draggable=this;Y.droppedOnThis=a&&a==b[W];R(b[W],"inactive",Y);}}if(a){var Y=new C.Event();Y.draggable=this;R(a,"drop",Y);}var V=this._dragListeners;for(W=0,U=V.length;W<U;W++){C.removeListener(V[W]);}var X=R(this,"drop");if(!X.defaultPrevented()&&this.dropTargets){this.returnHome();}else{this.endDrag();}},endDrag:function(){if(this._dragging!=2){return ;}this._dragging=0;if(this._reset){this._reset();delete this._reset;}if(this.placeholder){this.placeholder.remove();}this._resetPosition();delete this.activeTarget;},returnHome:function(V){var Y=(V)?V:glow.tweens.linear(),W=this.element,a=Math.pow(Math.pow(this._startOffset.x-this._box.offsetLeft(),2)+Math.pow(this._startOffset.y-this._box.offsetTop(),2),0.5),Z=0.3+(a/1000);var U=[[glow.anim.css(this.element,Z,{left:{from:this._box.offsetLeft(),to:this._startOffset.x},top:{from:this._box.offsetTop(),to:this._startOffset.y}},{tween:Y})]];if(this._dropIndicator){U.push([glow.anim.css(this._dropIndicator,Z-0.1,{opacity:{to:0}})]);}var X=new glow.anim.Timeline(U);I(X,"complete",function(b){this.endDrag();},this);X.start();return ;}};var J=0;L.DropTarget=function(U,V){var U=this.element=H(U);if(!U.length){throw"no element passed into DropTarget constuctor";}if(U.length>1){throw"more than one element passed into DropTarget constructor";}this._id=++J;this._opts=V=glow.lang.apply({dropIndicator:"none",acceptDropOutside:false,dropIndicatorClass:"glow-dragdrop-dropindicator",tolerance:"intersect"},V||{});if(V.onActive){I(this,"active",V.onActive);}if(V.onInactive){I(this,"inactive",V.onInactive);}if(V.onEnter){I(this,"enter",V.onEnter);}if(V.onLeave){I(this,"leave",V.onLeave);}if(V.onDrop){I(this,"drop",V.onDrop);}this._activeListener=I(this,"active",this._onActive);this._activeListener=I(this,"inactive",this._onInactive);return this;};L.DropTarget.prototype={setLogicalBottom:function(U){this._logicalBottom=U;},_onActive:function(X){var V=X.draggable;this._box=new N(this.element);if(this._logicalBottom){this._box.setLogicalBottom(this._logicalBottom);}if(this._opts.dropIndicator=="none"){return ;}this._onEnterListener=I(this,"enter",this._onEnter);this._onLeaveListener=I(this,"leave",this._onLeave);this._dropIndicator=E(V.element);if(this._opts.dropIndicatorClass){this._dropIndicator.addClass(this._opts.dropIndicatorClass);}V._box.sizePlaceholder(this._dropIndicator,"relative",0,0);var W=this._children=H(this.element.children()).filter(function(){var Y=H(this);return(!X.draggable._placeholder||!Y.eq(X.draggable._placeholder))&&(!this._dropIndicator||!Y.eq(this._dropIndicator));});var U=this._childBoxes=[];W.each(function(Y){U[Y]=new N(H(W[Y]));});},_onInactive:function(U){G(this._onEnterListener);G(this._onLeaveListener);delete this._box;if(this._opts.dropIndicator=="none"){return ;}if(!U.droppedOnThis&&this._dropIndicator){this._dropIndicator.remove();delete this._dropIndicator;}delete this._childBoxes;delete this._children;},_onEnter:function(W){var V=this,U=W.draggable;this._dropIndicatorAt=-1;},_onLeave:function(U){this._dropIndicator.remove();},moveToPosition:function(U){var Y=this._dropIndicator,V=new N(Y);var X=parseInt(Y.css("margin-left")),W=parseInt(Y.css("margin-top"));if(isNaN(X)){X=0;}if(isNaN(W)){W=0;}U._startOffset={x:V.offsetLeft()-X,y:V.offsetTop()-W};U._dropIndicator=Y;delete this._dropIndicator;}};return L;}});/*@end @*/