=0; g--){h=this.items[g];if(h.instance!==this.currentContainer&&this.currentContainer&&h.item[0]!==this.currentItem[0]){continue;}f=this.options.toleranceElement?b(this.options.toleranceElement,h.item):h.item; if(!e){h.width=f.outerWidth();h.height=f.outerHeight();}j=f.offset();h.left=j.left;h.top=j.top;}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this); }else{for(g=this.containers.length-1;g>=0;g--){j=this.containers[g].element.offset();this.containers[g].containerCache.left=j.left;this.containers[g].containerCache.top=j.top; this.containers[g].containerCache.width=this.containers[g].element.outerWidth();this.containers[g].containerCache.height=this.containers[g].element.outerHeight(); }}return this;},_createPlaceholder:function(f){f=f||this;var e,g=f.options;if(!g.placeholder||g.placeholder.constructor===String){e=g.placeholder;g.placeholder={element:function(){var i=f.currentItem[0].nodeName.toLowerCase(),h=b("<"+i+">",f.document[0]).addClass(e||f.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper"); if(i==="tr"){f.currentItem.children().each(function(){b("",f.document[0]).attr("colspan",b(this).attr("colspan")||1).appendTo(h);});}else{if(i==="img"){h.attr("src",f.currentItem.attr("src")); }}if(!e){h.css("visibility","hidden");}return h;},update:function(h,i){if(e&&!g.forcePlaceholderSize){return;}if(!i.height()){i.height(f.currentItem.innerHeight()-parseInt(f.currentItem.css("paddingTop")||0,10)-parseInt(f.currentItem.css("paddingBottom")||0,10)); }if(!i.width()){i.width(f.currentItem.innerWidth()-parseInt(f.currentItem.css("paddingLeft")||0,10)-parseInt(f.currentItem.css("paddingRight")||0,10)); }}};}f.placeholder=b(g.placeholder.element.call(f.element,f.currentItem));f.currentItem.after(f.placeholder);g.placeholder.update(f,f.placeholder);},_contactContainers:function(e){var l,h,p,m,n,r,f,s,k,o,g=null,q=null; for(l=this.containers.length-1;l>=0;l--){if(b.contains(this.currentItem[0],this.containers[l].element[0])){continue;}if(this._intersectsWith(this.containers[l].containerCache)){if(g&&b.contains(this.containers[l].element[0],g.element[0])){continue; }g=this.containers[l];q=l;}else{if(this.containers[l].containerCache.over){this.containers[l]._trigger("out",e,this._uiHash(this));this.containers[l].containerCache.over=0; }}}if(!g){return;}if(this.containers.length===1){if(!this.containers[q].containerCache.over){this.containers[q]._trigger("over",e,this._uiHash(this));this.containers[q].containerCache.over=1; }}else{p=10000;m=null;o=g.floating||c(this.currentItem);n=o?"left":"top";r=o?"width":"height";f=this.positionAbs[n]+this.offset.click[n];for(h=this.items.length-1; h>=0;h--){if(!b.contains(this.containers[q].element[0],this.items[h].item[0])){continue;}if(this.items[h].item[0]===this.currentItem[0]){continue;}if(o&&!a(this.positionAbs.top+this.offset.click.top,this.items[h].top,this.items[h].height)){continue; }s=this.items[h].item.offset()[n];k=false;if(Math.abs(s-f)>Math.abs(s+this.items[h][r]-f)){k=true;s+=this.items[h][r];}if(Math.abs(s-f) this.containment[2]){g=this.containment[2]+this.offset.click.left;}if(h.pageY-this.offset.click.top>this.containment[3]){f=this.containment[3]+this.offset.click.top; }}if(k.grid){j=this.originalPageY+Math.round((f-this.originalPageY)/k.grid[1])*k.grid[1];f=this.containment?((j-this.offset.click.top>=this.containment[1]&&j-this.offset.click.top<=this.containment[3])?j:((j-this.offset.click.top>=this.containment[1])?j-k.grid[1]:j+k.grid[1])):j; i=this.originalPageX+Math.round((g-this.originalPageX)/k.grid[0])*k.grid[0];g=this.containment?((i-this.offset.click.left>=this.containment[0]&&i-this.offset.click.left<=this.containment[2])?i:((i-this.offset.click.left>=this.containment[0])?i-k.grid[0]:i+k.grid[0])):i; }}return{top:(f-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+((this.cssPosition==="fixed"?-this.scrollParent.scrollTop():(l?0:e.scrollTop())))),left:(g-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+((this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():l?0:e.scrollLeft())))}; },_rearrange:function(j,h,f,g){f?f[0].appendChild(this.placeholder[0]):h.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction==="down"?h.item[0]:h.item[0].nextSibling)); this.counter=this.counter?++this.counter:1;var e=this.counter;this._delay(function(){if(e===this.counter){this.refreshPositions(!g);}});},_clear:function(f,g){this.reverting=false; var e,h=[];if(!this._noFinalSort&&this.currentItem.parent().length){this.placeholder.before(this.currentItem);}this._noFinalSort=null;if(this.helper[0]===this.currentItem[0]){for(e in this._storedCSS){if(this._storedCSS[e]==="auto"||this._storedCSS[e]==="static"){this._storedCSS[e]=""; }}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");}else{this.currentItem.show();}if(this.fromOutside&&!g){h.push(function(i){this._trigger("receive",i,this._uiHash(this.fromOutside)); });}if((this.fromOutside||this.domPosition.prev!==this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!==this.currentItem.parent()[0])&&!g){h.push(function(i){this._trigger("update",i,this._uiHash()); });}if(this!==this.currentContainer){if(!g){h.push(function(i){this._trigger("remove",i,this._uiHash());});h.push((function(i){return function(j){i._trigger("receive",j,this._uiHash(this)); };}).call(this,this.currentContainer));h.push((function(i){return function(j){i._trigger("update",j,this._uiHash(this));};}).call(this,this.currentContainer)); }}for(e=this.containers.length-1;e>=0;e--){if(!g){h.push((function(i){return function(j){i._trigger("deactivate",j,this._uiHash(this));};}).call(this,this.containers[e])); }if(this.containers[e].containerCache.over){h.push((function(i){return function(j){i._trigger("out",j,this._uiHash(this));};}).call(this,this.containers[e])); this.containers[e].containerCache.over=0;}}if(this.storedCursor){this.document.find("body").css("cursor",this.storedCursor);this.storedStylesheet.remove(); }if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity);}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex==="auto"?"":this._storedZIndex); }this.dragging=false;if(this.cancelHelperRemoval){if(!g){this._trigger("beforeStop",f,this._uiHash());for(e=0;e
")[0],d,o=r.each; e.style.cssText="background-color:rgba(1,1,1,.5)";p.rgba=e.style.backgroundColor.indexOf("rgba")>-1;o(m,function(s,t){t.cache="_"+s;t.props.alpha={idx:3,type:"percent",def:1}; });function l(t,v,u){var s=q[v.type]||{};if(t==null){return(u||!v.def)?null:v.def;}t=s.floor?~~t:parseFloat(t);if(isNaN(t)){return v.def;}if(s.mod){return(t+s.mod)%s.mod; }return 0>t?0:s.max E.mod/2){B+=E.mod; }else{if(B-A>E.mod/2){B-=E.mod;}}}s[C]=l((A-B)*z+B,F);}});return this[v](s);},blend:function(v){if(this._rgba[3]===1){return this;}var u=this._rgba.slice(),t=u.pop(),s=h(v)._rgba; return h(r.map(u,function(w,x){return(1-t)*s[x]+t*w;}));},toRgbaString:function(){var t="rgba(",s=r.map(this._rgba,function(u,w){return u==null?(w>2?1:0):u; });if(s[3]===1){s.pop();t="rgb(";}return t+s.join()+")";},toHslaString:function(){var t="hsla(",s=r.map(this.hsla(),function(u,w){if(u==null){u=w>2?1:0; }if(w&&w<3){u=Math.round(u*100)+"%";}return u;});if(s[3]===1){s.pop();t="hsl(";}return t+s.join()+")";},toHexString:function(s){var t=this._rgba.slice(),u=t.pop(); if(s){t.push(~~(u*255));}return"#"+r.map(t,function(w){w=(w||0).toString(16);return w.length===1?"0"+w:w;}).join("");},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString(); }});h.fn.parse.prototype=h.fn;function f(u,t,s){s=(s+1)%1;if(s*6<1){return u+(t-u)*s*6;}if(s*2<1){return t;}if(s*3<2){return u+(t-u)*((2/3)-s)*6;}return u; }m.hsla.to=function(v){if(v[0]==null||v[1]==null||v[2]==null){return[null,null,null,v[3]];}var t=v[0]/255,y=v[1]/255,z=v[2]/255,B=v[3],A=Math.max(t,y,z),w=Math.min(t,y,z),C=A-w,D=A+w,u=D*0.5,x,E; if(w===A){x=0;}else{if(t===A){x=(60*(y-z)/C)+360;}else{if(y===A){x=(60*(z-t)/C)+120;}else{x=(60*(t-y)/C)+240;}}}if(C===0){E=0;}else{if(u<=0.5){E=C/D;}else{E=C/(2-D); }}return[Math.round(x)%360,E,u,B==null?1:B];};m.hsla.from=function(x){if(x[0]==null||x[1]==null||x[2]==null){return[null,null,null,x[3]];}var w=x[0]/360,v=x[1],u=x[2],t=x[3],y=u<=0.5?u*(1+v):u+v-u*v,z=2*u-y; return[Math.round(f(z,y,w+(1/3))*255),Math.round(f(z,y,w)*255),Math.round(f(z,y,w-(1/3))*255),t];};o(m,function(t,v){var u=v.props,s=v.cache,x=v.to,w=v.from; h.fn[t]=function(C){if(x&&!this[s]){this[s]=x(this._rgba);}if(C===g){return this[s].slice();}var z,B=r.type(C),y=(B==="array"||B==="object")?C:arguments,A=this[s].slice(); o(u,function(D,F){var E=y[B==="object"?D:F.idx];if(E==null){E=A[F.idx];}A[F.idx]=l(E,F);});if(w){z=h(w(A));z[s]=A;return z;}else{return h(A);}};o(u,function(y,z){if(h.fn[y]){return; }h.fn[y]=function(D){var F=r.type(D),C=(y==="alpha"?(this._hsla?"hsla":"rgba"):t),B=this[C](),E=B[z.idx],A;if(F==="undefined"){return E;}if(F==="function"){D=D.call(this,E); F=r.type(D);}if(D==null&&z.empty){return this;}if(F==="string"){A=k.exec(D);if(A){D=E+parseFloat(A[2])*(A[1]==="+"?1:-1);}}B[z.idx]=D;return this[C](B); };});});h.hook=function(t){var s=t.split(" ");o(s,function(u,v){r.cssHooks[v]={set:function(z,A){var x,y,w="";if(A!=="transparent"&&(r.type(A)!=="string"||(x=i(A)))){A=h(x||A); if(!p.rgba&&A._rgba[3]!==1){y=v==="backgroundColor"?z.parentNode:z;while((w===""||w==="transparent")&&y&&y.style){try{w=r.css(y,"backgroundColor");y=y.parentNode; }catch(B){}}A=A.blend(w&&w!=="transparent"?w:"_default");}A=A.toRgbaString();}try{z.style[v]=A;}catch(B){}}};r.fx.step[v]=function(w){if(!w.colorInit){w.start=h(w.elem,v); w.end=h(w.end);w.colorInit=true;}r.cssHooks[v].set(w.elem,w.start.transition(w.end,w.pos));};});};h.hook(n);r.cssHooks.borderColor={expand:function(t){var s={}; o(["Top","Right","Bottom","Left"],function(v,u){s["border"+u+"Color"]=t;});return s;}};d=r.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}; })(jQuery);(function(){var e=["add","remove","toggle"],f={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1}; a.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(h,i){a.fx.step[i]=function(j){if(j.end!=="none"&&!j.setAttr||j.pos===1&&!j.setAttr){jQuery.style(j.elem,i,j.end); j.setAttr=true;}};});function g(l){var i,h,j=l.ownerDocument.defaultView?l.ownerDocument.defaultView.getComputedStyle(l,null):l.currentStyle,k={};if(j&&j.length&&j[0]&&j[j[0]]){h=j.length; while(h--){i=j[h];if(typeof j[i]==="string"){k[a.camelCase(i)]=j[i];}}}else{for(i in j){if(typeof j[i]==="string"){k[i]=j[i];}}}return k;}function d(h,j){var l={},i,k; for(i in j){k=j[i];if(h[i]!==k){if(!f[i]){if(a.fx.step[i]||!isNaN(parseFloat(k))){l[i]=k;}}}}return l;}if(!a.fn.addBack){a.fn.addBack=function(h){return this.add(h==null?this.prevObject:this.prevObject.filter(h)); };}a.effects.animateClass=function(h,i,l,k){var j=a.speed(i,l,k);return this.queue(function(){var o=a(this),m=o.attr("class")||"",n,p=j.children?o.find("*").addBack():o; p=p.map(function(){var q=a(this);return{el:q,start:g(this)};});n=function(){a.each(e,function(q,r){if(h[r]){o[r+"Class"](h[r]);}});};n();p=p.map(function(){this.end=g(this.el[0]); this.diff=d(this.start,this.end);return this;});o.attr("class",m);p=p.map(function(){var s=this,q=a.Deferred(),r=a.extend({},j,{queue:false,complete:function(){q.resolve(s); }});this.el.animate(this.diff,r);return q.promise();});a.when.apply(a,p.get()).done(function(){n();a.each(arguments,function(){var q=this.el;a.each(this.diff,function(r){q.css(r,""); });});j.complete.call(o[0]);});});};a.fn.extend({addClass:(function(h){return function(j,i,l,k){return i?a.effects.animateClass.call(this,{add:j},i,l,k):h.apply(this,arguments); };})(a.fn.addClass),removeClass:(function(h){return function(j,i,l,k){return arguments.length>1?a.effects.animateClass.call(this,{remove:j},i,l,k):h.apply(this,arguments); };})(a.fn.removeClass),toggleClass:(function(h){return function(k,j,i,m,l){if(typeof j==="boolean"||j===c){if(!i){return h.apply(this,arguments);}else{return a.effects.animateClass.call(this,(j?{add:k}:{remove:k}),i,m,l); }}else{return a.effects.animateClass.call(this,{toggle:k},j,i,m);}};})(a.fn.toggleClass),switchClass:function(h,j,i,l,k){return a.effects.animateClass.call(this,{add:j,remove:h},i,l,k); }});})();(function(){a.extend(a.effects,{version:"1.10.3",save:function(g,h){for(var f=0;f