rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 13
136k
| meta
stringlengths 132
347
|
---|---|---|---|
(function(a){a.widget("ui.droppable",{_init:function(){var c=this.options,b=c.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&&a.isFunction(this.options.accept)?this.options.accept:function(e){return e.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[this.options.scope]=a.ui.ddmanager.droppables[this.options.scope]||[];a.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.addClasses&&this.element.addClass("ui-droppable"))},destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];for(var c=0;c<b.length;c++){if(b[c]==this){b.splice(c,1)}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},_setData:function(b,c){if(b=="accept"){this.options.accept=c&&a.isFunction(c)?c:function(e){return e.is(c)}}else{a.widget.prototype._setData.apply(this,arguments)}},_activate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)}(b&&this._trigger("activate",c,this.ui(b)))},_deactivate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}(b&&this._trigger("deactivate",c,this.ui(b)))},_over:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}this._trigger("over",c,this.ui(b))}},_out:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("out",c,this.ui(b))}},_drop:function(c,d){var b=d||a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return false}var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var f=a.data(this,"droppable");if(f.options.greedy&&a.ui.intersect(b,a.extend(f,{offset:f.element.offset()}),f.options.tolerance)){e=true;return false}});if(e){return false}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("drop",c,this.ui(b));return this.element}return false},ui:function(b){return{draggable:(b.currentItem||b.element),helper:b.helper,position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs}}});a.extend(a.ui.droppable,{version:"1.7.3",eventPrefix:"drop",defaults:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"}});a.ui.intersect=function(q,j,o){if(!j.offset){return false}var e=(q.positionAbs||q.position.absolute).left,d=e+q.helperProportions.width,n=(q.positionAbs||q.position.absolute).top,m=n+q.helperProportions.height;var g=j.offset.left,c=g+j.proportions.width,p=j.offset.top,k=p+j.proportions.height;switch(o){case"fit":return(g<e&&d<c&&p<n&&m<k);break;case"intersect":return(g<e+(q.helperProportions.width/2)&&d-(q.helperProportions.width/2)<c&&p<n+(q.helperProportions.height/2)&&m-(q.helperProportions.height/2)<k);break;case"pointer":var h=((q.positionAbs||q.position.absolute).left+(q.clickOffset||q.offset.click).left),i=((q.positionAbs||q.position.absolute).top+(q.clickOffset||q.offset.click).top),f=a.ui.isOver(i,h,p,g,j.proportions.height,j.proportions.width);return f;break;case"touch":return((n>=p&&n<=k)||(m>=p&&m<=k)||(n<p&&m>k))&&((e>=g&&e<=c)||(d>=g&&d<=c)||(e<g&&d>c));break;default:return false;break}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,g){var b=a.ui.ddmanager.droppables[e.options.scope];var f=g?g.type:null;var h=(e.currentItem||e.element).find(":data(droppable)").andSelf();droppablesLoop:for(var d=0;d<b.length;d++){if(b[d].options.disabled||(e&&!b[d].options.accept.call(b[d].element[0],(e.currentItem||e.element)))){continue}for(var c=0;c<h.length;c++){if(h[c]==b[d].element[0]){b[d].proportions.height=0;continue droppablesLoop}}b[d].visible=b[d].element.css("display")!="none";if(!b[d].visible){continue}b[d].offset=b[d].element.offset();b[d].proportions={width:b[d].element[0].offsetWidth,height:b[d].element[0].offsetHeight};if(f=="mousedown"){b[d]._activate.call(b[d],g)}}},drop:function(b,c){var d=false;a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(!this.options){return}if(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance)){d=this._drop.call(this,c)}if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element[0],(b.currentItem||b.element))){this.isout=1;this.isover=0;this._deactivate.call(this,c)}});return d},drag:function(b,c){if(b.options.refreshPositions){a.ui.ddmanager.prepareOffsets(b,c)}a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return}var e=a.ui.intersect(b,this,this.options.tolerance);var g=!e&&this.isover==1?"isout":(e&&this.isover==0?"isover":null);if(!g){return}var f;if(this.options.greedy){var d=this.element.parents(":data(droppable):eq(0)");if(d.length){f=a.data(d[0],"droppable");f.greedyChild=(g=="isover"?1:0)}}if(f&&g=="isover"){f.isover=0;f.isout=1;f._out.call(f,c)}this[g]=1;this[g=="isout"?"isover":"isout"]=0;this[g=="isover"?"_over":"_out"].call(this,c);if(f&&g=="isout"){f.isout=0;f.isover=1;f._over.call(f,c)}})}}})(jQuery); | a,this.ui(c));return this.element}return false},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}});d.extend(d.ui.droppable,{version:"1.8.5"});d.ui.intersect=function(a,b,c){if(!b.offset)return false;var e=(a.positionAbs||a.position.absolute).left,g=e+a.helperProportions.width,f=(a.positionAbs||a.position.absolute).top,h=f+a.helperProportions.height,i=b.offset.left,k=i+b.proportions.width,j=b.offset.top,l=j+b.proportions.height; | (function(a){a.widget("ui.droppable",{_init:function(){var c=this.options,b=c.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&&a.isFunction(this.options.accept)?this.options.accept:function(e){return e.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[this.options.scope]=a.ui.ddmanager.droppables[this.options.scope]||[];a.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.addClasses&&this.element.addClass("ui-droppable"))},destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];for(var c=0;c<b.length;c++){if(b[c]==this){b.splice(c,1)}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},_setData:function(b,c){if(b=="accept"){this.options.accept=c&&a.isFunction(c)?c:function(e){return e.is(c)}}else{a.widget.prototype._setData.apply(this,arguments)}},_activate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)}(b&&this._trigger("activate",c,this.ui(b)))},_deactivate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}(b&&this._trigger("deactivate",c,this.ui(b)))},_over:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}this._trigger("over",c,this.ui(b))}},_out:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("out",c,this.ui(b))}},_drop:function(c,d){var b=d||a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return false}var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var f=a.data(this,"droppable");if(f.options.greedy&&a.ui.intersect(b,a.extend(f,{offset:f.element.offset()}),f.options.tolerance)){e=true;return false}});if(e){return false}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("drop",c,this.ui(b));return this.element}return false},ui:function(b){return{draggable:(b.currentItem||b.element),helper:b.helper,position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs}}});a.extend(a.ui.droppable,{version:"1.7.3",eventPrefix:"drop",defaults:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"}});a.ui.intersect=function(q,j,o){if(!j.offset){return false}var e=(q.positionAbs||q.position.absolute).left,d=e+q.helperProportions.width,n=(q.positionAbs||q.position.absolute).top,m=n+q.helperProportions.height;var g=j.offset.left,c=g+j.proportions.width,p=j.offset.top,k=p+j.proportions.height;switch(o){case"fit":return(g<e&&d<c&&p<n&&m<k);break;case"intersect":return(g<e+(q.helperProportions.width/2)&&d-(q.helperProportions.width/2)<c&&p<n+(q.helperProportions.height/2)&&m-(q.helperProportions.height/2)<k);break;case"pointer":var h=((q.positionAbs||q.position.absolute).left+(q.clickOffset||q.offset.click).left),i=((q.positionAbs||q.position.absolute).top+(q.clickOffset||q.offset.click).top),f=a.ui.isOver(i,h,p,g,j.proportions.height,j.proportions.width);return f;break;case"touch":return((n>=p&&n<=k)||(m>=p&&m<=k)||(n<p&&m>k))&&((e>=g&&e<=c)||(d>=g&&d<=c)||(e<g&&d>c));break;default:return false;break}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,g){var b=a.ui.ddmanager.droppables[e.options.scope];var f=g?g.type:null;var h=(e.currentItem||e.element).find(":data(droppable)").andSelf();droppablesLoop:for(var d=0;d<b.length;d++){if(b[d].options.disabled||(e&&!b[d].options.accept.call(b[d].element[0],(e.currentItem||e.element)))){continue}for(var c=0;c<h.length;c++){if(h[c]==b[d].element[0]){b[d].proportions.height=0;continue droppablesLoop}}b[d].visible=b[d].element.css("display")!="none";if(!b[d].visible){continue}b[d].offset=b[d].element.offset();b[d].proportions={width:b[d].element[0].offsetWidth,height:b[d].element[0].offsetHeight};if(f=="mousedown"){b[d]._activate.call(b[d],g)}}},drop:function(b,c){var d=false;a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(!this.options){return}if(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance)){d=this._drop.call(this,c)}if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element[0],(b.currentItem||b.element))){this.isout=1;this.isover=0;this._deactivate.call(this,c)}});return d},drag:function(b,c){if(b.options.refreshPositions){a.ui.ddmanager.prepareOffsets(b,c)}a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return}var e=a.ui.intersect(b,this,this.options.tolerance);var g=!e&&this.isover==1?"isout":(e&&this.isover==0?"isover":null);if(!g){return}var f;if(this.options.greedy){var d=this.element.parents(":data(droppable):eq(0)");if(d.length){f=a.data(d[0],"droppable");f.greedyChild=(g=="isover"?1:0)}}if(f&&g=="isover"){f.isover=0;f.isout=1;f._out.call(f,c)}this[g]=1;this[g=="isout"?"isover":"isout"]=0;this[g=="isover"?"_over":"_out"].call(this,c);if(f&&g=="isout"){f.isout=0;f.isover=1;f._over.call(f,c)}})}}})(jQuery); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/acf7df638f135d97c0f97b727e0898760c53bb85/ui.droppable.js/buggy/wp-includes/js/jquery/ui.droppable.js |
else return 'url('+E+G+H+I+')';});};if(!l[p]){var v=s.preload;if(v&&v.length>0){t(v);a.imageCacher.load(v,function(){l[p]=1;n(o,p,q,r);});return;}l[p]=1;}q=s[q];var w=!q||!!q._isLoaded;if(w)r&&r();else{var x=q._pending||(q._pending=[]);x.push(r);if(x.length>1)return;var y=!q.css||!q.css.length,z=!q.js||!q.js.length,A=function(){if(y&&z){q._isLoaded=1;for(var D=0;D<x.length;D++){if(x[D])x[D]();}}};if(!y){var B=q.css;if(e.isArray(B)){t(B);for(var C=0;C<B.length;C++)a.document.appendStyleSheet(B[C]);}else{B=u(B,a.getUrl(m[p]));a.document.appendStyleText(B);}q.css=B;y=1;}if(!z){t(q.js);a.scriptLoader.load(q.js,function(){z=1;A();});}A();}};return{add:function(o,p){k[o]=p;p.skinPath=m[o]||(m[o]=a.getUrl('skins/'+o+'/'));},load:function(o,p,q){var r=o.skinName,s=o.skinPath;if(k[r])n(o,r,p,q);else{m[r]=s;a.scriptLoader.load(a.getUrl(s+'skin.js'),function(){n(o,r,p,q);});}}};})();a.themes=new a.resourceManager('themes/','theme');a.ui=function(k){if(k.ui)return k.ui;this._={handlers:{},items:{},editor:k};return this;};var k=a.ui;k.prototype={add:function(l,m,n){this._.items[l]={type:m,command:n.command||null,args:Array.prototype.slice.call(arguments,2)};},create:function(l){var q=this;var m=q._.items[l],n=m&&q._.handlers[m.type],o=m&&m.command&&q._.editor.getCommand(m.command),p=n&&n.create.apply(q,m.args);if(o)o.uiItems.push(p);return p;},addHandler:function(l,m){this._.handlers[l]=m;}};(function(){var l=0,m=function(){var x='editor'+ ++l;return a.instances&&a.instances[x]?m():x;},n={},o=function(x){var y=x.config.customConfig;if(!y)return false;y=a.getUrl(y);var z=n[y]||(n[y]={});if(z.fn){z.fn.call(x,x.config);if(a.getUrl(x.config.customConfig)==y||!o(x))x.fireOnce('customConfigLoaded');}else a.scriptLoader.load(y,function(){if(a.editorConfig)z.fn=a.editorConfig;else z.fn=function(){};o(x);});return true;},p=function(x,y){x.on('customConfigLoaded',function(){if(y){if(y.on)for(var z in y.on)x.on(z,y.on[z]);e.extend(x.config,y,true);delete x.config.on;}q(x);});if(y&&y.customConfig!=undefined)x.config.customConfig=y.customConfig;if(!o(x))x.fireOnce('customConfigLoaded');},q=function(x){var y=x.config.skin.split(','),z=y[0],A=a.getUrl(y[1]||'skins/'+z+'/');x.skinName=z;x.skinPath=A;x.skinClass='cke_skin_'+z;x.tabIndex=x.config.tabIndex||x.element.getAttribute('tabindex')||0;x.fireOnce('configLoaded');t(x);},r=function(x){a.lang.load(x.config.language,x.config.defaultLanguage,function(y,z){x.langCode=y;x.lang=e.prototypedCopy(z);if(b.gecko&&b.version<10900&&x.lang.dir=='rtl')x.lang.dir='ltr'; | for(var C=0;C<B.length;C++)a.document.appendStyleSheet(B[C]);}else{B=u(B,a.getUrl(m[p]));a.document.appendStyleText(B);}q.css=B;y=1;}if(!z){t(q.js);a.scriptLoader.load(q.js,function(){z=1;A();});}A();}};return{add:function(o,p){k[o]=p;p.skinPath=m[o]||(m[o]=a.getUrl('skins/'+o+'/'));},load:function(o,p,q){var r=o.skinName,s=o.skinPath;if(k[r])n(o,r,p,q);else{m[r]=s;a.scriptLoader.load(a.getUrl(s+'skin.js'),function(){n(o,r,p,q);});}}};})();a.themes=new a.resourceManager('themes/','theme');a.ui=function(k){if(k.ui)return k.ui;this._={handlers:{},items:{},editor:k};return this;};var k=a.ui;k.prototype={add:function(l,m,n){this._.items[l]={type:m,command:n.command||null,args:Array.prototype.slice.call(arguments,2)};},create:function(l){var q=this;var m=q._.items[l],n=m&&q._.handlers[m.type],o=m&&m.command&&q._.editor.getCommand(m.command),p=n&&n.create.apply(q,m.args);if(o)o.uiItems.push(p);return p;},addHandler:function(l,m){this._.handlers[l]=m;}};(function(){var l=0,m=function(){var x='editor'+ ++l;return a.instances&&a.instances[x]?m():x;},n={},o=function(x){var y=x.config.customConfig;if(!y)return false;y=a.getUrl(y);var z=n[y]||(n[y]={});if(z.fn){z.fn.call(x,x.config);if(a.getUrl(x.config.customConfig)==y||!o(x))x.fireOnce('customConfigLoaded');}else a.scriptLoader.load(y,function(){if(a.editorConfig)z.fn=a.editorConfig;else z.fn=function(){};o(x);});return true;},p=function(x,y){x.on('customConfigLoaded',function(){if(y){if(y.on)for(var z in y.on)x.on(z,y.on[z]);e.extend(x.config,y,true);delete x.config.on;}q(x);});if(y&&y.customConfig!=undefined)x.config.customConfig=y.customConfig;if(!o(x))x.fireOnce('customConfigLoaded');},q=function(x){var y=x.config.skin.split(','),z=y[0],A=a.getUrl(y[1]||'skins/'+z+'/');x.skinName=z;x.skinPath=A;x.skinClass='cke_skin_'+z;x.tabIndex=x.config.tabIndex||x.element.getAttribute('tabindex')||0;x.fireOnce('configLoaded');t(x);},r=function(x){a.lang.load(x.config.language,x.config.defaultLanguage,function(y,z){x.langCode=y;x.lang=e.prototypedCopy(z);if(b.gecko&&b.version<10900&&x.lang.dir=='rtl')x.lang.dir='ltr';var A=x.config;A.contentsLangDirection=='ui'&&(A.contentsLangDirection=x.lang.dir);s(x);});},s=function(x){var y=x.config,z=y.plugins,A=y.extraPlugins,B=y.removePlugins;if(A){var C=new RegExp('(?:^|,)(?:'+A.replace(/\s*,\s*/g,'|')+')(?=,|$)','g');z=z.replace(C,'');z+=','+A;}if(B){C=new RegExp('(?:^|,)(?:'+B.replace(/\s*,\s*/g,'|')+')(?=,|$)','g');z=z.replace(C,'');}j.load(z.split(','),function(D){var E=[],F=[],G=[]; | else return 'url('+E+G+H+I+')';});};if(!l[p]){var v=s.preload;if(v&&v.length>0){t(v);a.imageCacher.load(v,function(){l[p]=1;n(o,p,q,r);});return;}l[p]=1;}q=s[q];var w=!q||!!q._isLoaded;if(w)r&&r();else{var x=q._pending||(q._pending=[]);x.push(r);if(x.length>1)return;var y=!q.css||!q.css.length,z=!q.js||!q.js.length,A=function(){if(y&&z){q._isLoaded=1;for(var D=0;D<x.length;D++){if(x[D])x[D]();}}};if(!y){var B=q.css;if(e.isArray(B)){t(B);for(var C=0;C<B.length;C++)a.document.appendStyleSheet(B[C]);}else{B=u(B,a.getUrl(m[p]));a.document.appendStyleText(B);}q.css=B;y=1;}if(!z){t(q.js);a.scriptLoader.load(q.js,function(){z=1;A();});}A();}};return{add:function(o,p){k[o]=p;p.skinPath=m[o]||(m[o]=a.getUrl('skins/'+o+'/'));},load:function(o,p,q){var r=o.skinName,s=o.skinPath;if(k[r])n(o,r,p,q);else{m[r]=s;a.scriptLoader.load(a.getUrl(s+'skin.js'),function(){n(o,r,p,q);});}}};})();a.themes=new a.resourceManager('themes/','theme');a.ui=function(k){if(k.ui)return k.ui;this._={handlers:{},items:{},editor:k};return this;};var k=a.ui;k.prototype={add:function(l,m,n){this._.items[l]={type:m,command:n.command||null,args:Array.prototype.slice.call(arguments,2)};},create:function(l){var q=this;var m=q._.items[l],n=m&&q._.handlers[m.type],o=m&&m.command&&q._.editor.getCommand(m.command),p=n&&n.create.apply(q,m.args);if(o)o.uiItems.push(p);return p;},addHandler:function(l,m){this._.handlers[l]=m;}};(function(){var l=0,m=function(){var x='editor'+ ++l;return a.instances&&a.instances[x]?m():x;},n={},o=function(x){var y=x.config.customConfig;if(!y)return false;y=a.getUrl(y);var z=n[y]||(n[y]={});if(z.fn){z.fn.call(x,x.config);if(a.getUrl(x.config.customConfig)==y||!o(x))x.fireOnce('customConfigLoaded');}else a.scriptLoader.load(y,function(){if(a.editorConfig)z.fn=a.editorConfig;else z.fn=function(){};o(x);});return true;},p=function(x,y){x.on('customConfigLoaded',function(){if(y){if(y.on)for(var z in y.on)x.on(z,y.on[z]);e.extend(x.config,y,true);delete x.config.on;}q(x);});if(y&&y.customConfig!=undefined)x.config.customConfig=y.customConfig;if(!o(x))x.fireOnce('customConfigLoaded');},q=function(x){var y=x.config.skin.split(','),z=y[0],A=a.getUrl(y[1]||'skins/'+z+'/');x.skinName=z;x.skinPath=A;x.skinClass='cke_skin_'+z;x.tabIndex=x.config.tabIndex||x.element.getAttribute('tabindex')||0;x.fireOnce('configLoaded');t(x);},r=function(x){a.lang.load(x.config.language,x.config.defaultLanguage,function(y,z){x.langCode=y;x.lang=e.prototypedCopy(z);if(b.gecko&&b.version<10900&&x.lang.dir=='rtl')x.lang.dir='ltr'; | 8656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8656/debb161f7671ff5bddc8def2221db94ff111ff1b/ckeditor.js/buggy/ckeditor/ckeditor.js |
d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&& !a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}}, | 0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h<k;h++)c.event.add(this[h],d,l,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d, a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d= | d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}}, | 3959 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/3959/6ffc2de1d5816f49b1cdf002161144b28f2dc6e5/jquery.js/clean/javascript/jquery.js |
f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){e=f;f=v}var j=b==="one"?c.proxy(e,function(n){c(this).unbind(n,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a, b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+ | d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&& !a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}}, | f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){e=f;f=v}var j=b==="one"?c.proxy(e,function(n){c(this).unbind(n,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+ | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/e67dc72e11289d294cc6b462fc98149983bd62f4/jquery.js/clean/wp-includes/js/jquery/jquery.js |
return this.each(function(){ jQuery.event.remove( this, type, fn ); }); | if ( typeof type === "object" && !type.preventDefault ) { for ( var key in type ) { this.unbind(key, type[key]); } } else { for ( var i = 0, l = this.length; i < l; i++ ) { jQuery.event.remove( this[i], type, fn ); } } return this; | unbind: function( type, fn ) { return this.each(function(){ jQuery.event.remove( this, type, fn ); }); }, | 7481 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/7481/dab47d32976aaaf622fe19a0f6372d9c7d38a3b0/jquery-latest.js/buggy/public/javascripts/jquery-latest.js |
(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML=' <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); | d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&& !a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}}, | (function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML=' <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); | 8656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8656/4120b09b68ebe356eaf79e35f7e2d6ee441dee08/jquery.js/clean/js/jquery.js |
0&&u.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=A}var k=b==="one"?c.proxy(f,function(n){c(this).unbind(n,k);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var l=this.length;h<l;h++)c.event.add(this[h],d,k,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d, | 0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h<k;h++)c.event.add(this[h],d,l,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d, | 0&&u.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=A}var k=b==="one"?c.proxy(f,function(n){c(this).unbind(n,k);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var l=this.length;h<l;h++)c.event.add(this[h],d,k,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d= | 2459 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2459/224f99709ae7b631dc0e80310148eb2c54d2198a/jquery.js/buggy/default_www/frontend/core/js/jquery/jquery.js |
unbind: function( type, fn ) { if ( typeof type === "object" && !type.preventDefault ) { for ( var key in type ) { this.unbind(key, type[key]); } } else { for ( var i = 0, l = this.length; i < l; i++ ) { jQuery.event.remove( this[i], type, fn ); } } return this; }, | 0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h<k;h++)c.event.add(this[h],d,l,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d, a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d= | unbind: function( type, fn ) { // Handle object literals if ( typeof type === "object" && !type.preventDefault ) { for ( var key in type ) { this.unbind(key, type[key]); } } else { for ( var i = 0, l = this.length; i < l; i++ ) { jQuery.event.remove( this[i], type, fn ); } } return this; }, | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/337f8a7f8f1bd9e61727ac292aa76724b4cf7a46/jquery.js/clean/wp-includes/js/jquery/jquery.js |
(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML=' <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); | f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){thisObject=e;e=f;f=w}var j=b==="one"?c.proxy(e,function(o){c(this).unbind(o,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e,thisObject):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a, | (function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML=' <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/e7ae3f3a40051447a962c694d60d04cd24452918/jquery.js/clean/wp-includes/js/jquery/jquery.js |
(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML=' <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); | f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){e=f;f=v}var j=b==="one"?c.proxy(e,function(n){c(this).unbind(n,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a, b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+ | (function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML=' <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); | 2459 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2459/dc03aa7fb2043bfce0a64ba716d55c8d7489daea/jquery.js/buggy/default_www/backend/core/js/jquery/jquery.js |
d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&& !a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}}, | 0&&u.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=A}var k=b==="one"?c.proxy(f,function(n){c(this).unbind(n,k);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var l=this.length;h<l;h++)c.event.add(this[h],d,k,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d, a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d= | d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}}, | 8656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8656/debb161f7671ff5bddc8def2221db94ff111ff1b/jquery.js/clean/js/jquery.js |
0&&u.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=A}var k=b==="one"?c.proxy(f,function(n){c(this).unbind(n,k);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var l=this.length;h<l;h++)c.event.add(this[h],d,k,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d, | 0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h<k;h++)c.event.add(this[h],d,l,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d, | 0&&u.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=A}var k=b==="one"?c.proxy(f,function(n){c(this).unbind(n,k);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var l=this.length;h<l;h++)c.event.add(this[h],d,k,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d= | 2459 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2459/224f99709ae7b631dc0e80310148eb2c54d2198a/jquery.js/buggy/default_www/backend/core/js/jquery/jquery.js |
f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){e=f;f=v}var j=b==="one"?c.proxy(e,function(n){c(this).unbind(n,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a, b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+ | d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&& !a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}}, | f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){e=f;f=v}var j=b==="one"?c.proxy(e,function(n){c(this).unbind(n,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+ | 8560 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8560/4d748e5cbfcbd91691b089e42cffdf43918e6201/jquery.min.js/clean/web/javascript/jquery/jquery.min.js |
d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&& !a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}}, | 0&&u.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=A}var k=b==="one"?c.proxy(f,function(n){c(this).unbind(n,k);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var l=this.length;h<l;h++)c.event.add(this[h],d,k,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d, a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d= | d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}}, | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/8e2f21f44411204c60060f830cb1a800533462d2/jquery.js/buggy/wp-includes/js/jquery/jquery.js |
f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){thisObject=e;e=f;f=w}var j=b==="one"?c.proxy(e,function(o){c(this).unbind(o,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e,thisObject):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a, | f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){e=f;f=v}var j=b==="one"?c.proxy(e,function(n){c(this).unbind(n,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a, b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+ | f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){thisObject=e;e=f;f=w}var j=b==="one"?c.proxy(e,function(o){c(this).unbind(o,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e,thisObject):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a, | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/59fd2fb902fce80768d38770b0d96a19623d08d2/jquery.js/buggy/wp-includes/js/jquery/jquery.js |
var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,isRTL:!!("undefined"!=typeof isRtl&&isRtl),init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){var c=a.isRTL?this.eq(0).css("margin-right"):this.eq(0).css("margin-left");return a.pxToDepth(c&&-1!=c.indexOf("px")?c.slice(0,-2):0)},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var i=b(this),h=f.exec(i.attr("name")),j="undefined"==typeof h[1]?0:parseInt(h[1],10);if(this.className&&-1!=this.className.indexOf("add-to-top")){c=a.addMenuItemToTop}d[j]=i.closest("li").getItemData("add-menu-item",j)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})},getItemData:function(f,g){f=f||"menu-item";var d={},e,c=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!g&&f=="menu-item"){g=this.find(".menu-item-data-db-id").val()}if(!g){return d}this.find("input").each(function(){var h;e=c.length;while(e--){if(f=="menu-item"){h=c[e]+"["+g+"]"}else{if(f=="add-menu-item"){h="menu-item["+g+"]["+c[e]+"]"}}if(this.name&&h==this.name){d[c[e]]=this.value}}});return d},setItemData:function(c,d,e){d=d||"menu-item";if(!e&&d=="menu-item"){e=b(".menu-item-data-db-id",this).val()}if(!e){return this}this.find("input").each(function(){var f=b(this),g;b.each(c,function(h,i){if(d=="menu-item"){g=h+"["+e+"]"}else{if(d=="add-menu-item"){g="menu-item["+e+"]["+h+"]"}}if(g==f.attr("name")){f.val(i)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;if(a.isRTL){v.item[0].style.right="auto"}g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0;if(a.isRTL){r.item[0].style.left="auto";r.item[0].style.right=0}},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=(a.isRTL?-1:1)*a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-cancel")){return c.eventOnClickCancelLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,isRTL:!!("undefined"!=typeof isRtl&&isRtl),init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){var c=a.isRTL?this.eq(0).css("margin-right"):this.eq(0).css("margin-left");return a.pxToDepth(c&&-1!=c.indexOf("px")?c.slice(0,-2):0)},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(!d[0]||!d[0].className||-1==d[0].className.indexOf("menu-item")||(d.menuItemDepth()!=f-1)){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var i=b(this),h=f.exec(i.attr("name")),j="undefined"==typeof h[1]?0:parseInt(h[1],10);if(this.className&&-1!=this.className.indexOf("add-to-top")){c=a.addMenuItemToTop}d[j]=i.closest("li").getItemData("add-menu-item",j)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})},getItemData:function(f,g){f=f||"menu-item";var d={},e,c=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!g&&f=="menu-item"){g=this.find(".menu-item-data-db-id").val()}if(!g){return d}this.find("input").each(function(){var h;e=c.length;while(e--){if(f=="menu-item"){h=c[e]+"["+g+"]"}else{if(f=="add-menu-item"){h="menu-item["+g+"]["+c[e]+"]"}}if(this.name&&h==this.name){d[c[e]]=this.value}}});return d},setItemData:function(c,d,e){d=d||"menu-item";if(!e&&d=="menu-item"){e=b(".menu-item-data-db-id",this).val()}if(!e){return this}this.find("input").each(function(){var f=b(this),g;b.each(c,function(h,i){if(d=="menu-item"){g=h+"["+e+"]"}else{if(d=="add-menu-item"){g="menu-item["+e+"]["+h+"]"}}if(g==f.attr("name")){f.val(i)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;if(a.isRTL){v.item[0].style.right="auto"}g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0;if(a.isRTL){r.item[0].style.left="auto";r.item[0].style.right=0}},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=(a.isRTL?-1:1)*a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-cancel")){return c.eventOnClickCancelLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,isRTL:!!("undefined"!=typeof isRtl&&isRtl),init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){var c=a.isRTL?this.eq(0).css("margin-right"):this.eq(0).css("margin-left");return a.pxToDepth(c&&-1!=c.indexOf("px")?c.slice(0,-2):0)},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var i=b(this),h=f.exec(i.attr("name")),j="undefined"==typeof h[1]?0:parseInt(h[1],10);if(this.className&&-1!=this.className.indexOf("add-to-top")){c=a.addMenuItemToTop}d[j]=i.closest("li").getItemData("add-menu-item",j)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})},getItemData:function(f,g){f=f||"menu-item";var d={},e,c=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!g&&f=="menu-item"){g=this.find(".menu-item-data-db-id").val()}if(!g){return d}this.find("input").each(function(){var h;e=c.length;while(e--){if(f=="menu-item"){h=c[e]+"["+g+"]"}else{if(f=="add-menu-item"){h="menu-item["+g+"]["+c[e]+"]"}}if(this.name&&h==this.name){d[c[e]]=this.value}}});return d},setItemData:function(c,d,e){d=d||"menu-item";if(!e&&d=="menu-item"){e=b(".menu-item-data-db-id",this).val()}if(!e){return this}this.find("input").each(function(){var f=b(this),g;b.each(c,function(h,i){if(d=="menu-item"){g=h+"["+e+"]"}else{if(d=="add-menu-item"){g="menu-item["+e+"]["+h+"]"}}if(g==f.attr("name")){f.val(i)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;if(a.isRTL){v.item[0].style.right="auto"}g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0;if(a.isRTL){r.item[0].style.left="auto";r.item[0].style.right=0}},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=(a.isRTL?-1:1)*a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-cancel")){return c.eventOnClickCancelLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http://"==e){return false}b(".customlinkdiv img.waiting").show();this.addLinkToMenu(e,d,c,function(){b(".customlinkdiv img.waiting").hide();b("#custom-menu-item-name").val("").blur();b("#custom-menu-item-url").val("http://")})},addLinkToMenu:function(e,d,c,f){c=c||a.addMenuItemToBottom;f=f||function(){};a.addItemToMenu({"-1":{"menu-item-type":"custom","menu-item-url":e,"menu-item-title":d}},c,f)},addItemToMenu:function(e,c,g){var f=b("#menu").val(),d=b("#menu-settings-column-nonce").val();c=c||function(){};g=g||function(){};params={action:"add-menu-item",menu:f,"menu-settings-column-nonce":d,"menu-item":e};b.post(ajaxurl,params,function(h){var i=b("#menu-instructions");c(h,params);if(!i.hasClass("menu-instructions-inactive")&&i.siblings().length){i.addClass("menu-instructions-inactive")}g()})},addMenuItemToBottom:function(c,d){b(c).hideAdvancedMenuItemFields().appendTo(a.targetList)},addMenuItemToTop:function(c,d){b(c).hideAdvancedMenuItemFields().prependTo(a.targetList)},attachUnsavedChangesListener:function(){b("#menu-management input, #menu-management select, #menu-management, #menu-management textarea").change(function(){a.registerChange()});window.onbeforeunload=function(){if(a.menusChanged){return navMenuL10n.saveAlert}}},registerChange:function(){a.menusChanged=true},attachTabsPanelListeners:function(){b("#menu-settings-column").bind("click",function(h){var f,d,i,c,g=b(h.target);if(g.hasClass("nav-tab-link")){d=/#(.*)$/.exec(h.target.href);if(d&&d[1]){d=d[1]}else{return false}i=g.parents(".inside").first();b("input",i).removeAttr("checked");b(".tabs-panel-active",i).removeClass("tabs-panel-active").addClass("tabs-panel-inactive");b("#"+d,i).removeClass("tabs-panel-inactive").addClass("tabs-panel-active");b(".tabs",i).removeClass("tabs");g.parent().addClass("tabs");b(".quick-search",i).focus();return false}else{if(g.hasClass("select-all")){f=/#(.*)$/.exec(h.target.href);if(f&&f[1]){c=b("#"+f[1]+" .tabs-panel-active .menu-item-title input");if(c.length===c.filter(":checked").length){c.removeAttr("checked")}else{c.attr("checked","checked")}return false}}else{if(g.hasClass("submit-add-to-menu")){a.registerChange();if(h.target.id&&"submit-customlinkdiv"==h.target.id){a.addCustomLink(a.addMenuItemToBottom)}else{if(h.target.id&&-1!=h.target.id.indexOf("submit-")){b("#"+h.target.id.replace(/submit-/,"")).addSelectedToMenu(a.addMenuItemToBottom)}}return false}else{if(g.hasClass("page-numbers")){b.post(ajaxurl,h.target.href.replace(/.*\?/,"").replace(/action=([^&]*)/,"")+"&action=menu-get-metabox",function(m){if(-1==m.indexOf("replace-id")){return}var l=b.parseJSON(m),e=document.getElementById(l["replace-id"]),k=document.createElement("div"),j=document.createElement("div");if(!l.markup||!e){return}j.innerHTML=l.markup?l.markup:"";e.parentNode.insertBefore(k,e);k.parentNode.removeChild(e);k.parentNode.insertBefore(j,k);k.parentNode.removeChild(k)});return false}}}}})},initTabManager:function(){var h=b(".nav-tabs-wrapper"),i=h.children(".nav-tabs"),g=i.children(".nav-tab-active"),l=i.children(".nav-tab"),e=0,m,f,k,d,j=false;function c(){f=h.offset().left;m=f+h.width();g.makeTabVisible()}b.fn.extend({makeTabVisible:function(){var o=this.eq(0),p,n;if(!o.length){return}p=o.offset().left;n=p+o.outerWidth();if(n>m){i.animate({"margin-left":"+="+(m-n)+"px"},"fast")}else{if(p<f){i.animate({"margin-left":"-="+(p-f)+"px"},"fast")}}return o},isTabVisible:function(){var o=this.eq(0),p=o.offset().left,n=p+o.outerWidth();return(n<=m&&p>=f)?true:false}});l.each(function(){e+=b(this).outerWidth(true)});if(e<=h.width()-i.css("padding-left").slice(0,-2)-i.css("padding-right").slice(0,-2)){return}i.css({"margin-right":(-1*e)+"px",padding:0});k=b('<div class="nav-tabs-arrow nav-tabs-arrow-left"><a>«</a></div>');d=b('<div class="nav-tabs-arrow nav-tabs-arrow-right"><a>»</a></div>');h.wrap('<div class="nav-tabs-nav"/>').parent().prepend(k).append(d);c();b(window).resize(function(){if(j){return}j=true;setTimeout(function(){c();j=false},1000)});b.each([{arrow:k,next:"next",last:"first",operator:"+="},{arrow:d,next:"prev",last:"last",operator:"-="}],function(){var n=this;this.arrow.mousedown(function(){var p=l[n.last](),o=function(){if(!p.isTabVisible()){i.animate({"margin-left":n.operator+"90px"},300,"linear",o)}};o()}).mouseup(function(){var p,o;i.stop(true);p=l[n.last]();while((o=p[n.next]())&&o.length&&!o.isTabVisible()){p=o}p.makeTabVisible()})})},eventOnClickEditLink:function(d){var c,e,f=/#(.*)$/.exec(d.href);if(f&&f[1]){c=b("#"+f[1]);e=c.parent();if(0!=e.length){if(e.hasClass("menu-item-edit-inactive")){if(!c.data("menu-item-data")){c.data("menu-item-data",c.getItemData())}c.slideDown("fast");e.removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{c.slideUp("fast");e.removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCancelLink:function(d){var c=b(d).closest(".menu-item-settings");c.setItemData(c.data("menu-item-data"));return false},eventOnClickMenuSave:function(c){var d="";b("#nav-menu-theme-locations select").each(function(){d+='<input type="hidden" name="'+this.name+'" value="'+b(this).val()+'" />'});b("#update-nav-menu").append(d);a.menuList.find(".menu-item-data-position").val(function(e){return e+1});window.onbeforeunload=null;return true},eventOnClickMenuDelete:function(c){if(confirm(navMenuL10n.warnDeleteMenu)){window.onbeforeunload=null;return true}return false},eventOnClickMenuItemDelete:function(c){var d=parseInt(c.id.replace("delete-",""),10);a.removeMenuItem(b("#menu-item-"+d));a.registerChange();return false},processQuickSearchQueryResponse:function(g,m,c){var h,e,j,f={},d=document.getElementById("nav-menu-meta"),l=new RegExp("menu-item\\[([^\\]]*)","g"),k=g.match(/<li>.*<\/li>/g);if(!k){b(".categorychecklist",c).html("<li><p>"+navMenuL10n.noResultsFound+"</p></li>");b("img.waiting",c).hide();return}h=k.length;while(h--){e=l.exec(k[h]);if(e&&e[1]){j=e[1];while(d.elements["menu-item["+j+"][menu-item-type]"]||f[j]){j--}f[j]=true;if(j!=e[1]){k[h]=k[h].replace(new RegExp("menu-item\\["+e[1]+"\\]","g"),"menu-item["+j+"]")}}}b(".categorychecklist",c).html(k.join(""));b("img.waiting",c).hide()},removeMenuItem:function(d){var c=d.childMenuItems();d.addClass("deleting").animate({opacity:0,height:0},350,function(){var e=b("#menu-instructions");d.remove();c.shiftDepthClass(-1).updateParentMenuItemDBId();if(!e.siblings().length){e.removeClass("menu-instructions-inactive")}})},depthToPx:function(c){return c*a.options.menuItemDepthPerLevel},pxToDepth:function(c){return Math.floor(c/a.options.menuItemDepthPerLevel)}};b(document).ready(function(){wpNavMenu.init()})})(jQuery); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/ec96528ee21f08ac8758ceb4b4530d53fccc4f49/nav-menu.js/clean/wp-admin/js/nav-menu.js |
var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){var c=b.slideToggle(150,function(){b.css("display","")}).parent().toggleClass("wp-menu-open").attr("id");if(c){a("li.wp-has-submenu","#adminmenu").each(function(f,g){if(c==g.id){var d=a(g).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+f,d)}})}return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var d=a(this),c=d.val();if(d.attr("checked")){b.checked(c)}else{b.unchecked(c)}columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show();this.colSpanChange(+1)},unchecked:function(b){a(".column-"+b).hide();this.colSpanChange(-1)},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var b=this.id;return b.substring(b,b.length-5)}).get().join(",")}},colSpanChange:function(b){var d=a("table").find(".colspanchange");if(!d.length){return}var c=parseInt(d.attr("colspan"),10)+b;d.attr("colspan",c.toString())}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(d){var f=false,a,e,c,b;d("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");d("div.updated, div.error").not(".below-h2, .inline").insertAfter(d("div.wrap h2:first"));d("#show-settings-link").click(function(){if(!d("#screen-options-wrap").hasClass("screen-options-open")){d("#contextual-help-link-wrap").css("visibility","hidden")}d("#screen-options-wrap").slideToggle("fast",function(){if(d(this).hasClass("screen-options-open")){d("#show-settings-link").css({backgroundPosition:"top right"});d("#contextual-help-link-wrap").css("visibility","");d(this).removeClass("screen-options-open")}else{d("#show-settings-link").css({backgroundPosition:"bottom right"});d(this).addClass("screen-options-open")}});return false});d("#contextual-help-link").click(function(){if(!d("#contextual-help-wrap").hasClass("contextual-help-open")){d("#screen-options-link-wrap").css("visibility","hidden")}d("#contextual-help-wrap").slideToggle("fast",function(){if(d(this).hasClass("contextual-help-open")){d("#contextual-help-link").css({backgroundPosition:"top right"});d("#screen-options-link-wrap").css("visibility","");d(this).removeClass("contextual-help-open")}else{d("#contextual-help-link").css({backgroundPosition:"bottom right"});d(this).addClass("contextual-help-open")}});return false});d("tbody").children().children(".check-column").find(":checkbox").click(function(g){if("undefined"==g.shiftKey){return true}if(g.shiftKey){if(!f){return true}a=d(f).closest("form").find(":checkbox");e=a.index(f);c=a.index(this);b=d(this).attr("checked");if(0<e&&0<c&&e!=c){a.slice(e,c).attr("checked",function(){if(d(this).closest("tr").is(":visible")){return b?"checked":""}return""})}}f=this;return true});d("thead, tfoot").find(".check-column :checkbox").click(function(i){var j=d(this).attr("checked"),h="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,g=i.shiftKey||h;d(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(d(this).closest("tr").is(":hidden")){return""}if(g){return d(this).attr("checked")?"":"checked"}else{if(j){return"checked"}}return""});d(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(g){return""}else{if(j){return"checked"}}return""})});d("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");d("div.default-password-nag").hide();return false});d("#newcontent").keydown(function(l){if(l.keyCode!=9){return true}var i=l.target,n=i.selectionStart,h=i.selectionEnd,m=i.value,g,k;try{this.lastKey=9}catch(j){}if(document.selection){i.focus();k=document.selection.createRange();k.text="\t"}else{if(n>=0){g=this.scrollTop;i.value=m.substring(0,n).concat("\t",m.substring(h));i.selectionStart=i.selectionEnd=n+1;this.scrollTop=g}}if(l.stopPropagation){l.stopPropagation()}if(l.preventDefault){l.preventDefault()}});d("#newcontent").blur(function(g){if(this.lastKey&&9==this.lastKey){this.focus()}})}); | var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){var c=b.slideToggle(150,function(){b.css("display","")}).parent().toggleClass("wp-menu-open").attr("id");if(c){a("li.wp-has-submenu","#adminmenu").each(function(f,g){if(c==g.id){var d=a(g).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+f,d)}})}return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var d=a(this),c=d.val();if(d.attr("checked")){b.checked(c)}else{b.unchecked(c)}columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show();this.colSpanChange(+1)},unchecked:function(b){a(".column-"+b).hide();this.colSpanChange(-1)},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var b=this.id;return b.substring(b,b.length-5)}).get().join(",")}},colSpanChange:function(b){var d=a("table").find(".colspanchange"),c;if(!d.length){return}c=parseInt(d.attr("colspan"),10)+b;d.attr("colspan",c.toString())}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(e){var g=false,b,f,d,c,a=(isRtl?"left":"right");e("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");e("div.updated, div.error").not(".below-h2, .inline").insertAfter(e("div.wrap h2:first"));e("#show-settings-link").click(function(){if(!e("#screen-options-wrap").hasClass("screen-options-open")){e("#contextual-help-link-wrap").css("visibility","hidden")}e("#screen-options-wrap").slideToggle("fast",function(){if(e(this).hasClass("screen-options-open")){e("#show-settings-link").css({backgroundPosition:"top "+a});e("#contextual-help-link-wrap").css("visibility","");e(this).removeClass("screen-options-open")}else{e("#show-settings-link").css({backgroundPosition:"bottom "+a});e(this).addClass("screen-options-open")}});return false});e("#contextual-help-link").click(function(){if(!e("#contextual-help-wrap").hasClass("contextual-help-open")){e("#screen-options-link-wrap").css("visibility","hidden")}e("#contextual-help-wrap").slideToggle("fast",function(){if(e(this).hasClass("contextual-help-open")){e("#contextual-help-link").css({backgroundPosition:"top "+a});e("#screen-options-link-wrap").css("visibility","");e(this).removeClass("contextual-help-open")}else{e("#contextual-help-link").css({backgroundPosition:"bottom "+a});e(this).addClass("contextual-help-open")}});return false});e("tbody").children().children(".check-column").find(":checkbox").click(function(h){if("undefined"==h.shiftKey){return true}if(h.shiftKey){if(!g){return true}b=e(g).closest("form").find(":checkbox");f=b.index(g);d=b.index(this);c=e(this).attr("checked");if(0<f&&0<d&&f!=d){b.slice(f,d).attr("checked",function(){if(e(this).closest("tr").is(":visible")){return c?"checked":""}return""})}}g=this;return true});e("thead, tfoot").find(".check-column :checkbox").click(function(j){var k=e(this).attr("checked"),i="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,h=j.shiftKey||i;e(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(e(this).closest("tr").is(":hidden")){return""}if(h){return e(this).attr("checked")?"":"checked"}else{if(k){return"checked"}}return""});e(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(h){return""}else{if(k){return"checked"}}return""})});e("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");e("div.default-password-nag").hide();return false});e("#newcontent").keydown(function(m){if(m.keyCode!=9){return true}var j=m.target,o=j.selectionStart,i=j.selectionEnd,n=j.value,h,l;try{this.lastKey=9}catch(k){}if(document.selection){j.focus();l=document.selection.createRange();l.text="\t"}else{if(o>=0){h=this.scrollTop;j.value=n.substring(0,o).concat("\t",n.substring(i));j.selectionStart=j.selectionEnd=o+1;this.scrollTop=h}}if(m.stopPropagation){m.stopPropagation()}if(m.preventDefault){m.preventDefault()}});e("#newcontent").blur(function(h){if(this.lastKey&&9==this.lastKey){this.focus()}})}); | var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){var c=b.slideToggle(150,function(){b.css("display","")}).parent().toggleClass("wp-menu-open").attr("id");if(c){a("li.wp-has-submenu","#adminmenu").each(function(f,g){if(c==g.id){var d=a(g).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+f,d)}})}return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var d=a(this),c=d.val();if(d.attr("checked")){b.checked(c)}else{b.unchecked(c)}columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show();this.colSpanChange(+1)},unchecked:function(b){a(".column-"+b).hide();this.colSpanChange(-1)},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var b=this.id;return b.substring(b,b.length-5)}).get().join(",")}},colSpanChange:function(b){var d=a("table").find(".colspanchange");if(!d.length){return}var c=parseInt(d.attr("colspan"),10)+b;d.attr("colspan",c.toString())}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(d){var f=false,a,e,c,b;d("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");d("div.updated, div.error").not(".below-h2, .inline").insertAfter(d("div.wrap h2:first"));d("#show-settings-link").click(function(){if(!d("#screen-options-wrap").hasClass("screen-options-open")){d("#contextual-help-link-wrap").css("visibility","hidden")}d("#screen-options-wrap").slideToggle("fast",function(){if(d(this).hasClass("screen-options-open")){d("#show-settings-link").css({backgroundPosition:"top right"});d("#contextual-help-link-wrap").css("visibility","");d(this).removeClass("screen-options-open")}else{d("#show-settings-link").css({backgroundPosition:"bottom right"});d(this).addClass("screen-options-open")}});return false});d("#contextual-help-link").click(function(){if(!d("#contextual-help-wrap").hasClass("contextual-help-open")){d("#screen-options-link-wrap").css("visibility","hidden")}d("#contextual-help-wrap").slideToggle("fast",function(){if(d(this).hasClass("contextual-help-open")){d("#contextual-help-link").css({backgroundPosition:"top right"});d("#screen-options-link-wrap").css("visibility","");d(this).removeClass("contextual-help-open")}else{d("#contextual-help-link").css({backgroundPosition:"bottom right"});d(this).addClass("contextual-help-open")}});return false});d("tbody").children().children(".check-column").find(":checkbox").click(function(g){if("undefined"==g.shiftKey){return true}if(g.shiftKey){if(!f){return true}a=d(f).closest("form").find(":checkbox");e=a.index(f);c=a.index(this);b=d(this).attr("checked");if(0<e&&0<c&&e!=c){a.slice(e,c).attr("checked",function(){if(d(this).closest("tr").is(":visible")){return b?"checked":""}return""})}}f=this;return true});d("thead, tfoot").find(".check-column :checkbox").click(function(i){var j=d(this).attr("checked"),h="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,g=i.shiftKey||h;d(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(d(this).closest("tr").is(":hidden")){return""}if(g){return d(this).attr("checked")?"":"checked"}else{if(j){return"checked"}}return""});d(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(g){return""}else{if(j){return"checked"}}return""})});d("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");d("div.default-password-nag").hide();return false});d("#newcontent").keydown(function(l){if(l.keyCode!=9){return true}var i=l.target,n=i.selectionStart,h=i.selectionEnd,m=i.value,g,k;try{this.lastKey=9}catch(j){}if(document.selection){i.focus();k=document.selection.createRange();k.text="\t"}else{if(n>=0){g=this.scrollTop;i.value=m.substring(0,n).concat("\t",m.substring(h));i.selectionStart=i.selectionEnd=n+1;this.scrollTop=g}}if(l.stopPropagation){l.stopPropagation()}if(l.preventDefault){l.preventDefault()}});d("#newcontent").blur(function(g){if(this.lastKey&&9==this.lastKey){this.focus()}})}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/cc52f289d0320f5c7ec85cfa9d90b7a5108980f2/common.js/clean/wp-admin/js/common.js |
var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachAddMenuItemListeners();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){return a.pxToDepth(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var h=f.exec(b(this).attr("name")),i="undefined"==typeof h[1]?0:parseInt(h[1],10);d[i]=a.getListDataFromID(i)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId()},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-close")){return c.eventOnClickCloseLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachAddMenuItemListeners:function(){var c=b("#nav-menu-meta");c.find(".add-to-menu input").click(function(){a.registerChange();b(this).trigger("wp-add-menu-item",[a.addMenuItemToBottom]);return false});c.find(".customlinkdiv").bind("wp-add-menu-item",function(f,d){a.addCustomLink(d)});c.find(".posttypediv, .taxonomydiv").bind("wp-add-menu-item",function(f,d){b(this).addSelectedToMenu(d)})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={action:"menu-locations-save","menu-locations":d.find("select").serialize(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val()};d.find("input[type=submit]").click(function(){d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachAddMenuItemListeners();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){return a.pxToDepth(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var h=f.exec(b(this).attr("name")),i="undefined"==typeof h[1]?0:parseInt(h[1],10);d[i]=a.getListDataFromID(i)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-close")){return c.eventOnClickCloseLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachAddMenuItemListeners:function(){var c=b("#nav-menu-meta");c.find(".add-to-menu input").click(function(){a.registerChange();b(this).trigger("wp-add-menu-item",[a.addMenuItemToBottom]);return false});c.find(".customlinkdiv").bind("wp-add-menu-item",function(f,d){a.addCustomLink(d)});c.find(".posttypediv, .taxonomydiv").bind("wp-add-menu-item",function(f,d){b(this).addSelectedToMenu(d)})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={action:"menu-locations-save","menu-locations":d.find("select").serialize(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val()};d.find("input[type=submit]").click(function(){d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachAddMenuItemListeners();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){return a.pxToDepth(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var h=f.exec(b(this).attr("name")),i="undefined"==typeof h[1]?0:parseInt(h[1],10);d[i]=a.getListDataFromID(i)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId()},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-close")){return c.eventOnClickCloseLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachAddMenuItemListeners:function(){var c=b("#nav-menu-meta");c.find(".add-to-menu input").click(function(){a.registerChange();b(this).trigger("wp-add-menu-item",[a.addMenuItemToBottom]);return false});c.find(".customlinkdiv").bind("wp-add-menu-item",function(f,d){a.addCustomLink(d)});c.find(".posttypediv, .taxonomydiv").bind("wp-add-menu-item",function(f,d){b(this).addSelectedToMenu(d)})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={action:"menu-locations-save","menu-locations":d.find("select").serialize(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val()};d.find("input[type=submit]").click(function(){d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http://"==e){return false}b(".customlinkdiv img.waiting").show();this.addLinkToMenu(e,d,c,function(){b(".customlinkdiv img.waiting").hide();b("#custom-menu-item-name").val("").blur();b("#custom-menu-item-url").val("http://")})},addLinkToMenu:function(e,d,c,f){c=c||a.addMenuItemToBottom;f=f||function(){};a.addItemToMenu({"-1":{"menu-item-type":"custom","menu-item-url":e,"menu-item-title":d}},c,f)},addItemToMenu:function(e,c,g){var f=b("#menu").val(),d=b("#menu-settings-column-nonce").val();c=c||function(){};g=g||function(){};params={action:"add-menu-item",menu:f,"menu-settings-column-nonce":d,"menu-item":e};b.post(ajaxurl,params,function(h){c(h,params);g()})},addMenuItemToBottom:function(c,d){b(c).hideAdvancedMenuItemFields().appendTo(a.targetList)},addMenuItemToTop:function(c,d){b(c).hideAdvancedMenuItemFields().prependTo(a.targetList)},attachHomeLinkListener:function(){b(".add-home-link",".customlinkdiv").click(function(c){a.addLinkToMenu(navMenuL10n.homeurl,navMenuL10n.home,a.addMenuItemToTop);return false})},attachUnsavedChangesListener:function(){b("#menu-management input, #menu-management select, #menu-management, #menu-management textarea").change(function(){a.registerChange()});window.onbeforeunload=function(){if(a.menusChanged){return navMenuL10n.saveAlert}};b("input.menu-save, input.save-menu-item").click(function(){window.onbeforeunload=null})},registerChange:function(){a.menusChanged=true},attachTabsPanelListeners:function(){b("#menu-settings-column").bind("click",function(h){var f,i,d,j,c,g=b(h.target);if(g.hasClass("nav-tab-link")){d=/#(.*)$/.exec(h.target.href);if(d&&d[1]){d=d[1]}else{return false}j=g.parents(".inside").first();b("input",j).removeAttr("checked");b(".tabs-panel-active",j).removeClass("tabs-panel-active").addClass("tabs-panel-inactive");b("#"+d,j).removeClass("tabs-panel-inactive").addClass("tabs-panel-active");b(".tabs",j).removeClass("tabs");g.parent().addClass("tabs");b(".quick-search",j).focus();return false}else{if(g.hasClass("select-all")){f=/#(.*)$/.exec(h.target.href);if(f&&f[1]){c=b("#"+f[1]+" .tabs-panel-active .menu-item-title input");if(c.length===c.filter(":checked").length){c.removeAttr("checked")}else{c.attr("checked","checked")}return false}}}})},initTabManager:function(){var h=b(".nav-tabs-wrapper"),i=h.children(".nav-tabs"),g=i.children(".nav-tab-active"),l=i.children(".nav-tab"),e=0,m,f,k,d,j=false;function c(){f=h.offset().left;m=f+h.width();g.makeTabVisible()}b.fn.extend({makeTabVisible:function(){var o=this.eq(0),p,n;if(!o.length){return}p=o.offset().left;n=p+o.outerWidth();if(n>m){i.animate({"margin-left":"+="+(m-n)+"px"},"fast")}else{if(p<f){i.animate({"margin-left":"-="+(p-f)+"px"},"fast")}}return o},isTabVisible:function(){var o=this.eq(0),p=o.offset().left,n=p+o.outerWidth();return(n<=m&&p>=f)?true:false}});l.each(function(){e+=b(this).outerWidth(true)});if(e<=h.width()-i.css("padding-left").slice(0,-2)-i.css("padding-right").slice(0,-2)){return}i.css({"margin-right":(-1*e)+"px",padding:0});k=b('<div class="nav-tabs-arrow nav-tabs-arrow-left"><a>«</a></div>');d=b('<div class="nav-tabs-arrow nav-tabs-arrow-right"><a>»</a></div>');h.wrap('<div class="nav-tabs-nav"/>').parent().prepend(k).append(d);c();b(window).resize(function(){if(j){return}j=true;setTimeout(function(){c();j=false},1000)});b.each([{arrow:k,next:"next",last:"first",operator:"+="},{arrow:d,next:"prev",last:"last",operator:"-="}],function(){var n=this;this.arrow.mousedown(function(){var p=l[n.last](),o=function(){if(!p.isTabVisible()){i.animate({"margin-left":n.operator+"90px"},300,"linear",o)}};o()}).mouseup(function(){var p,o;i.stop(true);p=l[n.last]();while((o=p[n.next]())&&o.length&&!o.isTabVisible()){p=o}p.makeTabVisible()})})},eventOnClickEditLink:function(c){var e,d=/#(.*)$/.exec(c.href);if(d&&d[1]){e=b("#"+d[1]);if(0!=e.length){if(e.hasClass("menu-item-edit-inactive")){e.slideDown("fast").siblings("dl").andSelf().removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{e.slideUp("fast").siblings("dl").andSelf().removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCloseLink:function(c){b(c).closest(".menu-item-settings").siblings("dl").find(".item-edit").click();return false},eventOnClickMenuSave:function(c){a.menuList.find(".menu-item-data-position").val(function(d){return d+1});return true},eventOnClickMenuDelete:function(c){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(c){var f,e,d=this;e=/_wpnonce=([a-zA-Z0-9]*)$/.exec(c.href);if(e&&e[1]){f=parseInt(c.id.replace("delete-",""),10);b.post(ajaxurl,{action:"delete-menu-item","menu-item":f,_wpnonce:e[1]},function(g){if("1"==g){d.removeMenuItem(document.getElementById("menu-item-"+f))}});return false}return true},processQuickSearchQueryResponse:function(g,m,c){var h,e,j,f={},d=document.getElementById("nav-menu-meta"),l=new RegExp("menu-item\\[([^\\]]*)","g"),k=g.match(/<li>.*<\/li>/g);if(!k){b(".categorychecklist",c).html("<li><p>"+navMenuL10n.noResultsFound+"</p></li>");b("img.waiting",c).hide();return}h=k.length;while(h--){e=l.exec(k[h]);if(e&&e[1]){j=e[1];while(d.elements["menu-item["+j+"][menu-item-type]"]||f[j]){j--}f[j]=true;if(j!=e[1]){k[h]=k[h].replace(new RegExp("menu-item\\["+e[1]+"\\]","g"),"menu-item["+j+"]")}}}b(".categorychecklist",c).html(k.join(""));b("img.waiting",c).hide()},removeMenuItem:function(d){d=b(d);var c=d.childMenuItems(),e=this;d.addClass("deleting").fadeOut(350,function(){d.remove();c.shiftDepthClass(-1).updateParentMenuItemDBId()})},getListDataFromID:function(k,h){if(!k){return false}h=h||document;var d=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],c={},e=h.getElementsByTagName("input"),g=e.length,f;while(g--){f=d.length;while(f--){if(e[g]&&e[g].name&&"menu-item["+k+"]["+d[f]+"]"==e[g].name){c[d[f]]=e[g].value}}}return c},depthToPx:function(c){return c*a.options.menuItemDepthPerLevel},pxToDepth:function(c){return Math.floor(c/a.options.menuItemDepthPerLevel)}};b(document).ready(function(){wpNavMenu.init()})})(jQuery); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/eb6db44fb939591715d6759ad47e575bf2968d6e/nav-menu.js/buggy/wp-admin/js/nav-menu.js |
var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,isRTL:!!("undefined"!=typeof isRtl&&isRtl),init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){var c=a.isRTL?this.eq(0).css("margin-right"):this.eq(0).css("margin-left");return a.pxToDepth(c&&-1!=c.indexOf("px")?c.slice(0,-2):0)},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(!d[0]||!d[0].className||-1==d[0].className.indexOf("menu-item")||(d.menuItemDepth()!=f-1)){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var i=b(this),h=f.exec(i.attr("name")),j="undefined"==typeof h[1]?0:parseInt(h[1],10);if(this.className&&-1!=this.className.indexOf("add-to-top")){c=a.addMenuItemToTop}d[j]=i.closest("li").getItemData("add-menu-item",j)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})},getItemData:function(f,g){f=f||"menu-item";var d={},e,c=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!g&&f=="menu-item"){g=this.find(".menu-item-data-db-id").val()}if(!g){return d}this.find("input").each(function(){var h;e=c.length;while(e--){if(f=="menu-item"){h=c[e]+"["+g+"]"}else{if(f=="add-menu-item"){h="menu-item["+g+"]["+c[e]+"]"}}if(this.name&&h==this.name){d[c[e]]=this.value}}});return d},setItemData:function(c,d,e){d=d||"menu-item";if(!e&&d=="menu-item"){e=b(".menu-item-data-db-id",this).val()}if(!e){return this}this.find("input").each(function(){var f=b(this),g;b.each(c,function(h,i){if(d=="menu-item"){g=h+"["+e+"]"}else{if(d=="add-menu-item"){g="menu-item["+e+"]["+h+"]"}}if(g==f.attr("name")){f.val(i)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;if(a.isRTL){v.item[0].style.right="auto"}g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0;if(a.isRTL){r.item[0].style.left="auto";r.item[0].style.right=0}},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=(a.isRTL?-1:1)*a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-cancel")){return c.eventOnClickCancelLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function($){var api=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,isRTL:!!("undefined"!=typeof isRtl&&isRtl),init:function(){api.menuList=$("#menu-to-edit");api.targetList=api.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachUnsavedChangesListener();if(api.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){$.fn.extend({menuItemDepth:function(){var margin=api.isRTL?this.eq(0).css("margin-right"):this.eq(0).css("margin-left");return api.pxToDepth(margin&&-1!=margin.indexOf("px")?margin.slice(0,-2):0)},updateDepthClass:function(current,prev){return this.each(function(){var t=$(this);prev=prev||t.menuItemDepth();$(this).removeClass("menu-item-depth-"+prev).addClass("menu-item-depth-"+current)})},shiftDepthClass:function(change){return this.each(function(){var t=$(this),depth=t.menuItemDepth();$(this).removeClass("menu-item-depth-"+depth).addClass("menu-item-depth-"+(depth+change))})},childMenuItems:function(){var result=$();this.each(function(){var t=$(this),depth=t.menuItemDepth(),next=t.next();while(next.length&&next.menuItemDepth()>depth){result=result.add(next);next=next.next()}});return result},updateParentMenuItemDBId:function(){return this.each(function(){var item=$(this),input=item.find(".menu-item-data-parent-id"),depth=item.menuItemDepth(),parent=item.prev();if(depth==0){input.val(0)}else{while(!parent[0]||!parent[0].className||-1==parent[0].className.indexOf("menu-item")||(parent.menuItemDepth()!=depth-1)){parent=parent.prev()}input.val(parent.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var that=$(this);$(".hide-column-tog").not(":checked").each(function(){that.find(".field-"+$(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(processMethod){if(0==$("#menu-to-edit").length){return false}return this.each(function(){var t=$(this),menuItems={},checkboxes=t.find(".tabs-panel-active .categorychecklist li input:checked"),re=new RegExp("menu-item\\[([^\\]]*)");processMethod=processMethod||api.addMenuItemToBottom;if(!checkboxes.length){return false}t.find("img.waiting").show();$(checkboxes).each(function(){var t=$(this),listItemDBIDMatch=re.exec(t.attr("name")),listItemDBID="undefined"==typeof listItemDBIDMatch[1]?0:parseInt(listItemDBIDMatch[1],10);if(this.className&&-1!=this.className.indexOf("add-to-top")){processMethod=api.addMenuItemToTop}menuItems[listItemDBID]=t.closest("li").getItemData("add-menu-item",listItemDBID)});api.addItemToMenu(menuItems,processMethod,function(){checkboxes.removeAttr("checked");t.find("img.waiting").hide()})})},getItemData:function(itemType,id){itemType=itemType||"menu-item";var itemData={},i,fields=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!id&&itemType=="menu-item"){id=this.find(".menu-item-data-db-id").val()}if(!id){return itemData}this.find("input").each(function(){var field;i=fields.length;while(i--){if(itemType=="menu-item"){field=fields[i]+"["+id+"]"}else{if(itemType=="add-menu-item"){field="menu-item["+id+"]["+fields[i]+"]"}}if(this.name&&field==this.name){itemData[fields[i]]=this.value}}});return itemData},setItemData:function(itemData,itemType,id){itemType=itemType||"menu-item";if(!id&&itemType=="menu-item"){id=$(".menu-item-data-db-id",this).val()}if(!id){return this}this.find("input").each(function(){var t=$(this),field;$.each(itemData,function(attr,val){if(itemType=="menu-item"){field=attr+"["+id+"]"}else{if(itemType=="add-menu-item"){field="menu-item["+id+"]["+attr+"]"}}if(field==t.attr("name")){t.val(val)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(field){$(".field-"+field).removeClass("hidden-field")};columns.unchecked=function(field){$(".field-"+field).addClass("hidden-field")};api.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var currentDepth=0,originalDepth,minDepth,maxDepth,prev,next,prevBottom,nextThreshold,helperHeight,transport,menuLeft=api.menuList.offset().left;api.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(e,ui){var height,width,parent,children,maxChildDepth,tempHolder;if(api.isRTL){ui.item[0].style.right="auto"}transport=ui.item.children(".menu-item-transport");originalDepth=ui.item.menuItemDepth();updateCurrentDepth(ui,originalDepth);parent=(ui.item.next()[0]==ui.placeholder[0])?ui.item.next():ui.item;children=parent.childMenuItems();transport.append(children);height=transport.outerHeight();height+=(height>0)?(ui.placeholder.css("margin-top").slice(0,-2)*1):0;height+=ui.helper.outerHeight();helperHeight=height;height-=2;ui.placeholder.height(height);maxChildDepth=originalDepth;children.each(function(){var depth=$(this).menuItemDepth();maxChildDepth=(depth>maxChildDepth)?depth:maxChildDepth});width=ui.helper.find(".menu-item-handle").outerWidth();width+=api.depthToPx(maxChildDepth-originalDepth);width-=2;ui.placeholder.width(width);tempHolder=ui.placeholder.next();tempHolder.css("margin-top",helperHeight+"px");ui.placeholder.detach();$(this).sortable("refresh");ui.item.after(ui.placeholder);tempHolder.css("margin-top",0);updateSharedVars(ui)},stop:function(e,ui){var children,depthChange=currentDepth-originalDepth;children=transport.children().insertAfter(ui.item);if(depthChange!=0){ui.item.updateDepthClass(currentDepth);children.shiftDepthClass(depthChange);api.registerChange()}ui.item.updateParentMenuItemDBId();ui.item[0].style.top=0;if(api.isRTL){ui.item[0].style.left="auto";ui.item[0].style.right=0}},change:function(e,ui){if(!ui.placeholder.parent().hasClass("menu")){(prev.length)?prev.after(ui.placeholder):api.menuList.prepend(ui.placeholder)}updateSharedVars(ui)},sort:function(e,ui){var offset=ui.helper.offset(),depth=(api.isRTL?-1:1)*api.pxToDepth(offset.left-menuLeft);if(depth>maxDepth||offset.top<prevBottom){depth=maxDepth}else{if(depth<minDepth){depth=minDepth}}if(depth!=currentDepth){updateCurrentDepth(ui,depth)}if(nextThreshold&&offset.top+helperHeight>nextThreshold){next.after(ui.placeholder);updateSharedVars(ui);$(this).sortable("refreshPositions")}},update:function(e,ui){api.registerChange()}});function updateSharedVars(ui){var depth;prev=ui.placeholder.prev();next=ui.placeholder.next();if(prev[0]==ui.item[0]){prev=prev.prev()}if(next[0]==ui.item[0]){next=next.next()}prevBottom=(prev.length)?prev.offset().top+prev.height():0;nextThreshold=(next.length)?next.offset().top+next.height()/3:0;minDepth=(next.length)?next.menuItemDepth():0;if(prev.length){maxDepth=((depth=prev.menuItemDepth()+1)>api.options.globalMaxDepth)?api.options.globalMaxDepth:depth}else{maxDepth=0}}function updateCurrentDepth(ui,depth){ui.placeholder.updateDepthClass(depth,currentDepth);currentDepth=depth}},attachMenuEditListeners:function(){var that=this;$("#update-nav-menu").bind("click",function(e){if(e.target&&e.target.className){if(-1!=e.target.className.indexOf("item-edit")){return that.eventOnClickEditLink(e.target)}else{if(-1!=e.target.className.indexOf("menu-save")){return that.eventOnClickMenuSave(e.target)}else{if(-1!=e.target.className.indexOf("menu-delete")){return that.eventOnClickMenuDelete(e.target)}else{if(-1!=e.target.className.indexOf("item-delete")){return that.eventOnClickMenuItemDelete(e.target)}else{if(-1!=e.target.className.indexOf("item-cancel")){return that.eventOnClickCancelLink(e.target)}}}}}}})},setupInputWithDefaultTitle:function(){var name="input-with-default-title";$("."+name).each(function(){var $t=$(this),title=$t.attr("title"),val=$t.val();$t.data(name,title);if(""==val){$t.val(title)}else{if(title==val){return}else{$t.removeClass(name)}}}).focus(function(){var $t=$(this);if($t.val()==$t.data(name)){$t.val("").removeClass(name)}}).blur(function(){var $t=$(this);if(""==$t.val()){$t.addClass(name).val($t.data(name))}})},attachThemeLocationsListeners:function(){var loc=$("#nav-menu-theme-locations"),params={};params.action="menu-locations-save";params["menu-settings-column-nonce"]=$("#menu-settings-column-nonce").val();loc.find("input[type=submit]").click(function(){loc.find("select").each(function(){params[this.name]=$(this).val()});loc.find(".waiting").show();$.post(ajaxurl,params,function(r){loc.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var searchTimer;$(".quick-search").keypress(function(e){var t=$(this);if(13==e.which){api.updateQuickSearchResults(t);return false}if(searchTimer){clearTimeout(searchTimer)}searchTimer=setTimeout(function(){api.updateQuickSearchResults(t)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(input){var panel,params,minSearchLength=2,q=input.val();if(q.length<minSearchLength){return}panel=input.parents(".tabs-panel");params={action:"menu-quick-search","response-format":"markup",menu:$("#menu").val(),"menu-settings-column-nonce":$("#menu-settings-column-nonce").val(),q:q,type:input.attr("name")};$("img.waiting",panel).show();$.post(ajaxurl,params,function(menuMarkup){api.processQuickSearchQueryResponse(menuMarkup,params,panel)})},addCustomLink:function(processMethod){var url=$("#custom-menu-item-url").val(),label=$("#custom-menu-item-name").val();processMethod=processMethod||api.addMenuItemToBottom;if(""==url||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,isRTL:!!("undefined"!=typeof isRtl&&isRtl),init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){var c=a.isRTL?this.eq(0).css("margin-right"):this.eq(0).css("margin-left");return a.pxToDepth(c&&-1!=c.indexOf("px")?c.slice(0,-2):0)},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(!d[0]||!d[0].className||-1==d[0].className.indexOf("menu-item")||(d.menuItemDepth()!=f-1)){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var i=b(this),h=f.exec(i.attr("name")),j="undefined"==typeof h[1]?0:parseInt(h[1],10);if(this.className&&-1!=this.className.indexOf("add-to-top")){c=a.addMenuItemToTop}d[j]=i.closest("li").getItemData("add-menu-item",j)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})},getItemData:function(f,g){f=f||"menu-item";var d={},e,c=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!g&&f=="menu-item"){g=this.find(".menu-item-data-db-id").val()}if(!g){return d}this.find("input").each(function(){var h;e=c.length;while(e--){if(f=="menu-item"){h=c[e]+"["+g+"]"}else{if(f=="add-menu-item"){h="menu-item["+g+"]["+c[e]+"]"}}if(this.name&&h==this.name){d[c[e]]=this.value}}});return d},setItemData:function(c,d,e){d=d||"menu-item";if(!e&&d=="menu-item"){e=b(".menu-item-data-db-id",this).val()}if(!e){return this}this.find("input").each(function(){var f=b(this),g;b.each(c,function(h,i){if(d=="menu-item"){g=h+"["+e+"]"}else{if(d=="add-menu-item"){g="menu-item["+e+"]["+h+"]"}}if(g==f.attr("name")){f.val(i)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;if(a.isRTL){v.item[0].style.right="auto"}g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0;if(a.isRTL){r.item[0].style.left="auto";r.item[0].style.right=0}},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=(a.isRTL?-1:1)*a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-cancel")){return c.eventOnClickCancelLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http://"==e){return false}b(".customlinkdiv img.waiting").show();this.addLinkToMenu(e,d,c,function(){b(".customlinkdiv img.waiting").hide();b("#custom-menu-item-name").val("").blur();b("#custom-menu-item-url").val("http://")})},addLinkToMenu:function(e,d,c,f){c=c||a.addMenuItemToBottom;f=f||function(){};a.addItemToMenu({"-1":{"menu-item-type":"custom","menu-item-url":e,"menu-item-title":d}},c,f)},addItemToMenu:function(e,c,g){var f=b("#menu").val(),d=b("#menu-settings-column-nonce").val();c=c||function(){};g=g||function(){};params={action:"add-menu-item",menu:f,"menu-settings-column-nonce":d,"menu-item":e};b.post(ajaxurl,params,function(h){var i=b("#menu-instructions");c(h,params);if(!i.hasClass("menu-instructions-inactive")&&i.siblings().length){i.addClass("menu-instructions-inactive")}g()})},addMenuItemToBottom:function(c,d){b(c).hideAdvancedMenuItemFields().appendTo(a.targetList)},addMenuItemToTop:function(c,d){b(c).hideAdvancedMenuItemFields().prependTo(a.targetList)},attachUnsavedChangesListener:function(){b("#menu-management input, #menu-management select, #menu-management, #menu-management textarea").change(function(){a.registerChange()});window.onbeforeunload=function(){if(a.menusChanged){return navMenuL10n.saveAlert}}},registerChange:function(){a.menusChanged=true},attachTabsPanelListeners:function(){b("#menu-settings-column").bind("click",function(h){var f,d,i,c,g=b(h.target);if(g.hasClass("nav-tab-link")){d=/#(.*)$/.exec(h.target.href);if(d&&d[1]){d=d[1]}else{return false}i=g.parents(".inside").first();b("input",i).removeAttr("checked");b(".tabs-panel-active",i).removeClass("tabs-panel-active").addClass("tabs-panel-inactive");b("#"+d,i).removeClass("tabs-panel-inactive").addClass("tabs-panel-active");b(".tabs",i).removeClass("tabs");g.parent().addClass("tabs");b(".quick-search",i).focus();return false}else{if(g.hasClass("select-all")){f=/#(.*)$/.exec(h.target.href);if(f&&f[1]){c=b("#"+f[1]+" .tabs-panel-active .menu-item-title input");if(c.length===c.filter(":checked").length){c.removeAttr("checked")}else{c.attr("checked","checked")}return false}}else{if(g.hasClass("submit-add-to-menu")){a.registerChange();if(h.target.id&&"submit-customlinkdiv"==h.target.id){a.addCustomLink(a.addMenuItemToBottom)}else{if(h.target.id&&-1!=h.target.id.indexOf("submit-")){b("#"+h.target.id.replace(/submit-/,"")).addSelectedToMenu(a.addMenuItemToBottom)}}return false}else{if(g.hasClass("page-numbers")){b.post(ajaxurl,h.target.href.replace(/.*\?/,"").replace(/action=([^&]*)/,"")+"&action=menu-get-metabox",function(m){if(-1==m.indexOf("replace-id")){return}var l=b.parseJSON(m),e=document.getElementById(l["replace-id"]),k=document.createElement("div"),j=document.createElement("div");if(!l.markup||!e){return}j.innerHTML=l.markup?l.markup:"";e.parentNode.insertBefore(k,e);k.parentNode.removeChild(e);k.parentNode.insertBefore(j,k);k.parentNode.removeChild(k)});return false}}}}})},initTabManager:function(){var h=b(".nav-tabs-wrapper"),i=h.children(".nav-tabs"),g=i.children(".nav-tab-active"),l=i.children(".nav-tab"),e=0,m,f,k,d,j=false;function c(){f=h.offset().left;m=f+h.width();g.makeTabVisible()}b.fn.extend({makeTabVisible:function(){var o=this.eq(0),p,n;if(!o.length){return}p=o.offset().left;n=p+o.outerWidth();if(n>m){i.animate({"margin-left":"+="+(m-n)+"px"},"fast")}else{if(p<f){i.animate({"margin-left":"-="+(p-f)+"px"},"fast")}}return o},isTabVisible:function(){var o=this.eq(0),p=o.offset().left,n=p+o.outerWidth();return(n<=m&&p>=f)?true:false}});l.each(function(){e+=b(this).outerWidth(true)});if(e<=h.width()-i.css("padding-left").slice(0,-2)-i.css("padding-right").slice(0,-2)){return}i.css({"margin-right":(-1*e)+"px",padding:0});k=b('<div class="nav-tabs-arrow nav-tabs-arrow-left"><a>«</a></div>');d=b('<div class="nav-tabs-arrow nav-tabs-arrow-right"><a>»</a></div>');h.wrap('<div class="nav-tabs-nav"/>').parent().prepend(k).append(d);c();b(window).resize(function(){if(j){return}j=true;setTimeout(function(){c();j=false},1000)});b.each([{arrow:k,next:"next",last:"first",operator:"+="},{arrow:d,next:"prev",last:"last",operator:"-="}],function(){var n=this;this.arrow.mousedown(function(){var p=l[n.last](),o=function(){if(!p.isTabVisible()){i.animate({"margin-left":n.operator+"90px"},300,"linear",o)}};o()}).mouseup(function(){var p,o;i.stop(true);p=l[n.last]();while((o=p[n.next]())&&o.length&&!o.isTabVisible()){p=o}p.makeTabVisible()})})},eventOnClickEditLink:function(d){var c,e,f=/#(.*)$/.exec(d.href);if(f&&f[1]){c=b("#"+f[1]);e=c.parent();if(0!=e.length){if(e.hasClass("menu-item-edit-inactive")){if(!c.data("menu-item-data")){c.data("menu-item-data",c.getItemData())}c.slideDown("fast");e.removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{c.slideUp("fast");e.removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCancelLink:function(d){var c=b(d).closest(".menu-item-settings");c.setItemData(c.data("menu-item-data"));return false},eventOnClickMenuSave:function(c){var d="";b("#nav-menu-theme-locations select").each(function(){d+='<input type="hidden" name="'+this.name+'" value="'+b(this).val()+'" />'});b("#update-nav-menu").append(d);a.menuList.find(".menu-item-data-position").val(function(e){return e+1});window.onbeforeunload=null;return true},eventOnClickMenuDelete:function(c){if(confirm(navMenuL10n.warnDeleteMenu)){window.onbeforeunload=null;return true}return false},eventOnClickMenuItemDelete:function(c){var d=parseInt(c.id.replace("delete-",""),10);a.removeMenuItem(b("#menu-item-"+d));a.registerChange();return false},processQuickSearchQueryResponse:function(g,m,c){var h,e,j,f={},d=document.getElementById("nav-menu-meta"),l=new RegExp("menu-item\\[([^\\]]*)","g"),k=g.match(/<li>.*<\/li>/g);if(!k){b(".categorychecklist",c).html("<li><p>"+navMenuL10n.noResultsFound+"</p></li>");b("img.waiting",c).hide();return}h=k.length;while(h--){e=l.exec(k[h]);if(e&&e[1]){j=e[1];while(d.elements["menu-item["+j+"][menu-item-type]"]||f[j]){j--}f[j]=true;if(j!=e[1]){k[h]=k[h].replace(new RegExp("menu-item\\["+e[1]+"\\]","g"),"menu-item["+j+"]")}}}b(".categorychecklist",c).html(k.join(""));b("img.waiting",c).hide()},removeMenuItem:function(d){var c=d.childMenuItems();d.addClass("deleting").animate({opacity:0,height:0},350,function(){var e=b("#menu-instructions");d.remove();c.shiftDepthClass(-1).updateParentMenuItemDBId();if(!e.siblings().length){e.removeClass("menu-instructions-inactive")}})},depthToPx:function(c){return c*a.options.menuItemDepthPerLevel},pxToDepth:function(c){return Math.floor(c/a.options.menuItemDepthPerLevel)}};b(document).ready(function(){wpNavMenu.init()})})(jQuery); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/aee81d94139b5d498f71d75891c46cc19a161146/nav-menu.js/clean/wp-admin/js/nav-menu.js |
var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachAddMenuItemListeners();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){var c=this.eq(0).css("margin-left");return a.pxToDepth(c&&-1!=c.indexOf("px")?c.slice(0,-2):0)},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var i=b(this),h=f.exec(i.attr("name")),j="undefined"==typeof h[1]?0:parseInt(h[1],10);d[j]=i.closest("li").getItemData("add-menu-item",j)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})},getItemData:function(f,g){f=f||"menu-item";var d={},e,c=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!g&&f=="menu-item"){g=this.find(".menu-item-data-db-id").val()}if(!g){return d}this.find("input").each(function(){var h;e=c.length;while(e--){if(f=="menu-item"){h=c[e]+"["+g+"]"}else{if(f=="add-menu-item"){h="menu-item["+g+"]["+c[e]+"]"}}if(this.name&&h==this.name){d[c[e]]=this.value}}});return d},setItemData:function(c,d,e){d=d||"menu-item";if(!e&&d=="menu-item"){e=b(".menu-item-data-db-id",this).val()}if(!e){return this}this.find("input").each(function(){var f=b(this),g;b.each(c,function(h,i){if(d=="menu-item"){g=h+"["+e+"]"}else{if(d=="add-menu-item"){g="menu-item["+e+"]["+h+"]"}}if(g==f.attr("name")){f.val(i)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-cancel")){return c.eventOnClickCancelLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachAddMenuItemListeners:function(){var c=b("#nav-menu-meta");c.find(".add-to-menu input").click(function(){a.registerChange();b(this).trigger("wp-add-menu-item",[a.addMenuItemToBottom]);return false});c.find(".customlinkdiv").bind("wp-add-menu-item",function(f,d){a.addCustomLink(d)});c.find(".posttypediv, .taxonomydiv").bind("wp-add-menu-item",function(f,d){b(this).addSelectedToMenu(d)})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){var c=this.eq(0).css("margin-left");return a.pxToDepth(c&&-1!=c.indexOf("px")?c.slice(0,-2):0)},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var i=b(this),h=f.exec(i.attr("name")),j="undefined"==typeof h[1]?0:parseInt(h[1],10);d[j]=i.closest("li").getItemData("add-menu-item",j)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})},getItemData:function(f,g){f=f||"menu-item";var d={},e,c=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!g&&f=="menu-item"){g=this.find(".menu-item-data-db-id").val()}if(!g){return d}this.find("input").each(function(){var h;e=c.length;while(e--){if(f=="menu-item"){h=c[e]+"["+g+"]"}else{if(f=="add-menu-item"){h="menu-item["+g+"]["+c[e]+"]"}}if(this.name&&h==this.name){d[c[e]]=this.value}}});return d},setItemData:function(c,d,e){d=d||"menu-item";if(!e&&d=="menu-item"){e=b(".menu-item-data-db-id",this).val()}if(!e){return this}this.find("input").each(function(){var f=b(this),g;b.each(c,function(h,i){if(d=="menu-item"){g=h+"["+e+"]"}else{if(d=="add-menu-item"){g="menu-item["+e+"]["+h+"]"}}if(g==f.attr("name")){f.val(i)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-cancel")){return c.eventOnClickCancelLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachAddMenuItemListeners();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){var c=this.eq(0).css("margin-left");return a.pxToDepth(c&&-1!=c.indexOf("px")?c.slice(0,-2):0)},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var i=b(this),h=f.exec(i.attr("name")),j="undefined"==typeof h[1]?0:parseInt(h[1],10);d[j]=i.closest("li").getItemData("add-menu-item",j)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})},getItemData:function(f,g){f=f||"menu-item";var d={},e,c=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!g&&f=="menu-item"){g=this.find(".menu-item-data-db-id").val()}if(!g){return d}this.find("input").each(function(){var h;e=c.length;while(e--){if(f=="menu-item"){h=c[e]+"["+g+"]"}else{if(f=="add-menu-item"){h="menu-item["+g+"]["+c[e]+"]"}}if(this.name&&h==this.name){d[c[e]]=this.value}}});return d},setItemData:function(c,d,e){d=d||"menu-item";if(!e&&d=="menu-item"){e=b(".menu-item-data-db-id",this).val()}if(!e){return this}this.find("input").each(function(){var f=b(this),g;b.each(c,function(h,i){if(d=="menu-item"){g=h+"["+e+"]"}else{if(d=="add-menu-item"){g="menu-item["+e+"]["+h+"]"}}if(g==f.attr("name")){f.val(i)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-cancel")){return c.eventOnClickCancelLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachAddMenuItemListeners:function(){var c=b("#nav-menu-meta");c.find(".add-to-menu input").click(function(){a.registerChange();b(this).trigger("wp-add-menu-item",[a.addMenuItemToBottom]);return false});c.find(".customlinkdiv").bind("wp-add-menu-item",function(f,d){a.addCustomLink(d)});c.find(".posttypediv, .taxonomydiv").bind("wp-add-menu-item",function(f,d){b(this).addSelectedToMenu(d)})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http://"==e){return false}b(".customlinkdiv img.waiting").show();this.addLinkToMenu(e,d,c,function(){b(".customlinkdiv img.waiting").hide();b("#custom-menu-item-name").val("").blur();b("#custom-menu-item-url").val("http://")})},addLinkToMenu:function(e,d,c,f){c=c||a.addMenuItemToBottom;f=f||function(){};a.addItemToMenu({"-1":{"menu-item-type":"custom","menu-item-url":e,"menu-item-title":d}},c,f)},addItemToMenu:function(e,c,g){var f=b("#menu").val(),d=b("#menu-settings-column-nonce").val();c=c||function(){};g=g||function(){};params={action:"add-menu-item",menu:f,"menu-settings-column-nonce":d,"menu-item":e};b.post(ajaxurl,params,function(h){var i=b("#menu-instructions");c(h,params);if(!i.hasClass("menu-instructions-inactive")&&i.siblings().length){i.addClass("menu-instructions-inactive")}g()})},addMenuItemToBottom:function(c,d){b(c).hideAdvancedMenuItemFields().appendTo(a.targetList)},addMenuItemToTop:function(c,d){b(c).hideAdvancedMenuItemFields().prependTo(a.targetList)},attachHomeLinkListener:function(){b(".add-home-link",".customlinkdiv").click(function(c){a.addLinkToMenu(navMenuL10n.homeurl,navMenuL10n.home,a.addMenuItemToTop);return false})},attachUnsavedChangesListener:function(){b("#menu-management input, #menu-management select, #menu-management, #menu-management textarea").change(function(){a.registerChange()});window.onbeforeunload=function(){if(a.menusChanged){return navMenuL10n.saveAlert}};b("input.menu-save").click(function(){window.onbeforeunload=null})},registerChange:function(){a.menusChanged=true},attachTabsPanelListeners:function(){b("#menu-settings-column").bind("click",function(h){var f,d,i,c,g=b(h.target);if(g.hasClass("nav-tab-link")){d=/#(.*)$/.exec(h.target.href);if(d&&d[1]){d=d[1]}else{return false}i=g.parents(".inside").first();b("input",i).removeAttr("checked");b(".tabs-panel-active",i).removeClass("tabs-panel-active").addClass("tabs-panel-inactive");b("#"+d,i).removeClass("tabs-panel-inactive").addClass("tabs-panel-active");b(".tabs",i).removeClass("tabs");g.parent().addClass("tabs");b(".quick-search",i).focus();return false}else{if(g.hasClass("select-all")){f=/#(.*)$/.exec(h.target.href);if(f&&f[1]){c=b("#"+f[1]+" .tabs-panel-active .menu-item-title input");if(c.length===c.filter(":checked").length){c.removeAttr("checked")}else{c.attr("checked","checked")}return false}}}})},initTabManager:function(){var h=b(".nav-tabs-wrapper"),i=h.children(".nav-tabs"),g=i.children(".nav-tab-active"),l=i.children(".nav-tab"),e=0,m,f,k,d,j=false;function c(){f=h.offset().left;m=f+h.width();g.makeTabVisible()}b.fn.extend({makeTabVisible:function(){var o=this.eq(0),p,n;if(!o.length){return}p=o.offset().left;n=p+o.outerWidth();if(n>m){i.animate({"margin-left":"+="+(m-n)+"px"},"fast")}else{if(p<f){i.animate({"margin-left":"-="+(p-f)+"px"},"fast")}}return o},isTabVisible:function(){var o=this.eq(0),p=o.offset().left,n=p+o.outerWidth();return(n<=m&&p>=f)?true:false}});l.each(function(){e+=b(this).outerWidth(true)});if(e<=h.width()-i.css("padding-left").slice(0,-2)-i.css("padding-right").slice(0,-2)){return}i.css({"margin-right":(-1*e)+"px",padding:0});k=b('<div class="nav-tabs-arrow nav-tabs-arrow-left"><a>«</a></div>');d=b('<div class="nav-tabs-arrow nav-tabs-arrow-right"><a>»</a></div>');h.wrap('<div class="nav-tabs-nav"/>').parent().prepend(k).append(d);c();b(window).resize(function(){if(j){return}j=true;setTimeout(function(){c();j=false},1000)});b.each([{arrow:k,next:"next",last:"first",operator:"+="},{arrow:d,next:"prev",last:"last",operator:"-="}],function(){var n=this;this.arrow.mousedown(function(){var p=l[n.last](),o=function(){if(!p.isTabVisible()){i.animate({"margin-left":n.operator+"90px"},300,"linear",o)}};o()}).mouseup(function(){var p,o;i.stop(true);p=l[n.last]();while((o=p[n.next]())&&o.length&&!o.isTabVisible()){p=o}p.makeTabVisible()})})},eventOnClickEditLink:function(d){var c,e,f=/#(.*)$/.exec(d.href);if(f&&f[1]){c=b("#"+f[1]);e=c.parent();if(0!=e.length){if(e.hasClass("menu-item-edit-inactive")){if(!c.data("menu-item-data")){c.data("menu-item-data",c.getItemData())}c.slideDown("fast");e.removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{c.slideUp("fast");e.removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCancelLink:function(d){var c=b(d).closest(".menu-item-settings");c.setItemData(c.data("menu-item-data"));return false},eventOnClickMenuSave:function(c){var d="";b("#nav-menu-theme-locations select").each(function(){d+='<input type="hidden" name="'+this.name+'" value="'+b(this).val()+'" />'});b("#update-nav-menu").append(d);a.menuList.find(".menu-item-data-position").val(function(e){return e+1});return true},eventOnClickMenuDelete:function(c){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(c){var d=parseInt(c.id.replace("delete-",""),10);a.removeMenuItem(b("#menu-item-"+d));return false},processQuickSearchQueryResponse:function(g,m,c){var h,e,j,f={},d=document.getElementById("nav-menu-meta"),l=new RegExp("menu-item\\[([^\\]]*)","g"),k=g.match(/<li>.*<\/li>/g);if(!k){b(".categorychecklist",c).html("<li><p>"+navMenuL10n.noResultsFound+"</p></li>");b("img.waiting",c).hide();return}h=k.length;while(h--){e=l.exec(k[h]);if(e&&e[1]){j=e[1];while(d.elements["menu-item["+j+"][menu-item-type]"]||f[j]){j--}f[j]=true;if(j!=e[1]){k[h]=k[h].replace(new RegExp("menu-item\\["+e[1]+"\\]","g"),"menu-item["+j+"]")}}}b(".categorychecklist",c).html(k.join(""));b("img.waiting",c).hide()},removeMenuItem:function(d){var c=d.childMenuItems();d.addClass("deleting").animate({opacity:0,height:0},350,function(){var e=b("#menu-instructions");d.remove();c.shiftDepthClass(-1).updateParentMenuItemDBId();if(!e.siblings().length){e.removeClass("menu-instructions-inactive")}})},depthToPx:function(c){return c*a.options.menuItemDepthPerLevel},pxToDepth:function(c){return Math.floor(c/a.options.menuItemDepthPerLevel)}};b(document).ready(function(){wpNavMenu.init()})})(jQuery); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/8cc1c9aa5cb638024a38bac496f8c62fe993c768/nav-menu.js/buggy/wp-admin/js/nav-menu.js |
var wpNavMenu;(function($){var api=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,init:function(){api.menuList=$("#menu-to-edit");api.targetList=api.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachAddMenuItemListeners();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();this.attachUnsavedChangesListener();if(api.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){$.fn.extend({menuItemDepth:function(){return api.pxToDepth(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(current,prev){return this.each(function(){var t=$(this);prev=prev||t.menuItemDepth();$(this).removeClass("menu-item-depth-"+prev).addClass("menu-item-depth-"+current)})},shiftDepthClass:function(change){return this.each(function(){var t=$(this),depth=t.menuItemDepth();$(this).removeClass("menu-item-depth-"+depth).addClass("menu-item-depth-"+(depth+change))})},childMenuItems:function(){var result=$();this.each(function(){var t=$(this),depth=t.menuItemDepth(),next=t.next();while(next.length&&next.menuItemDepth()>depth){result=result.add(next);next=next.next()}});return result},updateParentMenuItemDBId:function(){return this.each(function(){var item=$(this),input=item.find(".menu-item-data-parent-id"),depth=item.menuItemDepth(),parent=item.prev();if(depth==0){input.val(0)}else{while(parent.menuItemDepth()!=depth-1){parent=parent.prev()}input.val(parent.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var that=$(this);$(".hide-column-tog").not(":checked").each(function(){that.find(".field-"+$(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(processMethod){return this.each(function(){var t=$(this),menuItems={},checkboxes=t.find(".tabs-panel-active .categorychecklist li input:checked"),re=new RegExp("menu-item\\[([^\\]]*)");processMethod=processMethod||api.addMenuItemToBottom;if(!checkboxes.length){return false}t.find("img.waiting").show();$(checkboxes).each(function(){var listItemDBIDMatch=re.exec($(this).attr("name")),listItemDBID="undefined"==typeof listItemDBIDMatch[1]?0:parseInt(listItemDBIDMatch[1],10);menuItems[listItemDBID]=api.getListDataFromID(listItemDBID)});api.addItemToMenu(menuItems,processMethod,function(){checkboxes.removeAttr("checked");t.find("img.waiting").hide()})})}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(field){$(".field-"+field).removeClass("hidden-field")};columns.unchecked=function(field){$(".field-"+field).addClass("hidden-field")};api.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var currentDepth=0,originalDepth,minDepth,maxDepth,prev,next,prevBottom,nextThreshold,helperHeight,transport,menuLeft=api.menuList.offset().left;api.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(e,ui){var height,width,parent,children,maxChildDepth,tempHolder;transport=ui.item.children(".menu-item-transport");originalDepth=ui.item.menuItemDepth();updateCurrentDepth(ui,originalDepth);parent=(ui.item.next()[0]==ui.placeholder[0])?ui.item.next():ui.item;children=parent.childMenuItems();transport.append(children);height=transport.outerHeight();height+=(height>0)?(ui.placeholder.css("margin-top").slice(0,-2)*1):0;height+=ui.helper.outerHeight();helperHeight=height;height-=2;ui.placeholder.height(height);maxChildDepth=originalDepth;children.each(function(){var depth=$(this).menuItemDepth();maxChildDepth=(depth>maxChildDepth)?depth:maxChildDepth});width=ui.helper.find(".menu-item-handle").outerWidth();width+=api.depthToPx(maxChildDepth-originalDepth);width-=2;ui.placeholder.width(width);tempHolder=ui.placeholder.next();tempHolder.css("margin-top",helperHeight+"px");ui.placeholder.detach();$(this).sortable("refresh");ui.item.after(ui.placeholder);tempHolder.css("margin-top",0);updateSharedVars(ui)},stop:function(e,ui){var children,depthChange=currentDepth-originalDepth;children=transport.children().insertAfter(ui.item);if(depthChange!=0){ui.item.updateDepthClass(currentDepth);children.shiftDepthClass(depthChange);api.registerChange()}ui.item.updateParentMenuItemDBId()},change:function(e,ui){if(!ui.placeholder.parent().hasClass("menu")){(prev.length)?prev.after(ui.placeholder):api.menuList.prepend(ui.placeholder)}updateSharedVars(ui)},sort:function(e,ui){var offset=ui.helper.offset(),depth=api.pxToDepth(offset.left-menuLeft);if(depth>maxDepth||offset.top<prevBottom){depth=maxDepth}else{if(depth<minDepth){depth=minDepth}}if(depth!=currentDepth){updateCurrentDepth(ui,depth)}if(nextThreshold&&offset.top+helperHeight>nextThreshold){next.after(ui.placeholder);updateSharedVars(ui);$(this).sortable("refreshPositions")}},update:function(e,ui){api.registerChange()}});function updateSharedVars(ui){var depth;prev=ui.placeholder.prev();next=ui.placeholder.next();if(prev[0]==ui.item[0]){prev=prev.prev()}if(next[0]==ui.item[0]){next=next.next()}prevBottom=(prev.length)?prev.offset().top+prev.height():0;nextThreshold=(next.length)?next.offset().top+next.height()/3:0;minDepth=(next.length)?next.menuItemDepth():0;if(prev.length){maxDepth=((depth=prev.menuItemDepth()+1)>api.options.globalMaxDepth)?api.options.globalMaxDepth:depth}else{maxDepth=0}}function updateCurrentDepth(ui,depth){ui.placeholder.updateDepthClass(depth,currentDepth);currentDepth=depth}},attachMenuEditListeners:function(){var that=this;$("#update-nav-menu").bind("click",function(e){if(e.target&&e.target.className){if(-1!=e.target.className.indexOf("item-edit")){return that.eventOnClickEditLink(e.target)}else{if(-1!=e.target.className.indexOf("menu-save")){return that.eventOnClickMenuSave(e.target)}else{if(-1!=e.target.className.indexOf("menu-delete")){return that.eventOnClickMenuDelete(e.target)}else{if(-1!=e.target.className.indexOf("item-delete")){return that.eventOnClickMenuItemDelete(e.target)}else{if(-1!=e.target.className.indexOf("item-close")){return that.eventOnClickCloseLink(e.target)}}}}}}})},setupInputWithDefaultTitle:function(){var name="input-with-default-title";$("."+name).each(function(){var $t=$(this),title=$t.attr("title"),val=$t.val();$t.data(name,title);if(""==val){$t.val(title)}else{if(title==val){return}else{$t.removeClass(name)}}}).focus(function(){var $t=$(this);if($t.val()==$t.data(name)){$t.val("").removeClass(name)}}).blur(function(){var $t=$(this);if(""==$t.val()){$t.addClass(name).val($t.data(name))}})},attachAddMenuItemListeners:function(){var form=$("#nav-menu-meta");form.find(".add-to-menu input").click(function(){api.registerChange();$(this).trigger("wp-add-menu-item",[api.addMenuItemToBottom]);return false});form.find(".customlinkdiv").bind("wp-add-menu-item",function(e,processMethod){api.addCustomLink(processMethod)});form.find(".posttypediv, .taxonomydiv").bind("wp-add-menu-item",function(e,processMethod){$(this).addSelectedToMenu(processMethod)})},attachThemeLocationsListeners:function(){var loc=$("#nav-menu-theme-locations"),params={action:"menu-locations-save","menu-locations":loc.find("select").serialize(),"menu-settings-column-nonce":$("#menu-settings-column-nonce").val()};loc.find("input[type=submit]").click(function(){loc.find(".waiting").show();$.post(ajaxurl,params,function(r){loc.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var searchTimer;$(".quick-search").keypress(function(e){var t=$(this);if(13==e.which){api.updateQuickSearchResults(t);return false}if(searchTimer){clearTimeout(searchTimer)}searchTimer=setTimeout(function(){api.updateQuickSearchResults(t)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(input){var panel,params,minSearchLength=2,q=input.val();if(q.length<minSearchLength){return}panel=input.parents(".tabs-panel");params={action:"menu-quick-search","response-format":"markup",menu:$("#menu").val(),"menu-settings-column-nonce":$("#menu-settings-column-nonce").val(),q:q,type:input.attr("name")};$("img.waiting",panel).show();$.post(ajaxurl,params,function(menuMarkup){api.processQuickSearchQueryResponse(menuMarkup,params,panel)})},addCustomLink:function(processMethod){var url=$("#custom-menu-item-url").val(),label=$("#custom-menu-item-name").val();processMethod=processMethod||api.addMenuItemToBottom;if(""==url||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachAddMenuItemListeners();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){return a.pxToDepth(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var h=f.exec(b(this).attr("name")),i="undefined"==typeof h[1]?0:parseInt(h[1],10);d[i]=a.getListDataFromID(i)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId()},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-close")){return c.eventOnClickCloseLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachAddMenuItemListeners:function(){var c=b("#nav-menu-meta");c.find(".add-to-menu input").click(function(){a.registerChange();b(this).trigger("wp-add-menu-item",[a.addMenuItemToBottom]);return false});c.find(".customlinkdiv").bind("wp-add-menu-item",function(f,d){a.addCustomLink(d)});c.find(".posttypediv, .taxonomydiv").bind("wp-add-menu-item",function(f,d){b(this).addSelectedToMenu(d)})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={action:"menu-locations-save","menu-locations":d.find("select").serialize(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val()};d.find("input[type=submit]").click(function(){d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function($){var api=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,init:function(){api.menuList=$("#menu-to-edit");api.targetList=api.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachAddMenuItemListeners();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();this.attachUnsavedChangesListener();if(api.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){$.fn.extend({menuItemDepth:function(){return api.pxToDepth(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(current,prev){return this.each(function(){var t=$(this);prev=prev||t.menuItemDepth();$(this).removeClass("menu-item-depth-"+prev).addClass("menu-item-depth-"+current)})},shiftDepthClass:function(change){return this.each(function(){var t=$(this),depth=t.menuItemDepth();$(this).removeClass("menu-item-depth-"+depth).addClass("menu-item-depth-"+(depth+change))})},childMenuItems:function(){var result=$();this.each(function(){var t=$(this),depth=t.menuItemDepth(),next=t.next();while(next.length&&next.menuItemDepth()>depth){result=result.add(next);next=next.next()}});return result},updateParentMenuItemDBId:function(){return this.each(function(){var item=$(this),input=item.find(".menu-item-data-parent-id"),depth=item.menuItemDepth(),parent=item.prev();if(depth==0){input.val(0)}else{while(parent.menuItemDepth()!=depth-1){parent=parent.prev()}input.val(parent.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var that=$(this);$(".hide-column-tog").not(":checked").each(function(){that.find(".field-"+$(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(processMethod){return this.each(function(){var t=$(this),menuItems={},checkboxes=t.find(".tabs-panel-active .categorychecklist li input:checked"),re=new RegExp("menu-item\\[([^\\]]*)");processMethod=processMethod||api.addMenuItemToBottom;if(!checkboxes.length){return false}t.find("img.waiting").show();$(checkboxes).each(function(){var listItemDBIDMatch=re.exec($(this).attr("name")),listItemDBID="undefined"==typeof listItemDBIDMatch[1]?0:parseInt(listItemDBIDMatch[1],10);menuItems[listItemDBID]=api.getListDataFromID(listItemDBID)});api.addItemToMenu(menuItems,processMethod,function(){checkboxes.removeAttr("checked");t.find("img.waiting").hide()})})}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(field){$(".field-"+field).removeClass("hidden-field")};columns.unchecked=function(field){$(".field-"+field).addClass("hidden-field")};api.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var currentDepth=0,originalDepth,minDepth,maxDepth,prev,next,prevBottom,nextThreshold,helperHeight,transport,menuLeft=api.menuList.offset().left;api.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(e,ui){var height,width,parent,children,maxChildDepth,tempHolder;transport=ui.item.children(".menu-item-transport");originalDepth=ui.item.menuItemDepth();updateCurrentDepth(ui,originalDepth);parent=(ui.item.next()[0]==ui.placeholder[0])?ui.item.next():ui.item;children=parent.childMenuItems();transport.append(children);height=transport.outerHeight();height+=(height>0)?(ui.placeholder.css("margin-top").slice(0,-2)*1):0;height+=ui.helper.outerHeight();helperHeight=height;height-=2;ui.placeholder.height(height);maxChildDepth=originalDepth;children.each(function(){var depth=$(this).menuItemDepth();maxChildDepth=(depth>maxChildDepth)?depth:maxChildDepth});width=ui.helper.find(".menu-item-handle").outerWidth();width+=api.depthToPx(maxChildDepth-originalDepth);width-=2;ui.placeholder.width(width);tempHolder=ui.placeholder.next();tempHolder.css("margin-top",helperHeight+"px");ui.placeholder.detach();$(this).sortable("refresh");ui.item.after(ui.placeholder);tempHolder.css("margin-top",0);updateSharedVars(ui)},stop:function(e,ui){var children,depthChange=currentDepth-originalDepth;children=transport.children().insertAfter(ui.item);if(depthChange!=0){ui.item.updateDepthClass(currentDepth);children.shiftDepthClass(depthChange);api.registerChange()}ui.item.updateParentMenuItemDBId()},change:function(e,ui){if(!ui.placeholder.parent().hasClass("menu")){(prev.length)?prev.after(ui.placeholder):api.menuList.prepend(ui.placeholder)}updateSharedVars(ui)},sort:function(e,ui){var offset=ui.helper.offset(),depth=api.pxToDepth(offset.left-menuLeft);if(depth>maxDepth||offset.top<prevBottom){depth=maxDepth}else{if(depth<minDepth){depth=minDepth}}if(depth!=currentDepth){updateCurrentDepth(ui,depth)}if(nextThreshold&&offset.top+helperHeight>nextThreshold){next.after(ui.placeholder);updateSharedVars(ui);$(this).sortable("refreshPositions")}},update:function(e,ui){api.registerChange()}});function updateSharedVars(ui){var depth;prev=ui.placeholder.prev();next=ui.placeholder.next();if(prev[0]==ui.item[0]){prev=prev.prev()}if(next[0]==ui.item[0]){next=next.next()}prevBottom=(prev.length)?prev.offset().top+prev.height():0;nextThreshold=(next.length)?next.offset().top+next.height()/3:0;minDepth=(next.length)?next.menuItemDepth():0;if(prev.length){maxDepth=((depth=prev.menuItemDepth()+1)>api.options.globalMaxDepth)?api.options.globalMaxDepth:depth}else{maxDepth=0}}function updateCurrentDepth(ui,depth){ui.placeholder.updateDepthClass(depth,currentDepth);currentDepth=depth}},attachMenuEditListeners:function(){var that=this;$("#update-nav-menu").bind("click",function(e){if(e.target&&e.target.className){if(-1!=e.target.className.indexOf("item-edit")){return that.eventOnClickEditLink(e.target)}else{if(-1!=e.target.className.indexOf("menu-save")){return that.eventOnClickMenuSave(e.target)}else{if(-1!=e.target.className.indexOf("menu-delete")){return that.eventOnClickMenuDelete(e.target)}else{if(-1!=e.target.className.indexOf("item-delete")){return that.eventOnClickMenuItemDelete(e.target)}else{if(-1!=e.target.className.indexOf("item-close")){return that.eventOnClickCloseLink(e.target)}}}}}}})},setupInputWithDefaultTitle:function(){var name="input-with-default-title";$("."+name).each(function(){var $t=$(this),title=$t.attr("title"),val=$t.val();$t.data(name,title);if(""==val){$t.val(title)}else{if(title==val){return}else{$t.removeClass(name)}}}).focus(function(){var $t=$(this);if($t.val()==$t.data(name)){$t.val("").removeClass(name)}}).blur(function(){var $t=$(this);if(""==$t.val()){$t.addClass(name).val($t.data(name))}})},attachAddMenuItemListeners:function(){var form=$("#nav-menu-meta");form.find(".add-to-menu input").click(function(){api.registerChange();$(this).trigger("wp-add-menu-item",[api.addMenuItemToBottom]);return false});form.find(".customlinkdiv").bind("wp-add-menu-item",function(e,processMethod){api.addCustomLink(processMethod)});form.find(".posttypediv, .taxonomydiv").bind("wp-add-menu-item",function(e,processMethod){$(this).addSelectedToMenu(processMethod)})},attachThemeLocationsListeners:function(){var loc=$("#nav-menu-theme-locations"),params={action:"menu-locations-save","menu-locations":loc.find("select").serialize(),"menu-settings-column-nonce":$("#menu-settings-column-nonce").val()};loc.find("input[type=submit]").click(function(){loc.find(".waiting").show();$.post(ajaxurl,params,function(r){loc.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var searchTimer;$(".quick-search").keypress(function(e){var t=$(this);if(13==e.which){api.updateQuickSearchResults(t);return false}if(searchTimer){clearTimeout(searchTimer)}searchTimer=setTimeout(function(){api.updateQuickSearchResults(t)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(input){var panel,params,minSearchLength=2,q=input.val();if(q.length<minSearchLength){return}panel=input.parents(".tabs-panel");params={action:"menu-quick-search","response-format":"markup",menu:$("#menu").val(),"menu-settings-column-nonce":$("#menu-settings-column-nonce").val(),q:q,type:input.attr("name")};$("img.waiting",panel).show();$.post(ajaxurl,params,function(menuMarkup){api.processQuickSearchQueryResponse(menuMarkup,params,panel)})},addCustomLink:function(processMethod){var url=$("#custom-menu-item-url").val(),label=$("#custom-menu-item-name").val();processMethod=processMethod||api.addMenuItemToBottom;if(""==url||"http://"==url){return false}$(".customlinkdiv img.waiting").show();this.addLinkToMenu(url,label,processMethod,function(){$(".customlinkdiv img.waiting").hide();$("#custom-menu-item-name").val("").blur();$("#custom-menu-item-url").val("http://")})},addLinkToMenu:function(url,label,processMethod,callback){processMethod=processMethod||api.addMenuItemToBottom;callback=callback||function(){};api.addItemToMenu({"-1":{"menu-item-type":"custom","menu-item-url":url,"menu-item-title":label}},processMethod,callback)},addItemToMenu:function(menuItem,processMethod,callback){var menu=$("#menu").val(),nonce=$("#menu-settings-column-nonce").val();processMethod=processMethod||function(){};callback=callback||function(){};params={action:"add-menu-item",menu:menu,"menu-settings-column-nonce":nonce,"menu-item":menuItem};$.post(ajaxurl,params,function(menuMarkup){processMethod(menuMarkup,params);callback()})},addMenuItemToBottom:function(menuMarkup,req){$(menuMarkup).hideAdvancedMenuItemFields().appendTo(api.targetList)},addMenuItemToTop:function(menuMarkup,req){$(menuMarkup).hideAdvancedMenuItemFields().prependTo(api.targetList)},attachHomeLinkListener:function(){$(".add-home-link",".customlinkdiv").click(function(e){api.addLinkToMenu(navMenuL10n.homeurl,navMenuL10n.home,api.addMenuItemToTop);return false})},attachUnsavedChangesListener:function(){$("#menu-management input, #menu-management select, #menu-management, #menu-management textarea").change(function(){api.registerChange()});window.onbeforeunload=function(){if(api.menusChanged){return navMenuL10n.saveAlert}};$("input.menu-save, input.save-menu-item").click(function(){window.onbeforeunload=null})},registerChange:function(){api.menusChanged=true},attachTabsPanelListeners:function(){$("#menu-settings-column").bind("click",function(e){var selectAreaMatch,activePanel,panelId,wrapper,items,target=$(e.target);if(target.hasClass("nav-tab-link")){panelId=/#(.*)$/.exec(e.target.href);if(panelId&&panelId[1]){panelId=panelId[1]}else{return false}wrapper=target.parents(".inside").first();$("input",wrapper).removeAttr("checked");$(".tabs-panel-active",wrapper).removeClass("tabs-panel-active").addClass("tabs-panel-inactive");$("#"+panelId,wrapper).removeClass("tabs-panel-inactive").addClass("tabs-panel-active");$(".tabs",wrapper).removeClass("tabs");target.parent().addClass("tabs");$(".quick-search",wrapper).focus();return false}else{if(target.hasClass("select-all")){selectAreaMatch=/#(.*)$/.exec(e.target.href);if(selectAreaMatch&&selectAreaMatch[1]){items=$("#"+selectAreaMatch[1]+" .tabs-panel-active .menu-item-title input");if(items.length===items.filter(":checked").length){items.removeAttr("checked")}else{items.attr("checked","checked")}return false}}}})},initTabManager:function(){var fixed=$(".nav-tabs-wrapper"),fluid=fixed.children(".nav-tabs"),active=fluid.children(".nav-tab-active"),tabs=fluid.children(".nav-tab"),tabsWidth=0,fixedRight,fixedLeft,arrowLeft,arrowRight,resizing=false;function resetMenuTabs(){fixedLeft=fixed.offset().left;fixedRight=fixedLeft+fixed.width();active.makeTabVisible()}$.fn.extend({makeTabVisible:function(){var t=this.eq(0),left,right;if(!t.length){return}left=t.offset().left;right=left+t.outerWidth();if(right>fixedRight){fluid.animate({"margin-left":"+="+(fixedRight-right)+"px"},"fast")}else{if(left<fixedLeft){fluid.animate({"margin-left":"-="+(left-fixedLeft)+"px"},"fast")}}return t},isTabVisible:function(){var t=this.eq(0),left=t.offset().left,right=left+t.outerWidth();return(right<=fixedRight&&left>=fixedLeft)?true:false}});tabs.each(function(){tabsWidth+=$(this).outerWidth(true)});if(tabsWidth<=fixed.width()-fluid.css("padding-left").slice(0,-2)-fluid.css("padding-right").slice(0,-2)){return}fluid.css({"margin-right":(-1*tabsWidth)+"px",padding:0});arrowLeft=$('<div class="nav-tabs-arrow nav-tabs-arrow-left"><a>«</a></div>');arrowRight=$('<div class="nav-tabs-arrow nav-tabs-arrow-right"><a>»</a></div>');fixed.wrap('<div class="nav-tabs-nav"/>').parent().prepend(arrowLeft).append(arrowRight);resetMenuTabs();$(window).resize(function(){if(resizing){return}resizing=true;setTimeout(function(){resetMenuTabs();resizing=false},1000)});$.each([{arrow:arrowLeft,next:"next",last:"first",operator:"+="},{arrow:arrowRight,next:"prev",last:"last",operator:"-="}],function(){var that=this;this.arrow.mousedown(function(){var last=tabs[that.last](),fn=function(){if(!last.isTabVisible()){fluid.animate({"margin-left":that.operator+"90px"},300,"linear",fn)}};fn()}).mouseup(function(){var tab,next;fluid.stop(true);tab=tabs[that.last]();while((next=tab[that.next]())&&next.length&&!next.isTabVisible()){tab=next}tab.makeTabVisible()})})},eventOnClickEditLink:function(clickedEl){var activeEdit,matchedSection=/#(.*)$/.exec(clickedEl.href);if(matchedSection&&matchedSection[1]){activeEdit=$("#"+matchedSection[1]);if(0!=activeEdit.length){if(activeEdit.hasClass("menu-item-edit-inactive")){activeEdit.slideDown("fast").siblings("dl").andSelf().removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{activeEdit.slideUp("fast").siblings("dl").andSelf().removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCloseLink:function(clickedEl){$(clickedEl).closest(".menu-item-settings").siblings("dl").find(".item-edit").click();return false},eventOnClickMenuSave:function(clickedEl){api.menuList.find(".menu-item-data-position").val(function(index){return index+1});return true},eventOnClickMenuDelete:function(clickedEl){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(clickedEl){var itemID,matchedSection,that=this;if(confirm(navMenuL10n.warnDeleteMenuItem)){matchedSection=/_wpnonce=([a-zA-Z0-9]*)$/.exec(clickedEl.href);if(matchedSection&&matchedSection[1]){itemID=parseInt(clickedEl.id.replace("delete-",""),10);$.post(ajaxurl,{action:"delete-menu-item","menu-item":itemID,_wpnonce:matchedSection[1]},function(resp){if("1"==resp){that.removeMenuItem(document.getElementById("menu-item-"+itemID))}});return false}return true}else{return false}},processQuickSearchQueryResponse:function(resp,req,panel){var i,matched,newID,takenIDs={},form=document.getElementById("nav-menu-meta"),pattern=new RegExp("menu-item\\[([^\\]]*)","g"),items=resp.match(/<li>.*<\/li>/g);if(!items){$(".categorychecklist",panel).html("<li><p>"+navMenuL10n.noResultsFound+"</p></li>");$("img.waiting",panel).hide();return}i=items.length;while(i--){matched=pattern.exec(items[i]);if(matched&&matched[1]){newID=matched[1];while(form.elements["menu-item["+newID+"][menu-item-type]"]||takenIDs[newID]){newID--}takenIDs[newID]=true;if(newID!=matched[1]){items[i]=items[i].replace(new RegExp("menu-item\\["+matched[1]+"\\]","g"),"menu-item["+newID+"]")}}}$(".categorychecklist",panel).html(items.join(""));$("img.waiting",panel).hide()},removeMenuItem:function(el){el=$(el);var children=el.childMenuItems(),that=this;el.addClass("deleting").fadeOut(350,function(){el.remove();children.shiftDepthClass(-1).updateParentMenuItemDBId()})},getListDataFromID:function(menuItemID,parentEl){if(!menuItemID){return false}parentEl=parentEl||document;var fields=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],itemData={},inputs=parentEl.getElementsByTagName("input"),i=inputs.length,j;while(i--){j=fields.length;while(j--){if(inputs[i]&&inputs[i].name&&"menu-item["+menuItemID+"]["+fields[j]+"]"==inputs[i].name){itemData[fields[j]]=inputs[i].value}}}return itemData},depthToPx:function(depth){return depth*api.options.menuItemDepthPerLevel},pxToDepth:function(px){return Math.floor(px/api.options.menuItemDepthPerLevel)}};$(document).ready(function(){wpNavMenu.init()})})(jQuery); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/0afb769ba166d7e38002b77005e3c75b18d4265a/nav-menu.js/clean/wp-admin/js/nav-menu.js |
var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,isRTL:!!("undefined"!=typeof isRtl&&isRtl),negateIfRTL:("undefined"!=typeof isRtl&&isRtl)?-1:1,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){var c=a.isRTL?this.eq(0).css("margin-right"):this.eq(0).css("margin-left");return a.pxToDepth(c&&-1!=c.indexOf("px")?c.slice(0,-2):0)},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(!d[0]||!d[0].className||-1==d[0].className.indexOf("menu-item")||(d.menuItemDepth()!=f-1)){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){if(0==b("#menu-to-edit").length){return false}return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var i=b(this),h=f.exec(i.attr("name")),j="undefined"==typeof h[1]?0:parseInt(h[1],10);if(this.className&&-1!=this.className.indexOf("add-to-top")){c=a.addMenuItemToTop}d[j]=i.closest("li").getItemData("add-menu-item",j)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})},getItemData:function(f,g){f=f||"menu-item";var d={},e,c=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!g&&f=="menu-item"){g=this.find(".menu-item-data-db-id").val()}if(!g){return d}this.find("input").each(function(){var h;e=c.length;while(e--){if(f=="menu-item"){h=c[e]+"["+g+"]"}else{if(f=="add-menu-item"){h="menu-item["+g+"]["+c[e]+"]"}}if(this.name&&h==this.name){d[c[e]]=this.value}}});return d},setItemData:function(c,d,e){d=d||"menu-item";if(!e&&d=="menu-item"){e=b(".menu-item-data-db-id",this).val()}if(!e){return this}this.find("input").each(function(){var f=b(this),g;b.each(c,function(h,i){if(d=="menu-item"){g=h+"["+e+"]"}else{if(d=="add-menu-item"){g="menu-item["+e+"]["+h+"]"}}if(g==f.attr("name")){f.val(i)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var p=0,e,t,d,l,o,f,c,i,s,m=a.menuList.offset().left,h=b("body"),q,n=r();m+=a.isRTL?a.menuList.width():0;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(A,z){var u,x,w,v,y;if(a.isRTL){z.item[0].style.right="auto"}s=z.item.children(".menu-item-transport");e=z.item.menuItemDepth();j(z,e);w=(z.item.next()[0]==z.placeholder[0])?z.item.next():z.item;v=w.childMenuItems();s.append(v);u=s.outerHeight();u+=(u>0)?(z.placeholder.css("margin-top").slice(0,-2)*1):0;u+=z.helper.outerHeight();i=u;u-=2;z.placeholder.height(u);q=e;v.each(function(){var B=b(this).menuItemDepth();q=(B>q)?B:q});x=z.helper.find(".menu-item-handle").outerWidth();x+=a.depthToPx(q-e);x-=2;z.placeholder.width(x);y=z.placeholder.next();y.css("margin-top",i+"px");z.placeholder.detach();b(this).sortable("refresh");z.item.after(z.placeholder);y.css("margin-top",0);k(z)},stop:function(x,w){var v,u=p-e;v=s.children().insertAfter(w.item);if(u!=0){w.item.updateDepthClass(p);v.shiftDepthClass(u);g(u)}a.registerChange();w.item.updateParentMenuItemDBId();w.item[0].style.top=0;if(a.isRTL){w.item[0].style.left="auto";w.item[0].style.right=0}a.refreshMenuTabs(true)},change:function(v,u){if(!u.placeholder.parent().hasClass("menu")){(l.length)?l.after(u.placeholder):a.menuList.prepend(u.placeholder)}k(u)},sort:function(w,v){var y=v.helper.offset(),u=a.isRTL?y.left+v.helper.width():y.left,x=a.negateIfRTL*a.pxToDepth(u-m);if(x>d||y.top<f){x=d}else{if(x<t){x=t}}if(x!=p){j(v,x)}if(c&&y.top+i>c){o.after(v.placeholder);k(v);b(this).sortable("refreshPositions")}}});function k(u){var v;l=u.placeholder.prev();o=u.placeholder.next();if(l[0]==u.item[0]){l=l.prev()}if(o[0]==u.item[0]){o=o.next()}f=(l.length)?l.offset().top+l.height():0;c=(o.length)?o.offset().top+o.height()/3:0;t=(o.length)?o.menuItemDepth():0;if(l.length){d=((v=l.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:v}else{d=0}}function j(u,v){u.placeholder.updateDepthClass(v,p);p=v}function r(){if(!h[0].className){return 0}var u=h[0].className.match(/menu-max-depth-(\d+)/);return u&&u[1]?parseInt(u[1]):0}function g(u){var v,w=n;if(u===0){return}else{if(u>0){v=q+u;if(v>n){w=v}}else{if(u<0&&q==n){while(!b(".menu-item-depth-"+w,a.menuList).length&&w>0){w--}}}}h.removeClass("menu-max-depth-"+n).addClass("menu-max-depth-"+w);n=w}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-cancel")){return c.eventOnClickCancelLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,isRTL:!!("undefined"!=typeof isRtl&&isRtl),negateIfRTL:("undefined"!=typeof isRtl&&isRtl)?-1:1,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){var c=a.isRTL?this.eq(0).css("margin-right"):this.eq(0).css("margin-left");return a.pxToDepth(c&&-1!=c.indexOf("px")?c.slice(0,-2):0)},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(!d[0]||!d[0].className||-1==d[0].className.indexOf("menu-item")||(d.menuItemDepth()!=f-1)){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){if(0==b("#menu-to-edit").length){return false}return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var i=b(this),h=f.exec(i.attr("name")),j="undefined"==typeof h[1]?0:parseInt(h[1],10);if(this.className&&-1!=this.className.indexOf("add-to-top")){c=a.addMenuItemToTop}d[j]=i.closest("li").getItemData("add-menu-item",j)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})},getItemData:function(f,g){f=f||"menu-item";var d={},e,c=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!g&&f=="menu-item"){g=this.find(".menu-item-data-db-id").val()}if(!g){return d}this.find("input").each(function(){var h;e=c.length;while(e--){if(f=="menu-item"){h=c[e]+"["+g+"]"}else{if(f=="add-menu-item"){h="menu-item["+g+"]["+c[e]+"]"}}if(this.name&&h==this.name){d[c[e]]=this.value}}});return d},setItemData:function(c,d,e){d=d||"menu-item";if(!e&&d=="menu-item"){e=b(".menu-item-data-db-id",this).val()}if(!e){return this}this.find("input").each(function(){var f=b(this),g;b.each(c,function(h,i){if(d=="menu-item"){g=h+"["+e+"]"}else{if(d=="add-menu-item"){g="menu-item["+e+"]["+h+"]"}}if(g==f.attr("name")){f.val(i)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var p=0,e,t,d,l,o,f,c,i,s,m=a.menuList.offset().left,h=b("body"),q,n=r();m+=a.isRTL?a.menuList.width():0;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(A,z){var u,x,w,v,y;if(a.isRTL){z.item[0].style.right="auto"}s=z.item.children(".menu-item-transport");e=z.item.menuItemDepth();j(z,e);w=(z.item.next()[0]==z.placeholder[0])?z.item.next():z.item;v=w.childMenuItems();s.append(v);u=s.outerHeight();u+=(u>0)?(z.placeholder.css("margin-top").slice(0,-2)*1):0;u+=z.helper.outerHeight();i=u;u-=2;z.placeholder.height(u);q=e;v.each(function(){var B=b(this).menuItemDepth();q=(B>q)?B:q});x=z.helper.find(".menu-item-handle").outerWidth();x+=a.depthToPx(q-e);x-=2;z.placeholder.width(x);y=z.placeholder.next();y.css("margin-top",i+"px");z.placeholder.detach();b(this).sortable("refresh");z.item.after(z.placeholder);y.css("margin-top",0);k(z)},stop:function(x,w){var v,u=p-e;v=s.children().insertAfter(w.item);if(u!=0){w.item.updateDepthClass(p);v.shiftDepthClass(u);g(u)}a.registerChange();w.item.updateParentMenuItemDBId();w.item[0].style.top=0;if(a.isRTL){w.item[0].style.left="auto";w.item[0].style.right=0}a.refreshMenuTabs(true)},change:function(v,u){if(!u.placeholder.parent().hasClass("menu")){(l.length)?l.after(u.placeholder):a.menuList.prepend(u.placeholder)}k(u)},sort:function(w,v){var y=v.helper.offset(),u=a.isRTL?y.left+v.helper.width():y.left,x=a.negateIfRTL*a.pxToDepth(u-m);if(x>d||y.top<f){x=d}else{if(x<t){x=t}}if(x!=p){j(v,x)}if(c&&y.top+i>c){o.after(v.placeholder);k(v);b(this).sortable("refreshPositions")}}});function k(u){var v;l=u.placeholder.prev();o=u.placeholder.next();if(l[0]==u.item[0]){l=l.prev()}if(o[0]==u.item[0]){o=o.next()}f=(l.length)?l.offset().top+l.height():0;c=(o.length)?o.offset().top+o.height()/3:0;t=(o.length)?o.menuItemDepth():0;if(l.length){d=((v=l.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:v}else{d=0}}function j(u,v){u.placeholder.updateDepthClass(v,p);p=v}function r(){if(!h[0].className){return 0}var u=h[0].className.match(/menu-max-depth-(\d+)/);return u&&u[1]?parseInt(u[1]):0}function g(u){var v,w=n;if(u===0){return}else{if(u>0){v=q+u;if(v>n){w=v}}else{if(u<0&&q==n){while(!b(".menu-item-depth-"+w,a.menuList).length&&w>0){w--}}}}h.removeClass("menu-max-depth-"+n).addClass("menu-max-depth-"+w);n=w}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-cancel")){return c.eventOnClickCancelLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,isRTL:!!("undefined"!=typeof isRtl&&isRtl),negateIfRTL:("undefined"!=typeof isRtl&&isRtl)?-1:1,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){var c=a.isRTL?this.eq(0).css("margin-right"):this.eq(0).css("margin-left");return a.pxToDepth(c&&-1!=c.indexOf("px")?c.slice(0,-2):0)},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(!d[0]||!d[0].className||-1==d[0].className.indexOf("menu-item")||(d.menuItemDepth()!=f-1)){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){if(0==b("#menu-to-edit").length){return false}return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var i=b(this),h=f.exec(i.attr("name")),j="undefined"==typeof h[1]?0:parseInt(h[1],10);if(this.className&&-1!=this.className.indexOf("add-to-top")){c=a.addMenuItemToTop}d[j]=i.closest("li").getItemData("add-menu-item",j)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})},getItemData:function(f,g){f=f||"menu-item";var d={},e,c=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!g&&f=="menu-item"){g=this.find(".menu-item-data-db-id").val()}if(!g){return d}this.find("input").each(function(){var h;e=c.length;while(e--){if(f=="menu-item"){h=c[e]+"["+g+"]"}else{if(f=="add-menu-item"){h="menu-item["+g+"]["+c[e]+"]"}}if(this.name&&h==this.name){d[c[e]]=this.value}}});return d},setItemData:function(c,d,e){d=d||"menu-item";if(!e&&d=="menu-item"){e=b(".menu-item-data-db-id",this).val()}if(!e){return this}this.find("input").each(function(){var f=b(this),g;b.each(c,function(h,i){if(d=="menu-item"){g=h+"["+e+"]"}else{if(d=="add-menu-item"){g="menu-item["+e+"]["+h+"]"}}if(g==f.attr("name")){f.val(i)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var p=0,e,t,d,l,o,f,c,i,s,m=a.menuList.offset().left,h=b("body"),q,n=r();m+=a.isRTL?a.menuList.width():0;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(A,z){var u,x,w,v,y;if(a.isRTL){z.item[0].style.right="auto"}s=z.item.children(".menu-item-transport");e=z.item.menuItemDepth();j(z,e);w=(z.item.next()[0]==z.placeholder[0])?z.item.next():z.item;v=w.childMenuItems();s.append(v);u=s.outerHeight();u+=(u>0)?(z.placeholder.css("margin-top").slice(0,-2)*1):0;u+=z.helper.outerHeight();i=u;u-=2;z.placeholder.height(u);q=e;v.each(function(){var B=b(this).menuItemDepth();q=(B>q)?B:q});x=z.helper.find(".menu-item-handle").outerWidth();x+=a.depthToPx(q-e);x-=2;z.placeholder.width(x);y=z.placeholder.next();y.css("margin-top",i+"px");z.placeholder.detach();b(this).sortable("refresh");z.item.after(z.placeholder);y.css("margin-top",0);k(z)},stop:function(x,w){var v,u=p-e;v=s.children().insertAfter(w.item);if(u!=0){w.item.updateDepthClass(p);v.shiftDepthClass(u);g(u)}a.registerChange();w.item.updateParentMenuItemDBId();w.item[0].style.top=0;if(a.isRTL){w.item[0].style.left="auto";w.item[0].style.right=0}a.refreshMenuTabs(true)},change:function(v,u){if(!u.placeholder.parent().hasClass("menu")){(l.length)?l.after(u.placeholder):a.menuList.prepend(u.placeholder)}k(u)},sort:function(w,v){var y=v.helper.offset(),u=a.isRTL?y.left+v.helper.width():y.left,x=a.negateIfRTL*a.pxToDepth(u-m);if(x>d||y.top<f){x=d}else{if(x<t){x=t}}if(x!=p){j(v,x)}if(c&&y.top+i>c){o.after(v.placeholder);k(v);b(this).sortable("refreshPositions")}}});function k(u){var v;l=u.placeholder.prev();o=u.placeholder.next();if(l[0]==u.item[0]){l=l.prev()}if(o[0]==u.item[0]){o=o.next()}f=(l.length)?l.offset().top+l.height():0;c=(o.length)?o.offset().top+o.height()/3:0;t=(o.length)?o.menuItemDepth():0;if(l.length){d=((v=l.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:v}else{d=0}}function j(u,v){u.placeholder.updateDepthClass(v,p);p=v}function r(){if(!h[0].className){return 0}var u=h[0].className.match(/menu-max-depth-(\d+)/);return u&&u[1]?parseInt(u[1]):0}function g(u){var v,w=n;if(u===0){return}else{if(u>0){v=q+u;if(v>n){w=v}}else{if(u<0&&q==n){while(!b(".menu-item-depth-"+w,a.menuList).length&&w>0){w--}}}}h.removeClass("menu-max-depth-"+n).addClass("menu-max-depth-"+w);n=w}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-cancel")){return c.eventOnClickCancelLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http://"==e){return false}b(".customlinkdiv img.waiting").show();this.addLinkToMenu(e,d,c,function(){b(".customlinkdiv img.waiting").hide();b("#custom-menu-item-name").val("").blur();b("#custom-menu-item-url").val("http://")})},addLinkToMenu:function(e,d,c,f){c=c||a.addMenuItemToBottom;f=f||function(){};a.addItemToMenu({"-1":{"menu-item-type":"custom","menu-item-url":e,"menu-item-title":d}},c,f)},addItemToMenu:function(e,c,g){var f=b("#menu").val(),d=b("#menu-settings-column-nonce").val();c=c||function(){};g=g||function(){};params={action:"add-menu-item",menu:f,"menu-settings-column-nonce":d,"menu-item":e};b.post(ajaxurl,params,function(h){var i=b("#menu-instructions");c(h,params);if(!i.hasClass("menu-instructions-inactive")&&i.siblings().length){i.addClass("menu-instructions-inactive")}g()})},addMenuItemToBottom:function(c,d){b(c).hideAdvancedMenuItemFields().appendTo(a.targetList)},addMenuItemToTop:function(c,d){b(c).hideAdvancedMenuItemFields().prependTo(a.targetList)},attachUnsavedChangesListener:function(){b("#menu-management input, #menu-management select, #menu-management, #menu-management textarea").change(function(){a.registerChange()});if(0!=b("#menu-to-edit").length){window.onbeforeunload=function(){if(a.menusChanged){return navMenuL10n.saveAlert}}}else{b("#menu-settings-column").find("input,select").attr("disabled","disabled").end().find("a").attr("href","#").unbind("click")}},registerChange:function(){a.menusChanged=true},attachTabsPanelListeners:function(){b("#menu-settings-column").bind("click",function(h){var f,d,i,c,g=b(h.target);if(g.hasClass("nav-tab-link")){d=/#(.*)$/.exec(h.target.href);if(d&&d[1]){d=d[1]}else{return false}i=g.parents(".inside").first();b("input",i).removeAttr("checked");b(".tabs-panel-active",i).removeClass("tabs-panel-active").addClass("tabs-panel-inactive");b("#"+d,i).removeClass("tabs-panel-inactive").addClass("tabs-panel-active");b(".tabs",i).removeClass("tabs");g.parent().addClass("tabs");b(".quick-search",i).focus();return false}else{if(g.hasClass("select-all")){f=/#(.*)$/.exec(h.target.href);if(f&&f[1]){c=b("#"+f[1]+" .tabs-panel-active .menu-item-title input");if(c.length===c.filter(":checked").length){c.removeAttr("checked")}else{c.attr("checked","checked")}return false}}else{if(g.hasClass("submit-add-to-menu")){a.registerChange();if(h.target.id&&"submit-customlinkdiv"==h.target.id){a.addCustomLink(a.addMenuItemToBottom)}else{if(h.target.id&&-1!=h.target.id.indexOf("submit-")){b("#"+h.target.id.replace(/submit-/,"")).addSelectedToMenu(a.addMenuItemToBottom)}}return false}else{if(g.hasClass("page-numbers")){b.post(ajaxurl,h.target.href.replace(/.*\?/,"").replace(/action=([^&]*)/,"")+"&action=menu-get-metabox",function(m){if(-1==m.indexOf("replace-id")){return}var l=b.parseJSON(m),e=document.getElementById(l["replace-id"]),k=document.createElement("div"),j=document.createElement("div");if(!l.markup||!e){return}j.innerHTML=l.markup?l.markup:"";e.parentNode.insertBefore(k,e);k.parentNode.removeChild(e);k.parentNode.insertBefore(j,k);k.parentNode.removeChild(k)});return false}}}}})},initTabManager:function(){var h=b(".nav-tabs-wrapper"),j=h.children(".nav-tabs"),g=j.children(".nav-tab-active"),m=j.children(".nav-tab"),e=0,o,f,l,d,k,i={},c=a.isRTL?"margin-right":"margin-left",p=a.isRTL?"margin-left":"margin-right",n=2;a.refreshMenuTabs=function(q){var t=h.width(),s=0,r={};f=h.offset().left;o=f+t;if(!q){g.makeTabVisible()}if(m.last().isTabVisible()){s=h.width()-e;s=s>0?0:s;r[c]=s+"px";j.animate(r,100,"linear")}if(t>e){l.add(d).hide()}else{l.add(d).show()}};b.fn.extend({makeTabVisible:function(){var u=this.eq(0),v,s,r={},q=0;if(!u.length){return this}v=u.offset().left;s=v+u.outerWidth();if(s>o){q=o-s}else{if(v<f){q=f-v}}if(!q){return this}r[c]="+="+a.negateIfRTL*q+"px";j.animate(r,Math.abs(q)*n,"linear");return this},isTabVisible:function(){var r=this.eq(0),s=r.offset().left,q=s+r.outerWidth();return(q<=o&&s>=f)?true:false}});m.each(function(){e+=b(this).outerWidth(true)});i.padding=0;i[p]=(-1*e)+"px";j.css(i);l=b('<div class="nav-tabs-arrow nav-tabs-arrow-left"><a>«</a></div>');d=b('<div class="nav-tabs-arrow nav-tabs-arrow-right"><a>»</a></div>');h.wrap('<div class="nav-tabs-nav"/>').parent().prepend(l).append(d);a.refreshMenuTabs();b(window).resize(function(){if(k){clearTimeout(k)}k=setTimeout(a.refreshMenuTabs,200)});b.each([{arrow:l,next:"next",last:"first",operator:"+="},{arrow:d,next:"prev",last:"last",operator:"-="}],function(){var q=this;this.arrow.mousedown(function(){var t=Math.abs(parseInt(j.css(c))),r=t,s={};if("-="==q.operator){r=Math.abs(e-h.width())-t}if(!r){return}s[c]=q.operator+r+"px";j.animate(s,r*n,"linear")}).mouseup(function(){var s,r;j.stop(true);s=m[q.last]();while((r=s[q.next]())&&r.length&&!r.isTabVisible()){s=r}s.makeTabVisible()})})},eventOnClickEditLink:function(d){var c,e,f=/#(.*)$/.exec(d.href);if(f&&f[1]){c=b("#"+f[1]);e=c.parent();if(0!=e.length){if(e.hasClass("menu-item-edit-inactive")){if(!c.data("menu-item-data")){c.data("menu-item-data",c.getItemData())}c.slideDown("fast");e.removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{c.slideUp("fast");e.removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCancelLink:function(d){var c=b(d).closest(".menu-item-settings");c.setItemData(c.data("menu-item-data"));return false},eventOnClickMenuSave:function(e){var f="",c=b("#menu-name"),d=c.val();if(!d||d==c.attr("title")||!d.replace(/\s+/,"")){c.parent().addClass("form-invalid");return false}b("#nav-menu-theme-locations select").each(function(){f+='<input type="hidden" name="'+this.name+'" value="'+b(this).val()+'" />'});b("#update-nav-menu").append(f);a.menuList.find(".menu-item-data-position").val(function(g){return g+1});window.onbeforeunload=null;return true},eventOnClickMenuDelete:function(c){if(confirm(navMenuL10n.warnDeleteMenu)){window.onbeforeunload=null;return true}return false},eventOnClickMenuItemDelete:function(c){var d=parseInt(c.id.replace("delete-",""),10);a.removeMenuItem(b("#menu-item-"+d));a.registerChange();return false},processQuickSearchQueryResponse:function(g,m,c){var h,e,j,f={},d=document.getElementById("nav-menu-meta"),l=new RegExp("menu-item\\[([^\\]]*)","g"),k=g.match(/<li>.*<\/li>/g);if(!k){b(".categorychecklist",c).html("<li><p>"+navMenuL10n.noResultsFound+"</p></li>");b("img.waiting",c).hide();return}h=k.length;while(h--){e=l.exec(k[h]);if(e&&e[1]){j=e[1];while(d.elements["menu-item["+j+"][menu-item-type]"]||f[j]){j--}f[j]=true;if(j!=e[1]){k[h]=k[h].replace(new RegExp("menu-item\\["+e[1]+"\\]","g"),"menu-item["+j+"]")}}}b(".categorychecklist",c).html(k.join(""));b("img.waiting",c).hide()},removeMenuItem:function(d){var c=d.childMenuItems();d.addClass("deleting").animate({opacity:0,height:0},350,function(){var e=b("#menu-instructions");d.remove();c.shiftDepthClass(-1).updateParentMenuItemDBId();if(!e.siblings().length){e.removeClass("menu-instructions-inactive")}})},depthToPx:function(c){return c*a.options.menuItemDepthPerLevel},pxToDepth:function(c){return Math.floor(c/a.options.menuItemDepthPerLevel)}};b(document).ready(function(){wpNavMenu.init()})})(jQuery); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/e398795d3454e46a1d591d928a1000318f6f4e32/nav-menu.js/clean/wp-admin/js/nav-menu.js |
var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){var c=b.slideToggle(150,function(){b.css("display","")}).parent().toggleClass("wp-menu-open").attr("id");if(c){a("li.wp-has-submenu","#adminmenu").each(function(f,g){if(c==g.id){var d=a(g).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+f,d)}})}return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var d=a(this),c=d.val();if(d.attr("checked")){b.checked(c)}else{b.unchecked(c)}columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show()},unchecked:function(b){a(".column-"+b).hide()},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var b=this.id;return b.substring(b,b.length-5)}).get().join(",")}},};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(d){var f=false,a,e,c,b;d("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");d("div.updated, div.error").not(".below-h2, .inline").insertAfter(d("div.wrap h2:first"));d("#show-settings-link").click(function(){if(!d("#screen-options-wrap").hasClass("screen-options-open")){d("#contextual-help-link-wrap").css("visibility","hidden")}d("#screen-options-wrap").slideToggle("fast",function(){if(d(this).hasClass("screen-options-open")){d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right.gif")'});d("#contextual-help-link-wrap").css("visibility","");d(this).removeClass("screen-options-open")}else{d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right-up.gif")'});d(this).addClass("screen-options-open")}});return false});d("#contextual-help-link").click(function(){if(!d("#contextual-help-wrap").hasClass("contextual-help-open")){d("#screen-options-link-wrap").css("visibility","hidden")}d("#contextual-help-wrap").slideToggle("fast",function(){if(d(this).hasClass("contextual-help-open")){d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right.gif")'});d("#screen-options-link-wrap").css("visibility","");d(this).removeClass("contextual-help-open")}else{d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right-up.gif")'});d(this).addClass("contextual-help-open")}});return false});d("tbody").children().children(".check-column").find(":checkbox").click(function(g){if("undefined"==g.shiftKey){return true}if(g.shiftKey){if(!f){return true}a=d(f).closest("form").find(":checkbox");e=a.index(f);c=a.index(this);b=d(this).attr("checked");if(0<e&&0<c&&e!=c){a.slice(e,c).attr("checked",function(){if(d(this).closest("tr").is(":visible")){return b?"checked":""}return""})}}f=this;return true});d("thead, tfoot").find(":checkbox").click(function(i){var j=d(this).attr("checked"),h="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,g=i.shiftKey||h;d(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(d(this).closest("tr").is(":hidden")){return""}if(g){return d(this).attr("checked")?"":"checked"}else{if(j){return"checked"}}return""});d(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(g){return""}else{if(j){return"checked"}}return""})});d("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");d("div.default-password-nag").hide();return false});d("#newcontent").keydown(function(l){if(l.keyCode!=9){return true}var i=l.target,n=i.selectionStart,h=i.selectionEnd,m=i.value,g,k;try{this.lastKey=9}catch(j){}if(document.selection){i.focus();k=document.selection.createRange();k.text="\t"}else{if(n>=0){g=this.scrollTop;i.value=m.substring(0,n).concat("\t",m.substring(h));i.selectionStart=i.selectionEnd=n+1;this.scrollTop=g}}if(l.stopPropagation){l.stopPropagation()}if(l.preventDefault){l.preventDefault()}});d("#newcontent").blur(function(g){if(this.lastKey&&9==this.lastKey){this.focus()}})}); | var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){var c=b.slideToggle(150,function(){b.css("display","")}).parent().toggleClass("wp-menu-open").attr("id");if(c){a("li.wp-has-submenu","#adminmenu").each(function(f,g){if(c==g.id){var d=a(g).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+f,d)}})}return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var d=a(this),c=d.val();if(d.attr("checked")){b.checked(c)}else{b.unchecked(c)}columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show()},unchecked:function(b){a(".column-"+b).hide()},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var b=this.id;return b.substring(b,b.length-5)}).get().join(",")}}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(d){var f=false,a,e,c,b;d("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");d("div.updated, div.error").not(".below-h2, .inline").insertAfter(d("div.wrap h2:first"));d("#show-settings-link").click(function(){if(!d("#screen-options-wrap").hasClass("screen-options-open")){d("#contextual-help-link-wrap").css("visibility","hidden")}d("#screen-options-wrap").slideToggle("fast",function(){if(d(this).hasClass("screen-options-open")){d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right.gif")'});d("#contextual-help-link-wrap").css("visibility","");d(this).removeClass("screen-options-open")}else{d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right-up.gif")'});d(this).addClass("screen-options-open")}});return false});d("#contextual-help-link").click(function(){if(!d("#contextual-help-wrap").hasClass("contextual-help-open")){d("#screen-options-link-wrap").css("visibility","hidden")}d("#contextual-help-wrap").slideToggle("fast",function(){if(d(this).hasClass("contextual-help-open")){d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right.gif")'});d("#screen-options-link-wrap").css("visibility","");d(this).removeClass("contextual-help-open")}else{d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right-up.gif")'});d(this).addClass("contextual-help-open")}});return false});d("tbody").children().children(".check-column").find(":checkbox").click(function(g){if("undefined"==g.shiftKey){return true}if(g.shiftKey){if(!f){return true}a=d(f).closest("form").find(":checkbox");e=a.index(f);c=a.index(this);b=d(this).attr("checked");if(0<e&&0<c&&e!=c){a.slice(e,c).attr("checked",function(){if(d(this).closest("tr").is(":visible")){return b?"checked":""}return""})}}f=this;return true});d("thead, tfoot").find(":checkbox").click(function(i){var j=d(this).attr("checked"),h="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,g=i.shiftKey||h;d(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(d(this).closest("tr").is(":hidden")){return""}if(g){return d(this).attr("checked")?"":"checked"}else{if(j){return"checked"}}return""});d(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(g){return""}else{if(j){return"checked"}}return""})});d("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");d("div.default-password-nag").hide();return false});d("#newcontent").keydown(function(l){if(l.keyCode!=9){return true}var i=l.target,n=i.selectionStart,h=i.selectionEnd,m=i.value,g,k;try{this.lastKey=9}catch(j){}if(document.selection){i.focus();k=document.selection.createRange();k.text="\t"}else{if(n>=0){g=this.scrollTop;i.value=m.substring(0,n).concat("\t",m.substring(h));i.selectionStart=i.selectionEnd=n+1;this.scrollTop=g}}if(l.stopPropagation){l.stopPropagation()}if(l.preventDefault){l.preventDefault()}});d("#newcontent").blur(function(g){if(this.lastKey&&9==this.lastKey){this.focus()}})}); | var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){var c=b.slideToggle(150,function(){b.css("display","")}).parent().toggleClass("wp-menu-open").attr("id");if(c){a("li.wp-has-submenu","#adminmenu").each(function(f,g){if(c==g.id){var d=a(g).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+f,d)}})}return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var d=a(this),c=d.val();if(d.attr("checked")){b.checked(c)}else{b.unchecked(c)}columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show()},unchecked:function(b){a(".column-"+b).hide()},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var b=this.id;return b.substring(b,b.length-5)}).get().join(",")}},};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(d){var f=false,a,e,c,b;d("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");d("div.updated, div.error").not(".below-h2, .inline").insertAfter(d("div.wrap h2:first"));d("#show-settings-link").click(function(){if(!d("#screen-options-wrap").hasClass("screen-options-open")){d("#contextual-help-link-wrap").css("visibility","hidden")}d("#screen-options-wrap").slideToggle("fast",function(){if(d(this).hasClass("screen-options-open")){d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right.gif")'});d("#contextual-help-link-wrap").css("visibility","");d(this).removeClass("screen-options-open")}else{d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right-up.gif")'});d(this).addClass("screen-options-open")}});return false});d("#contextual-help-link").click(function(){if(!d("#contextual-help-wrap").hasClass("contextual-help-open")){d("#screen-options-link-wrap").css("visibility","hidden")}d("#contextual-help-wrap").slideToggle("fast",function(){if(d(this).hasClass("contextual-help-open")){d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right.gif")'});d("#screen-options-link-wrap").css("visibility","");d(this).removeClass("contextual-help-open")}else{d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right-up.gif")'});d(this).addClass("contextual-help-open")}});return false});d("tbody").children().children(".check-column").find(":checkbox").click(function(g){if("undefined"==g.shiftKey){return true}if(g.shiftKey){if(!f){return true}a=d(f).closest("form").find(":checkbox");e=a.index(f);c=a.index(this);b=d(this).attr("checked");if(0<e&&0<c&&e!=c){a.slice(e,c).attr("checked",function(){if(d(this).closest("tr").is(":visible")){return b?"checked":""}return""})}}f=this;return true});d("thead, tfoot").find(":checkbox").click(function(i){var j=d(this).attr("checked"),h="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,g=i.shiftKey||h;d(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(d(this).closest("tr").is(":hidden")){return""}if(g){return d(this).attr("checked")?"":"checked"}else{if(j){return"checked"}}return""});d(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(g){return""}else{if(j){return"checked"}}return""})});d("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");d("div.default-password-nag").hide();return false});d("#newcontent").keydown(function(l){if(l.keyCode!=9){return true}var i=l.target,n=i.selectionStart,h=i.selectionEnd,m=i.value,g,k;try{this.lastKey=9}catch(j){}if(document.selection){i.focus();k=document.selection.createRange();k.text="\t"}else{if(n>=0){g=this.scrollTop;i.value=m.substring(0,n).concat("\t",m.substring(h));i.selectionStart=i.selectionEnd=n+1;this.scrollTop=g}}if(l.stopPropagation){l.stopPropagation()}if(l.preventDefault){l.preventDefault()}});d("#newcontent").blur(function(g){if(this.lastKey&&9==this.lastKey){this.focus()}})}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/73fcd8d2aadd65b57fb25eba9b42cbf6e3eec6db/common.js/clean/wp-admin/js/common.js |
var WPNavMenuHandler=function(){var h=jQuery,a=false,j=null,g,d,m,i,l={},n=function(p,t,q,s){if(p&&p[0]){var r=h.parseJSON(p[0]);if(r.post_title){if(r.ID&&r.post_type){l[r.post_title]={ID:r.ID,object_type:r.post_type}}return r.post_title}}},o=function(p,t,q,s){if(p&&p[0]){var r=h.parseJSON(p[0]);if(r.post_title){return r.post_title}}},b=function(v,u){if(!v){return false}u=u||document;var q=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-append","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],p={},r=u.getElementsByTagName("input"),t=r.length,s,w=document.getElementById("nav-menu-meta-object-id").value;while(t--){s=q.length;while(s--){if(r[t]&&r[t].name&&"menu-item["+v+"]["+q[s]+"]"==r[t].name){p[q[s]]=r[t].value}}}return p},c=function(){var t=this.getElementsByTagName("input"),q=t.length,p,s,r;while(q--){if(-1!=t[q].name.indexOf("menu-item-parent-id["+parseInt(this.id.replace("menu-item-",""),10)+"]")){if(!this.parentNode.className||-1==this.parentNode.className.indexOf("sub-menu")){t[q].value=0}else{if("LI"==this.parentNode.parentNode.nodeName&&-1!=this.parentNode.parentNode.id.indexOf("menu-item-")){s=this.parentNode.parentNode;r=s.getElementsByTagName("input");p=r.length;while(p--){if(r[p].name&&-1!=r[p].name.indexOf("menu-item-object-id["+parseInt(s.id.replace("menu-item-",""),10)+"]")){t[q].value=parseInt(r[p].value,10);break}}}}break}}},e=function(p){var q=this;h(p).droppable({accept:".menu li",tolerance:"pointer",drop:function(s,r){q.eventOnDrop(r.draggable[0],this,r,s)},over:function(s,r){q.eventOnDragOver(r.draggable[0],this,r,s)},out:function(s,r){q.eventOnDragOut(r.draggable[0],this,r,s)}})},k,f=function(s){if(!s){return}var q=document.getElementById(s.id+"-dummy-list-item"),p=s.getElementsByTagName("li"),r=p.length;if(!q){q=document.createElement("li");q.id=s.id+"-dummy-list-item";s.appendChild(q);this.setupListItemDragAndDrop(q)}while(r--){this.setupListItemDragAndDrop(p[r])}};return{init:function(){k=document.getElementById("menu-to-edit");this.attachMenuEditListeners();this.attachMenuMetaListeners(document.getElementById("nav-menu-meta"));this.attachTabsPanelListeners();f.call(this,k);this.initToggles()},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(p){h(".field-"+p).removeClass("hidden-field")};columns.unchecked=function(p){h(".field-"+p).addClass("hidden-field")};this.hideAdvancedMenuItemFields()},hideAdvancedMenuItemFields:function(p){p=p||".menu";h(".hide-column-tog").not(":checked").each(function(){h(p).find(".field-"+h(this).val()).addClass("hidden-field")})},attachMenuEditListeners:function(){var p=this;h("#update-nav-menu").bind("click",function(q){if(q.target&&q.target.className){if(-1!=q.target.className.indexOf("item-edit")){return p.eventOnClickEditLink(q.target)}else{if(-1!=q.target.className.indexOf("menu-delete")){return p.eventOnClickMenuDelete(q.target)}else{if(-1!=q.target.className.indexOf("item-delete")){return p.eventOnClickMenuItemDelete(q.target)}else{if(-1!=q.target.className.indexOf("item-close")){return p.eventOnClickCloseLink(q.target)}}}}}})},attachMenuMetaListeners:function(q){if(!q){return}var r=this,p="label-with-default-title";h("."+p).each(function(){var u=h(this),t=u.attr("title"),s=u.val();u.data(p,t);if(""==s){u.val(t)}else{if(t==s){return}else{u.removeClass(p)}}}).focus(function(){var s=h(this);if(s.val()==s.data(p)){s.val("").removeClass(p)}}).blur(function(){var s=h(this);if(""==s.val()){s.val(s.data(p)).addClass(p)}});h("input.quick-search").each(function(s,t){r.setupQuickSearchEventListeners(t)});h(q).bind("submit",function(s){return r.eventSubmitMetaForm.call(r,this,s)})},attachTabsPanelListeners:function(){h("#menu-settings-column").bind("click",function(u){if(u.target&&u.target.className&&-1!=u.target.className.indexOf("nav-tab-link")){var v,q=/#(.*)$/.exec(u.target.href),t,w=getParentWrapper(u.target,"inside"),p=w?w.getElementsByTagName("input"):[],r=p.length;while(r--){p[r].checked=false}h(".tabs-panel",w).each(function(){if(this.className){this.className=this.className.replace("tabs-panel-active","tabs-panel-inactive")}});h(".tabs",w).each(function(){this.className=this.className.replace("tabs","")});u.target.parentNode.className+=" tabs";if(q&&q[1]){v=document.getElementById(q[1]);if(v){v.className=v.className.replace("tabs-panel-inactive","tabs-panel-active")}}return false}else{if(u.target&&u.target.className&&-1!=u.target.className.indexOf("select-all")){var s=/#(.*)$/.exec(u.target.href);if(s&&s[1]){h("#"+s[1]+" .tabs-panel-active input[type=checkbox]").attr("checked","checked");return false}}}})},setupListItemDragAndDrop:function(r){var p=r.getElementsByTagName("dl"),s=this.makeListItemDropzone(r),q=p.length;e.call(this,s);this.makeListItemDraggable(r);while(q--){e.call(this,p[q])}},setupQuickSearchEventListeners:function(p){var q=this;h(p).autocomplete(ajaxurl+"?action=menu-quick-search&type="+p.name,{delay:500,formatItem:n,formatResult:o,minchars:2,multiple:false}).bind("blur",function(t){var r=l[this.value],s=this;if(r){h.post(ajaxurl+"?action=menu-quick-search&type=get-post-item&response-format=markup",r,function(u){q.processQuickSearchQueryResponse.call(q,u,r);l[s.value]=false})}})},eventOnClickEditLink:function(p){var r,q=/#(.*)$/.exec(p.href);if(q&&q[1]){r=h("#"+q[1]);if(0!=r.length){if(r.hasClass("menu-item-edit-inactive")){r.slideDown("fast").siblings("dl").andSelf().removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{r.slideUp("fast").siblings("dl").andSelf().removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCloseLink:function(p){h(p).closest(".menu-item-settings").siblings("dl").find(".item-edit").click();return false},eventOnClickMenuDelete:function(p){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(p){var s,r,q=this;if(confirm(navMenuL10n.warnDeleteMenuItem)){r=/_wpnonce=([a-zA-Z0-9]*)$/.exec(p.href);if(r&&r[1]){s=parseInt(p.id.replace("delete-",""),10);h.post(ajaxurl,{action:"delete-menu-item","menu-item":s,_wpnonce:r[1]},function(t){if("1"==t){q.removeMenuItem(document.getElementById("menu-item-"+s))}});return false}return true}else{return false}},eventOnDragOver:function(p,q){a=true;j=q;q.className+=" sortable-placeholder"},eventOnDragOut:function(p,q){a=false;(function(r){setTimeout(function(){if(r!=j||(!a&&r.className&&-1!=r.className.indexOf("sortable-placeholder"))){r.className=r.className.replace(/sortable-placeholder/g,"")}},800)})(q)},eventOnDrop:function(s,v){var t=!!(-1==v.className.indexOf("dropzone")),q=v.parentNode.getElementsByTagName("ul"),u=false,r=q.length,p;a=false;v.className=v.className.replace(/sortable-placeholder/g,"");if(t){while(r--){if(q[r]&&1!=q[r].className.indexOf("sub-menu")){u=true;p=q[r]}}if(!u){p=document.createElement("ul");p.className="sub-menu";v.parentNode.appendChild(p)}p.appendChild(s)}else{v.parentNode.parentNode.insertBefore(s,v.parentNode)}this.recalculateSortOrder(k);c.call(s)},eventSubmitMetaForm:function(q,w){var u=q.getElementsByTagName("input"),t=u.length,s,y,p,v,r={},x=function(){},z=new RegExp("menu-item\\[([^\\]]*)");q.className=q.className+" processing",that=this;r.action="";while(t--){if(u[t].name&&-1!=u[t].name.indexOf("menu-item-object-id")&&u[t].checked||("undefined"!=typeof u[t].id&&"custom-menu-item-url"==u[t].id&&""!=u[t].value&&"http: | var WPNavMenuHandler=function(){var h=jQuery,a=false,j=null,g,d,m,i,l={},n=function(p,t,q,s){if(p&&p[0]){var r=h.parseJSON(p[0]);if(r.post_title){if(r.ID&&r.post_type){l[r.post_title]={ID:r.ID,object_type:r.post_type}}return r.post_title}}},o=function(p,t,q,s){if(p&&p[0]){var r=h.parseJSON(p[0]);if(r.post_title){return r.post_title}}},b=function(v,u){if(!v){return false}u=u||document;var q=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-append","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],p={},r=u.getElementsByTagName("input"),t=r.length,s,w=document.getElementById("nav-menu-meta-object-id").value;while(t--){s=q.length;while(s--){if(r[t]&&r[t].name&&"menu-item["+v+"]["+q[s]+"]"==r[t].name){p[q[s]]=r[t].value}}}return p},c=function(){var t=this.getElementsByTagName("input"),q=t.length,p,s,r;while(q--){if(-1!=t[q].name.indexOf("menu-item-parent-id["+parseInt(this.id.replace("menu-item-",""),10)+"]")){if(!this.parentNode.className||-1==this.parentNode.className.indexOf("sub-menu")){t[q].value=0}else{if("LI"==this.parentNode.parentNode.nodeName&&-1!=this.parentNode.parentNode.id.indexOf("menu-item-")){s=this.parentNode.parentNode;r=s.getElementsByTagName("input");p=r.length;while(p--){if(r[p].name&&-1!=r[p].name.indexOf("menu-item-object-id["+parseInt(s.id.replace("menu-item-",""),10)+"]")){t[q].value=parseInt(r[p].value,10);break}}}}break}}},e=function(p){var q=this;h(p).droppable({accept:".menu li",tolerance:"pointer",drop:function(s,r){q.eventOnDrop(r.draggable[0],this,r,s)},over:function(s,r){q.eventOnDragOver(r.draggable[0],this,r,s)},out:function(s,r){q.eventOnDragOut(r.draggable[0],this,r,s)}})},k,f=function(s){if(!s){return}var q=document.getElementById(s.id+"-dummy-list-item"),p=s.getElementsByTagName("li"),r=p.length;if(!q){q=document.createElement("li");q.id=s.id+"-dummy-list-item";s.appendChild(q);this.setupListItemDragAndDrop(q)}while(r--){this.setupListItemDragAndDrop(p[r])}};return{init:function(){k=document.getElementById("menu-to-edit");this.attachMenuEditListeners();this.attachMenuMetaListeners(document.getElementById("nav-menu-meta"));this.attachTabsPanelListeners();f.call(this,k);this.initToggles()},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(p){h(".field-"+p).removeClass("hidden-field")};columns.unchecked=function(p){h(".field-"+p).addClass("hidden-field")};this.hideAdvancedMenuItemFields()},hideAdvancedMenuItemFields:function(p){p=p||".menu";h(".hide-column-tog").not(":checked").each(function(){h(p).find(".field-"+h(this).val()).addClass("hidden-field")})},attachMenuEditListeners:function(){var p=this;h("#update-nav-menu").bind("click",function(q){if(q.target&&q.target.className){if(-1!=q.target.className.indexOf("item-edit")){return p.eventOnClickEditLink(q.target)}else{if(-1!=q.target.className.indexOf("menu-delete")){return p.eventOnClickMenuDelete(q.target)}else{if(-1!=q.target.className.indexOf("item-delete")){return p.eventOnClickMenuItemDelete(q.target)}else{if(-1!=q.target.className.indexOf("item-close")){return p.eventOnClickCloseLink(q.target)}}}}}})},attachMenuMetaListeners:function(q){if(!q){return}var r=this,p="label-with-default-title";h("."+p).each(function(){var u=h(this),t=u.attr("title"),s=u.val();u.data(p,t);if(""==s){u.val(t)}else{if(t==s){return}else{u.removeClass(p)}}}).focus(function(){var s=h(this);if(s.val()==s.data(p)){s.val("").removeClass(p)}}).blur(function(){var s=h(this);if(""==s.val()){s.val(s.data(p)).addClass(p)}});h("input.quick-search").each(function(s,t){r.setupQuickSearchEventListeners(t)});h(q).bind("submit",function(s){return r.eventSubmitMetaForm.call(r,this,s)});h(q).find("input:submit").click(function(){h(this).siblings("img.waiting").show()})},attachTabsPanelListeners:function(){h("#menu-settings-column").bind("click",function(u){if(u.target&&u.target.className&&-1!=u.target.className.indexOf("nav-tab-link")){var v,q=/#(.*)$/.exec(u.target.href),t,w=getParentWrapper(u.target,"inside"),p=w?w.getElementsByTagName("input"):[],r=p.length;while(r--){p[r].checked=false}h(".tabs-panel",w).each(function(){if(this.className){this.className=this.className.replace("tabs-panel-active","tabs-panel-inactive")}});h(".tabs",w).each(function(){this.className=this.className.replace("tabs","")});u.target.parentNode.className+=" tabs";if(q&&q[1]){v=document.getElementById(q[1]);if(v){v.className=v.className.replace("tabs-panel-inactive","tabs-panel-active")}}return false}else{if(u.target&&u.target.className&&-1!=u.target.className.indexOf("select-all")){var s=/#(.*)$/.exec(u.target.href);if(s&&s[1]){h("#"+s[1]+" .tabs-panel-active input[type=checkbox]").attr("checked","checked");return false}}}})},setupListItemDragAndDrop:function(r){var p=r.getElementsByTagName("dl"),s=this.makeListItemDropzone(r),q=p.length;e.call(this,s);this.makeListItemDraggable(r);while(q--){e.call(this,p[q])}},setupQuickSearchEventListeners:function(p){var q=this;h(p).autocomplete(ajaxurl+"?action=menu-quick-search&type="+p.name,{delay:500,formatItem:n,formatResult:o,minchars:2,multiple:false}).bind("blur",function(t){var r=l[this.value],s=this;if(r){h.post(ajaxurl+"?action=menu-quick-search&type=get-post-item&response-format=markup",r,function(u){q.processQuickSearchQueryResponse.call(q,u,r);l[s.value]=false})}})},eventOnClickEditLink:function(p){var r,q=/#(.*)$/.exec(p.href);if(q&&q[1]){r=h("#"+q[1]);if(0!=r.length){if(r.hasClass("menu-item-edit-inactive")){r.slideDown("fast").siblings("dl").andSelf().removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{r.slideUp("fast").siblings("dl").andSelf().removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCloseLink:function(p){h(p).closest(".menu-item-settings").siblings("dl").find(".item-edit").click();return false},eventOnClickMenuDelete:function(p){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(p){var s,r,q=this;if(confirm(navMenuL10n.warnDeleteMenuItem)){r=/_wpnonce=([a-zA-Z0-9]*)$/.exec(p.href);if(r&&r[1]){s=parseInt(p.id.replace("delete-",""),10);h.post(ajaxurl,{action:"delete-menu-item","menu-item":s,_wpnonce:r[1]},function(t){if("1"==t){q.removeMenuItem(document.getElementById("menu-item-"+s))}});return false}return true}else{return false}},eventOnDragOver:function(p,q){a=true;j=q;q.className+=" sortable-placeholder"},eventOnDragOut:function(p,q){a=false;(function(r){setTimeout(function(){if(r!=j||(!a&&r.className&&-1!=r.className.indexOf("sortable-placeholder"))){r.className=r.className.replace(/sortable-placeholder/g,"")}},800)})(q)},eventOnDrop:function(s,v){var t=!!(-1==v.className.indexOf("dropzone")),q=v.parentNode.getElementsByTagName("ul"),u=false,r=q.length,p;a=false;v.className=v.className.replace(/sortable-placeholder/g,"");if(t){while(r--){if(q[r]&&1!=q[r].className.indexOf("sub-menu")){u=true;p=q[r]}}if(!u){p=document.createElement("ul");p.className="sub-menu";v.parentNode.appendChild(p)}p.appendChild(s)}else{v.parentNode.parentNode.insertBefore(s,v.parentNode)}this.recalculateSortOrder(k);c.call(s)},eventSubmitMetaForm:function(q,w){var u=q.getElementsByTagName("input"),t=u.length,s,y,p,v,r={},x=function(){},z=new RegExp("menu-item\\[([^\\]]*)");that=this;r.action="";while(t--){if(u[t].name&&-1!=u[t].name.indexOf("menu-item-object-id")&&u[t].checked||("undefined"!=typeof u[t].id&&"custom-menu-item-url"==u[t].id&&""!=u[t].value&&"http: | var WPNavMenuHandler=function(){var h=jQuery,a=false,j=null,g,d,m,i,l={},n=function(p,t,q,s){if(p&&p[0]){var r=h.parseJSON(p[0]);if(r.post_title){if(r.ID&&r.post_type){l[r.post_title]={ID:r.ID,object_type:r.post_type}}return r.post_title}}},o=function(p,t,q,s){if(p&&p[0]){var r=h.parseJSON(p[0]);if(r.post_title){return r.post_title}}},b=function(v,u){if(!v){return false}u=u||document;var q=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-append","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],p={},r=u.getElementsByTagName("input"),t=r.length,s,w=document.getElementById("nav-menu-meta-object-id").value;while(t--){s=q.length;while(s--){if(r[t]&&r[t].name&&"menu-item["+v+"]["+q[s]+"]"==r[t].name){p[q[s]]=r[t].value}}}return p},c=function(){var t=this.getElementsByTagName("input"),q=t.length,p,s,r;while(q--){if(-1!=t[q].name.indexOf("menu-item-parent-id["+parseInt(this.id.replace("menu-item-",""),10)+"]")){if(!this.parentNode.className||-1==this.parentNode.className.indexOf("sub-menu")){t[q].value=0}else{if("LI"==this.parentNode.parentNode.nodeName&&-1!=this.parentNode.parentNode.id.indexOf("menu-item-")){s=this.parentNode.parentNode;r=s.getElementsByTagName("input");p=r.length;while(p--){if(r[p].name&&-1!=r[p].name.indexOf("menu-item-object-id["+parseInt(s.id.replace("menu-item-",""),10)+"]")){t[q].value=parseInt(r[p].value,10);break}}}}break}}},e=function(p){var q=this;h(p).droppable({accept:".menu li",tolerance:"pointer",drop:function(s,r){q.eventOnDrop(r.draggable[0],this,r,s)},over:function(s,r){q.eventOnDragOver(r.draggable[0],this,r,s)},out:function(s,r){q.eventOnDragOut(r.draggable[0],this,r,s)}})},k,f=function(s){if(!s){return}var q=document.getElementById(s.id+"-dummy-list-item"),p=s.getElementsByTagName("li"),r=p.length;if(!q){q=document.createElement("li");q.id=s.id+"-dummy-list-item";s.appendChild(q);this.setupListItemDragAndDrop(q)}while(r--){this.setupListItemDragAndDrop(p[r])}};return{init:function(){k=document.getElementById("menu-to-edit");this.attachMenuEditListeners();this.attachMenuMetaListeners(document.getElementById("nav-menu-meta"));this.attachTabsPanelListeners();f.call(this,k);this.initToggles()},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(p){h(".field-"+p).removeClass("hidden-field")};columns.unchecked=function(p){h(".field-"+p).addClass("hidden-field")};this.hideAdvancedMenuItemFields()},hideAdvancedMenuItemFields:function(p){p=p||".menu";h(".hide-column-tog").not(":checked").each(function(){h(p).find(".field-"+h(this).val()).addClass("hidden-field")})},attachMenuEditListeners:function(){var p=this;h("#update-nav-menu").bind("click",function(q){if(q.target&&q.target.className){if(-1!=q.target.className.indexOf("item-edit")){return p.eventOnClickEditLink(q.target)}else{if(-1!=q.target.className.indexOf("menu-delete")){return p.eventOnClickMenuDelete(q.target)}else{if(-1!=q.target.className.indexOf("item-delete")){return p.eventOnClickMenuItemDelete(q.target)}else{if(-1!=q.target.className.indexOf("item-close")){return p.eventOnClickCloseLink(q.target)}}}}}})},attachMenuMetaListeners:function(q){if(!q){return}var r=this,p="label-with-default-title";h("."+p).each(function(){var u=h(this),t=u.attr("title"),s=u.val();u.data(p,t);if(""==s){u.val(t)}else{if(t==s){return}else{u.removeClass(p)}}}).focus(function(){var s=h(this);if(s.val()==s.data(p)){s.val("").removeClass(p)}}).blur(function(){var s=h(this);if(""==s.val()){s.val(s.data(p)).addClass(p)}});h("input.quick-search").each(function(s,t){r.setupQuickSearchEventListeners(t)});h(q).bind("submit",function(s){return r.eventSubmitMetaForm.call(r,this,s)})},attachTabsPanelListeners:function(){h("#menu-settings-column").bind("click",function(u){if(u.target&&u.target.className&&-1!=u.target.className.indexOf("nav-tab-link")){var v,q=/#(.*)$/.exec(u.target.href),t,w=getParentWrapper(u.target,"inside"),p=w?w.getElementsByTagName("input"):[],r=p.length;while(r--){p[r].checked=false}h(".tabs-panel",w).each(function(){if(this.className){this.className=this.className.replace("tabs-panel-active","tabs-panel-inactive")}});h(".tabs",w).each(function(){this.className=this.className.replace("tabs","")});u.target.parentNode.className+=" tabs";if(q&&q[1]){v=document.getElementById(q[1]);if(v){v.className=v.className.replace("tabs-panel-inactive","tabs-panel-active")}}return false}else{if(u.target&&u.target.className&&-1!=u.target.className.indexOf("select-all")){var s=/#(.*)$/.exec(u.target.href);if(s&&s[1]){h("#"+s[1]+" .tabs-panel-active input[type=checkbox]").attr("checked","checked");return false}}}})},setupListItemDragAndDrop:function(r){var p=r.getElementsByTagName("dl"),s=this.makeListItemDropzone(r),q=p.length;e.call(this,s);this.makeListItemDraggable(r);while(q--){e.call(this,p[q])}},setupQuickSearchEventListeners:function(p){var q=this;h(p).autocomplete(ajaxurl+"?action=menu-quick-search&type="+p.name,{delay:500,formatItem:n,formatResult:o,minchars:2,multiple:false}).bind("blur",function(t){var r=l[this.value],s=this;if(r){h.post(ajaxurl+"?action=menu-quick-search&type=get-post-item&response-format=markup",r,function(u){q.processQuickSearchQueryResponse.call(q,u,r);l[s.value]=false})}})},eventOnClickEditLink:function(p){var r,q=/#(.*)$/.exec(p.href);if(q&&q[1]){r=h("#"+q[1]);if(0!=r.length){if(r.hasClass("menu-item-edit-inactive")){r.slideDown("fast").siblings("dl").andSelf().removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{r.slideUp("fast").siblings("dl").andSelf().removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCloseLink:function(p){h(p).closest(".menu-item-settings").siblings("dl").find(".item-edit").click();return false},eventOnClickMenuDelete:function(p){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(p){var s,r,q=this;if(confirm(navMenuL10n.warnDeleteMenuItem)){r=/_wpnonce=([a-zA-Z0-9]*)$/.exec(p.href);if(r&&r[1]){s=parseInt(p.id.replace("delete-",""),10);h.post(ajaxurl,{action:"delete-menu-item","menu-item":s,_wpnonce:r[1]},function(t){if("1"==t){q.removeMenuItem(document.getElementById("menu-item-"+s))}});return false}return true}else{return false}},eventOnDragOver:function(p,q){a=true;j=q;q.className+=" sortable-placeholder"},eventOnDragOut:function(p,q){a=false;(function(r){setTimeout(function(){if(r!=j||(!a&&r.className&&-1!=r.className.indexOf("sortable-placeholder"))){r.className=r.className.replace(/sortable-placeholder/g,"")}},800)})(q)},eventOnDrop:function(s,v){var t=!!(-1==v.className.indexOf("dropzone")),q=v.parentNode.getElementsByTagName("ul"),u=false,r=q.length,p;a=false;v.className=v.className.replace(/sortable-placeholder/g,"");if(t){while(r--){if(q[r]&&1!=q[r].className.indexOf("sub-menu")){u=true;p=q[r]}}if(!u){p=document.createElement("ul");p.className="sub-menu";v.parentNode.appendChild(p)}p.appendChild(s)}else{v.parentNode.parentNode.insertBefore(s,v.parentNode)}this.recalculateSortOrder(k);c.call(s)},eventSubmitMetaForm:function(q,w){var u=q.getElementsByTagName("input"),t=u.length,s,y,p,v,r={},x=function(){},z=new RegExp("menu-item\\[([^\\]]*)");q.className=q.className+" processing",that=this;r.action="";while(t--){if(u[t].name&&-1!=u[t].name.indexOf("menu-item-object-id")&&u[t].checked||("undefined"!=typeof u[t].id&&"custom-menu-item-url"==u[t].id&&""!=u[t].value&&"http://"!=u[t].value)){r.action="add-menu-item";x=that.processAddMenuItemResponse;v=z.exec(u[t].name);p="undefined"==typeof v[1]?0:parseInt(v[1],10);y=b(p);for(s in y){r["menu-item["+p+"]["+s+"]"]=y[s]}u[t].checked=false}else{if(""==r.action&&""!=u[t].value&&u[t].className&&-1!=u[t].className.search(/quick-search\b[^-]/)){r.action="menu-quick-search";r.q=u[t].value;r["response-format"]="markup";r.type=u[t].name;x=that.processQuickSearchQueryResponse}}}r.menu=q.elements.menu.value;r["menu-settings-column-nonce"]=q.elements["menu-settings-column-nonce"].value;h.post(ajaxurl,r,function(A){x.call(that,A,r);q.className=q.className.replace(/processing/g,"")});return false},makeListItemDraggable:function(p){h(p).draggable({handle:" > dl",opacity:0.8,addClasses:false,helper:"clone",zIndex:100})},makeListItemDropzone:function(r){if(!r){return false}var q=r.getElementsByTagName("div"),p=q.length,s=document.createElement("div");while(p--){if(q[p].className&&-1!=q[p].className.indexOf("dropzone")&&(r==q[p].parentNode)){return q[p]}}s.className="dropzone";r.insertBefore(s,r.firstChild);return s},processAddMenuItemResponse:function(p,u){if(!u){u={}}var v,q=document.getElementById(k.id+"-dummy-list-item"),s,r,t=document.createElement("ul");t.innerHTML=p;r=t.getElementsByTagName("li");s=r.length;while(s--){this.setupListItemDragAndDrop(r[s]);if(q){k.insertBefore(r[s],q)}else{k.appendChild(r[s])}}this.recalculateSortOrder(k);this.hideAdvancedMenuItemFields(k);h("#custom-menu-item-name").val("").blur();h("#custom-menu-item-url").val("http://")},processQuickSearchQueryResponse:function(t,y){if(!y){y={}}var q=document.createElement("ul"),p=document.getElementById("nav-menu-meta"),u,x,r,z,v,w=new RegExp("menu-item\\[([^\\]]*)"),s;r=w.exec(t);if(r&&r[1]){v=r[1];while(p.elements["menu-item["+v+"][menu-item-type]"]){v--}if(v!=r[1]){t=t.replace(new RegExp("menu-item\\["+r[1]+"\\]","g"),"menu-item["+v+"]")}}q.innerHTML=t;x=q.getElementsByTagName("li");if(x[0]&&y.object_type){s=document.getElementById(y.object_type+"-search-checklist");if(s){s.appendChild(x[0])}}else{if(y.type){r=/quick-search-(posttype|taxonomy)-([a-zA-Z_-]*)/.exec(y.type);if(r&&r[2]){s=document.getElementById(r[2]+"-search-checklist");if(s){u=x.length;if(!u){z=document.createElement("li");z.appendChild(document.createTextNode(navMenuL10n.noResultsFound));s.appendChild(z)}while(u--){s.appendChild(x[u])}}}}}},recalculateSortOrder:function(r){var s=r.getElementsByTagName("input"),q,p=0;for(q=0;q<s.length;q++){if(s[q].name&&-1!=s[q].name.indexOf("menu-item-position")){s[q].value=++p}}},removeMenuItem:function(r){if(!r){return false}var s=r.getElementsByTagName("ul"),q,p;if(s[0]){q=s[0].getElementsByTagName("li");for(p=0;p<q.length;p++){if(q[p].id&&-1!=q[p].id.indexOf("menu-item-")&&q[p].parentNode==s[0]){r.parentNode.insertBefore(q[p],r)}}}r.className+=" deleting";h(r).fadeOut(350,function(){this.parentNode.removeChild(this)});this.recalculateSortOrder(k)}}};var wpNavMenu=new WPNavMenuHandler();jQuery(function(){wpNavMenu.init()}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/592ec7e51e72c8bd561884cdd2b11d04ff8ef096/nav-menu.js/clean/wp-admin/js/nav-menu.js |
var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,isRTL:!!("undefined"!=typeof isRtl&&isRtl),negateIfRTL:("undefined"!=typeof isRtl&&isRtl)?-1:1,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){var c=a.isRTL?this.eq(0).css("margin-right"):this.eq(0).css("margin-left");return a.pxToDepth(c&&-1!=c.indexOf("px")?c.slice(0,-2):0)},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(!d[0]||!d[0].className||-1==d[0].className.indexOf("menu-item")||(d.menuItemDepth()!=f-1)){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){if(0==b("#menu-to-edit").length){return false}return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var i=b(this),h=f.exec(i.attr("name")),j="undefined"==typeof h[1]?0:parseInt(h[1],10);if(this.className&&-1!=this.className.indexOf("add-to-top")){c=a.addMenuItemToTop}d[j]=i.closest("li").getItemData("add-menu-item",j)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})},getItemData:function(f,g){f=f||"menu-item";var d={},e,c=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!g&&f=="menu-item"){g=this.find(".menu-item-data-db-id").val()}if(!g){return d}this.find("input").each(function(){var h;e=c.length;while(e--){if(f=="menu-item"){h=c[e]+"["+g+"]"}else{if(f=="add-menu-item"){h="menu-item["+g+"]["+c[e]+"]"}}if(this.name&&h==this.name){d[c[e]]=this.value}}});return d},setItemData:function(c,d,e){d=d||"menu-item";if(!e&&d=="menu-item"){e=b(".menu-item-data-db-id",this).val()}if(!e){return this}this.find("input").each(function(){var f=b(this),g;b.each(c,function(h,i){if(d=="menu-item"){g=h+"["+e+"]"}else{if(d=="add-menu-item"){g="menu-item["+e+"]["+h+"]"}}if(g==f.attr("name")){f.val(i)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;if(a.isRTL){v.item[0].style.right="auto"}g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0;if(a.isRTL){r.item[0].style.left="auto";r.item[0].style.right=0}},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.negateIfRTL*a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-cancel")){return c.eventOnClickCancelLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,isRTL:!!("undefined"!=typeof isRtl&&isRtl),negateIfRTL:("undefined"!=typeof isRtl&&isRtl)?-1:1,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){var c=a.isRTL?this.eq(0).css("margin-right"):this.eq(0).css("margin-left");return a.pxToDepth(c&&-1!=c.indexOf("px")?c.slice(0,-2):0)},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(!d[0]||!d[0].className||-1==d[0].className.indexOf("menu-item")||(d.menuItemDepth()!=f-1)){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){if(0==b("#menu-to-edit").length){return false}return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var i=b(this),h=f.exec(i.attr("name")),j="undefined"==typeof h[1]?0:parseInt(h[1],10);if(this.className&&-1!=this.className.indexOf("add-to-top")){c=a.addMenuItemToTop}d[j]=i.closest("li").getItemData("add-menu-item",j)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})},getItemData:function(f,g){f=f||"menu-item";var d={},e,c=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!g&&f=="menu-item"){g=this.find(".menu-item-data-db-id").val()}if(!g){return d}this.find("input").each(function(){var h;e=c.length;while(e--){if(f=="menu-item"){h=c[e]+"["+g+"]"}else{if(f=="add-menu-item"){h="menu-item["+g+"]["+c[e]+"]"}}if(this.name&&h==this.name){d[c[e]]=this.value}}});return d},setItemData:function(c,d,e){d=d||"menu-item";if(!e&&d=="menu-item"){e=b(".menu-item-data-db-id",this).val()}if(!e){return this}this.find("input").each(function(){var f=b(this),g;b.each(c,function(h,i){if(d=="menu-item"){g=h+"["+e+"]"}else{if(d=="add-menu-item"){g="menu-item["+e+"]["+h+"]"}}if(g==f.attr("name")){f.val(i)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var p=0,e,t,d,l,o,f,c,i,s,m=a.menuList.offset().left,h=b("body"),q,n=r();m+=a.isRTL?a.menuList.width():0;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(A,z){var u,x,w,v,y;if(a.isRTL){z.item[0].style.right="auto"}s=z.item.children(".menu-item-transport");e=z.item.menuItemDepth();j(z,e);w=(z.item.next()[0]==z.placeholder[0])?z.item.next():z.item;v=w.childMenuItems();s.append(v);u=s.outerHeight();u+=(u>0)?(z.placeholder.css("margin-top").slice(0,-2)*1):0;u+=z.helper.outerHeight();i=u;u-=2;z.placeholder.height(u);q=e;v.each(function(){var B=b(this).menuItemDepth();q=(B>q)?B:q});x=z.helper.find(".menu-item-handle").outerWidth();x+=a.depthToPx(q-e);x-=2;z.placeholder.width(x);y=z.placeholder.next();y.css("margin-top",i+"px");z.placeholder.detach();b(this).sortable("refresh");z.item.after(z.placeholder);y.css("margin-top",0);k(z)},stop:function(x,w){var v,u=p-e;v=s.children().insertAfter(w.item);if(u!=0){w.item.updateDepthClass(p);v.shiftDepthClass(u);g(u)}a.registerChange();w.item.updateParentMenuItemDBId();w.item[0].style.top=0;if(a.isRTL){w.item[0].style.left="auto";w.item[0].style.right=0}a.refreshMenuTabs(true)},change:function(v,u){if(!u.placeholder.parent().hasClass("menu")){(l.length)?l.after(u.placeholder):a.menuList.prepend(u.placeholder)}k(u)},sort:function(w,v){var y=v.helper.offset(),u=a.isRTL?y.left+v.helper.width():y.left,x=a.negateIfRTL*a.pxToDepth(u-m);if(x>d||y.top<f){x=d}else{if(x<t){x=t}}if(x!=p){j(v,x)}if(c&&y.top+i>c){o.after(v.placeholder);k(v);b(this).sortable("refreshPositions")}}});function k(u){var v;l=u.placeholder.prev();o=u.placeholder.next();if(l[0]==u.item[0]){l=l.prev()}if(o[0]==u.item[0]){o=o.next()}f=(l.length)?l.offset().top+l.height():0;c=(o.length)?o.offset().top+o.height()/3:0;t=(o.length)?o.menuItemDepth():0;if(l.length){d=((v=l.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:v}else{d=0}}function j(u,v){u.placeholder.updateDepthClass(v,p);p=v}function r(){if(!h[0].className){return 0}var u=h[0].className.match(/menu-max-depth-(\d+)/);return u&&u[1]?parseInt(u[1]):0}function g(u){var v,w=n;if(u===0){return}else{if(u>0){v=q+u;if(v>n){w=v}}else{if(u<0&&q==n){while(!b(".menu-item-depth-"+w,a.menuList).length&&w>0){w--}}}}h.removeClass("menu-max-depth-"+n).addClass("menu-max-depth-"+w);n=w}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-cancel")){return c.eventOnClickCancelLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,isRTL:!!("undefined"!=typeof isRtl&&isRtl),negateIfRTL:("undefined"!=typeof isRtl&&isRtl)?-1:1,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){var c=a.isRTL?this.eq(0).css("margin-right"):this.eq(0).css("margin-left");return a.pxToDepth(c&&-1!=c.indexOf("px")?c.slice(0,-2):0)},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(!d[0]||!d[0].className||-1==d[0].className.indexOf("menu-item")||(d.menuItemDepth()!=f-1)){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){if(0==b("#menu-to-edit").length){return false}return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var i=b(this),h=f.exec(i.attr("name")),j="undefined"==typeof h[1]?0:parseInt(h[1],10);if(this.className&&-1!=this.className.indexOf("add-to-top")){c=a.addMenuItemToTop}d[j]=i.closest("li").getItemData("add-menu-item",j)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})},getItemData:function(f,g){f=f||"menu-item";var d={},e,c=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!g&&f=="menu-item"){g=this.find(".menu-item-data-db-id").val()}if(!g){return d}this.find("input").each(function(){var h;e=c.length;while(e--){if(f=="menu-item"){h=c[e]+"["+g+"]"}else{if(f=="add-menu-item"){h="menu-item["+g+"]["+c[e]+"]"}}if(this.name&&h==this.name){d[c[e]]=this.value}}});return d},setItemData:function(c,d,e){d=d||"menu-item";if(!e&&d=="menu-item"){e=b(".menu-item-data-db-id",this).val()}if(!e){return this}this.find("input").each(function(){var f=b(this),g;b.each(c,function(h,i){if(d=="menu-item"){g=h+"["+e+"]"}else{if(d=="add-menu-item"){g="menu-item["+e+"]["+h+"]"}}if(g==f.attr("name")){f.val(i)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;if(a.isRTL){v.item[0].style.right="auto"}g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0;if(a.isRTL){r.item[0].style.left="auto";r.item[0].style.right=0}},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.negateIfRTL*a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-cancel")){return c.eventOnClickCancelLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http://"==e){return false}b(".customlinkdiv img.waiting").show();this.addLinkToMenu(e,d,c,function(){b(".customlinkdiv img.waiting").hide();b("#custom-menu-item-name").val("").blur();b("#custom-menu-item-url").val("http://")})},addLinkToMenu:function(e,d,c,f){c=c||a.addMenuItemToBottom;f=f||function(){};a.addItemToMenu({"-1":{"menu-item-type":"custom","menu-item-url":e,"menu-item-title":d}},c,f)},addItemToMenu:function(e,c,g){var f=b("#menu").val(),d=b("#menu-settings-column-nonce").val();c=c||function(){};g=g||function(){};params={action:"add-menu-item",menu:f,"menu-settings-column-nonce":d,"menu-item":e};b.post(ajaxurl,params,function(h){var i=b("#menu-instructions");c(h,params);if(!i.hasClass("menu-instructions-inactive")&&i.siblings().length){i.addClass("menu-instructions-inactive")}g()})},addMenuItemToBottom:function(c,d){b(c).hideAdvancedMenuItemFields().appendTo(a.targetList)},addMenuItemToTop:function(c,d){b(c).hideAdvancedMenuItemFields().prependTo(a.targetList)},attachUnsavedChangesListener:function(){b("#menu-management input, #menu-management select, #menu-management, #menu-management textarea").change(function(){a.registerChange()});if(0!=b("#menu-to-edit").length){window.onbeforeunload=function(){if(a.menusChanged){return navMenuL10n.saveAlert}}}else{b("#menu-settings-column").find("input,select").attr("disabled","disabled").end().find("a").attr("href","#").unbind("click")}},registerChange:function(){a.menusChanged=true},attachTabsPanelListeners:function(){b("#menu-settings-column").bind("click",function(h){var f,d,i,c,g=b(h.target);if(g.hasClass("nav-tab-link")){d=/#(.*)$/.exec(h.target.href);if(d&&d[1]){d=d[1]}else{return false}i=g.parents(".inside").first();b("input",i).removeAttr("checked");b(".tabs-panel-active",i).removeClass("tabs-panel-active").addClass("tabs-panel-inactive");b("#"+d,i).removeClass("tabs-panel-inactive").addClass("tabs-panel-active");b(".tabs",i).removeClass("tabs");g.parent().addClass("tabs");b(".quick-search",i).focus();return false}else{if(g.hasClass("select-all")){f=/#(.*)$/.exec(h.target.href);if(f&&f[1]){c=b("#"+f[1]+" .tabs-panel-active .menu-item-title input");if(c.length===c.filter(":checked").length){c.removeAttr("checked")}else{c.attr("checked","checked")}return false}}else{if(g.hasClass("submit-add-to-menu")){a.registerChange();if(h.target.id&&"submit-customlinkdiv"==h.target.id){a.addCustomLink(a.addMenuItemToBottom)}else{if(h.target.id&&-1!=h.target.id.indexOf("submit-")){b("#"+h.target.id.replace(/submit-/,"")).addSelectedToMenu(a.addMenuItemToBottom)}}return false}else{if(g.hasClass("page-numbers")){b.post(ajaxurl,h.target.href.replace(/.*\?/,"").replace(/action=([^&]*)/,"")+"&action=menu-get-metabox",function(m){if(-1==m.indexOf("replace-id")){return}var l=b.parseJSON(m),e=document.getElementById(l["replace-id"]),k=document.createElement("div"),j=document.createElement("div");if(!l.markup||!e){return}j.innerHTML=l.markup?l.markup:"";e.parentNode.insertBefore(k,e);k.parentNode.removeChild(e);k.parentNode.insertBefore(j,k);k.parentNode.removeChild(k)});return false}}}}})},initTabManager:function(){var i=b(".nav-tabs-wrapper"),k=i.children(".nav-tabs"),h=k.children(".nav-tab-active"),n=k.children(".nav-tab"),f=0,p,g,m,e,l,j={},d=a.isRTL?"margin-right":"margin-left",q=a.isRTL?"margin-left":"margin-right",o=2;function c(){var t=i.width(),s=0,r={};g=i.offset().left;p=g+t;h.makeTabVisible();if(n.last().isTabVisible()){s=i.width()-f;s=s>0?0:s;r[d]=s+"px";k.animate(r,100,"linear")}if(t>f){m.add(e).hide()}else{m.add(e).show()}}b.fn.extend({makeTabVisible:function(){var v=this.eq(0),w,u,s={},r=0;if(!v.length){return this}w=v.offset().left;u=w+v.outerWidth();if(u>p){r=p-u}else{if(w<g){r=g-w}}if(!r){return this}s[d]="+="+a.negateIfRTL*r+"px";k.animate(s,Math.abs(r)*o,"linear");return this},isTabVisible:function(){var s=this.eq(0),u=s.offset().left,r=u+s.outerWidth();return(r<=p&&u>=g)?true:false}});n.each(function(){f+=b(this).outerWidth(true)});j.padding=0;j[q]=(-1*f)+"px";k.css(j);m=b('<div class="nav-tabs-arrow nav-tabs-arrow-left"><a>«</a></div>');e=b('<div class="nav-tabs-arrow nav-tabs-arrow-right"><a>»</a></div>');i.wrap('<div class="nav-tabs-nav"/>').parent().prepend(m).append(e);c();b(window).resize(function(){if(l){clearTimeout(l)}l=setTimeout(c,200)});b.each([{arrow:m,next:"next",last:"first",operator:"+="},{arrow:e,next:"prev",last:"last",operator:"-="}],function(){var r=this;this.arrow.mousedown(function(){var u=Math.abs(parseInt(k.css(d))),s=u,t={};if("-="==r.operator){s=Math.abs(f-i.width())-u}if(!s){return}t[d]=r.operator+s+"px";k.animate(t,s*o,"linear")}).mouseup(function(){var t,s;k.stop(true);t=n[r.last]();while((s=t[r.next]())&&s.length&&!s.isTabVisible()){t=s}t.makeTabVisible()})})},eventOnClickEditLink:function(d){var c,e,f=/#(.*)$/.exec(d.href);if(f&&f[1]){c=b("#"+f[1]);e=c.parent();if(0!=e.length){if(e.hasClass("menu-item-edit-inactive")){if(!c.data("menu-item-data")){c.data("menu-item-data",c.getItemData())}c.slideDown("fast");e.removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{c.slideUp("fast");e.removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCancelLink:function(d){var c=b(d).closest(".menu-item-settings");c.setItemData(c.data("menu-item-data"));return false},eventOnClickMenuSave:function(e){var f="",c=b("#menu-name"),d=c.val();if(!d||d==c.attr("title")||!d.replace(/\s+/,"")){c.parent().addClass("form-invalid");return false}b("#nav-menu-theme-locations select").each(function(){f+='<input type="hidden" name="'+this.name+'" value="'+b(this).val()+'" />'});b("#update-nav-menu").append(f);a.menuList.find(".menu-item-data-position").val(function(g){return g+1});window.onbeforeunload=null;return true},eventOnClickMenuDelete:function(c){if(confirm(navMenuL10n.warnDeleteMenu)){window.onbeforeunload=null;return true}return false},eventOnClickMenuItemDelete:function(c){var d=parseInt(c.id.replace("delete-",""),10);a.removeMenuItem(b("#menu-item-"+d));a.registerChange();return false},processQuickSearchQueryResponse:function(g,m,c){var h,e,j,f={},d=document.getElementById("nav-menu-meta"),l=new RegExp("menu-item\\[([^\\]]*)","g"),k=g.match(/<li>.*<\/li>/g);if(!k){b(".categorychecklist",c).html("<li><p>"+navMenuL10n.noResultsFound+"</p></li>");b("img.waiting",c).hide();return}h=k.length;while(h--){e=l.exec(k[h]);if(e&&e[1]){j=e[1];while(d.elements["menu-item["+j+"][menu-item-type]"]||f[j]){j--}f[j]=true;if(j!=e[1]){k[h]=k[h].replace(new RegExp("menu-item\\["+e[1]+"\\]","g"),"menu-item["+j+"]")}}}b(".categorychecklist",c).html(k.join(""));b("img.waiting",c).hide()},removeMenuItem:function(d){var c=d.childMenuItems();d.addClass("deleting").animate({opacity:0,height:0},350,function(){var e=b("#menu-instructions");d.remove();c.shiftDepthClass(-1).updateParentMenuItemDBId();if(!e.siblings().length){e.removeClass("menu-instructions-inactive")}})},depthToPx:function(c){return c*a.options.menuItemDepthPerLevel},pxToDepth:function(c){return Math.floor(c/a.options.menuItemDepthPerLevel)}};b(document).ready(function(){wpNavMenu.init()})})(jQuery); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/4fdeb848e447c889f80d777bb0ac0b20f47b02f6/nav-menu.js/clean/wp-admin/js/nav-menu.js |
var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){var c=this.eq(0).css("margin-left");return a.pxToDepth(c&&-1!=c.indexOf("px")?c.slice(0,-2):0)},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var i=b(this),h=f.exec(i.attr("name")),j="undefined"==typeof h[1]?0:parseInt(h[1],10);d[j]=i.closest("li").getItemData("add-menu-item",j)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})},getItemData:function(f,g){f=f||"menu-item";var d={},e,c=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!g&&f=="menu-item"){g=this.find(".menu-item-data-db-id").val()}if(!g){return d}this.find("input").each(function(){var h;e=c.length;while(e--){if(f=="menu-item"){h=c[e]+"["+g+"]"}else{if(f=="add-menu-item"){h="menu-item["+g+"]["+c[e]+"]"}}if(this.name&&h==this.name){d[c[e]]=this.value}}});return d},setItemData:function(c,d,e){d=d||"menu-item";if(!e&&d=="menu-item"){e=b(".menu-item-data-db-id",this).val()}if(!e){return this}this.find("input").each(function(){var f=b(this),g;b.each(c,function(h,i){if(d=="menu-item"){g=h+"["+e+"]"}else{if(d=="add-menu-item"){g="menu-item["+e+"]["+h+"]"}}if(g==f.attr("name")){f.val(i)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-cancel")){return c.eventOnClickCancelLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){var c=this.eq(0).css("margin-left");return a.pxToDepth(c&&-1!=c.indexOf("px")?c.slice(0,-2):0)},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var i=b(this),h=f.exec(i.attr("name")),j="undefined"==typeof h[1]?0:parseInt(h[1],10);if(this.className&&-1!=this.className.indexOf("add-to-top")){c=a.addMenuItemToTop}d[j]=i.closest("li").getItemData("add-menu-item",j)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})},getItemData:function(f,g){f=f||"menu-item";var d={},e,c=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!g&&f=="menu-item"){g=this.find(".menu-item-data-db-id").val()}if(!g){return d}this.find("input").each(function(){var h;e=c.length;while(e--){if(f=="menu-item"){h=c[e]+"["+g+"]"}else{if(f=="add-menu-item"){h="menu-item["+g+"]["+c[e]+"]"}}if(this.name&&h==this.name){d[c[e]]=this.value}}});return d},setItemData:function(c,d,e){d=d||"menu-item";if(!e&&d=="menu-item"){e=b(".menu-item-data-db-id",this).val()}if(!e){return this}this.find("input").each(function(){var f=b(this),g;b.each(c,function(h,i){if(d=="menu-item"){g=h+"["+e+"]"}else{if(d=="add-menu-item"){g="menu-item["+e+"]["+h+"]"}}if(g==f.attr("name")){f.val(i)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-cancel")){return c.eventOnClickCancelLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){var c=this.eq(0).css("margin-left");return a.pxToDepth(c&&-1!=c.indexOf("px")?c.slice(0,-2):0)},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var i=b(this),h=f.exec(i.attr("name")),j="undefined"==typeof h[1]?0:parseInt(h[1],10);d[j]=i.closest("li").getItemData("add-menu-item",j)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})},getItemData:function(f,g){f=f||"menu-item";var d={},e,c=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!g&&f=="menu-item"){g=this.find(".menu-item-data-db-id").val()}if(!g){return d}this.find("input").each(function(){var h;e=c.length;while(e--){if(f=="menu-item"){h=c[e]+"["+g+"]"}else{if(f=="add-menu-item"){h="menu-item["+g+"]["+c[e]+"]"}}if(this.name&&h==this.name){d[c[e]]=this.value}}});return d},setItemData:function(c,d,e){d=d||"menu-item";if(!e&&d=="menu-item"){e=b(".menu-item-data-db-id",this).val()}if(!e){return this}this.find("input").each(function(){var f=b(this),g;b.each(c,function(h,i){if(d=="menu-item"){g=h+"["+e+"]"}else{if(d=="add-menu-item"){g="menu-item["+e+"]["+h+"]"}}if(g==f.attr("name")){f.val(i)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-cancel")){return c.eventOnClickCancelLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http://"==e){return false}b(".customlinkdiv img.waiting").show();this.addLinkToMenu(e,d,c,function(){b(".customlinkdiv img.waiting").hide();b("#custom-menu-item-name").val("").blur();b("#custom-menu-item-url").val("http://")})},addLinkToMenu:function(e,d,c,f){c=c||a.addMenuItemToBottom;f=f||function(){};a.addItemToMenu({"-1":{"menu-item-type":"custom","menu-item-url":e,"menu-item-title":d}},c,f)},addItemToMenu:function(e,c,g){var f=b("#menu").val(),d=b("#menu-settings-column-nonce").val();c=c||function(){};g=g||function(){};params={action:"add-menu-item",menu:f,"menu-settings-column-nonce":d,"menu-item":e};b.post(ajaxurl,params,function(h){var i=b("#menu-instructions");c(h,params);if(!i.hasClass("menu-instructions-inactive")&&i.siblings().length){i.addClass("menu-instructions-inactive")}g()})},addMenuItemToBottom:function(c,d){b(c).hideAdvancedMenuItemFields().appendTo(a.targetList)},addMenuItemToTop:function(c,d){b(c).hideAdvancedMenuItemFields().prependTo(a.targetList)},attachHomeLinkListener:function(){b(".add-home-link",".customlinkdiv").click(function(c){a.addLinkToMenu(navMenuL10n.homeurl,navMenuL10n.home,a.addMenuItemToTop);return false})},attachUnsavedChangesListener:function(){b("#menu-management input, #menu-management select, #menu-management, #menu-management textarea").change(function(){a.registerChange()});window.onbeforeunload=function(){if(a.menusChanged){return navMenuL10n.saveAlert}};b("input.menu-save").click(function(){window.onbeforeunload=null})},registerChange:function(){a.menusChanged=true},attachTabsPanelListeners:function(){b("#menu-settings-column").bind("click",function(h){var f,d,i,c,g=b(h.target);if(g.hasClass("nav-tab-link")){d=/#(.*)$/.exec(h.target.href);if(d&&d[1]){d=d[1]}else{return false}i=g.parents(".inside").first();b("input",i).removeAttr("checked");b(".tabs-panel-active",i).removeClass("tabs-panel-active").addClass("tabs-panel-inactive");b("#"+d,i).removeClass("tabs-panel-inactive").addClass("tabs-panel-active");b(".tabs",i).removeClass("tabs");g.parent().addClass("tabs");b(".quick-search",i).focus();return false}else{if(g.hasClass("select-all")){f=/#(.*)$/.exec(h.target.href);if(f&&f[1]){c=b("#"+f[1]+" .tabs-panel-active .menu-item-title input");if(c.length===c.filter(":checked").length){c.removeAttr("checked")}else{c.attr("checked","checked")}return false}}else{if(g.hasClass("submit-add-to-menu")){a.registerChange();if(h.target.id&&"submit-customlinkdiv"==h.target.id){a.addCustomLink(a.addMenuItemToBottom)}else{if(h.target.id&&-1!=h.target.id.indexOf("submit-")){b("#"+h.target.id.replace(/submit-/,"")).addSelectedToMenu(a.addMenuItemToBottom)}}return false}else{if(g.hasClass("page-numbers")){b.post(ajaxurl,h.target.href.replace(/.*\?/,"").replace(/action=([^&]*)/,"")+"&action=menu-get-metabox",function(m){if(-1==m.indexOf("replace-id")){return}var l=b.parseJSON(m),e=document.getElementById(l["replace-id"]),k=document.createElement("div"),j=document.createElement("div");if(!l.markup||!e){return}j.innerHTML=l.markup?l.markup:"";e.parentNode.insertBefore(k,e);k.parentNode.removeChild(e);k.parentNode.insertBefore(j,k);k.parentNode.removeChild(k)});return false}}}}})},initTabManager:function(){var h=b(".nav-tabs-wrapper"),i=h.children(".nav-tabs"),g=i.children(".nav-tab-active"),l=i.children(".nav-tab"),e=0,m,f,k,d,j=false;function c(){f=h.offset().left;m=f+h.width();g.makeTabVisible()}b.fn.extend({makeTabVisible:function(){var o=this.eq(0),p,n;if(!o.length){return}p=o.offset().left;n=p+o.outerWidth();if(n>m){i.animate({"margin-left":"+="+(m-n)+"px"},"fast")}else{if(p<f){i.animate({"margin-left":"-="+(p-f)+"px"},"fast")}}return o},isTabVisible:function(){var o=this.eq(0),p=o.offset().left,n=p+o.outerWidth();return(n<=m&&p>=f)?true:false}});l.each(function(){e+=b(this).outerWidth(true)});if(e<=h.width()-i.css("padding-left").slice(0,-2)-i.css("padding-right").slice(0,-2)){return}i.css({"margin-right":(-1*e)+"px",padding:0});k=b('<div class="nav-tabs-arrow nav-tabs-arrow-left"><a>«</a></div>');d=b('<div class="nav-tabs-arrow nav-tabs-arrow-right"><a>»</a></div>');h.wrap('<div class="nav-tabs-nav"/>').parent().prepend(k).append(d);c();b(window).resize(function(){if(j){return}j=true;setTimeout(function(){c();j=false},1000)});b.each([{arrow:k,next:"next",last:"first",operator:"+="},{arrow:d,next:"prev",last:"last",operator:"-="}],function(){var n=this;this.arrow.mousedown(function(){var p=l[n.last](),o=function(){if(!p.isTabVisible()){i.animate({"margin-left":n.operator+"90px"},300,"linear",o)}};o()}).mouseup(function(){var p,o;i.stop(true);p=l[n.last]();while((o=p[n.next]())&&o.length&&!o.isTabVisible()){p=o}p.makeTabVisible()})})},eventOnClickEditLink:function(d){var c,e,f=/#(.*)$/.exec(d.href);if(f&&f[1]){c=b("#"+f[1]);e=c.parent();if(0!=e.length){if(e.hasClass("menu-item-edit-inactive")){if(!c.data("menu-item-data")){c.data("menu-item-data",c.getItemData())}c.slideDown("fast");e.removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{c.slideUp("fast");e.removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCancelLink:function(d){var c=b(d).closest(".menu-item-settings");c.setItemData(c.data("menu-item-data"));return false},eventOnClickMenuSave:function(c){var d="";b("#nav-menu-theme-locations select").each(function(){d+='<input type="hidden" name="'+this.name+'" value="'+b(this).val()+'" />'});b("#update-nav-menu").append(d);a.menuList.find(".menu-item-data-position").val(function(e){return e+1});return true},eventOnClickMenuDelete:function(c){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(c){var d=parseInt(c.id.replace("delete-",""),10);a.removeMenuItem(b("#menu-item-"+d));return false},processQuickSearchQueryResponse:function(g,m,c){var h,e,j,f={},d=document.getElementById("nav-menu-meta"),l=new RegExp("menu-item\\[([^\\]]*)","g"),k=g.match(/<li>.*<\/li>/g);if(!k){b(".categorychecklist",c).html("<li><p>"+navMenuL10n.noResultsFound+"</p></li>");b("img.waiting",c).hide();return}h=k.length;while(h--){e=l.exec(k[h]);if(e&&e[1]){j=e[1];while(d.elements["menu-item["+j+"][menu-item-type]"]||f[j]){j--}f[j]=true;if(j!=e[1]){k[h]=k[h].replace(new RegExp("menu-item\\["+e[1]+"\\]","g"),"menu-item["+j+"]")}}}b(".categorychecklist",c).html(k.join(""));b("img.waiting",c).hide()},removeMenuItem:function(d){var c=d.childMenuItems();d.addClass("deleting").animate({opacity:0,height:0},350,function(){var e=b("#menu-instructions");d.remove();c.shiftDepthClass(-1).updateParentMenuItemDBId();if(!e.siblings().length){e.removeClass("menu-instructions-inactive")}})},depthToPx:function(c){return c*a.options.menuItemDepthPerLevel},pxToDepth:function(c){return Math.floor(c/a.options.menuItemDepthPerLevel)}};b(document).ready(function(){wpNavMenu.init()})})(jQuery); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/9901104dcc712e7caf15a076bb2edb7d2a6f2a4c/nav-menu.js/buggy/wp-admin/js/nav-menu.js |
var WPNavMenuHandler=function(d){var h={},f=30,c=11,k=function(m,q,n,p){if(m&&m[0]){var o=d.parseJSON(m[0]);if(o.post_title){if(o.ID&&o.post_type){h[o.post_title]={ID:o.ID,object_type:o.post_type}}return o.post_title}}},l=function(m,q,n,p){if(m&&m[0]){var o=d.parseJSON(m[0]);if(o.post_title){return o.post_title}}},b=function(s,r){if(!s){return false}r=r||document;var n=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-append","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],m={},o=r.getElementsByTagName("input"),q=o.length,p,t=document.getElementById("nav-menu-meta-object-id").value;while(q--){p=n.length;while(p--){if(o[q]&&o[q].name&&"menu-item["+s+"]["+n[p]+"]"==o[q].name){m[n[p]]=o[q].value}}}return m},a=function(){g.find(".menu-item-data-position").val(function(m){return m+1})},e=function(m){return m*f},i=function(m){return Math.floor(m/f)},g,j;d.fn.extend({menuItemDepth:function(){return i(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(n,m){return this.each(function(){var o=d(this);m=m||o.menuItemDepth();d(this).removeClass("menu-item-depth-"+m).addClass("menu-item-depth-"+n)})},shiftDepthClass:function(m){return this.each(function(){var n=d(this),o=n.menuItemDepth();d(this).removeClass("menu-item-depth-"+o).addClass("menu-item-depth-"+(o+m))})},childMenuItems:function(){var m=d();this.each(function(){var n=d(this),p=n.menuItemDepth(),o=n.next();while(o.length&&o.menuItemDepth()>p){m=m.add(o);o=o.next()}});return m},updateParentMenuItemDBId:function(){return this.each(function(){var o=d(this),m=o.find(".menu-item-data-parent-id"),p=o.menuItemDepth(),n=o.prev();if(p==0){m.val(0)}else{while(n.menuItemDepth()!=p-1){n=n.prev()}m.val(n.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var m=d(this);d(".hide-column-tog").not(":checked").each(function(){m.find(".field-"+d(this).val()).addClass("hidden-field")})})},selectItem:function(){return this.each(function(){d(this).addClass("selected-menu-item").next().children("input").attr("checked","checked")})},deselectItem:function(){return this.each(function(){d(this).removeClass("selected-menu-item").next().children("input").removeAttr("checked")})},toggleItem:function(){return this.each(function(){var m=d(this);if(m.hasClass("selected-menu-item")){m.deselectItem()}else{m.selectItem()}})}});return{init:function(){g=d("#menu-to-edit");j=g;this.attachMenuEditListeners();this.attachMenuMetaListeners(document.getElementById("nav-menu-meta"));this.attachTabsPanelListeners();this.attachHomeLinkListener();if(g.length){this.initSortables()}this.initToggles();this.initTabManager();this.initAddMenuItemDraggables();this.checkForEmptyMenu()},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(m){d(".field-"+m).removeClass("hidden-field")};columns.unchecked=function(m){d(".field-"+m).addClass("hidden-field")};g.hideAdvancedMenuItemFields()},initSortables:function(){var s=0,r,q,m,p=g.offset().left,t,o;g.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(C,B){var A,v,z,y,w,x;o=B.item.children(".menu-item-transport");t=(B.helper.hasClass("new-menu-item"));r=(t)?0:B.item.menuItemDepth();n(B,r);if(!t){y=(B.item.next()[0]==B.placeholder[0])?B.item.next():B.item;w=y.childMenuItems();o.append(w)}u(B);v=o.outerHeight();v+=(v>0)?(B.placeholder.css("margin-top").slice(0,-2)*1):0;v+=B.helper.outerHeight();v-=2;B.placeholder.height(v);x=r;if(!t){w.each(function(){var D=d(this).menuItemDepth();x=(D>x)?D:x})}z=B.helper.find(".menu-item-handle").outerWidth();z+=e(x-r);z-=2;B.placeholder.width(z)},stop:function(y,x){var w,v=s-r;w=o.children().insertAfter(x.item);if(t){x.item.remove();if(v!=0){w.shiftDepthClass(v)}w.updateParentMenuItemDBId()}else{if(v!=0){x.item.updateDepthClass(s);w.shiftDepthClass(v)}x.item.updateParentMenuItemDBId()}a()},change:function(w,v){if(!v.placeholder.parent().hasClass("menu")){v.placeholder.appendTo(g)}u(v)},sort:function(w,v){var x=i(v.helper.offset().left-p);if(x<q){x=q}else{if(x>m){x=m}}if(x!=s){n(v,x)}},receive:function(w,v){o=v.sender.children(".menu-item-transport")}});function u(x){var w=x.placeholder.prev(),v=x.placeholder.next(),y;if(w[0]==x.item[0]){w=w.prev()}if(v[0]==x.item[0]){v=v.next()}q=(v.length)?v.menuItemDepth():0;if(w.length){m=((y=w.menuItemDepth()+1)>c)?c:y}else{m=0}}function n(v,w){v.placeholder.updateDepthClass(w,s);s=w}},initAddMenuItemDraggables:function(){var m=d(".potential-menu-item");m.click(function(n){d(this).toggleItem()}).children().draggable({helper:"clone",connectToSortable:"ul#menu-to-edit",distance:5,zIndex:100,start:function(s,q){var r=d(s.target),p=r.parent(),n=p.parent(),o;p.selectItem();j=r.children(".menu-item-transport");o=n.parents(".tabs-panel").find(".selected-menu-item").children().not(q.helper).clone();q.helper.children(".additional-menu-items").append(o);q.helper.addClass("new-menu-item");q.helper.children("div").hide();o.first().css("margin-top",0);o.children("div").addClass("menu-item-handle");q.helper.children("div").addClass("hidden-handle");n.parents(".inside").find(".add-to-menu input").click();q.helper.width(q.helper.width());q.helper.height(q.helper.height())},stop:function(o,n){j=g;d(o.target).parents(".tabs-panel").find(".selected-menu-item").deselectItem()}})},attachMenuEditListeners:function(){var m=this;d("#update-nav-menu").bind("click",function(n){if(n.target&&n.target.className){if(-1!=n.target.className.indexOf("item-edit")){return m.eventOnClickEditLink(n.target)}else{if(-1!=n.target.className.indexOf("menu-delete")){return m.eventOnClickMenuDelete(n.target)}else{if(-1!=n.target.className.indexOf("item-delete")){return m.eventOnClickMenuItemDelete(n.target)}else{if(-1!=n.target.className.indexOf("item-close")){return m.eventOnClickCloseLink(n.target)}}}}}})},setupInputWithDefaultTitle:function(){var m="input-with-default-title";d("."+m).each(function(){var p=d(this),o=p.attr("title"),n=p.val();p.data(m,o);if(""==n){p.val(o)}else{if(o==n){return}else{p.removeClass(m)}}}).focus(function(){var n=d(this);if(n.val()==n.data(m)){n.val("").removeClass(m)}}).blur(function(){var n=d(this);if(""==n.val()){n.val(n.data(m)).addClass(m)}})},attachMenuMetaListeners:function(m){if(!m){return}var n=this;this.setupInputWithDefaultTitle();d("input.quick-search").each(function(o,p){n.setupQuickSearchEventListeners(p)});d(m).click(function(p){var o=d(p.target).parent().parent().parent();if(d(p.target).is("input")&&d(p.target).hasClass("button-secondary")&&!d(p.target).hasClass("quick-search-submit")){if(d(o).hasClass("customlinkdiv")){n.addCustomLink()}else{if(d(o).hasClass("posttypediv")||d(o).hasClass("taxonomydiv")){n.addItemsToMenu(d(o).attr("id"))}}return false}else{if(d(p.target).is("input")&&d(p.target).hasClass("quick-search-submit")){n.quickSearch(d(o).attr("id"));return false}}})},quickSearch:function(u){var o=d("#"+u+" .quick-search").attr("name"),r=d("#"+u+" .quick-search").val(),t=d("#menu").val(),n=d("#menu-settings-column-nonce").val(),s={},p=this,m=function(){};m=p.processQuickSearchQueryResponse;s={action:"menu-quick-search","response-format":"markup",menu:t,"menu-settings-column-nonce":n,q:r,type:o};d.post(ajaxurl,s,function(q){m.call(p,q,s)})},addCustomLink:function(o,n,p){var o=o||d("#custom-menu-item-url").val(),n=n||d("#custom-menu-item-name").val(),p=p||false,t=d("#menu").val(),q=d("#menu-settings-column-nonce").val(),s={},r=this,m=function(){};if(""==o||"http: | var WPNavMenuHandler=function(d){var i={},g=30,c=11,l=function(n,r,o,q){if(n&&n[0]){var p=d.parseJSON(n[0]);if(p.post_title){if(p.ID&&p.post_type){i[p.post_title]={ID:p.ID,object_type:p.post_type}}return p.post_title}}},m=function(n,r,o,q){if(n&&n[0]){var p=d.parseJSON(n[0]);if(p.post_title){return p.post_title}}},b=function(t,s){if(!t){return false}s=s||document;var o=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-append","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],n={},p=s.getElementsByTagName("input"),r=p.length,q,u=document.getElementById("nav-menu-meta-object-id").value;while(r--){q=o.length;while(q--){if(p[r]&&p[r].name&&"menu-item["+t+"]["+o[q]+"]"==p[r].name){n[o[q]]=p[r].value}}}return n},a=function(){h.find(".menu-item-data-position").val(function(n){return n+1})},f=function(n){return n*g},j=function(n){return Math.floor(n/g)},h,k,e;d.fn.extend({menuItemDepth:function(){return j(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(o,n){return this.each(function(){var p=d(this);n=n||p.menuItemDepth();d(this).removeClass("menu-item-depth-"+n).addClass("menu-item-depth-"+o)})},shiftDepthClass:function(n){return this.each(function(){var o=d(this),p=o.menuItemDepth();d(this).removeClass("menu-item-depth-"+p).addClass("menu-item-depth-"+(p+n))})},childMenuItems:function(){var n=d();this.each(function(){var o=d(this),q=o.menuItemDepth(),p=o.next();while(p.length&&p.menuItemDepth()>q){n=n.add(p);p=p.next()}});return n},updateParentMenuItemDBId:function(){return this.each(function(){var p=d(this),n=p.find(".menu-item-data-parent-id"),q=p.menuItemDepth(),o=p.prev();if(q==0){n.val(0)}else{while(o.menuItemDepth()!=q-1){o=o.prev()}n.val(o.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var n=d(this);d(".hide-column-tog").not(":checked").each(function(){n.find(".field-"+d(this).val()).addClass("hidden-field")})})},selectItem:function(){return this.each(function(){d(this).addClass("selected-menu-item").next().children("input").attr("checked","checked")})},deselectItem:function(){return this.each(function(){d(this).removeClass("selected-menu-item").next().children("input").removeAttr("checked")})},toggleItem:function(){return this.each(function(){var n=d(this);if(n.hasClass("selected-menu-item")){n.deselectItem()}else{n.selectItem()}})},addSelectedToMenu:function(n){return this.each(function(){var o=d(this),q=o.find(".tabs-panel-active .categorychecklist li input:checked"),p=new RegExp("menu-item\\[([^\\]]*)");n=n||e.addMenuItemToBottom;if(!q.length){return false}o.find("img.waiting").show();d(q).each(function(){var s=d(this),r=s.parent().prev();listItemDBIDMatch=p.exec(s.attr("name"));listItemDBID="undefined"==typeof listItemDBIDMatch[1]?0:parseInt(listItemDBIDMatch[1],10);listItemData=b(listItemDBID);menuItem={};menuItem[listItemDBID]=listItemData;e.addItemToMenu(menuItem,n,function(){r.deselectItem()})});o.find("img.waiting").hide()})},});return e={init:function(){h=d("#menu-to-edit");k=h;this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachAddMenuItemListeners();this.attachQuickSearchListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();if(h.length){this.initSortables()}this.initToggles();this.initTabManager();this.initAddMenuItemDraggables();this.checkForEmptyMenu()},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(n){d(".field-"+n).removeClass("hidden-field")};columns.unchecked=function(n){d(".field-"+n).addClass("hidden-field")};h.hideAdvancedMenuItemFields()},initSortables:function(){var t=0,s,r,n,q=h.offset().left,u,p;h.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(D,C){var B,w,A,z,x,y;p=C.item.children(".menu-item-transport");u=(C.helper.hasClass("new-menu-item"));s=(u)?0:C.item.menuItemDepth();o(C,s);if(!u){z=(C.item.next()[0]==C.placeholder[0])?C.item.next():C.item;x=z.childMenuItems();p.append(x)}v(C);w=p.outerHeight();w+=(w>0)?(C.placeholder.css("margin-top").slice(0,-2)*1):0;w+=C.helper.outerHeight();w-=2;C.placeholder.height(w);y=s;if(!u){x.each(function(){var E=d(this).menuItemDepth();y=(E>y)?E:y})}A=C.helper.find(".menu-item-handle").outerWidth();A+=f(y-s);A-=2;C.placeholder.width(A)},stop:function(z,y){var x,w=t-s;x=p.children().insertAfter(y.item);if(u){y.item.remove();if(w!=0){x.shiftDepthClass(w)}x.updateParentMenuItemDBId()}else{if(w!=0){y.item.updateDepthClass(t);x.shiftDepthClass(w)}y.item.updateParentMenuItemDBId()}a()},change:function(x,w){if(!w.placeholder.parent().hasClass("menu")){w.placeholder.appendTo(h)}v(w)},sort:function(x,w){var y=j(w.helper.offset().left-q);if(y<r){y=r}else{if(y>n){y=n}}if(y!=t){o(w,y)}},receive:function(x,w){p=w.sender.children(".menu-item-transport")}});function v(y){var x=y.placeholder.prev(),w=y.placeholder.next(),z;if(x[0]==y.item[0]){x=x.prev()}if(w[0]==y.item[0]){w=w.next()}r=(w.length)?w.menuItemDepth():0;if(x.length){n=((z=x.menuItemDepth()+1)>c)?c:z}else{n=0}}function o(w,x){w.placeholder.updateDepthClass(x,t);t=x}},initAddMenuItemDraggables:function(){var n=d(".potential-menu-item");n.click(function(o){d(this).toggleItem()}).children().draggable({helper:"clone",connectToSortable:"ul#menu-to-edit",distance:5,zIndex:100,start:function(t,r){var s=d(t.target),q=s.parent(),o=q.parent(),p;q.selectItem();k=s.children(".menu-item-transport");p=o.parents(".tabs-panel").find(".selected-menu-item").children().not(r.helper).clone();r.helper.children(".additional-menu-items").append(p);r.helper.addClass("new-menu-item");r.helper.children("div").hide();p.first().css("margin-top",0);p.children("div").addClass("menu-item-handle");r.helper.children("div").addClass("hidden-handle");o.parents(".inside").find(".add-to-menu input").click();r.helper.width(r.helper.width());r.helper.height(r.helper.height())},stop:function(p,o){k=h;d(p.target).parents(".tabs-panel").find(".selected-menu-item").deselectItem()}})},attachMenuEditListeners:function(){var n=this;d("#update-nav-menu").bind("click",function(o){if(o.target&&o.target.className){if(-1!=o.target.className.indexOf("item-edit")){return n.eventOnClickEditLink(o.target)}else{if(-1!=o.target.className.indexOf("menu-delete")){return n.eventOnClickMenuDelete(o.target)}else{if(-1!=o.target.className.indexOf("item-delete")){return n.eventOnClickMenuItemDelete(o.target)}else{if(-1!=o.target.className.indexOf("item-close")){return n.eventOnClickCloseLink(o.target)}}}}}})},setupInputWithDefaultTitle:function(){var n="input-with-default-title";d("."+n).each(function(){var q=d(this),p=q.attr("title"),o=q.val();q.data(n,p);if(""==o){q.val(p)}else{if(p==o){return}else{q.removeClass(n)}}}).focus(function(){var o=d(this);if(o.val()==o.data(n)){o.val("").removeClass(n)}}).blur(function(){var o=d(this);if(""==o.val()){o.addClass(n).val(o.data(n))}})},attachAddMenuItemListeners:function(){var n=d("#nav-menu-meta");n.find(".add-to-menu input").click(function(){d(this).trigger("wp-add-menu-item",[e.addMenuItemToBottom]);return false});n.find(".customlinkdiv").bind("wp-add-menu-item",function(p,o){e.addCustomLink(o)});n.find(".posttypediv, .taxonomydiv").bind("wp-add-menu-item",function(p,o){d(this).addSelectedToMenu(o)})},attachQuickSearchListeners:function(){var o=this,n=d("#nav-menu-meta");d("input.quick-search").each(function(p,q){o.setupQuickSearchEventListeners(q)});n.find(".quick-search-submit").click(function(){d(this).trigger("wp-quick-search");return false});n.find(".inside").children().bind("wp-quick-search",function(){o.quickSearch(d(this).attr("id"))})},quickSearch:function(v){var p=d("#"+v+" .quick-search").attr("name"),s=d("#"+v+" .quick-search").val(),u=d("#menu").val(),o=d("#menu-settings-column-nonce").val(),t={},r=this,n=function(){};n=r.processQuickSearchQueryResponse;t={action:"menu-quick-search","response-format":"markup",menu:u,"menu-settings-column-nonce":o,q:s,type:p};d.post(ajaxurl,t,function(q){n.call(r,q,t)})},addCustomLink:function(n){var p=d("#custom-menu-item-url").val(),o=d("#custom-menu-item-name").val();n=n||e.addMenuItemToBottom;if(""==p||"http: | var WPNavMenuHandler=function(d){var h={},f=30,c=11,k=function(m,q,n,p){if(m&&m[0]){var o=d.parseJSON(m[0]);if(o.post_title){if(o.ID&&o.post_type){h[o.post_title]={ID:o.ID,object_type:o.post_type}}return o.post_title}}},l=function(m,q,n,p){if(m&&m[0]){var o=d.parseJSON(m[0]);if(o.post_title){return o.post_title}}},b=function(s,r){if(!s){return false}r=r||document;var n=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-append","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],m={},o=r.getElementsByTagName("input"),q=o.length,p,t=document.getElementById("nav-menu-meta-object-id").value;while(q--){p=n.length;while(p--){if(o[q]&&o[q].name&&"menu-item["+s+"]["+n[p]+"]"==o[q].name){m[n[p]]=o[q].value}}}return m},a=function(){g.find(".menu-item-data-position").val(function(m){return m+1})},e=function(m){return m*f},i=function(m){return Math.floor(m/f)},g,j;d.fn.extend({menuItemDepth:function(){return i(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(n,m){return this.each(function(){var o=d(this);m=m||o.menuItemDepth();d(this).removeClass("menu-item-depth-"+m).addClass("menu-item-depth-"+n)})},shiftDepthClass:function(m){return this.each(function(){var n=d(this),o=n.menuItemDepth();d(this).removeClass("menu-item-depth-"+o).addClass("menu-item-depth-"+(o+m))})},childMenuItems:function(){var m=d();this.each(function(){var n=d(this),p=n.menuItemDepth(),o=n.next();while(o.length&&o.menuItemDepth()>p){m=m.add(o);o=o.next()}});return m},updateParentMenuItemDBId:function(){return this.each(function(){var o=d(this),m=o.find(".menu-item-data-parent-id"),p=o.menuItemDepth(),n=o.prev();if(p==0){m.val(0)}else{while(n.menuItemDepth()!=p-1){n=n.prev()}m.val(n.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var m=d(this);d(".hide-column-tog").not(":checked").each(function(){m.find(".field-"+d(this).val()).addClass("hidden-field")})})},selectItem:function(){return this.each(function(){d(this).addClass("selected-menu-item").next().children("input").attr("checked","checked")})},deselectItem:function(){return this.each(function(){d(this).removeClass("selected-menu-item").next().children("input").removeAttr("checked")})},toggleItem:function(){return this.each(function(){var m=d(this);if(m.hasClass("selected-menu-item")){m.deselectItem()}else{m.selectItem()}})}});return{init:function(){g=d("#menu-to-edit");j=g;this.attachMenuEditListeners();this.attachMenuMetaListeners(document.getElementById("nav-menu-meta"));this.attachTabsPanelListeners();this.attachHomeLinkListener();if(g.length){this.initSortables()}this.initToggles();this.initTabManager();this.initAddMenuItemDraggables();this.checkForEmptyMenu()},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(m){d(".field-"+m).removeClass("hidden-field")};columns.unchecked=function(m){d(".field-"+m).addClass("hidden-field")};g.hideAdvancedMenuItemFields()},initSortables:function(){var s=0,r,q,m,p=g.offset().left,t,o;g.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(C,B){var A,v,z,y,w,x;o=B.item.children(".menu-item-transport");t=(B.helper.hasClass("new-menu-item"));r=(t)?0:B.item.menuItemDepth();n(B,r);if(!t){y=(B.item.next()[0]==B.placeholder[0])?B.item.next():B.item;w=y.childMenuItems();o.append(w)}u(B);v=o.outerHeight();v+=(v>0)?(B.placeholder.css("margin-top").slice(0,-2)*1):0;v+=B.helper.outerHeight();v-=2;B.placeholder.height(v);x=r;if(!t){w.each(function(){var D=d(this).menuItemDepth();x=(D>x)?D:x})}z=B.helper.find(".menu-item-handle").outerWidth();z+=e(x-r);z-=2;B.placeholder.width(z)},stop:function(y,x){var w,v=s-r;w=o.children().insertAfter(x.item);if(t){x.item.remove();if(v!=0){w.shiftDepthClass(v)}w.updateParentMenuItemDBId()}else{if(v!=0){x.item.updateDepthClass(s);w.shiftDepthClass(v)}x.item.updateParentMenuItemDBId()}a()},change:function(w,v){if(!v.placeholder.parent().hasClass("menu")){v.placeholder.appendTo(g)}u(v)},sort:function(w,v){var x=i(v.helper.offset().left-p);if(x<q){x=q}else{if(x>m){x=m}}if(x!=s){n(v,x)}},receive:function(w,v){o=v.sender.children(".menu-item-transport")}});function u(x){var w=x.placeholder.prev(),v=x.placeholder.next(),y;if(w[0]==x.item[0]){w=w.prev()}if(v[0]==x.item[0]){v=v.next()}q=(v.length)?v.menuItemDepth():0;if(w.length){m=((y=w.menuItemDepth()+1)>c)?c:y}else{m=0}}function n(v,w){v.placeholder.updateDepthClass(w,s);s=w}},initAddMenuItemDraggables:function(){var m=d(".potential-menu-item");m.click(function(n){d(this).toggleItem()}).children().draggable({helper:"clone",connectToSortable:"ul#menu-to-edit",distance:5,zIndex:100,start:function(s,q){var r=d(s.target),p=r.parent(),n=p.parent(),o;p.selectItem();j=r.children(".menu-item-transport");o=n.parents(".tabs-panel").find(".selected-menu-item").children().not(q.helper).clone();q.helper.children(".additional-menu-items").append(o);q.helper.addClass("new-menu-item");q.helper.children("div").hide();o.first().css("margin-top",0);o.children("div").addClass("menu-item-handle");q.helper.children("div").addClass("hidden-handle");n.parents(".inside").find(".add-to-menu input").click();q.helper.width(q.helper.width());q.helper.height(q.helper.height())},stop:function(o,n){j=g;d(o.target).parents(".tabs-panel").find(".selected-menu-item").deselectItem()}})},attachMenuEditListeners:function(){var m=this;d("#update-nav-menu").bind("click",function(n){if(n.target&&n.target.className){if(-1!=n.target.className.indexOf("item-edit")){return m.eventOnClickEditLink(n.target)}else{if(-1!=n.target.className.indexOf("menu-delete")){return m.eventOnClickMenuDelete(n.target)}else{if(-1!=n.target.className.indexOf("item-delete")){return m.eventOnClickMenuItemDelete(n.target)}else{if(-1!=n.target.className.indexOf("item-close")){return m.eventOnClickCloseLink(n.target)}}}}}})},setupInputWithDefaultTitle:function(){var m="input-with-default-title";d("."+m).each(function(){var p=d(this),o=p.attr("title"),n=p.val();p.data(m,o);if(""==n){p.val(o)}else{if(o==n){return}else{p.removeClass(m)}}}).focus(function(){var n=d(this);if(n.val()==n.data(m)){n.val("").removeClass(m)}}).blur(function(){var n=d(this);if(""==n.val()){n.val(n.data(m)).addClass(m)}})},attachMenuMetaListeners:function(m){if(!m){return}var n=this;this.setupInputWithDefaultTitle();d("input.quick-search").each(function(o,p){n.setupQuickSearchEventListeners(p)});d(m).click(function(p){var o=d(p.target).parent().parent().parent();if(d(p.target).is("input")&&d(p.target).hasClass("button-secondary")&&!d(p.target).hasClass("quick-search-submit")){if(d(o).hasClass("customlinkdiv")){n.addCustomLink()}else{if(d(o).hasClass("posttypediv")||d(o).hasClass("taxonomydiv")){n.addItemsToMenu(d(o).attr("id"))}}return false}else{if(d(p.target).is("input")&&d(p.target).hasClass("quick-search-submit")){n.quickSearch(d(o).attr("id"));return false}}})},quickSearch:function(u){var o=d("#"+u+" .quick-search").attr("name"),r=d("#"+u+" .quick-search").val(),t=d("#menu").val(),n=d("#menu-settings-column-nonce").val(),s={},p=this,m=function(){};m=p.processQuickSearchQueryResponse;s={action:"menu-quick-search","response-format":"markup",menu:t,"menu-settings-column-nonce":n,q:r,type:o};d.post(ajaxurl,s,function(q){m.call(p,q,s)})},addCustomLink:function(o,n,p){var o=o||d("#custom-menu-item-url").val(),n=n||d("#custom-menu-item-name").val(),p=p||false,t=d("#menu").val(),q=d("#menu-settings-column-nonce").val(),s={},r=this,m=function(){};if(""==o||"http://"==o){return false}d(".customlinkdiv img.waiting").show();s={action:"add-menu-item",menu:t,"menu-settings-column-nonce":q,"menu-item":{"-1":{"menu-item-type":"custom","menu-item-url":o,"menu-item-title":n}}};m=p?r.addMenuItemToTop:r.addMenuItemToBottom;d.post(ajaxurl,s,function(u){m.call(r,u,s);d(".customlinkdiv img.waiting").hide();wpNavMenu.resetCustomLinkForm()})},resetCustomLinkForm:function(){d("#custom-menu-item-name").val("").blur();d("#custom-menu-item-url").val("http://")},attachHomeLinkListener:function(){d(".add-home-link",".customlinkdiv").click(function(m){wpNavMenu.addCustomLink(navMenuL10n.homeurl,navMenuL10n.home,true);return false})},attachTabsPanelListeners:function(){d("#menu-settings-column").bind("click",function(r){if(r.target&&r.target.className&&-1!=r.target.className.indexOf("nav-tab-link")){var o,u=/#(.*)$/.exec(r.target.href),t,m=d(r.target).parents(".inside").first()[0],q=m?m.getElementsByTagName("input"):[],p=q.length;while(p--){q[p].checked=false}d(".tabs-panel",m).each(function(){if(this.className){this.className=this.className.replace("tabs-panel-active","tabs-panel-inactive")}});d(".tabs",m).each(function(){this.className=this.className.replace("tabs","")});r.target.parentNode.className+=" tabs";if(u&&u[1]){o=document.getElementById(u[1]);if(o){o.className=o.className.replace("tabs-panel-inactive","tabs-panel-active")}}return false}else{if(r.target&&r.target.className&&-1!=r.target.className.indexOf("select-all")){var n=/#(.*)$/.exec(r.target.href),s;if(n&&n[1]){s=d("#"+n[1]+" .tabs-panel-active .potential-menu-item");if(s.length===s.filter(".selected-menu-item").length){s.deselectItem()}else{s.selectItem()}return false}}}})},initTabManager:function(){var r=d(".nav-tabs-wrapper"),s=r.children(".nav-tabs"),q=s.children(".nav-tab-active"),u=s.children(".nav-tab"),o=0,v,p,t,n;resizing=false;function m(){p=r.offset().left;v=p+r.width();q.makeTabVisible()}d.fn.extend({makeTabVisible:function(){var x=this.eq(0),y,w;if(!x.length){return}y=x.offset().left;w=y+x.outerWidth();if(w>v){s.animate({"margin-left":"+="+(v-w)+"px",},"fast")}else{if(y<p){s.animate({"margin-left":"-="+(y-p)+"px",},"fast")}}return x},isTabVisible:function(){var x=this.eq(0),y=x.offset().left,w=y+x.outerWidth();return(w<=v&&y>=p)?true:false}});u.each(function(){o+=d(this).outerWidth(true)});if(o<=r.width()-s.css("padding-left").slice(0,-2)-s.css("padding-right").slice(0,-2)){return}s.css({"margin-right":(-1*o)+"px",padding:0,});t=d('<div class="nav-tabs-arrow nav-tabs-arrow-left"><a>«</a></div>');n=d('<div class="nav-tabs-arrow nav-tabs-arrow-right"><a>»</a></div>');r.wrap('<div class="nav-tabs-nav"/>').parent().prepend(t).append(n);m();d(window).resize(function(){if(resizing){return}resizing=true;setTimeout(function(){m();resizing=false},1000)});d.each([{arrow:t,next:"next",last:"first",operator:"+=",},{arrow:n,next:"prev",last:"last",operator:"-=",}],function(){var w=this;this.arrow.mousedown(function(){var y=u[w.last](),x=function(){if(!y.isTabVisible()){s.animate({"margin-left":w.operator+"90px",},300,"linear",x)}};x()}).mouseup(function(){var y,x;s.stop(true);y=u[w.last]();while((x=y[w.next]())&&x.length&&!x.isTabVisible()){y=x}y.makeTabVisible()})})},setupQuickSearchEventListeners:function(m){var n=this;d(m).autocomplete(ajaxurl+"?action=menu-quick-search&type="+m.name,{delay:500,formatItem:k,formatResult:l,minchars:2,multiple:false}).bind("blur",function(q){var o=h[this.value],p=this;if(o){d.post(ajaxurl+"?action=menu-quick-search&type=get-post-item&response-format=markup",o,function(s){n.processQuickSearchQueryResponse.call(n,s,o);h[p.value]=false})}})},eventOnClickEditLink:function(m){var o,n=/#(.*)$/.exec(m.href);if(n&&n[1]){o=d("#"+n[1]);if(0!=o.length){if(o.hasClass("menu-item-edit-inactive")){o.slideDown("fast").siblings("dl").andSelf().removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{o.slideUp("fast").siblings("dl").andSelf().removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCloseLink:function(m){d(m).closest(".menu-item-settings").siblings("dl").find(".item-edit").click();return false},eventOnClickMenuDelete:function(m){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(m){var p,o,n=this;if(confirm(navMenuL10n.warnDeleteMenuItem)){o=/_wpnonce=([a-zA-Z0-9]*)$/.exec(m.href);if(o&&o[1]){p=parseInt(m.id.replace("delete-",""),10);d.post(ajaxurl,{action:"delete-menu-item","menu-item":p,_wpnonce:o[1]},function(q){if("1"==q){n.removeMenuItem(document.getElementById("menu-item-"+p))}});return false}return true}else{return false}},addItemsToMenu:function(n,m){var s=d(".tabs-panel-active .categorychecklist li input:checked","#"+n),o=d("#menu").val(),r=d("#menu-settings-column-nonce").val(),p={},q=this,m=m||false,t=function(){},u=new RegExp("menu-item\\[([^\\]]*)");t=m?q.addMenuItemToTop:q.addMenuItemToBottom;if(!s.length){return false}d("#"+n+" img.waiting").show();d(s).each(function(){listItemDBIDMatch=u.exec(d(this).attr("name"));listItemDBID="undefined"==typeof listItemDBIDMatch[1]?0:parseInt(listItemDBIDMatch[1],10);listItemData=b(listItemDBID);p={action:"add-menu-item",menu:o,"menu-settings-column-nonce":r,"menu-item":{}};p["menu-item"][listItemDBID]=listItemData;d.post(ajaxurl,p,function(v){t.call(q,v,p)});d(this).parent().prev().deselectItem()});d("#"+n+" img.waiting").hide()},addMenuItemToBottom:function(m,n){d(m).hideAdvancedMenuItemFields().appendTo(j)},addMenuItemToTop:function(m,n){d(m).hideAdvancedMenuItemFields().prependTo(j)},processQuickSearchQueryResponse:function(q,v){if(!v){v={}}var n=document.createElement("ul"),m=document.getElementById("nav-menu-meta"),r,u,o,w,s,t=new RegExp("menu-item\\[([^\\]]*)"),p;o=t.exec(q);if(o&&o[1]){s=o[1];while(m.elements["menu-item["+s+"][menu-item-type]"]){s--}if(s!=o[1]){q=q.replace(new RegExp("menu-item\\["+o[1]+"\\]","g"),"menu-item["+s+"]")}}n.innerHTML=q;u=n.getElementsByTagName("li");if(u[0]&&v.object_type){p=document.getElementById(v.object_type+"-search-checklist");if(p){p.appendChild(u[0])}}else{if(v.type){o=/quick-search-(posttype|taxonomy)-([a-zA-Z_-]*)/.exec(v.type);if(o&&o[2]){p=document.getElementById(o[2]+"-search-checklist");if(p){r=u.length;if(!r){w=document.createElement("li");w.appendChild(document.createTextNode(navMenuL10n.noResultsFound));p.appendChild(w)}while(r--){p.appendChild(u[r])}}}}}},removeMenuItem:function(n){n=d(n);var m=n.childMenuItems();var o=this;n.addClass("deleting").fadeOut(350,function(){n.remove();m.shiftDepthClass(-1).updateParentMenuItemDBId();a();o.checkForEmptyMenu()})},checkForEmptyMenu:function(){if(g.children().length){return}g.height(80).one("sortstop",function(){d(this).height("auto")})}}};var wpNavMenu=new WPNavMenuHandler(jQuery);jQuery(function(){wpNavMenu.init()}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/f2b874044e3784501c3a235d2c139ac09a722783/nav-menu.js/clean/wp-admin/js/nav-menu.js |
var WPNavMenuHandler=function(d){var h={},f=30,c=11,k=function(m,q,n,p){if(m&&m[0]){var o=d.parseJSON(m[0]);if(o.post_title){if(o.ID&&o.post_type){h[o.post_title]={ID:o.ID,object_type:o.post_type}}return o.post_title}}},l=function(m,q,n,p){if(m&&m[0]){var o=d.parseJSON(m[0]);if(o.post_title){return o.post_title}}},b=function(s,r){if(!s){return false}r=r||document;var n=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-append","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],m={},o=r.getElementsByTagName("input"),q=o.length,p,t=document.getElementById("nav-menu-meta-object-id").value;while(q--){p=n.length;while(p--){if(o[q]&&o[q].name&&"menu-item["+s+"]["+n[p]+"]"==o[q].name){m[n[p]]=o[q].value}}}return m},a=function(){g.find(".menu-item-data-position").val(function(m){return m+1})},e=function(m){return m*f},i=function(m){return Math.floor(m/f)},g,j;d.fn.extend({menuItemDepth:function(){return i(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(n,m){return this.each(function(){var o=d(this);m=m||o.menuItemDepth();d(this).removeClass("menu-item-depth-"+m).addClass("menu-item-depth-"+n)})},shiftDepthClass:function(m){return this.each(function(){var n=d(this),o=n.menuItemDepth();d(this).removeClass("menu-item-depth-"+o).addClass("menu-item-depth-"+(o+m))})},childMenuItems:function(){var m=d();this.each(function(){var n=d(this),p=n.menuItemDepth(),o=n.next();while(o.length&&o.menuItemDepth()>p){m=m.add(o);o=o.next()}});return m},updateParentMenuItemDBId:function(){return this.each(function(){var o=d(this),m=o.find(".menu-item-data-parent-id"),p=o.menuItemDepth(),n=o.prev();if(p==0){m.val(0)}else{while(n.menuItemDepth()!=p-1){n=n.prev()}m.val(n.find(".menu-item-data-object-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var m=d(this);d(".hide-column-tog").not(":checked").each(function(){m.find(".field-"+d(this).val()).addClass("hidden-field")})})},selectItem:function(){return this.each(function(){d(this).addClass("selected-menu-item").next().children("input").attr("checked","checked")})},deselectItem:function(){return this.each(function(){d(this).removeClass("selected-menu-item").next().children("input").removeAttr("checked")})},toggleItem:function(){return this.each(function(){var m=d(this);if(m.hasClass("selected-menu-item")){m.deselectItem()}else{m.selectItem()}})}});return{init:function(){g=d("#menu-to-edit");j=g;this.attachMenuEditListeners();this.attachMenuMetaListeners(document.getElementById("nav-menu-meta"));this.attachTabsPanelListeners();this.attachHomeLinkListener();if(g.length){this.initSortables()}this.initToggles();this.initTabManager();this.initAddMenuItemDraggables();this.checkForEmptyMenu()},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(m){d(".field-"+m).removeClass("hidden-field")};columns.unchecked=function(m){d(".field-"+m).addClass("hidden-field")};g.hideAdvancedMenuItemFields()},initSortables:function(){var s=0,r,q,m,p=g.offset().left,t,o;g.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(C,B){var A,v,z,y,w,x;o=B.item.children(".menu-item-transport");t=(B.helper.hasClass("new-menu-item"));r=(t)?0:B.item.menuItemDepth();n(B,r);if(!t){y=(B.item.next()[0]==B.placeholder[0])?B.item.next():B.item;w=y.childMenuItems();o.append(w)}u(B);v=o.outerHeight();v+=(v>0)?(B.placeholder.css("margin-top").slice(0,-2)*1):0;v+=B.helper.outerHeight();v-=2;B.placeholder.height(v);x=r;if(!t){w.each(function(){var D=d(this).menuItemDepth();x=(D>x)?D:x})}z=B.helper.find(".menu-item-handle").outerWidth();z+=e(x-r);z-=2;B.placeholder.width(z)},stop:function(y,x){var w,v=s-r;w=o.children().insertAfter(x.item);if(t){x.item.remove();if(v!=0){w.shiftDepthClass(v)}w.updateParentMenuItemDBId()}else{if(v!=0){x.item.updateDepthClass(s);w.shiftDepthClass(v)}x.item.updateParentMenuItemDBId()}a()},change:function(w,v){if(!v.placeholder.parent().hasClass("menu")){v.placeholder.appendTo(g)}u(v)},sort:function(w,v){var x=i(v.helper.offset().left-p);if(x<q){x=q}else{if(x>m){x=m}}if(x!=s){n(v,x)}},receive:function(w,v){o=v.sender.children(".menu-item-transport")}});function u(x){var w=x.placeholder.prev(),v=x.placeholder.next(),y;if(w[0]==x.item[0]){w=w.prev()}if(v[0]==x.item[0]){v=v.next()}q=(v.length)?v.menuItemDepth():0;if(w.length){m=((y=w.menuItemDepth()+1)>c)?c:y}else{m=0}}function n(v,w){v.placeholder.updateDepthClass(w,s);s=w}},initAddMenuItemDraggables:function(){var m=d(".potential-menu-item");m.click(function(n){d(this).toggleItem()}).children().draggable({helper:"clone",connectToSortable:"ul#menu-to-edit",distance:5,zIndex:100,start:function(s,q){var r=d(s.target),p=r.parent(),n=p.parent(),o;p.selectItem();j=r.children(".menu-item-transport");o=n.parents(".tabs-panel").find(".selected-menu-item").children().not(q.helper).clone();q.helper.children(".additional-menu-items").append(o);q.helper.addClass("new-menu-item");q.helper.children("div").hide();o.first().css("margin-top",0);o.children("div").addClass("menu-item-handle");q.helper.children("div").addClass("hidden-handle");n.parents(".inside").find(".add-to-menu input").click();q.helper.width(q.helper.width());q.helper.height(q.helper.height())},stop:function(o,n){j=g;d(o.target).parents(".tabs-panel").find(".selected-menu-item").deselectItem()}})},attachMenuEditListeners:function(){var m=this;d("#update-nav-menu").bind("click",function(n){if(n.target&&n.target.className){if(-1!=n.target.className.indexOf("item-edit")){return m.eventOnClickEditLink(n.target)}else{if(-1!=n.target.className.indexOf("menu-delete")){return m.eventOnClickMenuDelete(n.target)}else{if(-1!=n.target.className.indexOf("item-delete")){return m.eventOnClickMenuItemDelete(n.target)}else{if(-1!=n.target.className.indexOf("item-close")){return m.eventOnClickCloseLink(n.target)}}}}}})},setupInputWithDefaultTitle:function(){var m="input-with-default-title";d("."+m).each(function(){var p=d(this),o=p.attr("title"),n=p.val();p.data(m,o);if(""==n){p.val(o)}else{if(o==n){return}else{p.removeClass(m)}}}).focus(function(){var n=d(this);if(n.val()==n.data(m)){n.val("").removeClass(m)}}).blur(function(){var n=d(this);if(""==n.val()){n.val(n.data(m)).addClass(m)}})},attachMenuMetaListeners:function(m){if(!m){return}var n=this;this.setupInputWithDefaultTitle();d("input.quick-search").each(function(o,p){n.setupQuickSearchEventListeners(p)});d(m).click(function(p){var o=d(p.target).parent().parent().parent();if(d(p.target).is("input")&&d(p.target).hasClass("button-secondary")&&!d(p.target).hasClass("quick-search-submit")){if(d(o).hasClass("customlinkdiv")){n.addCustomLink()}else{if(d(o).hasClass("posttypediv")||d(o).hasClass("taxonomydiv")){n.addItemsToMenu(d(o).attr("id"))}}return false}else{if(d(p.target).is("input")&&d(p.target).hasClass("quick-search-submit")){n.quickSearch(d(o).attr("id"));return false}}})},quickSearch:function(u){var o=d("#"+u+" .quick-search").attr("name"),r=d("#"+u+" .quick-search").val(),t=d("#menu").val(),n=d("#menu-settings-column-nonce").val(),s={},p=this,m=function(){};m=p.processQuickSearchQueryResponse;s={action:"menu-quick-search","response-format":"markup",menu:t,"menu-settings-column-nonce":n,q:r,type:o};d.post(ajaxurl,s,function(q){m.call(p,q,s)})},addCustomLink:function(o,n,p){var o=o||d("#custom-menu-item-url").val(),n=n||d("#custom-menu-item-name").val(),p=p||false,t=d("#menu").val(),q=d("#menu-settings-column-nonce").val(),s={},r=this,m=function(){};if(""==o||"http: | var WPNavMenuHandler=function(d){var h={},f=30,c=11,k=function(m,q,n,p){if(m&&m[0]){var o=d.parseJSON(m[0]);if(o.post_title){if(o.ID&&o.post_type){h[o.post_title]={ID:o.ID,object_type:o.post_type}}return o.post_title}}},l=function(m,q,n,p){if(m&&m[0]){var o=d.parseJSON(m[0]);if(o.post_title){return o.post_title}}},b=function(s,r){if(!s){return false}r=r||document;var n=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-append","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],m={},o=r.getElementsByTagName("input"),q=o.length,p,t=document.getElementById("nav-menu-meta-object-id").value;while(q--){p=n.length;while(p--){if(o[q]&&o[q].name&&"menu-item["+s+"]["+n[p]+"]"==o[q].name){m[n[p]]=o[q].value}}}return m},a=function(){g.find(".menu-item-data-position").val(function(m){return m+1})},e=function(m){return m*f},i=function(m){return Math.floor(m/f)},g,j;d.fn.extend({menuItemDepth:function(){return i(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(n,m){return this.each(function(){var o=d(this);m=m||o.menuItemDepth();d(this).removeClass("menu-item-depth-"+m).addClass("menu-item-depth-"+n)})},shiftDepthClass:function(m){return this.each(function(){var n=d(this),o=n.menuItemDepth();d(this).removeClass("menu-item-depth-"+o).addClass("menu-item-depth-"+(o+m))})},childMenuItems:function(){var m=d();this.each(function(){var n=d(this),p=n.menuItemDepth(),o=n.next();while(o.length&&o.menuItemDepth()>p){m=m.add(o);o=o.next()}});return m},updateParentMenuItemDBId:function(){return this.each(function(){var o=d(this),m=o.find(".menu-item-data-parent-id"),p=o.menuItemDepth(),n=o.prev();if(p==0){m.val(0)}else{while(n.menuItemDepth()!=p-1){n=n.prev()}m.val(n.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var m=d(this);d(".hide-column-tog").not(":checked").each(function(){m.find(".field-"+d(this).val()).addClass("hidden-field")})})},selectItem:function(){return this.each(function(){d(this).addClass("selected-menu-item").next().children("input").attr("checked","checked")})},deselectItem:function(){return this.each(function(){d(this).removeClass("selected-menu-item").next().children("input").removeAttr("checked")})},toggleItem:function(){return this.each(function(){var m=d(this);if(m.hasClass("selected-menu-item")){m.deselectItem()}else{m.selectItem()}})}});return{init:function(){g=d("#menu-to-edit");j=g;this.attachMenuEditListeners();this.attachMenuMetaListeners(document.getElementById("nav-menu-meta"));this.attachTabsPanelListeners();this.attachHomeLinkListener();if(g.length){this.initSortables()}this.initToggles();this.initTabManager();this.initAddMenuItemDraggables();this.checkForEmptyMenu()},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(m){d(".field-"+m).removeClass("hidden-field")};columns.unchecked=function(m){d(".field-"+m).addClass("hidden-field")};g.hideAdvancedMenuItemFields()},initSortables:function(){var s=0,r,q,m,p=g.offset().left,t,o;g.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(C,B){var A,v,z,y,w,x;o=B.item.children(".menu-item-transport");t=(B.helper.hasClass("new-menu-item"));r=(t)?0:B.item.menuItemDepth();n(B,r);if(!t){y=(B.item.next()[0]==B.placeholder[0])?B.item.next():B.item;w=y.childMenuItems();o.append(w)}u(B);v=o.outerHeight();v+=(v>0)?(B.placeholder.css("margin-top").slice(0,-2)*1):0;v+=B.helper.outerHeight();v-=2;B.placeholder.height(v);x=r;if(!t){w.each(function(){var D=d(this).menuItemDepth();x=(D>x)?D:x})}z=B.helper.find(".menu-item-handle").outerWidth();z+=e(x-r);z-=2;B.placeholder.width(z)},stop:function(y,x){var w,v=s-r;w=o.children().insertAfter(x.item);if(t){x.item.remove();if(v!=0){w.shiftDepthClass(v)}w.updateParentMenuItemDBId()}else{if(v!=0){x.item.updateDepthClass(s);w.shiftDepthClass(v)}x.item.updateParentMenuItemDBId()}a()},change:function(w,v){if(!v.placeholder.parent().hasClass("menu")){v.placeholder.appendTo(g)}u(v)},sort:function(w,v){var x=i(v.helper.offset().left-p);if(x<q){x=q}else{if(x>m){x=m}}if(x!=s){n(v,x)}},receive:function(w,v){o=v.sender.children(".menu-item-transport")}});function u(x){var w=x.placeholder.prev(),v=x.placeholder.next(),y;if(w[0]==x.item[0]){w=w.prev()}if(v[0]==x.item[0]){v=v.next()}q=(v.length)?v.menuItemDepth():0;if(w.length){m=((y=w.menuItemDepth()+1)>c)?c:y}else{m=0}}function n(v,w){v.placeholder.updateDepthClass(w,s);s=w}},initAddMenuItemDraggables:function(){var m=d(".potential-menu-item");m.click(function(n){d(this).toggleItem()}).children().draggable({helper:"clone",connectToSortable:"ul#menu-to-edit",distance:5,zIndex:100,start:function(s,q){var r=d(s.target),p=r.parent(),n=p.parent(),o;p.selectItem();j=r.children(".menu-item-transport");o=n.parents(".tabs-panel").find(".selected-menu-item").children().not(q.helper).clone();q.helper.children(".additional-menu-items").append(o);q.helper.addClass("new-menu-item");q.helper.children("div").hide();o.first().css("margin-top",0);o.children("div").addClass("menu-item-handle");q.helper.children("div").addClass("hidden-handle");n.parents(".inside").find(".add-to-menu input").click();q.helper.width(q.helper.width());q.helper.height(q.helper.height())},stop:function(o,n){j=g;d(o.target).parents(".tabs-panel").find(".selected-menu-item").deselectItem()}})},attachMenuEditListeners:function(){var m=this;d("#update-nav-menu").bind("click",function(n){if(n.target&&n.target.className){if(-1!=n.target.className.indexOf("item-edit")){return m.eventOnClickEditLink(n.target)}else{if(-1!=n.target.className.indexOf("menu-delete")){return m.eventOnClickMenuDelete(n.target)}else{if(-1!=n.target.className.indexOf("item-delete")){return m.eventOnClickMenuItemDelete(n.target)}else{if(-1!=n.target.className.indexOf("item-close")){return m.eventOnClickCloseLink(n.target)}}}}}})},setupInputWithDefaultTitle:function(){var m="input-with-default-title";d("."+m).each(function(){var p=d(this),o=p.attr("title"),n=p.val();p.data(m,o);if(""==n){p.val(o)}else{if(o==n){return}else{p.removeClass(m)}}}).focus(function(){var n=d(this);if(n.val()==n.data(m)){n.val("").removeClass(m)}}).blur(function(){var n=d(this);if(""==n.val()){n.val(n.data(m)).addClass(m)}})},attachMenuMetaListeners:function(m){if(!m){return}var n=this;this.setupInputWithDefaultTitle();d("input.quick-search").each(function(o,p){n.setupQuickSearchEventListeners(p)});d(m).click(function(p){var o=d(p.target).parent().parent().parent();if(d(p.target).is("input")&&d(p.target).hasClass("button-secondary")&&!d(p.target).hasClass("quick-search-submit")){if(d(o).hasClass("customlinkdiv")){n.addCustomLink()}else{if(d(o).hasClass("posttypediv")||d(o).hasClass("taxonomydiv")){n.addItemsToMenu(d(o).attr("id"))}}return false}else{if(d(p.target).is("input")&&d(p.target).hasClass("quick-search-submit")){n.quickSearch(d(o).attr("id"));return false}}})},quickSearch:function(u){var o=d("#"+u+" .quick-search").attr("name"),r=d("#"+u+" .quick-search").val(),t=d("#menu").val(),n=d("#menu-settings-column-nonce").val(),s={},p=this,m=function(){};m=p.processQuickSearchQueryResponse;s={action:"menu-quick-search","response-format":"markup",menu:t,"menu-settings-column-nonce":n,q:r,type:o};d.post(ajaxurl,s,function(q){m.call(p,q,s)})},addCustomLink:function(o,n,p){var o=o||d("#custom-menu-item-url").val(),n=n||d("#custom-menu-item-name").val(),p=p||false,t=d("#menu").val(),q=d("#menu-settings-column-nonce").val(),s={},r=this,m=function(){};if(""==o||"http: | var WPNavMenuHandler=function(d){var h={},f=30,c=11,k=function(m,q,n,p){if(m&&m[0]){var o=d.parseJSON(m[0]);if(o.post_title){if(o.ID&&o.post_type){h[o.post_title]={ID:o.ID,object_type:o.post_type}}return o.post_title}}},l=function(m,q,n,p){if(m&&m[0]){var o=d.parseJSON(m[0]);if(o.post_title){return o.post_title}}},b=function(s,r){if(!s){return false}r=r||document;var n=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-append","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],m={},o=r.getElementsByTagName("input"),q=o.length,p,t=document.getElementById("nav-menu-meta-object-id").value;while(q--){p=n.length;while(p--){if(o[q]&&o[q].name&&"menu-item["+s+"]["+n[p]+"]"==o[q].name){m[n[p]]=o[q].value}}}return m},a=function(){g.find(".menu-item-data-position").val(function(m){return m+1})},e=function(m){return m*f},i=function(m){return Math.floor(m/f)},g,j;d.fn.extend({menuItemDepth:function(){return i(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(n,m){return this.each(function(){var o=d(this);m=m||o.menuItemDepth();d(this).removeClass("menu-item-depth-"+m).addClass("menu-item-depth-"+n)})},shiftDepthClass:function(m){return this.each(function(){var n=d(this),o=n.menuItemDepth();d(this).removeClass("menu-item-depth-"+o).addClass("menu-item-depth-"+(o+m))})},childMenuItems:function(){var m=d();this.each(function(){var n=d(this),p=n.menuItemDepth(),o=n.next();while(o.length&&o.menuItemDepth()>p){m=m.add(o);o=o.next()}});return m},updateParentMenuItemDBId:function(){return this.each(function(){var o=d(this),m=o.find(".menu-item-data-parent-id"),p=o.menuItemDepth(),n=o.prev();if(p==0){m.val(0)}else{while(n.menuItemDepth()!=p-1){n=n.prev()}m.val(n.find(".menu-item-data-object-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var m=d(this);d(".hide-column-tog").not(":checked").each(function(){m.find(".field-"+d(this).val()).addClass("hidden-field")})})},selectItem:function(){return this.each(function(){d(this).addClass("selected-menu-item").next().children("input").attr("checked","checked")})},deselectItem:function(){return this.each(function(){d(this).removeClass("selected-menu-item").next().children("input").removeAttr("checked")})},toggleItem:function(){return this.each(function(){var m=d(this);if(m.hasClass("selected-menu-item")){m.deselectItem()}else{m.selectItem()}})}});return{init:function(){g=d("#menu-to-edit");j=g;this.attachMenuEditListeners();this.attachMenuMetaListeners(document.getElementById("nav-menu-meta"));this.attachTabsPanelListeners();this.attachHomeLinkListener();if(g.length){this.initSortables()}this.initToggles();this.initTabManager();this.initAddMenuItemDraggables();this.checkForEmptyMenu()},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(m){d(".field-"+m).removeClass("hidden-field")};columns.unchecked=function(m){d(".field-"+m).addClass("hidden-field")};g.hideAdvancedMenuItemFields()},initSortables:function(){var s=0,r,q,m,p=g.offset().left,t,o;g.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(C,B){var A,v,z,y,w,x;o=B.item.children(".menu-item-transport");t=(B.helper.hasClass("new-menu-item"));r=(t)?0:B.item.menuItemDepth();n(B,r);if(!t){y=(B.item.next()[0]==B.placeholder[0])?B.item.next():B.item;w=y.childMenuItems();o.append(w)}u(B);v=o.outerHeight();v+=(v>0)?(B.placeholder.css("margin-top").slice(0,-2)*1):0;v+=B.helper.outerHeight();v-=2;B.placeholder.height(v);x=r;if(!t){w.each(function(){var D=d(this).menuItemDepth();x=(D>x)?D:x})}z=B.helper.find(".menu-item-handle").outerWidth();z+=e(x-r);z-=2;B.placeholder.width(z)},stop:function(y,x){var w,v=s-r;w=o.children().insertAfter(x.item);if(t){x.item.remove();if(v!=0){w.shiftDepthClass(v)}w.updateParentMenuItemDBId()}else{if(v!=0){x.item.updateDepthClass(s);w.shiftDepthClass(v)}x.item.updateParentMenuItemDBId()}a()},change:function(w,v){if(!v.placeholder.parent().hasClass("menu")){v.placeholder.appendTo(g)}u(v)},sort:function(w,v){var x=i(v.helper.offset().left-p);if(x<q){x=q}else{if(x>m){x=m}}if(x!=s){n(v,x)}},receive:function(w,v){o=v.sender.children(".menu-item-transport")}});function u(x){var w=x.placeholder.prev(),v=x.placeholder.next(),y;if(w[0]==x.item[0]){w=w.prev()}if(v[0]==x.item[0]){v=v.next()}q=(v.length)?v.menuItemDepth():0;if(w.length){m=((y=w.menuItemDepth()+1)>c)?c:y}else{m=0}}function n(v,w){v.placeholder.updateDepthClass(w,s);s=w}},initAddMenuItemDraggables:function(){var m=d(".potential-menu-item");m.click(function(n){d(this).toggleItem()}).children().draggable({helper:"clone",connectToSortable:"ul#menu-to-edit",distance:5,zIndex:100,start:function(s,q){var r=d(s.target),p=r.parent(),n=p.parent(),o;p.selectItem();j=r.children(".menu-item-transport");o=n.parents(".tabs-panel").find(".selected-menu-item").children().not(q.helper).clone();q.helper.children(".additional-menu-items").append(o);q.helper.addClass("new-menu-item");q.helper.children("div").hide();o.first().css("margin-top",0);o.children("div").addClass("menu-item-handle");q.helper.children("div").addClass("hidden-handle");n.parents(".inside").find(".add-to-menu input").click();q.helper.width(q.helper.width());q.helper.height(q.helper.height())},stop:function(o,n){j=g;d(o.target).parents(".tabs-panel").find(".selected-menu-item").deselectItem()}})},attachMenuEditListeners:function(){var m=this;d("#update-nav-menu").bind("click",function(n){if(n.target&&n.target.className){if(-1!=n.target.className.indexOf("item-edit")){return m.eventOnClickEditLink(n.target)}else{if(-1!=n.target.className.indexOf("menu-delete")){return m.eventOnClickMenuDelete(n.target)}else{if(-1!=n.target.className.indexOf("item-delete")){return m.eventOnClickMenuItemDelete(n.target)}else{if(-1!=n.target.className.indexOf("item-close")){return m.eventOnClickCloseLink(n.target)}}}}}})},setupInputWithDefaultTitle:function(){var m="input-with-default-title";d("."+m).each(function(){var p=d(this),o=p.attr("title"),n=p.val();p.data(m,o);if(""==n){p.val(o)}else{if(o==n){return}else{p.removeClass(m)}}}).focus(function(){var n=d(this);if(n.val()==n.data(m)){n.val("").removeClass(m)}}).blur(function(){var n=d(this);if(""==n.val()){n.val(n.data(m)).addClass(m)}})},attachMenuMetaListeners:function(m){if(!m){return}var n=this;this.setupInputWithDefaultTitle();d("input.quick-search").each(function(o,p){n.setupQuickSearchEventListeners(p)});d(m).click(function(p){var o=d(p.target).parent().parent().parent();if(d(p.target).is("input")&&d(p.target).hasClass("button-secondary")&&!d(p.target).hasClass("quick-search-submit")){if(d(o).hasClass("customlinkdiv")){n.addCustomLink()}else{if(d(o).hasClass("posttypediv")||d(o).hasClass("taxonomydiv")){n.addItemsToMenu(d(o).attr("id"))}}return false}else{if(d(p.target).is("input")&&d(p.target).hasClass("quick-search-submit")){n.quickSearch(d(o).attr("id"));return false}}})},quickSearch:function(u){var o=d("#"+u+" .quick-search").attr("name"),r=d("#"+u+" .quick-search").val(),t=d("#menu").val(),n=d("#menu-settings-column-nonce").val(),s={},p=this,m=function(){};m=p.processQuickSearchQueryResponse;s={action:"menu-quick-search","response-format":"markup",menu:t,"menu-settings-column-nonce":n,q:r,type:o};d.post(ajaxurl,s,function(q){m.call(p,q,s)})},addCustomLink:function(o,n,p){var o=o||d("#custom-menu-item-url").val(),n=n||d("#custom-menu-item-name").val(),p=p||false,t=d("#menu").val(),q=d("#menu-settings-column-nonce").val(),s={},r=this,m=function(){};if(""==o||"http://"==o){return false}d(".customlinkdiv img.waiting").show();s={action:"add-menu-item",menu:t,"menu-settings-column-nonce":q,"menu-item":{"-1":{"menu-item-type":"custom","menu-item-url":o,"menu-item-title":n}}};m=p?r.addMenuItemToTop:r.addMenuItemToBottom;d.post(ajaxurl,s,function(u){m.call(r,u,s);d(".customlinkdiv img.waiting").hide();wpNavMenu.resetCustomLinkForm()})},resetCustomLinkForm:function(){d("#custom-menu-item-name").val("").blur();d("#custom-menu-item-url").val("http://")},attachHomeLinkListener:function(){d(".add-home-link",".customlinkdiv").click(function(m){wpNavMenu.addCustomLink(navMenuL10n.homeurl,navMenuL10n.home,true);return false})},attachTabsPanelListeners:function(){d("#menu-settings-column").bind("click",function(r){if(r.target&&r.target.className&&-1!=r.target.className.indexOf("nav-tab-link")){var o,u=/#(.*)$/.exec(r.target.href),t,m=d(r.target).parents(".inside").first()[0],q=m?m.getElementsByTagName("input"):[],p=q.length;while(p--){q[p].checked=false}d(".tabs-panel",m).each(function(){if(this.className){this.className=this.className.replace("tabs-panel-active","tabs-panel-inactive")}});d(".tabs",m).each(function(){this.className=this.className.replace("tabs","")});r.target.parentNode.className+=" tabs";if(u&&u[1]){o=document.getElementById(u[1]);if(o){o.className=o.className.replace("tabs-panel-inactive","tabs-panel-active")}}return false}else{if(r.target&&r.target.className&&-1!=r.target.className.indexOf("select-all")){var n=/#(.*)$/.exec(r.target.href),s;if(n&&n[1]){s=d("#"+n[1]+" .tabs-panel-active .potential-menu-item");if(s.length===s.filter(".selected-menu-item").length){s.deselectItem()}else{s.selectItem()}return false}}}})},initTabManager:function(){var r=d(".nav-tabs-wrapper"),s=r.children(".nav-tabs"),q=s.children(".nav-tab-active"),u=s.children(".nav-tab"),o=0,v,p,t,n;resizing=false;function m(){p=r.offset().left;v=p+r.width();q.makeTabVisible()}d.fn.extend({makeTabVisible:function(){var x=this.eq(0),y,w;if(!x.length){return}y=x.offset().left;w=y+x.outerWidth();if(w>v){s.animate({"margin-left":"+="+(v-w)+"px",},"fast")}else{if(y<p){s.animate({"margin-left":"-="+(y-p)+"px",},"fast")}}return x},isTabVisible:function(){var x=this.eq(0),y=x.offset().left,w=y+x.outerWidth();return(w<=v&&y>=p)?true:false}});u.each(function(){o+=d(this).outerWidth(true)});if(o<=r.width()-s.css("padding-left").slice(0,-2)-s.css("padding-right").slice(0,-2)){return}s.css({"margin-right":(-1*o)+"px",padding:0,});t=d('<div class="nav-tabs-arrow nav-tabs-arrow-left"><a>«</a></div>');n=d('<div class="nav-tabs-arrow nav-tabs-arrow-right"><a>»</a></div>');r.wrap('<div class="nav-tabs-nav"/>').parent().prepend(t).append(n);m();d(window).resize(function(){if(resizing){return}resizing=true;setTimeout(function(){m();resizing=false},1000)});d.each([{arrow:t,next:"next",last:"first",operator:"+=",},{arrow:n,next:"prev",last:"last",operator:"-=",}],function(){var w=this;this.arrow.mousedown(function(){var y=u[w.last](),x=function(){if(!y.isTabVisible()){s.animate({"margin-left":w.operator+"90px",},300,"linear",x)}};x()}).mouseup(function(){var y,x;s.stop(true);y=u[w.last]();while((x=y[w.next]())&&x.length&&!x.isTabVisible()){y=x}y.makeTabVisible()})})},setupQuickSearchEventListeners:function(m){var n=this;d(m).autocomplete(ajaxurl+"?action=menu-quick-search&type="+m.name,{delay:500,formatItem:k,formatResult:l,minchars:2,multiple:false}).bind("blur",function(q){var o=h[this.value],p=this;if(o){d.post(ajaxurl+"?action=menu-quick-search&type=get-post-item&response-format=markup",o,function(s){n.processQuickSearchQueryResponse.call(n,s,o);h[p.value]=false})}})},eventOnClickEditLink:function(m){var o,n=/#(.*)$/.exec(m.href);if(n&&n[1]){o=d("#"+n[1]);if(0!=o.length){if(o.hasClass("menu-item-edit-inactive")){o.slideDown("fast").siblings("dl").andSelf().removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{o.slideUp("fast").siblings("dl").andSelf().removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCloseLink:function(m){d(m).closest(".menu-item-settings").siblings("dl").find(".item-edit").click();return false},eventOnClickMenuDelete:function(m){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(m){var p,o,n=this;if(confirm(navMenuL10n.warnDeleteMenuItem)){o=/_wpnonce=([a-zA-Z0-9]*)$/.exec(m.href);if(o&&o[1]){p=parseInt(m.id.replace("delete-",""),10);d.post(ajaxurl,{action:"delete-menu-item","menu-item":p,_wpnonce:o[1]},function(q){if("1"==q){n.removeMenuItem(document.getElementById("menu-item-"+p))}});return false}return true}else{return false}},addItemsToMenu:function(n,m){var s=d(".tabs-panel-active .categorychecklist li input:checked","#"+n),o=d("#menu").val(),r=d("#menu-settings-column-nonce").val(),p={},q=this,m=m||false,t=function(){},u=new RegExp("menu-item\\[([^\\]]*)");t=m?q.addMenuItemToTop:q.addMenuItemToBottom;if(!s.length){return false}d("#"+n+" img.waiting").show();d(s).each(function(){listItemDBIDMatch=u.exec(d(this).attr("name"));listItemDBID="undefined"==typeof listItemDBIDMatch[1]?0:parseInt(listItemDBIDMatch[1],10);listItemData=b(listItemDBID);p={action:"add-menu-item",menu:o,"menu-settings-column-nonce":r,"menu-item":{}};p["menu-item"][listItemDBID]=listItemData;d.post(ajaxurl,p,function(v){t.call(q,v,p)});d(this).parent().prev().deselectItem()});d("#"+n+" img.waiting").hide()},addMenuItemToBottom:function(m,n){d(m).hideAdvancedMenuItemFields().appendTo(j)},addMenuItemToTop:function(m,n){d(m).hideAdvancedMenuItemFields().prependTo(j)},processQuickSearchQueryResponse:function(q,v){if(!v){v={}}var n=document.createElement("ul"),m=document.getElementById("nav-menu-meta"),r,u,o,w,s,t=new RegExp("menu-item\\[([^\\]]*)"),p;o=t.exec(q);if(o&&o[1]){s=o[1];while(m.elements["menu-item["+s+"][menu-item-type]"]){s--}if(s!=o[1]){q=q.replace(new RegExp("menu-item\\["+o[1]+"\\]","g"),"menu-item["+s+"]")}}n.innerHTML=q;u=n.getElementsByTagName("li");if(u[0]&&v.object_type){p=document.getElementById(v.object_type+"-search-checklist");if(p){p.appendChild(u[0])}}else{if(v.type){o=/quick-search-(posttype|taxonomy)-([a-zA-Z_-]*)/.exec(v.type);if(o&&o[2]){p=document.getElementById(o[2]+"-search-checklist");if(p){r=u.length;if(!r){w=document.createElement("li");w.appendChild(document.createTextNode(navMenuL10n.noResultsFound));p.appendChild(w)}while(r--){p.appendChild(u[r])}}}}}},removeMenuItem:function(n){n=d(n);var m=n.childMenuItems();var o=this;n.addClass("deleting").fadeOut(350,function(){n.remove();m.shiftDepthClass(-1).updateParentMenuItemDBId();a();o.checkForEmptyMenu()})},checkForEmptyMenu:function(){if(g.children().length){return}g.height(80).one("sortstop",function(){d(this).height("auto")})}}};var wpNavMenu=new WPNavMenuHandler(jQuery);jQuery(function(){wpNavMenu.init()}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/a7c0cc943333a172bacd57d00871dc35243e91e4/nav-menu.js/buggy/wp-admin/js/nav-menu.js |
var WPNavMenuHandler=function(d){var h={},f=30,c=11,k=function(m,q,n,p){if(m&&m[0]){var o=d.parseJSON(m[0]);if(o.post_title){if(o.ID&&o.post_type){h[o.post_title]={ID:o.ID,object_type:o.post_type}}return o.post_title}}},l=function(m,q,n,p){if(m&&m[0]){var o=d.parseJSON(m[0]);if(o.post_title){return o.post_title}}},b=function(s,r){if(!s){return false}r=r||document;var n=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-append","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],m={},o=r.getElementsByTagName("input"),q=o.length,p,t=document.getElementById("nav-menu-meta-object-id").value;while(q--){p=n.length;while(p--){if(o[q]&&o[q].name&&"menu-item["+s+"]["+n[p]+"]"==o[q].name){m[n[p]]=o[q].value}}}return m},a=function(){g.find(".menu-item-data-position").val(function(m){return m+1})},e=function(m){return m*f},i=function(m){return Math.floor(m/f)},g,j;d.fn.extend({menuItemDepth:function(){return i(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(n,m){return this.each(function(){var o=d(this);m=m||o.menuItemDepth();d(this).removeClass("menu-item-depth-"+m).addClass("menu-item-depth-"+n)})},shiftDepthClass:function(m){return this.each(function(){var n=d(this),o=n.menuItemDepth();d(this).removeClass("menu-item-depth-"+o).addClass("menu-item-depth-"+(o+m))})},childMenuItems:function(){var m=d();this.each(function(){var n=d(this),p=n.menuItemDepth(),o=n.next();while(o.length&&o.menuItemDepth()>p){m=m.add(o);o=o.next()}});return m},updateParentMenuItemDBId:function(){return this.each(function(){var o=d(this),m=o.find(".menu-item-data-parent-id"),p=o.menuItemDepth(),n=o.prev();if(p==0){m.val(0)}else{while(n.menuItemDepth()!=p-1){n=n.prev()}m.val(n.find(".menu-item-data-object-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var m=d(this);d(".hide-column-tog").not(":checked").each(function(){m.find(".field-"+d(this).val()).addClass("hidden-field")})})},});return{init:function(){g=d("#menu-to-edit");j=g;this.attachMenuEditListeners();this.attachMenuMetaListeners(document.getElementById("nav-menu-meta"));this.attachTabsPanelListeners();if(g.length){this.initSortables()}this.initToggles();this.initTabManager();this.initAddMenuItemDraggables()},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(m){d(".field-"+m).removeClass("hidden-field")};columns.unchecked=function(m){d(".field-"+m).addClass("hidden-field")};g.hideAdvancedMenuItemFields()},initSortables:function(){var s=0,r,q,m,p=g.offset().left,t,o;g.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(C,B){var A,v,z,y,w,x;o=B.item.children(".menu-item-transport");t=(B.helper.hasClass("new-menu-item"));r=(t)?0:B.item.menuItemDepth();n(B,r);if(!t){y=(B.item.next()[0]==B.placeholder[0])?B.item.next():B.item;w=y.childMenuItems();o.append(w)}u(B);v=o.outerHeight();v+=(v>0)?(B.placeholder.css("margin-top").slice(0,-2)*1):0;v+=B.helper.outerHeight();v-=2;B.placeholder.height(v);x=r;if(!t){w.each(function(){var D=d(this).menuItemDepth();x=(D>x)?D:x})}z=B.helper.find(".menu-item-handle").outerWidth();z+=e(x-r);z-=2;B.placeholder.width(z)},stop:function(y,x){var w,v=s-r;w=o.children().insertAfter(x.item);if(t){x.item.remove();if(v!=0){w.shiftDepthClass(v)}w.updateParentMenuItemDBId()}else{if(v!=0){x.item.updateDepthClass(s);w.shiftDepthClass(v)}x.item.updateParentMenuItemDBId()}a()},change:function(w,v){if(!v.placeholder.parent().hasClass("menu")){v.placeholder.appendTo(g)}u(v)},sort:function(w,v){var x=i(v.helper.offset().left-p);if(x<q){x=q}else{if(x>m){x=m}}if(x!=s){n(v,x)}},receive:function(w,v){o=v.sender.children(".menu-item-transport")}});function u(x){var w=x.placeholder.prev(),v=x.placeholder.next(),y;if(w[0]==x.item[0]){w=w.prev()}if(v[0]==x.item[0]){v=v.next()}q=(v.length)?v.menuItemDepth():0;if(w.length){m=((y=w.menuItemDepth()+1)>c)?c:y}else{m=0}}function n(v,w){v.placeholder.updateDepthClass(w,s);s=w}},initAddMenuItemDraggables:function(){d.fn.extend({checkItem:function(){return this.each(function(){d(this).addClass("selected-menu-item").next().children("input").attr("checked","checked")})},uncheckItem:function(){return this.each(function(){d(this).removeClass("selected-menu-item").next().children("input").removeAttr("checked")})},toggleItem:function(){return this.each(function(){var n=d(this);if(n.hasClass("selected-menu-item")){n.uncheckItem()}else{n.checkItem()}})}});var m=d(".potential-menu-item");m.click(function(n){d(this).toggleItem()}).children().draggable({helper:"clone",connectToSortable:"ul#menu-to-edit",distance:5,zIndex:100,start:function(s,q){var r=d(s.target),p=r.parent(),n=p.parent(),o;p.checkItem();j=r.children(".menu-item-transport");o=m.filter(".selected-menu-item").children().not(q.helper).clone();q.helper.children(".additional-menu-items").append(o);q.helper.addClass("new-menu-item");q.helper.children("div").hide();o.first().css("margin-top",0);o.children("div").addClass("menu-item-handle");q.helper.children("div").addClass("hidden-handle");n.parents(".inside").find(".add-to-menu input").click();q.helper.width(q.helper.width());q.helper.height(q.helper.height())},stop:function(o,n){j=g;m.filter(".selected-menu-item").uncheckItem()}})},attachMenuEditListeners:function(){var m=this;d("#update-nav-menu").bind("click",function(n){if(n.target&&n.target.className){if(-1!=n.target.className.indexOf("item-edit")){return m.eventOnClickEditLink(n.target)}else{if(-1!=n.target.className.indexOf("menu-delete")){return m.eventOnClickMenuDelete(n.target)}else{if(-1!=n.target.className.indexOf("item-delete")){return m.eventOnClickMenuItemDelete(n.target)}else{if(-1!=n.target.className.indexOf("item-close")){return m.eventOnClickCloseLink(n.target)}}}}}})},setupInputWithDefaultTitle:function(){var m="input-with-default-title";d("."+m).each(function(){var p=d(this),o=p.attr("title"),n=p.val();p.data(m,o);if(""==n){p.val(o)}else{if(o==n){return}else{p.removeClass(m)}}}).focus(function(){var n=d(this);if(n.val()==n.data(m)){n.val("").removeClass(m)}}).blur(function(){var n=d(this);if(""==n.val()){n.val(n.data(m)).addClass(m)}})},attachMenuMetaListeners:function(m){if(!m){return}var n=this;this.setupInputWithDefaultTitle();d("input.quick-search").each(function(o,p){n.setupQuickSearchEventListeners(p)});d(m).click(function(p){var o=d(p.target).parent().parent().parent();if(d(p.target).is("input")&&d(p.target).hasClass("button-secondary")&&!d(p.target).hasClass("quick-search-submit")){if(d(o).hasClass("customlinkdiv")){n.addCustomLink()}else{if(d(o).hasClass("posttypediv")||d(o).hasClass("taxonomydiv")){n.addItemsToMenu(d(o).attr("id"))}}return false}else{if(d(p.target).is("input")&&d(p.target).hasClass("quick-search-submit")){n.quickSearch(d(o).attr("id"));return false}}})},quickSearch:function(u){var o=d("#"+u+" .quick-search").attr("name"),r=d("#"+u+" .quick-search").val(),t=d("#menu").val(),n=d("#menu-settings-column-nonce").val(),s={},p=this,m=function(){};m=p.processQuickSearchQueryResponse;s={action:"menu-quick-search","response-format":"markup",menu:t,"menu-settings-column-nonce":n,q:r,type:o};d.post(ajaxurl,s,function(q){m.call(p,q,s)})},addCustomLink:function(){var o=d("#custom-menu-item-url").val(),n=d("#custom-menu-item-name").val(),s=d("#menu").val(),p=d("#menu-settings-column-nonce").val(),r={},q=this,m=function(){};if(""==o||"http: | var WPNavMenuHandler=function(d){var h={},f=30,c=11,k=function(m,q,n,p){if(m&&m[0]){var o=d.parseJSON(m[0]);if(o.post_title){if(o.ID&&o.post_type){h[o.post_title]={ID:o.ID,object_type:o.post_type}}return o.post_title}}},l=function(m,q,n,p){if(m&&m[0]){var o=d.parseJSON(m[0]);if(o.post_title){return o.post_title}}},b=function(s,r){if(!s){return false}r=r||document;var n=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-append","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],m={},o=r.getElementsByTagName("input"),q=o.length,p,t=document.getElementById("nav-menu-meta-object-id").value;while(q--){p=n.length;while(p--){if(o[q]&&o[q].name&&"menu-item["+s+"]["+n[p]+"]"==o[q].name){m[n[p]]=o[q].value}}}return m},a=function(){g.find(".menu-item-data-position").val(function(m){return m+1})},e=function(m){return m*f},i=function(m){return Math.floor(m/f)},g,j;d.fn.extend({menuItemDepth:function(){return i(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(n,m){return this.each(function(){var o=d(this);m=m||o.menuItemDepth();d(this).removeClass("menu-item-depth-"+m).addClass("menu-item-depth-"+n)})},shiftDepthClass:function(m){return this.each(function(){var n=d(this),o=n.menuItemDepth();d(this).removeClass("menu-item-depth-"+o).addClass("menu-item-depth-"+(o+m))})},childMenuItems:function(){var m=d();this.each(function(){var n=d(this),p=n.menuItemDepth(),o=n.next();while(o.length&&o.menuItemDepth()>p){m=m.add(o);o=o.next()}});return m},updateParentMenuItemDBId:function(){return this.each(function(){var o=d(this),m=o.find(".menu-item-data-parent-id"),p=o.menuItemDepth(),n=o.prev();if(p==0){m.val(0)}else{while(n.menuItemDepth()!=p-1){n=n.prev()}m.val(n.find(".menu-item-data-object-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var m=d(this);d(".hide-column-tog").not(":checked").each(function(){m.find(".field-"+d(this).val()).addClass("hidden-field")})})},selectItem:function(){return this.each(function(){d(this).addClass("selected-menu-item").next().children("input").attr("checked","checked")})},deselectItem:function(){return this.each(function(){d(this).removeClass("selected-menu-item").next().children("input").removeAttr("checked")})},toggleItem:function(){return this.each(function(){var m=d(this);if(m.hasClass("selected-menu-item")){m.deselectItem()}else{m.selectItem()}})}});return{init:function(){g=d("#menu-to-edit");j=g;this.attachMenuEditListeners();this.attachMenuMetaListeners(document.getElementById("nav-menu-meta"));this.attachTabsPanelListeners();if(g.length){this.initSortables()}this.initToggles();this.initTabManager();this.initAddMenuItemDraggables()},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(m){d(".field-"+m).removeClass("hidden-field")};columns.unchecked=function(m){d(".field-"+m).addClass("hidden-field")};g.hideAdvancedMenuItemFields()},initSortables:function(){var s=0,r,q,m,p=g.offset().left,t,o;g.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(C,B){var A,v,z,y,w,x;o=B.item.children(".menu-item-transport");t=(B.helper.hasClass("new-menu-item"));r=(t)?0:B.item.menuItemDepth();n(B,r);if(!t){y=(B.item.next()[0]==B.placeholder[0])?B.item.next():B.item;w=y.childMenuItems();o.append(w)}u(B);v=o.outerHeight();v+=(v>0)?(B.placeholder.css("margin-top").slice(0,-2)*1):0;v+=B.helper.outerHeight();v-=2;B.placeholder.height(v);x=r;if(!t){w.each(function(){var D=d(this).menuItemDepth();x=(D>x)?D:x})}z=B.helper.find(".menu-item-handle").outerWidth();z+=e(x-r);z-=2;B.placeholder.width(z)},stop:function(y,x){var w,v=s-r;w=o.children().insertAfter(x.item);if(t){x.item.remove();if(v!=0){w.shiftDepthClass(v)}w.updateParentMenuItemDBId()}else{if(v!=0){x.item.updateDepthClass(s);w.shiftDepthClass(v)}x.item.updateParentMenuItemDBId()}a()},change:function(w,v){if(!v.placeholder.parent().hasClass("menu")){v.placeholder.appendTo(g)}u(v)},sort:function(w,v){var x=i(v.helper.offset().left-p);if(x<q){x=q}else{if(x>m){x=m}}if(x!=s){n(v,x)}},receive:function(w,v){o=v.sender.children(".menu-item-transport")}});function u(x){var w=x.placeholder.prev(),v=x.placeholder.next(),y;if(w[0]==x.item[0]){w=w.prev()}if(v[0]==x.item[0]){v=v.next()}q=(v.length)?v.menuItemDepth():0;if(w.length){m=((y=w.menuItemDepth()+1)>c)?c:y}else{m=0}}function n(v,w){v.placeholder.updateDepthClass(w,s);s=w}},initAddMenuItemDraggables:function(){var m=d(".potential-menu-item");m.click(function(n){d(this).toggleItem()}).children().draggable({helper:"clone",connectToSortable:"ul#menu-to-edit",distance:5,zIndex:100,start:function(s,q){var r=d(s.target),p=r.parent(),n=p.parent(),o;p.selectItem();j=r.children(".menu-item-transport");o=m.filter(".selected-menu-item").children().not(q.helper).clone();q.helper.children(".additional-menu-items").append(o);q.helper.addClass("new-menu-item");q.helper.children("div").hide();o.first().css("margin-top",0);o.children("div").addClass("menu-item-handle");q.helper.children("div").addClass("hidden-handle");n.parents(".inside").find(".add-to-menu input").click();q.helper.width(q.helper.width());q.helper.height(q.helper.height())},stop:function(o,n){j=g;m.filter(".selected-menu-item").deselectItem()}})},attachMenuEditListeners:function(){var m=this;d("#update-nav-menu").bind("click",function(n){if(n.target&&n.target.className){if(-1!=n.target.className.indexOf("item-edit")){return m.eventOnClickEditLink(n.target)}else{if(-1!=n.target.className.indexOf("menu-delete")){return m.eventOnClickMenuDelete(n.target)}else{if(-1!=n.target.className.indexOf("item-delete")){return m.eventOnClickMenuItemDelete(n.target)}else{if(-1!=n.target.className.indexOf("item-close")){return m.eventOnClickCloseLink(n.target)}}}}}})},setupInputWithDefaultTitle:function(){var m="input-with-default-title";d("."+m).each(function(){var p=d(this),o=p.attr("title"),n=p.val();p.data(m,o);if(""==n){p.val(o)}else{if(o==n){return}else{p.removeClass(m)}}}).focus(function(){var n=d(this);if(n.val()==n.data(m)){n.val("").removeClass(m)}}).blur(function(){var n=d(this);if(""==n.val()){n.val(n.data(m)).addClass(m)}})},attachMenuMetaListeners:function(m){if(!m){return}var n=this;this.setupInputWithDefaultTitle();d("input.quick-search").each(function(o,p){n.setupQuickSearchEventListeners(p)});d(m).click(function(p){var o=d(p.target).parent().parent().parent();if(d(p.target).is("input")&&d(p.target).hasClass("button-secondary")&&!d(p.target).hasClass("quick-search-submit")){if(d(o).hasClass("customlinkdiv")){n.addCustomLink()}else{if(d(o).hasClass("posttypediv")||d(o).hasClass("taxonomydiv")){n.addItemsToMenu(d(o).attr("id"))}}return false}else{if(d(p.target).is("input")&&d(p.target).hasClass("quick-search-submit")){n.quickSearch(d(o).attr("id"));return false}}})},quickSearch:function(u){var o=d("#"+u+" .quick-search").attr("name"),r=d("#"+u+" .quick-search").val(),t=d("#menu").val(),n=d("#menu-settings-column-nonce").val(),s={},p=this,m=function(){};m=p.processQuickSearchQueryResponse;s={action:"menu-quick-search","response-format":"markup",menu:t,"menu-settings-column-nonce":n,q:r,type:o};d.post(ajaxurl,s,function(q){m.call(p,q,s)})},addCustomLink:function(){var o=d("#custom-menu-item-url").val(),n=d("#custom-menu-item-name").val(),s=d("#menu").val(),p=d("#menu-settings-column-nonce").val(),r={},q=this,m=function(){};if(""==o||"http: | var WPNavMenuHandler=function(d){var h={},f=30,c=11,k=function(m,q,n,p){if(m&&m[0]){var o=d.parseJSON(m[0]);if(o.post_title){if(o.ID&&o.post_type){h[o.post_title]={ID:o.ID,object_type:o.post_type}}return o.post_title}}},l=function(m,q,n,p){if(m&&m[0]){var o=d.parseJSON(m[0]);if(o.post_title){return o.post_title}}},b=function(s,r){if(!s){return false}r=r||document;var n=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-append","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],m={},o=r.getElementsByTagName("input"),q=o.length,p,t=document.getElementById("nav-menu-meta-object-id").value;while(q--){p=n.length;while(p--){if(o[q]&&o[q].name&&"menu-item["+s+"]["+n[p]+"]"==o[q].name){m[n[p]]=o[q].value}}}return m},a=function(){g.find(".menu-item-data-position").val(function(m){return m+1})},e=function(m){return m*f},i=function(m){return Math.floor(m/f)},g,j;d.fn.extend({menuItemDepth:function(){return i(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(n,m){return this.each(function(){var o=d(this);m=m||o.menuItemDepth();d(this).removeClass("menu-item-depth-"+m).addClass("menu-item-depth-"+n)})},shiftDepthClass:function(m){return this.each(function(){var n=d(this),o=n.menuItemDepth();d(this).removeClass("menu-item-depth-"+o).addClass("menu-item-depth-"+(o+m))})},childMenuItems:function(){var m=d();this.each(function(){var n=d(this),p=n.menuItemDepth(),o=n.next();while(o.length&&o.menuItemDepth()>p){m=m.add(o);o=o.next()}});return m},updateParentMenuItemDBId:function(){return this.each(function(){var o=d(this),m=o.find(".menu-item-data-parent-id"),p=o.menuItemDepth(),n=o.prev();if(p==0){m.val(0)}else{while(n.menuItemDepth()!=p-1){n=n.prev()}m.val(n.find(".menu-item-data-object-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var m=d(this);d(".hide-column-tog").not(":checked").each(function(){m.find(".field-"+d(this).val()).addClass("hidden-field")})})},});return{init:function(){g=d("#menu-to-edit");j=g;this.attachMenuEditListeners();this.attachMenuMetaListeners(document.getElementById("nav-menu-meta"));this.attachTabsPanelListeners();if(g.length){this.initSortables()}this.initToggles();this.initTabManager();this.initAddMenuItemDraggables()},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(m){d(".field-"+m).removeClass("hidden-field")};columns.unchecked=function(m){d(".field-"+m).addClass("hidden-field")};g.hideAdvancedMenuItemFields()},initSortables:function(){var s=0,r,q,m,p=g.offset().left,t,o;g.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(C,B){var A,v,z,y,w,x;o=B.item.children(".menu-item-transport");t=(B.helper.hasClass("new-menu-item"));r=(t)?0:B.item.menuItemDepth();n(B,r);if(!t){y=(B.item.next()[0]==B.placeholder[0])?B.item.next():B.item;w=y.childMenuItems();o.append(w)}u(B);v=o.outerHeight();v+=(v>0)?(B.placeholder.css("margin-top").slice(0,-2)*1):0;v+=B.helper.outerHeight();v-=2;B.placeholder.height(v);x=r;if(!t){w.each(function(){var D=d(this).menuItemDepth();x=(D>x)?D:x})}z=B.helper.find(".menu-item-handle").outerWidth();z+=e(x-r);z-=2;B.placeholder.width(z)},stop:function(y,x){var w,v=s-r;w=o.children().insertAfter(x.item);if(t){x.item.remove();if(v!=0){w.shiftDepthClass(v)}w.updateParentMenuItemDBId()}else{if(v!=0){x.item.updateDepthClass(s);w.shiftDepthClass(v)}x.item.updateParentMenuItemDBId()}a()},change:function(w,v){if(!v.placeholder.parent().hasClass("menu")){v.placeholder.appendTo(g)}u(v)},sort:function(w,v){var x=i(v.helper.offset().left-p);if(x<q){x=q}else{if(x>m){x=m}}if(x!=s){n(v,x)}},receive:function(w,v){o=v.sender.children(".menu-item-transport")}});function u(x){var w=x.placeholder.prev(),v=x.placeholder.next(),y;if(w[0]==x.item[0]){w=w.prev()}if(v[0]==x.item[0]){v=v.next()}q=(v.length)?v.menuItemDepth():0;if(w.length){m=((y=w.menuItemDepth()+1)>c)?c:y}else{m=0}}function n(v,w){v.placeholder.updateDepthClass(w,s);s=w}},initAddMenuItemDraggables:function(){d.fn.extend({checkItem:function(){return this.each(function(){d(this).addClass("selected-menu-item").next().children("input").attr("checked","checked")})},uncheckItem:function(){return this.each(function(){d(this).removeClass("selected-menu-item").next().children("input").removeAttr("checked")})},toggleItem:function(){return this.each(function(){var n=d(this);if(n.hasClass("selected-menu-item")){n.uncheckItem()}else{n.checkItem()}})}});var m=d(".potential-menu-item");m.click(function(n){d(this).toggleItem()}).children().draggable({helper:"clone",connectToSortable:"ul#menu-to-edit",distance:5,zIndex:100,start:function(s,q){var r=d(s.target),p=r.parent(),n=p.parent(),o;p.checkItem();j=r.children(".menu-item-transport");o=m.filter(".selected-menu-item").children().not(q.helper).clone();q.helper.children(".additional-menu-items").append(o);q.helper.addClass("new-menu-item");q.helper.children("div").hide();o.first().css("margin-top",0);o.children("div").addClass("menu-item-handle");q.helper.children("div").addClass("hidden-handle");n.parents(".inside").find(".add-to-menu input").click();q.helper.width(q.helper.width());q.helper.height(q.helper.height())},stop:function(o,n){j=g;m.filter(".selected-menu-item").uncheckItem()}})},attachMenuEditListeners:function(){var m=this;d("#update-nav-menu").bind("click",function(n){if(n.target&&n.target.className){if(-1!=n.target.className.indexOf("item-edit")){return m.eventOnClickEditLink(n.target)}else{if(-1!=n.target.className.indexOf("menu-delete")){return m.eventOnClickMenuDelete(n.target)}else{if(-1!=n.target.className.indexOf("item-delete")){return m.eventOnClickMenuItemDelete(n.target)}else{if(-1!=n.target.className.indexOf("item-close")){return m.eventOnClickCloseLink(n.target)}}}}}})},setupInputWithDefaultTitle:function(){var m="input-with-default-title";d("."+m).each(function(){var p=d(this),o=p.attr("title"),n=p.val();p.data(m,o);if(""==n){p.val(o)}else{if(o==n){return}else{p.removeClass(m)}}}).focus(function(){var n=d(this);if(n.val()==n.data(m)){n.val("").removeClass(m)}}).blur(function(){var n=d(this);if(""==n.val()){n.val(n.data(m)).addClass(m)}})},attachMenuMetaListeners:function(m){if(!m){return}var n=this;this.setupInputWithDefaultTitle();d("input.quick-search").each(function(o,p){n.setupQuickSearchEventListeners(p)});d(m).click(function(p){var o=d(p.target).parent().parent().parent();if(d(p.target).is("input")&&d(p.target).hasClass("button-secondary")&&!d(p.target).hasClass("quick-search-submit")){if(d(o).hasClass("customlinkdiv")){n.addCustomLink()}else{if(d(o).hasClass("posttypediv")||d(o).hasClass("taxonomydiv")){n.addItemsToMenu(d(o).attr("id"))}}return false}else{if(d(p.target).is("input")&&d(p.target).hasClass("quick-search-submit")){n.quickSearch(d(o).attr("id"));return false}}})},quickSearch:function(u){var o=d("#"+u+" .quick-search").attr("name"),r=d("#"+u+" .quick-search").val(),t=d("#menu").val(),n=d("#menu-settings-column-nonce").val(),s={},p=this,m=function(){};m=p.processQuickSearchQueryResponse;s={action:"menu-quick-search","response-format":"markup",menu:t,"menu-settings-column-nonce":n,q:r,type:o};d.post(ajaxurl,s,function(q){m.call(p,q,s)})},addCustomLink:function(){var o=d("#custom-menu-item-url").val(),n=d("#custom-menu-item-name").val(),s=d("#menu").val(),p=d("#menu-settings-column-nonce").val(),r={},q=this,m=function(){};if(""==o||"http://"==o){return false}d(".customlinkdiv img.waiting").show();r={action:"add-menu-item",menu:s,"menu-settings-column-nonce":p,"menu-item":{"-1":{"menu-item-type":"custom","menu-item-url":o,"menu-item-title":n}}};m=q.eventAddMenuItem;d.post(ajaxurl,r,function(t){m.call(q,t,r);d(".customlinkdiv img.waiting").hide()})},attachTabsPanelListeners:function(){d("#menu-settings-column").bind("click",function(r){if(r.target&&r.target.className&&-1!=r.target.className.indexOf("nav-tab-link")){var s,n=/#(.*)$/.exec(r.target.href),q,t=d(r.target).parents(".inside").first()[0],m=t?t.getElementsByTagName("input"):[],o=m.length;while(o--){m[o].checked=false}d(".tabs-panel",t).each(function(){if(this.className){this.className=this.className.replace("tabs-panel-active","tabs-panel-inactive")}});d(".tabs",t).each(function(){this.className=this.className.replace("tabs","")});r.target.parentNode.className+=" tabs";if(n&&n[1]){s=document.getElementById(n[1]);if(s){s.className=s.className.replace("tabs-panel-inactive","tabs-panel-active")}}return false}else{if(r.target&&r.target.className&&-1!=r.target.className.indexOf("select-all")){var p=/#(.*)$/.exec(r.target.href);if(p&&p[1]){d("#"+p[1]+" .tabs-panel-active input[type=checkbox]").attr("checked","checked");return false}}}})},initTabManager:function(){var r=d(".nav-tabs-wrapper"),s=r.children(".nav-tabs"),q=s.children(".nav-tab-active"),u=s.children(".nav-tab"),o=0,v,p,t,n;resizing=false;function m(){p=r.offset().left;v=p+r.width();q.makeTabVisible()}d.fn.extend({makeTabVisible:function(){var x=this.eq(0),y,w;if(!x.length){return}y=x.offset().left;w=y+x.outerWidth();if(w>v){s.animate({"margin-left":"+="+(v-w)+"px",},"fast")}else{if(y<p){s.animate({"margin-left":"-="+(y-p)+"px",},"fast")}}return x},isTabVisible:function(){var x=this.eq(0),y=x.offset().left,w=y+x.outerWidth();return(w<=v&&y>=p)?true:false}});u.each(function(){o+=d(this).outerWidth(true)});if(o<=r.width()-s.css("padding-left").slice(0,-2)-s.css("padding-right").slice(0,-2)){return}s.css({"margin-right":(-1*o)+"px",padding:0,});t=d('<div class="nav-tabs-arrow nav-tabs-arrow-left"><a>«</a></div>');n=d('<div class="nav-tabs-arrow nav-tabs-arrow-right"><a>»</a></div>');r.wrap('<div class="nav-tabs-nav"/>').parent().prepend(t).append(n);m();d(window).resize(function(){if(resizing){return}resizing=true;setTimeout(function(){m();resizing=false},1000)});d.each([{arrow:t,next:"next",last:"first",operator:"+=",},{arrow:n,next:"prev",last:"last",operator:"-=",}],function(){var w=this;this.arrow.mousedown(function(){var y=u[w.last](),x=function(){if(!y.isTabVisible()){s.animate({"margin-left":w.operator+"90px",},300,"linear",x)}};x()}).mouseup(function(){var y,x;s.stop(true);y=u[w.last]();while((x=y[w.next]())&&x.length&&!x.isTabVisible()){y=x}y.makeTabVisible()})})},setupQuickSearchEventListeners:function(m){var n=this;d(m).autocomplete(ajaxurl+"?action=menu-quick-search&type="+m.name,{delay:500,formatItem:k,formatResult:l,minchars:2,multiple:false}).bind("blur",function(q){var o=h[this.value],p=this;if(o){d.post(ajaxurl+"?action=menu-quick-search&type=get-post-item&response-format=markup",o,function(s){n.processQuickSearchQueryResponse.call(n,s,o);h[p.value]=false})}})},eventOnClickEditLink:function(m){var o,n=/#(.*)$/.exec(m.href);if(n&&n[1]){o=d("#"+n[1]);if(0!=o.length){if(o.hasClass("menu-item-edit-inactive")){o.slideDown("fast").siblings("dl").andSelf().removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{o.slideUp("fast").siblings("dl").andSelf().removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCloseLink:function(m){d(m).closest(".menu-item-settings").siblings("dl").find(".item-edit").click();return false},eventOnClickMenuDelete:function(m){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(m){var p,o,n=this;if(confirm(navMenuL10n.warnDeleteMenuItem)){o=/_wpnonce=([a-zA-Z0-9]*)$/.exec(m.href);if(o&&o[1]){p=parseInt(m.id.replace("delete-",""),10);d.post(ajaxurl,{action:"delete-menu-item","menu-item":p,_wpnonce:o[1]},function(q){if("1"==q){n.removeMenuItem(document.getElementById("menu-item-"+p))}});return false}return true}else{return false}},addItemsToMenu:function(t){var n=d(".tabs-panel-active .categorychecklist li input:checked","#"+t),s=d("#menu").val(),p=d("#menu-settings-column-nonce").val(),r={},q=this,m=function(){},o=new RegExp("menu-item\\[([^\\]]*)");m=q.eventAddMenuItem;if(!n.length){return false}d("#"+t+" img.waiting").show();d(n).each(function(){listItemDBIDMatch=o.exec(d(this).attr("name"));listItemDBID="undefined"==typeof listItemDBIDMatch[1]?0:parseInt(listItemDBIDMatch[1],10);listItemData=b(listItemDBID);r={action:"add-menu-item",menu:s,"menu-settings-column-nonce":p,"menu-item":{}};r["menu-item"][listItemDBID]=listItemData;d.post(ajaxurl,r,function(u){m.call(q,u,r)});d(this).attr("checked",false)});d("#"+t+" img.waiting").hide()},eventAddMenuItem:function(m,n){d(m).hideAdvancedMenuItemFields().appendTo(j)},processQuickSearchQueryResponse:function(q,v){if(!v){v={}}var n=document.createElement("ul"),m=document.getElementById("nav-menu-meta"),r,u,o,w,s,t=new RegExp("menu-item\\[([^\\]]*)"),p;o=t.exec(q);if(o&&o[1]){s=o[1];while(m.elements["menu-item["+s+"][menu-item-type]"]){s--}if(s!=o[1]){q=q.replace(new RegExp("menu-item\\["+o[1]+"\\]","g"),"menu-item["+s+"]")}}n.innerHTML=q;u=n.getElementsByTagName("li");if(u[0]&&v.object_type){p=document.getElementById(v.object_type+"-search-checklist");if(p){p.appendChild(u[0])}}else{if(v.type){o=/quick-search-(posttype|taxonomy)-([a-zA-Z_-]*)/.exec(v.type);if(o&&o[2]){p=document.getElementById(o[2]+"-search-checklist");if(p){r=u.length;if(!r){w=document.createElement("li");w.appendChild(document.createTextNode(navMenuL10n.noResultsFound));p.appendChild(w)}while(r--){p.appendChild(u[r])}}}}}},removeMenuItem:function(n){n=d(n);var m=n.childMenuItems();n.addClass("deleting").fadeOut(350,function(){n.remove();m.shiftDepthClass(-1).updateParentMenuItemDBId();a()})}}};var wpNavMenu=new WPNavMenuHandler(jQuery);jQuery(function(){wpNavMenu.init()}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/a178f871fb455c1076e936bdf8c1a70a7d253a99/nav-menu.js/buggy/wp-admin/js/nav-menu.js |
var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){var c=b.slideToggle(150,function(){b.css("display","")}).parent().toggleClass("wp-menu-open").attr("id");if(c){a("li.wp-has-submenu","#adminmenu").each(function(f,g){if(c==g.id){var d=a(g).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+f,d)}})}return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var d=a(this),c=d.val();if(d.attr("checked")){b.checked(c)}else{b.unchecked(c)}columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show();this.colSpanChange(+1)},unchecked:function(b){a(".column-"+b).hide();this.colSpanChange(-1)},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var b=this.id;return b.substring(b,b.length-5)}).get().join(",")}},colSpanChange:function(b){var d=a("table").find(".colspanchange"),c;if(!d.length){return}c=parseInt(d.attr("colspan"),10)+b;d.attr("colspan",c.toString())}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(e){var g=false,b,f,d,c,a=(isRtl?"left":"right");e("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");e("div.updated, div.error").not(".below-h2, .inline").insertAfter(e("div.wrap h2:first"));e("#show-settings-link").click(function(){if(!e("#screen-options-wrap").hasClass("screen-options-open")){e("#contextual-help-link-wrap").css("visibility","hidden")}e("#screen-options-wrap").slideToggle("fast",function(){if(e(this).hasClass("screen-options-open")){e("#show-settings-link").css({backgroundPosition:"top "+a});e("#contextual-help-link-wrap").css("visibility","");e(this).removeClass("screen-options-open")}else{e("#show-settings-link").css({backgroundPosition:"bottom "+a});e(this).addClass("screen-options-open")}});return false});e("#contextual-help-link").click(function(){if(!e("#contextual-help-wrap").hasClass("contextual-help-open")){e("#screen-options-link-wrap").css("visibility","hidden")}e("#contextual-help-wrap").slideToggle("fast",function(){if(e(this).hasClass("contextual-help-open")){e("#contextual-help-link").css({backgroundPosition:"top "+a});e("#screen-options-link-wrap").css("visibility","");e(this).removeClass("contextual-help-open")}else{e("#contextual-help-link").css({backgroundPosition:"bottom "+a});e(this).addClass("contextual-help-open")}});return false});e("tbody").children().children(".check-column").find(":checkbox").click(function(h){if("undefined"==h.shiftKey){return true}if(h.shiftKey){if(!g){return true}b=e(g).closest("form").find(":checkbox");f=b.index(g);d=b.index(this);c=e(this).attr("checked");if(0<f&&0<d&&f!=d){b.slice(f,d).attr("checked",function(){if(e(this).closest("tr").is(":visible")){return c?"checked":""}return""})}}g=this;return true});e("thead, tfoot").find(".check-column :checkbox").click(function(j){var k=e(this).attr("checked"),i="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,h=j.shiftKey||i;e(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(e(this).closest("tr").is(":hidden")){return""}if(h){return e(this).attr("checked")?"":"checked"}else{if(k){return"checked"}}return""});e(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(h){return""}else{if(k){return"checked"}}return""})});e("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");e("div.default-password-nag").hide();return false});e("#newcontent").keydown(function(m){if(m.keyCode!=9){return true}var j=m.target,o=j.selectionStart,i=j.selectionEnd,n=j.value,h,l;try{this.lastKey=9}catch(k){}if(document.selection){j.focus();l=document.selection.createRange();l.text="\t"}else{if(o>=0){h=this.scrollTop;j.value=n.substring(0,o).concat("\t",n.substring(i));j.selectionStart=j.selectionEnd=o+1;this.scrollTop=h}}if(m.stopPropagation){m.stopPropagation()}if(m.preventDefault){m.preventDefault()}});e("#newcontent").blur(function(h){if(this.lastKey&&9==this.lastKey){this.focus()}})}); | var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){var c=b.slideToggle(150,function(){b.parent().toggleClass("wp-menu-open")}).attr("id");if(c){a("li.wp-has-submenu","#adminmenu").each(function(f,g){if(c==g.id){var d=a(g).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+f,d)}})}return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var d=a(this),c=d.val();if(d.attr("checked")){b.checked(c)}else{b.unchecked(c)}columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show();this.colSpanChange(+1)},unchecked:function(b){a(".column-"+b).hide();this.colSpanChange(-1)},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var b=this.id;return b.substring(b,b.length-5)}).get().join(",")}},colSpanChange:function(b){var d=a("table").find(".colspanchange"),c;if(!d.length){return}c=parseInt(d.attr("colspan"),10)+b;d.attr("colspan",c.toString())}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(e){var g=false,b,f,d,c,a=(isRtl?"left":"right");e("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");e("div.updated, div.error").not(".below-h2, .inline").insertAfter(e("div.wrap h2:first"));e("#show-settings-link").click(function(){if(!e("#screen-options-wrap").hasClass("screen-options-open")){e("#contextual-help-link-wrap").css("visibility","hidden")}e("#screen-options-wrap").slideToggle("fast",function(){if(e(this).hasClass("screen-options-open")){e("#show-settings-link").css({backgroundPosition:"top "+a});e("#contextual-help-link-wrap").css("visibility","");e(this).removeClass("screen-options-open")}else{e("#show-settings-link").css({backgroundPosition:"bottom "+a});e(this).addClass("screen-options-open")}});return false});e("#contextual-help-link").click(function(){if(!e("#contextual-help-wrap").hasClass("contextual-help-open")){e("#screen-options-link-wrap").css("visibility","hidden")}e("#contextual-help-wrap").slideToggle("fast",function(){if(e(this).hasClass("contextual-help-open")){e("#contextual-help-link").css({backgroundPosition:"top "+a});e("#screen-options-link-wrap").css("visibility","");e(this).removeClass("contextual-help-open")}else{e("#contextual-help-link").css({backgroundPosition:"bottom "+a});e(this).addClass("contextual-help-open")}});return false});e("tbody").children().children(".check-column").find(":checkbox").click(function(h){if("undefined"==h.shiftKey){return true}if(h.shiftKey){if(!g){return true}b=e(g).closest("form").find(":checkbox");f=b.index(g);d=b.index(this);c=e(this).attr("checked");if(0<f&&0<d&&f!=d){b.slice(f,d).attr("checked",function(){if(e(this).closest("tr").is(":visible")){return c?"checked":""}return""})}}g=this;return true});e("thead, tfoot").find(".check-column :checkbox").click(function(j){var k=e(this).attr("checked"),i="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,h=j.shiftKey||i;e(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(e(this).closest("tr").is(":hidden")){return""}if(h){return e(this).attr("checked")?"":"checked"}else{if(k){return"checked"}}return""});e(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(h){return""}else{if(k){return"checked"}}return""})});e("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");e("div.default-password-nag").hide();return false});e("#newcontent").keydown(function(m){if(m.keyCode!=9){return true}var j=m.target,o=j.selectionStart,i=j.selectionEnd,n=j.value,h,l;try{this.lastKey=9}catch(k){}if(document.selection){j.focus();l=document.selection.createRange();l.text="\t"}else{if(o>=0){h=this.scrollTop;j.value=n.substring(0,o).concat("\t",n.substring(i));j.selectionStart=j.selectionEnd=o+1;this.scrollTop=h}}if(m.stopPropagation){m.stopPropagation()}if(m.preventDefault){m.preventDefault()}});e("#newcontent").blur(function(h){if(this.lastKey&&9==this.lastKey){this.focus()}})}); | var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){var c=b.slideToggle(150,function(){b.css("display","")}).parent().toggleClass("wp-menu-open").attr("id");if(c){a("li.wp-has-submenu","#adminmenu").each(function(f,g){if(c==g.id){var d=a(g).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+f,d)}})}return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var d=a(this),c=d.val();if(d.attr("checked")){b.checked(c)}else{b.unchecked(c)}columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show();this.colSpanChange(+1)},unchecked:function(b){a(".column-"+b).hide();this.colSpanChange(-1)},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var b=this.id;return b.substring(b,b.length-5)}).get().join(",")}},colSpanChange:function(b){var d=a("table").find(".colspanchange"),c;if(!d.length){return}c=parseInt(d.attr("colspan"),10)+b;d.attr("colspan",c.toString())}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(e){var g=false,b,f,d,c,a=(isRtl?"left":"right");e("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");e("div.updated, div.error").not(".below-h2, .inline").insertAfter(e("div.wrap h2:first"));e("#show-settings-link").click(function(){if(!e("#screen-options-wrap").hasClass("screen-options-open")){e("#contextual-help-link-wrap").css("visibility","hidden")}e("#screen-options-wrap").slideToggle("fast",function(){if(e(this).hasClass("screen-options-open")){e("#show-settings-link").css({backgroundPosition:"top "+a});e("#contextual-help-link-wrap").css("visibility","");e(this).removeClass("screen-options-open")}else{e("#show-settings-link").css({backgroundPosition:"bottom "+a});e(this).addClass("screen-options-open")}});return false});e("#contextual-help-link").click(function(){if(!e("#contextual-help-wrap").hasClass("contextual-help-open")){e("#screen-options-link-wrap").css("visibility","hidden")}e("#contextual-help-wrap").slideToggle("fast",function(){if(e(this).hasClass("contextual-help-open")){e("#contextual-help-link").css({backgroundPosition:"top "+a});e("#screen-options-link-wrap").css("visibility","");e(this).removeClass("contextual-help-open")}else{e("#contextual-help-link").css({backgroundPosition:"bottom "+a});e(this).addClass("contextual-help-open")}});return false});e("tbody").children().children(".check-column").find(":checkbox").click(function(h){if("undefined"==h.shiftKey){return true}if(h.shiftKey){if(!g){return true}b=e(g).closest("form").find(":checkbox");f=b.index(g);d=b.index(this);c=e(this).attr("checked");if(0<f&&0<d&&f!=d){b.slice(f,d).attr("checked",function(){if(e(this).closest("tr").is(":visible")){return c?"checked":""}return""})}}g=this;return true});e("thead, tfoot").find(".check-column :checkbox").click(function(j){var k=e(this).attr("checked"),i="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,h=j.shiftKey||i;e(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(e(this).closest("tr").is(":hidden")){return""}if(h){return e(this).attr("checked")?"":"checked"}else{if(k){return"checked"}}return""});e(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(h){return""}else{if(k){return"checked"}}return""})});e("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");e("div.default-password-nag").hide();return false});e("#newcontent").keydown(function(m){if(m.keyCode!=9){return true}var j=m.target,o=j.selectionStart,i=j.selectionEnd,n=j.value,h,l;try{this.lastKey=9}catch(k){}if(document.selection){j.focus();l=document.selection.createRange();l.text="\t"}else{if(o>=0){h=this.scrollTop;j.value=n.substring(0,o).concat("\t",n.substring(i));j.selectionStart=j.selectionEnd=o+1;this.scrollTop=h}}if(m.stopPropagation){m.stopPropagation()}if(m.preventDefault){m.preventDefault()}});e("#newcontent").blur(function(h){if(this.lastKey&&9==this.lastKey){this.focus()}})}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/0dd215ff0366562af209cd7db430560abd139aac/common.js/clean/wp-admin/js/common.js |
var WPNavMenuHandler=function(d){var h={},f=30,c=11,j=function(l,p,m,o){if(l&&l[0]){var n=d.parseJSON(l[0]);if(n.post_title){if(n.ID&&n.post_type){h[n.post_title]={ID:n.ID,object_type:n.post_type}}return n.post_title}}},k=function(l,p,m,o){if(l&&l[0]){var n=d.parseJSON(l[0]);if(n.post_title){return n.post_title}}},b=function(r,q){if(!r){return false}q=q||document;var m=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-append","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],l={},n=q.getElementsByTagName("input"),p=n.length,o,s=document.getElementById("nav-menu-meta-object-id").value;while(p--){o=m.length;while(o--){if(n[p]&&n[p].name&&"menu-item["+r+"]["+m[o]+"]"==n[p].name){l[m[o]]=n[p].value}}}return l},a=function(){g.find(".menu-item-data-position").val(function(l){return l+1})},e=function(l){return l*f},i=function(l){return Math.floor(l/f)},g;d.fn.extend({menuItemDepth:function(){return i(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(m,l){return this.each(function(){var n=d(this);l=l||n.menuItemDepth();d(this).removeClass("menu-item-depth-"+l).addClass("menu-item-depth-"+m)})},shiftDepthClass:function(l){return this.each(function(){var m=d(this),n=m.menuItemDepth();d(this).removeClass("menu-item-depth-"+n).addClass("menu-item-depth-"+(n+l))})},childMenuItems:function(){var l=d();this.each(function(){var m=d(this),o=m.menuItemDepth(),n=m.next();while(n.length&&n.menuItemDepth()>o){l=l.add(n);n=n.next()}});return l},updateParentMenuItemDBId:function(){return this.each(function(){var n=d(this),l=n.find(".menu-item-data-parent-id"),o=n.menuItemDepth(),m=n.prev();if(o==0){l.val(0)}else{while(m.menuItemDepth()!=o-1){m=m.prev()}l.val(m.find(".menu-item-data-object-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var l=d(this);d(".hide-column-tog").not(":checked").each(function(){l.find(".field-"+d(this).val()).addClass("hidden-field")})})},});return{init:function(){g=d("#menu-to-edit");this.attachMenuEditListeners();this.attachMenuMetaListeners(document.getElementById("nav-menu-meta"));this.attachTabsPanelListeners();if(g.length){this.initSortables()}this.initToggles()},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(l){d(".field-"+l).removeClass("hidden-field")};columns.unchecked=function(l){d(".field-"+l).addClass("hidden-field")};g.hideAdvancedMenuItemFields()},initSortables:function(){var o=0,m,p,r,n=g.offset().left;g.sortable({handle:" > dl",placeholder:"sortable-placeholder",start:function(w,x){var v,z,s,y,t,A,u=x.item.children(".menu-item-transport");m=x.item.menuItemDepth();l(x,m);y=(x.item.next()[0]==x.placeholder[0])?x.item.next():x.item;t=y.childMenuItems();u.append(t);q(x);z=u.outerHeight();z+=(z>0)?(x.placeholder.css("margin-top").slice(0,-2)*1):0;z+=x.item.outerHeight();z-=2;x.placeholder.height(z);A=m;t.each(function(){var B=d(this).menuItemDepth();A=(B>A)?B:A});s=x.item.find("dl dt").outerWidth();s+=e(A-m);s-=2;x.placeholder.width(s)},stop:function(v,u){var t,s=o-m;t=u.item.children(".menu-item-transport").children().insertAfter(u.item);if(s!=0){u.item.updateDepthClass(o);t.shiftDepthClass(s)}u.item.updateParentMenuItemDBId();a()},change:function(t,s){if(!s.placeholder.parent().hasClass("menu")){s.placeholder.appendTo(g)}q(s)},sort:function(t,s){var u=i(s.item.offset().left-n);if(u<p){u=p}else{if(u>r){u=r}}if(u!=o){l(s,u)}}});function q(u){var t=u.placeholder.prev(),s=u.placeholder.next(),v;if(t[0]==u.item[0]){t=t.prev()}if(s[0]==u.item[0]){s=s.next()}p=(s.length)?s.menuItemDepth():0;if(t.length){r=((v=t.menuItemDepth()+1)>c)?c:v}else{r=0}}function l(s,t){s.placeholder.updateDepthClass(t,o);o=t}},attachMenuEditListeners:function(){var l=this;d("#update-nav-menu").bind("click",function(m){if(m.target&&m.target.className){if(-1!=m.target.className.indexOf("item-edit")){return l.eventOnClickEditLink(m.target)}else{if(-1!=m.target.className.indexOf("menu-delete")){return l.eventOnClickMenuDelete(m.target)}else{if(-1!=m.target.className.indexOf("item-delete")){return l.eventOnClickMenuItemDelete(m.target)}else{if(-1!=m.target.className.indexOf("item-close")){return l.eventOnClickCloseLink(m.target)}}}}}})},setupInputWithDefaultTitle:function(){var l="input-with-default-title";d("."+l).each(function(){var o=d(this),n=o.attr("title"),m=o.val();o.data(l,n);if(""==m){o.val(n)}else{if(n==m){return}else{o.removeClass(l)}}}).focus(function(){var m=d(this);if(m.val()==m.data(l)){m.val("").removeClass(l)}}).blur(function(){var m=d(this);if(""==m.val()){m.val(m.data(l)).addClass(l)}})},attachMenuMetaListeners:function(l){if(!l){return}var m=this;this.setupInputWithDefaultTitle();d("input.quick-search").each(function(n,o){m.setupQuickSearchEventListeners(o)});d(l).bind("submit",function(n){return m.eventSubmitMetaForm.call(m,this,n)})},attachTabsPanelListeners:function(){d("#menu-settings-column").bind("click",function(q){if(q.target&&q.target.className&&-1!=q.target.className.indexOf("nav-tab-link")){var r,m=/#(.*)$/.exec(q.target.href),p,s=d(q.target).parents(".inside").first()[0],l=s?s.getElementsByTagName("input"):[],n=l.length;while(n--){l[n].checked=false}d(".tabs-panel",s).each(function(){if(this.className){this.className=this.className.replace("tabs-panel-active","tabs-panel-inactive")}});d(".tabs",s).each(function(){this.className=this.className.replace("tabs","")});q.target.parentNode.className+=" tabs";if(m&&m[1]){r=document.getElementById(m[1]);if(r){r.className=r.className.replace("tabs-panel-inactive","tabs-panel-active")}}return false}else{if(q.target&&q.target.className&&-1!=q.target.className.indexOf("select-all")){var o=/#(.*)$/.exec(q.target.href);if(o&&o[1]){d("#"+o[1]+" .tabs-panel-active input[type=checkbox]").attr("checked","checked");return false}}}})},setupQuickSearchEventListeners:function(l){var m=this;d(l).autocomplete(ajaxurl+"?action=menu-quick-search&type="+l.name,{delay:500,formatItem:j,formatResult:k,minchars:2,multiple:false}).bind("blur",function(p){var n=h[this.value],o=this;if(n){d.post(ajaxurl+"?action=menu-quick-search&type=get-post-item&response-format=markup",n,function(q){m.processQuickSearchQueryResponse.call(m,q,n);h[o.value]=false})}})},eventOnClickEditLink:function(l){var n,m=/#(.*)$/.exec(l.href);if(m&&m[1]){n=d("#"+m[1]);if(0!=n.length){if(n.hasClass("menu-item-edit-inactive")){n.slideDown("fast").siblings("dl").andSelf().removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{n.slideUp("fast").siblings("dl").andSelf().removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCloseLink:function(l){d(l).closest(".menu-item-settings").siblings("dl").find(".item-edit").click();return false},eventOnClickMenuDelete:function(l){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(l){var o,n,m=this;if(confirm(navMenuL10n.warnDeleteMenuItem)){n=/_wpnonce=([a-zA-Z0-9]*)$/.exec(l.href);if(n&&n[1]){o=parseInt(l.id.replace("delete-",""),10);d.post(ajaxurl,{action:"delete-menu-item","menu-item":o,_wpnonce:n[1]},function(p){if("1"==p){m.removeMenuItem(document.getElementById("menu-item-"+o))}});return false}return true}else{return false}},eventSubmitMetaForm:function(m,s){var q=m.getElementsByTagName("input"),p=q.length,o,u,l,r,n={},t=function(){},v=new RegExp("menu-item\\[([^\\]]*)");m.className=m.className+" processing",that=this;n.action="";while(p--){if(q[p].name&&-1!=q[p].name.indexOf("menu-item-object-id")&&q[p].checked||("undefined"!=typeof q[p].id&&"custom-menu-item-url"==q[p].id&&""!=q[p].value&&"http: | var WPNavMenuHandler=function(d){var h={},f=30,c=11,j=function(l,p,m,o){if(l&&l[0]){var n=d.parseJSON(l[0]);if(n.post_title){if(n.ID&&n.post_type){h[n.post_title]={ID:n.ID,object_type:n.post_type}}return n.post_title}}},k=function(l,p,m,o){if(l&&l[0]){var n=d.parseJSON(l[0]);if(n.post_title){return n.post_title}}},b=function(r,q){if(!r){return false}q=q||document;var m=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-append","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],l={},n=q.getElementsByTagName("input"),p=n.length,o,s=document.getElementById("nav-menu-meta-object-id").value;while(p--){o=m.length;while(o--){if(n[p]&&n[p].name&&"menu-item["+r+"]["+m[o]+"]"==n[p].name){l[m[o]]=n[p].value}}}return l},a=function(){g.find(".menu-item-data-position").val(function(l){return l+1})},e=function(l){return l*f},i=function(l){return Math.floor(l/f)},g;d.fn.extend({menuItemDepth:function(){return i(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(m,l){return this.each(function(){var n=d(this);l=l||n.menuItemDepth();d(this).removeClass("menu-item-depth-"+l).addClass("menu-item-depth-"+m)})},shiftDepthClass:function(l){return this.each(function(){var m=d(this),n=m.menuItemDepth();d(this).removeClass("menu-item-depth-"+n).addClass("menu-item-depth-"+(n+l))})},childMenuItems:function(){var l=d();this.each(function(){var m=d(this),o=m.menuItemDepth(),n=m.next();while(n.length&&n.menuItemDepth()>o){l=l.add(n);n=n.next()}});return l},updateParentMenuItemDBId:function(){return this.each(function(){var n=d(this),l=n.find(".menu-item-data-parent-id"),o=n.menuItemDepth(),m=n.prev();if(o==0){l.val(0)}else{while(m.menuItemDepth()!=o-1){m=m.prev()}l.val(m.find(".menu-item-data-object-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var l=d(this);d(".hide-column-tog").not(":checked").each(function(){l.find(".field-"+d(this).val()).addClass("hidden-field")})})},});return{init:function(){g=d("#menu-to-edit");this.attachMenuEditListeners();this.attachMenuMetaListeners(document.getElementById("nav-menu-meta"));this.attachTabsPanelListeners();if(g.length){this.initSortables()}this.initToggles()},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(l){d(".field-"+l).removeClass("hidden-field")};columns.unchecked=function(l){d(".field-"+l).addClass("hidden-field")};g.hideAdvancedMenuItemFields()},initSortables:function(){var o=0,m,p,r,n=g.offset().left;g.sortable({handle:" > dl",placeholder:"sortable-placeholder",start:function(w,x){var v,z,s,y,t,A,u=x.item.children(".menu-item-transport");m=x.item.menuItemDepth();l(x,m);y=(x.item.next()[0]==x.placeholder[0])?x.item.next():x.item;t=y.childMenuItems();u.append(t);q(x);z=u.outerHeight();z+=(z>0)?(x.placeholder.css("margin-top").slice(0,-2)*1):0;z+=x.item.outerHeight();z-=2;x.placeholder.height(z);A=m;t.each(function(){var B=d(this).menuItemDepth();A=(B>A)?B:A});s=x.item.find("dl dt").outerWidth();s+=e(A-m);s-=2;x.placeholder.width(s)},stop:function(v,u){var t,s=o-m;t=u.item.children(".menu-item-transport").children().insertAfter(u.item);if(s!=0){u.item.updateDepthClass(o);t.shiftDepthClass(s)}u.item.updateParentMenuItemDBId();a()},change:function(t,s){if(!s.placeholder.parent().hasClass("menu")){s.placeholder.appendTo(g)}q(s)},sort:function(t,s){var u=i(s.item.offset().left-n);if(u<p){u=p}else{if(u>r){u=r}}if(u!=o){l(s,u)}}});function q(u){var t=u.placeholder.prev(),s=u.placeholder.next(),v;if(t[0]==u.item[0]){t=t.prev()}if(s[0]==u.item[0]){s=s.next()}p=(s.length)?s.menuItemDepth():0;if(t.length){r=((v=t.menuItemDepth()+1)>c)?c:v}else{r=0}}function l(s,t){s.placeholder.updateDepthClass(t,o);o=t}},attachMenuEditListeners:function(){var l=this;d("#update-nav-menu").bind("click",function(m){if(m.target&&m.target.className){if(-1!=m.target.className.indexOf("item-edit")){return l.eventOnClickEditLink(m.target)}else{if(-1!=m.target.className.indexOf("menu-delete")){return l.eventOnClickMenuDelete(m.target)}else{if(-1!=m.target.className.indexOf("item-delete")){return l.eventOnClickMenuItemDelete(m.target)}else{if(-1!=m.target.className.indexOf("item-close")){return l.eventOnClickCloseLink(m.target)}}}}}})},setupInputWithDefaultTitle:function(){var l="input-with-default-title";d("."+l).each(function(){var o=d(this),n=o.attr("title"),m=o.val();o.data(l,n);if(""==m){o.val(n)}else{if(n==m){return}else{o.removeClass(l)}}}).focus(function(){var m=d(this);if(m.val()==m.data(l)){m.val("").removeClass(l)}}).blur(function(){var m=d(this);if(""==m.val()){m.val(m.data(l)).addClass(l)}})},attachMenuMetaListeners:function(l){if(!l){return}var m=this;this.setupInputWithDefaultTitle();d("input.quick-search").each(function(n,o){m.setupQuickSearchEventListeners(o)});d(l).bind("submit",function(n){return m.eventSubmitMetaForm.call(m,this,n)});d(l).find("input:submit").click(function(){d(this).siblings("img.waiting").show()})},attachTabsPanelListeners:function(){d("#menu-settings-column").bind("click",function(q){if(q.target&&q.target.className&&-1!=q.target.className.indexOf("nav-tab-link")){var r,m=/#(.*)$/.exec(q.target.href),p,s=d(q.target).parents(".inside").first()[0],l=s?s.getElementsByTagName("input"):[],n=l.length;while(n--){l[n].checked=false}d(".tabs-panel",s).each(function(){if(this.className){this.className=this.className.replace("tabs-panel-active","tabs-panel-inactive")}});d(".tabs",s).each(function(){this.className=this.className.replace("tabs","")});q.target.parentNode.className+=" tabs";if(m&&m[1]){r=document.getElementById(m[1]);if(r){r.className=r.className.replace("tabs-panel-inactive","tabs-panel-active")}}return false}else{if(q.target&&q.target.className&&-1!=q.target.className.indexOf("select-all")){var o=/#(.*)$/.exec(q.target.href);if(o&&o[1]){d("#"+o[1]+" .tabs-panel-active input[type=checkbox]").attr("checked","checked");return false}}}})},setupQuickSearchEventListeners:function(l){var m=this;d(l).autocomplete(ajaxurl+"?action=menu-quick-search&type="+l.name,{delay:500,formatItem:j,formatResult:k,minchars:2,multiple:false}).bind("blur",function(p){var n=h[this.value],o=this;if(n){d.post(ajaxurl+"?action=menu-quick-search&type=get-post-item&response-format=markup",n,function(q){m.processQuickSearchQueryResponse.call(m,q,n);h[o.value]=false})}})},eventOnClickEditLink:function(l){var n,m=/#(.*)$/.exec(l.href);if(m&&m[1]){n=d("#"+m[1]);if(0!=n.length){if(n.hasClass("menu-item-edit-inactive")){n.slideDown("fast").siblings("dl").andSelf().removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{n.slideUp("fast").siblings("dl").andSelf().removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCloseLink:function(l){d(l).closest(".menu-item-settings").siblings("dl").find(".item-edit").click();return false},eventOnClickMenuDelete:function(l){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(l){var o,n,m=this;if(confirm(navMenuL10n.warnDeleteMenuItem)){n=/_wpnonce=([a-zA-Z0-9]*)$/.exec(l.href);if(n&&n[1]){o=parseInt(l.id.replace("delete-",""),10);d.post(ajaxurl,{action:"delete-menu-item","menu-item":o,_wpnonce:n[1]},function(p){if("1"==p){m.removeMenuItem(document.getElementById("menu-item-"+o))}});return false}return true}else{return false}},eventSubmitMetaForm:function(m,s){var q=m.getElementsByTagName("input"),p=q.length,o,u,l,r,n={},t=function(){},v=new RegExp("menu-item\\[([^\\]]*)");that=this;n.action="";while(p--){if(q[p].name&&-1!=q[p].name.indexOf("menu-item-object-id")&&q[p].checked||("undefined"!=typeof q[p].id&&"custom-menu-item-url"==q[p].id&&""!=q[p].value&&"http: | var WPNavMenuHandler=function(d){var h={},f=30,c=11,j=function(l,p,m,o){if(l&&l[0]){var n=d.parseJSON(l[0]);if(n.post_title){if(n.ID&&n.post_type){h[n.post_title]={ID:n.ID,object_type:n.post_type}}return n.post_title}}},k=function(l,p,m,o){if(l&&l[0]){var n=d.parseJSON(l[0]);if(n.post_title){return n.post_title}}},b=function(r,q){if(!r){return false}q=q||document;var m=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-append","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],l={},n=q.getElementsByTagName("input"),p=n.length,o,s=document.getElementById("nav-menu-meta-object-id").value;while(p--){o=m.length;while(o--){if(n[p]&&n[p].name&&"menu-item["+r+"]["+m[o]+"]"==n[p].name){l[m[o]]=n[p].value}}}return l},a=function(){g.find(".menu-item-data-position").val(function(l){return l+1})},e=function(l){return l*f},i=function(l){return Math.floor(l/f)},g;d.fn.extend({menuItemDepth:function(){return i(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(m,l){return this.each(function(){var n=d(this);l=l||n.menuItemDepth();d(this).removeClass("menu-item-depth-"+l).addClass("menu-item-depth-"+m)})},shiftDepthClass:function(l){return this.each(function(){var m=d(this),n=m.menuItemDepth();d(this).removeClass("menu-item-depth-"+n).addClass("menu-item-depth-"+(n+l))})},childMenuItems:function(){var l=d();this.each(function(){var m=d(this),o=m.menuItemDepth(),n=m.next();while(n.length&&n.menuItemDepth()>o){l=l.add(n);n=n.next()}});return l},updateParentMenuItemDBId:function(){return this.each(function(){var n=d(this),l=n.find(".menu-item-data-parent-id"),o=n.menuItemDepth(),m=n.prev();if(o==0){l.val(0)}else{while(m.menuItemDepth()!=o-1){m=m.prev()}l.val(m.find(".menu-item-data-object-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var l=d(this);d(".hide-column-tog").not(":checked").each(function(){l.find(".field-"+d(this).val()).addClass("hidden-field")})})},});return{init:function(){g=d("#menu-to-edit");this.attachMenuEditListeners();this.attachMenuMetaListeners(document.getElementById("nav-menu-meta"));this.attachTabsPanelListeners();if(g.length){this.initSortables()}this.initToggles()},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(l){d(".field-"+l).removeClass("hidden-field")};columns.unchecked=function(l){d(".field-"+l).addClass("hidden-field")};g.hideAdvancedMenuItemFields()},initSortables:function(){var o=0,m,p,r,n=g.offset().left;g.sortable({handle:" > dl",placeholder:"sortable-placeholder",start:function(w,x){var v,z,s,y,t,A,u=x.item.children(".menu-item-transport");m=x.item.menuItemDepth();l(x,m);y=(x.item.next()[0]==x.placeholder[0])?x.item.next():x.item;t=y.childMenuItems();u.append(t);q(x);z=u.outerHeight();z+=(z>0)?(x.placeholder.css("margin-top").slice(0,-2)*1):0;z+=x.item.outerHeight();z-=2;x.placeholder.height(z);A=m;t.each(function(){var B=d(this).menuItemDepth();A=(B>A)?B:A});s=x.item.find("dl dt").outerWidth();s+=e(A-m);s-=2;x.placeholder.width(s)},stop:function(v,u){var t,s=o-m;t=u.item.children(".menu-item-transport").children().insertAfter(u.item);if(s!=0){u.item.updateDepthClass(o);t.shiftDepthClass(s)}u.item.updateParentMenuItemDBId();a()},change:function(t,s){if(!s.placeholder.parent().hasClass("menu")){s.placeholder.appendTo(g)}q(s)},sort:function(t,s){var u=i(s.item.offset().left-n);if(u<p){u=p}else{if(u>r){u=r}}if(u!=o){l(s,u)}}});function q(u){var t=u.placeholder.prev(),s=u.placeholder.next(),v;if(t[0]==u.item[0]){t=t.prev()}if(s[0]==u.item[0]){s=s.next()}p=(s.length)?s.menuItemDepth():0;if(t.length){r=((v=t.menuItemDepth()+1)>c)?c:v}else{r=0}}function l(s,t){s.placeholder.updateDepthClass(t,o);o=t}},attachMenuEditListeners:function(){var l=this;d("#update-nav-menu").bind("click",function(m){if(m.target&&m.target.className){if(-1!=m.target.className.indexOf("item-edit")){return l.eventOnClickEditLink(m.target)}else{if(-1!=m.target.className.indexOf("menu-delete")){return l.eventOnClickMenuDelete(m.target)}else{if(-1!=m.target.className.indexOf("item-delete")){return l.eventOnClickMenuItemDelete(m.target)}else{if(-1!=m.target.className.indexOf("item-close")){return l.eventOnClickCloseLink(m.target)}}}}}})},setupInputWithDefaultTitle:function(){var l="input-with-default-title";d("."+l).each(function(){var o=d(this),n=o.attr("title"),m=o.val();o.data(l,n);if(""==m){o.val(n)}else{if(n==m){return}else{o.removeClass(l)}}}).focus(function(){var m=d(this);if(m.val()==m.data(l)){m.val("").removeClass(l)}}).blur(function(){var m=d(this);if(""==m.val()){m.val(m.data(l)).addClass(l)}})},attachMenuMetaListeners:function(l){if(!l){return}var m=this;this.setupInputWithDefaultTitle();d("input.quick-search").each(function(n,o){m.setupQuickSearchEventListeners(o)});d(l).bind("submit",function(n){return m.eventSubmitMetaForm.call(m,this,n)})},attachTabsPanelListeners:function(){d("#menu-settings-column").bind("click",function(q){if(q.target&&q.target.className&&-1!=q.target.className.indexOf("nav-tab-link")){var r,m=/#(.*)$/.exec(q.target.href),p,s=d(q.target).parents(".inside").first()[0],l=s?s.getElementsByTagName("input"):[],n=l.length;while(n--){l[n].checked=false}d(".tabs-panel",s).each(function(){if(this.className){this.className=this.className.replace("tabs-panel-active","tabs-panel-inactive")}});d(".tabs",s).each(function(){this.className=this.className.replace("tabs","")});q.target.parentNode.className+=" tabs";if(m&&m[1]){r=document.getElementById(m[1]);if(r){r.className=r.className.replace("tabs-panel-inactive","tabs-panel-active")}}return false}else{if(q.target&&q.target.className&&-1!=q.target.className.indexOf("select-all")){var o=/#(.*)$/.exec(q.target.href);if(o&&o[1]){d("#"+o[1]+" .tabs-panel-active input[type=checkbox]").attr("checked","checked");return false}}}})},setupQuickSearchEventListeners:function(l){var m=this;d(l).autocomplete(ajaxurl+"?action=menu-quick-search&type="+l.name,{delay:500,formatItem:j,formatResult:k,minchars:2,multiple:false}).bind("blur",function(p){var n=h[this.value],o=this;if(n){d.post(ajaxurl+"?action=menu-quick-search&type=get-post-item&response-format=markup",n,function(q){m.processQuickSearchQueryResponse.call(m,q,n);h[o.value]=false})}})},eventOnClickEditLink:function(l){var n,m=/#(.*)$/.exec(l.href);if(m&&m[1]){n=d("#"+m[1]);if(0!=n.length){if(n.hasClass("menu-item-edit-inactive")){n.slideDown("fast").siblings("dl").andSelf().removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{n.slideUp("fast").siblings("dl").andSelf().removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCloseLink:function(l){d(l).closest(".menu-item-settings").siblings("dl").find(".item-edit").click();return false},eventOnClickMenuDelete:function(l){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(l){var o,n,m=this;if(confirm(navMenuL10n.warnDeleteMenuItem)){n=/_wpnonce=([a-zA-Z0-9]*)$/.exec(l.href);if(n&&n[1]){o=parseInt(l.id.replace("delete-",""),10);d.post(ajaxurl,{action:"delete-menu-item","menu-item":o,_wpnonce:n[1]},function(p){if("1"==p){m.removeMenuItem(document.getElementById("menu-item-"+o))}});return false}return true}else{return false}},eventSubmitMetaForm:function(m,s){var q=m.getElementsByTagName("input"),p=q.length,o,u,l,r,n={},t=function(){},v=new RegExp("menu-item\\[([^\\]]*)");m.className=m.className+" processing",that=this;n.action="";while(p--){if(q[p].name&&-1!=q[p].name.indexOf("menu-item-object-id")&&q[p].checked||("undefined"!=typeof q[p].id&&"custom-menu-item-url"==q[p].id&&""!=q[p].value&&"http://"!=q[p].value)){n.action="add-menu-item";t=that.processAddMenuItemResponse;r=v.exec(q[p].name);l="undefined"==typeof r[1]?0:parseInt(r[1],10);u=b(l);for(o in u){n["menu-item["+l+"]["+o+"]"]=u[o]}q[p].checked=false}else{if(""==n.action&&""!=q[p].value&&q[p].className&&-1!=q[p].className.search(/quick-search\b[^-]/)){n.action="menu-quick-search";n.q=q[p].value;n["response-format"]="markup";n.type=q[p].name;t=that.processQuickSearchQueryResponse}}}n.menu=m.elements.menu.value;n["menu-settings-column-nonce"]=m.elements["menu-settings-column-nonce"].value;d.post(ajaxurl,n,function(w){t.call(that,w,n);m.className=m.className.replace(/processing/g,"")});return false},processAddMenuItemResponse:function(l,m){d(l).hideAdvancedMenuItemFields().appendTo(g);d("#custom-menu-item-name").val("").blur();d("#custom-menu-item-url").val("http://")},processQuickSearchQueryResponse:function(p,u){if(!u){u={}}var m=document.createElement("ul"),l=document.getElementById("nav-menu-meta"),q,t,n,v,r,s=new RegExp("menu-item\\[([^\\]]*)"),o;n=s.exec(p);if(n&&n[1]){r=n[1];while(l.elements["menu-item["+r+"][menu-item-type]"]){r--}if(r!=n[1]){p=p.replace(new RegExp("menu-item\\["+n[1]+"\\]","g"),"menu-item["+r+"]")}}m.innerHTML=p;t=m.getElementsByTagName("li");if(t[0]&&u.object_type){o=document.getElementById(u.object_type+"-search-checklist");if(o){o.appendChild(t[0])}}else{if(u.type){n=/quick-search-(posttype|taxonomy)-([a-zA-Z_-]*)/.exec(u.type);if(n&&n[2]){o=document.getElementById(n[2]+"-search-checklist");if(o){q=t.length;if(!q){v=document.createElement("li");v.appendChild(document.createTextNode(navMenuL10n.noResultsFound));o.appendChild(v)}while(q--){o.appendChild(t[q])}}}}}},removeMenuItem:function(m){m=d(m);var l=m.childMenuItems();m.addClass("deleting").fadeOut(350,function(){m.remove();l.shiftDepthClass(-1).updateParentMenuItemDBId();a()})}}};var wpNavMenu=new WPNavMenuHandler(jQuery);jQuery(function(){wpNavMenu.init()}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/d333559bbb89fa81a1db30eae45d76ea35b28a38/nav-menu.js/clean/wp-admin/js/nav-menu.js |
var WPNavMenuHandler=function(){var h=jQuery,a=false,j=null,g,d,m,i,l={},n=function(p,t,q,s){if(p&&p[0]){var r=h.parseJSON(p[0]);if(r.post_title){if(r.ID&&r.post_type){l[r.post_title]={ID:r.ID,object_type:r.post_type}}return r.post_title}}},o=function(p,t,q,s){if(p&&p[0]){var r=h.parseJSON(p[0]);if(r.post_title){return r.post_title}}},b=function(v,u){if(!v){return false}u=u||document;var q=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-append","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],p={},r=u.getElementsByTagName("input"),t=r.length,s,w=document.getElementById("nav-menu-meta-object-id").value;while(t--){s=q.length;while(s--){if(r[t]&&r[t].name&&"menu-item["+v+"]["+q[s]+"]"==r[t].name){p[q[s]]=r[t].value}}}return p},c=function(){var t=this.getElementsByTagName("input"),q=t.length,p,s,r;while(q--){if(-1!=t[q].name.indexOf("menu-item-parent-id["+parseInt(this.id.replace("menu-item-",""),10)+"]")){if(!this.parentNode.className||-1==this.parentNode.className.indexOf("sub-menu")){t[q].value=0}else{if("LI"==this.parentNode.parentNode.nodeName&&-1!=this.parentNode.parentNode.id.indexOf("menu-item-")){s=this.parentNode.parentNode;r=s.getElementsByTagName("input");p=r.length;while(p--){if(r[p].name&&-1!=r[p].name.indexOf("menu-item-object-id["+parseInt(s.id.replace("menu-item-",""),10)+"]")){t[q].value=parseInt(r[p].value,10);break}}}}break}}},e=function(p){var q=this;h(p).droppable({accept:".menu li",tolerance:"pointer",drop:function(s,r){q.eventOnDrop(r.draggable[0],this,r,s)},over:function(s,r){q.eventOnDragOver(r.draggable[0],this,r,s)},out:function(s,r){q.eventOnDragOut(r.draggable[0],this,r,s)}})},k,f=function(s){if(!s){return}var q=document.getElementById(s.id+"-dummy-list-item"),p=s.getElementsByTagName("li"),r=p.length;if(!q){q=document.createElement("li");q.id=s.id+"-dummy-list-item";s.appendChild(q);this.setupListItemDragAndDrop(q)}while(r--){this.setupListItemDragAndDrop(p[r])}};return{init:function(){k=document.getElementById("menu-to-edit");this.attachMenuEditListeners();this.attachMenuMetaListeners(document.getElementById("nav-menu-meta"));this.attachTabsPanelListeners();f.call(this,k);this.initToggles()},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(p){h(".field-"+p).removeClass("hidden-field")};columns.unchecked=function(p){h(".field-"+p).addClass("hidden-field")};this.hideAdvancedMenuItemFields()},hideAdvancedMenuItemFields:function(p){p=p||".menu";h(".hide-column-tog").not(":checked").each(function(){h(p).find(".field-"+h(this).val()).addClass("hidden-field")})},attachMenuEditListeners:function(){var p=this;h("#update-nav-menu").bind("click",function(q){if(q.target&&q.target.className){if(-1!=q.target.className.indexOf("item-edit")){return p.eventOnClickEditLink(q.target)}else{if(-1!=q.target.className.indexOf("menu-delete")){return p.eventOnClickMenuDelete(q.target)}else{if(-1!=q.target.className.indexOf("item-delete")){return p.eventOnClickMenuItemDelete(q.target)}else{if(-1!=q.target.className.indexOf("item-close")){return p.eventOnClickCloseLink(q.target)}}}}}})},attachMenuMetaListeners:function(q){if(!q){return}var r=this,p="label-with-default-title";h("."+p).each(function(){var u=h(this),t=u.attr("title"),s=u.val();u.data(p,t);if(""==s){u.val(t)}else{if(t==s){return}else{u.removeClass(p)}}}).focus(function(){var s=h(this);if(s.val()==s.data(p)){s.val("").removeClass(p)}}).blur(function(){var s=h(this);if(""==s.val()){s.val(s.data(p)).addClass(p)}});h("input.quick-search").each(function(s,t){r.setupQuickSearchEventListeners(t)});h(q).bind("submit",function(s){return r.eventSubmitMetaForm.call(r,this,s)});h(q).find("input:submit").click(function(){h(this).siblings("img.waiting").show()})},attachTabsPanelListeners:function(){h("#menu-settings-column").bind("click",function(u){if(u.target&&u.target.className&&-1!=u.target.className.indexOf("nav-tab-link")){var v,q=/#(.*)$/.exec(u.target.href),t,w=h(u.target).parents(".inside").first()[0],p=w?w.getElementsByTagName("input"):[],r=p.length;while(r--){p[r].checked=false}h(".tabs-panel",w).each(function(){if(this.className){this.className=this.className.replace("tabs-panel-active","tabs-panel-inactive")}});h(".tabs",w).each(function(){this.className=this.className.replace("tabs","")});u.target.parentNode.className+=" tabs";if(q&&q[1]){v=document.getElementById(q[1]);if(v){v.className=v.className.replace("tabs-panel-inactive","tabs-panel-active")}}return false}else{if(u.target&&u.target.className&&-1!=u.target.className.indexOf("select-all")){var s=/#(.*)$/.exec(u.target.href);if(s&&s[1]){h("#"+s[1]+" .tabs-panel-active input[type=checkbox]").attr("checked","checked");return false}}}})},setupListItemDragAndDrop:function(r){var p=r.getElementsByTagName("dl"),s=this.makeListItemDropzone(r),q=p.length;e.call(this,s);this.makeListItemDraggable(r);while(q--){e.call(this,p[q])}},setupQuickSearchEventListeners:function(p){var q=this;h(p).autocomplete(ajaxurl+"?action=menu-quick-search&type="+p.name,{delay:500,formatItem:n,formatResult:o,minchars:2,multiple:false}).bind("blur",function(t){var r=l[this.value],s=this;if(r){h.post(ajaxurl+"?action=menu-quick-search&type=get-post-item&response-format=markup",r,function(u){q.processQuickSearchQueryResponse.call(q,u,r);l[s.value]=false})}})},eventOnClickEditLink:function(p){var r,q=/#(.*)$/.exec(p.href);if(q&&q[1]){r=h("#"+q[1]);if(0!=r.length){if(r.hasClass("menu-item-edit-inactive")){r.slideDown("fast").siblings("dl").andSelf().removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{r.slideUp("fast").siblings("dl").andSelf().removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCloseLink:function(p){h(p).closest(".menu-item-settings").siblings("dl").find(".item-edit").click();return false},eventOnClickMenuDelete:function(p){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(p){var s,r,q=this;if(confirm(navMenuL10n.warnDeleteMenuItem)){r=/_wpnonce=([a-zA-Z0-9]*)$/.exec(p.href);if(r&&r[1]){s=parseInt(p.id.replace("delete-",""),10);h.post(ajaxurl,{action:"delete-menu-item","menu-item":s,_wpnonce:r[1]},function(t){if("1"==t){q.removeMenuItem(document.getElementById("menu-item-"+s))}});return false}return true}else{return false}},eventOnDragOver:function(p,q){a=true;j=q;q.className+=" sortable-placeholder"},eventOnDragOut:function(p,q){a=false;(function(r){setTimeout(function(){if(r!=j||(!a&&r.className&&-1!=r.className.indexOf("sortable-placeholder"))){r.className=r.className.replace(/sortable-placeholder/g,"")}},800)})(q)},eventOnDrop:function(s,v){var t=!!(-1==v.className.indexOf("dropzone")),q=v.parentNode.getElementsByTagName("ul"),u=false,r=q.length,p;a=false;v.className=v.className.replace(/sortable-placeholder/g,"");if(t){while(r--){if(q[r]&&1!=q[r].className.indexOf("sub-menu")){u=true;p=q[r]}}if(!u){p=document.createElement("ul");p.className="sub-menu";v.parentNode.appendChild(p)}p.appendChild(s)}else{v.parentNode.parentNode.insertBefore(s,v.parentNode)}this.recalculateSortOrder(k);c.call(s)},eventSubmitMetaForm:function(q,w){var u=q.getElementsByTagName("input"),t=u.length,s,y,p,v,r={},x=function(){},z=new RegExp("menu-item\\[([^\\]]*)");that=this;r.action="";while(t--){if(u[t].name&&-1!=u[t].name.indexOf("menu-item-object-id")&&u[t].checked||("undefined"!=typeof u[t].id&&"custom-menu-item-url"==u[t].id&&""!=u[t].value&&"http: | var WPNavMenuHandler=function(d){var h={},f=30,c=11,j=function(l,p,m,o){if(l&&l[0]){var n=d.parseJSON(l[0]);if(n.post_title){if(n.ID&&n.post_type){h[n.post_title]={ID:n.ID,object_type:n.post_type}}return n.post_title}}},k=function(l,p,m,o){if(l&&l[0]){var n=d.parseJSON(l[0]);if(n.post_title){return n.post_title}}},b=function(r,q){if(!r){return false}q=q||document;var m=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-append","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],l={},n=q.getElementsByTagName("input"),p=n.length,o,s=document.getElementById("nav-menu-meta-object-id").value;while(p--){o=m.length;while(o--){if(n[p]&&n[p].name&&"menu-item["+r+"]["+m[o]+"]"==n[p].name){l[m[o]]=n[p].value}}}return l},a=function(){g.find(".menu-item-data-position").val(function(l){return l+1})},e=function(l){return l*f},i=function(l){return Math.floor(l/f)},g;d.fn.extend({menuItemDepth:function(){return i(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(m,l){return this.each(function(){var n=d(this);l=l||n.menuItemDepth();d(this).removeClass("menu-item-depth-"+l).addClass("menu-item-depth-"+m)})},shiftDepthClass:function(l){return this.each(function(){var m=d(this),n=m.menuItemDepth();d(this).removeClass("menu-item-depth-"+n).addClass("menu-item-depth-"+(n+l))})},childMenuItems:function(){var l=d();this.each(function(){var m=d(this),o=m.menuItemDepth(),n=m.next();while(n.length&&n.menuItemDepth()>o){l=l.add(n);n=n.next()}});return l},updateParentMenuItemDBId:function(){return this.each(function(){var n=d(this),l=n.find(".menu-item-data-parent-id"),o=n.menuItemDepth(),m=n.prev();if(o==0){l.val(0)}else{while(m.menuItemDepth()!=o-1){m=m.prev()}l.val(m.find(".menu-item-data-object-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var l=d(this);d(".hide-column-tog").not(":checked").each(function(){l.find(".field-"+d(this).val()).addClass("hidden-field")})})},});return{init:function(){g=d("#menu-to-edit");this.attachMenuEditListeners();this.attachMenuMetaListeners(document.getElementById("nav-menu-meta"));this.attachTabsPanelListeners();if(g.length){this.initSortables()}this.initToggles()},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(l){d(".field-"+l).removeClass("hidden-field")};columns.unchecked=function(l){d(".field-"+l).addClass("hidden-field")};g.hideAdvancedMenuItemFields()},initSortables:function(){var o=0,m,p,r,n=g.offset().left;g.sortable({handle:" > dl",placeholder:"sortable-placeholder",start:function(w,x){var v,z,s,y,t,A,u=x.item.children(".menu-item-transport");m=x.item.menuItemDepth();l(x,m);y=(x.item.next()[0]==x.placeholder[0])?x.item.next():x.item;t=y.childMenuItems();u.append(t);q(x);z=u.outerHeight();z+=(z>0)?(x.placeholder.css("margin-top").slice(0,-2)*1):0;z+=x.item.outerHeight();z-=2;x.placeholder.height(z);A=m;t.each(function(){var B=d(this).menuItemDepth();A=(B>A)?B:A});s=x.item.find("dl dt").outerWidth();s+=e(A-m);s-=2;x.placeholder.width(s)},stop:function(v,u){var t,s=o-m;t=u.item.children(".menu-item-transport").children().insertAfter(u.item);if(s!=0){u.item.updateDepthClass(o);t.shiftDepthClass(s)}u.item.updateParentMenuItemDBId();a()},change:function(t,s){if(!s.placeholder.parent().hasClass("menu")){s.placeholder.appendTo(g)}q(s)},sort:function(t,s){var u=i(s.item.offset().left-n);if(u<p){u=p}else{if(u>r){u=r}}if(u!=o){l(s,u)}}});function q(u){var t=u.placeholder.prev(),s=u.placeholder.next(),v;if(t[0]==u.item[0]){t=t.prev()}if(s[0]==u.item[0]){s=s.next()}p=(s.length)?s.menuItemDepth():0;if(t.length){r=((v=t.menuItemDepth()+1)>c)?c:v}else{r=0}}function l(s,t){s.placeholder.updateDepthClass(t,o);o=t}},attachMenuEditListeners:function(){var l=this;d("#update-nav-menu").bind("click",function(m){if(m.target&&m.target.className){if(-1!=m.target.className.indexOf("item-edit")){return l.eventOnClickEditLink(m.target)}else{if(-1!=m.target.className.indexOf("menu-delete")){return l.eventOnClickMenuDelete(m.target)}else{if(-1!=m.target.className.indexOf("item-delete")){return l.eventOnClickMenuItemDelete(m.target)}else{if(-1!=m.target.className.indexOf("item-close")){return l.eventOnClickCloseLink(m.target)}}}}}})},setupInputWithDefaultTitle:function(){var l="input-with-default-title";d("."+l).each(function(){var o=d(this),n=o.attr("title"),m=o.val();o.data(l,n);if(""==m){o.val(n)}else{if(n==m){return}else{o.removeClass(l)}}}).focus(function(){var m=d(this);if(m.val()==m.data(l)){m.val("").removeClass(l)}}).blur(function(){var m=d(this);if(""==m.val()){m.val(m.data(l)).addClass(l)}})},attachMenuMetaListeners:function(l){if(!l){return}var m=this;this.setupInputWithDefaultTitle();d("input.quick-search").each(function(n,o){m.setupQuickSearchEventListeners(o)});d(l).bind("submit",function(n){return m.eventSubmitMetaForm.call(m,this,n)})},attachTabsPanelListeners:function(){d("#menu-settings-column").bind("click",function(q){if(q.target&&q.target.className&&-1!=q.target.className.indexOf("nav-tab-link")){var r,m=/#(.*)$/.exec(q.target.href),p,s=d(q.target).parents(".inside").first()[0],l=s?s.getElementsByTagName("input"):[],n=l.length;while(n--){l[n].checked=false}d(".tabs-panel",s).each(function(){if(this.className){this.className=this.className.replace("tabs-panel-active","tabs-panel-inactive")}});d(".tabs",s).each(function(){this.className=this.className.replace("tabs","")});q.target.parentNode.className+=" tabs";if(m&&m[1]){r=document.getElementById(m[1]);if(r){r.className=r.className.replace("tabs-panel-inactive","tabs-panel-active")}}return false}else{if(q.target&&q.target.className&&-1!=q.target.className.indexOf("select-all")){var o=/#(.*)$/.exec(q.target.href);if(o&&o[1]){d("#"+o[1]+" .tabs-panel-active input[type=checkbox]").attr("checked","checked");return false}}}})},setupQuickSearchEventListeners:function(l){var m=this;d(l).autocomplete(ajaxurl+"?action=menu-quick-search&type="+l.name,{delay:500,formatItem:j,formatResult:k,minchars:2,multiple:false}).bind("blur",function(p){var n=h[this.value],o=this;if(n){d.post(ajaxurl+"?action=menu-quick-search&type=get-post-item&response-format=markup",n,function(q){m.processQuickSearchQueryResponse.call(m,q,n);h[o.value]=false})}})},eventOnClickEditLink:function(l){var n,m=/#(.*)$/.exec(l.href);if(m&&m[1]){n=d("#"+m[1]);if(0!=n.length){if(n.hasClass("menu-item-edit-inactive")){n.slideDown("fast").siblings("dl").andSelf().removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{n.slideUp("fast").siblings("dl").andSelf().removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCloseLink:function(l){d(l).closest(".menu-item-settings").siblings("dl").find(".item-edit").click();return false},eventOnClickMenuDelete:function(l){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(l){var o,n,m=this;if(confirm(navMenuL10n.warnDeleteMenuItem)){n=/_wpnonce=([a-zA-Z0-9]*)$/.exec(l.href);if(n&&n[1]){o=parseInt(l.id.replace("delete-",""),10);d.post(ajaxurl,{action:"delete-menu-item","menu-item":o,_wpnonce:n[1]},function(p){if("1"==p){m.removeMenuItem(document.getElementById("menu-item-"+o))}});return false}return true}else{return false}},eventSubmitMetaForm:function(m,s){var q=m.getElementsByTagName("input"),p=q.length,o,u,l,r,n={},t=function(){},v=new RegExp("menu-item\\[([^\\]]*)");m.className=m.className+" processing",that=this;n.action="";while(p--){if(q[p].name&&-1!=q[p].name.indexOf("menu-item-object-id")&&q[p].checked||("undefined"!=typeof q[p].id&&"custom-menu-item-url"==q[p].id&&""!=q[p].value&&"http: | var WPNavMenuHandler=function(){var h=jQuery,a=false,j=null,g,d,m,i,l={},n=function(p,t,q,s){if(p&&p[0]){var r=h.parseJSON(p[0]);if(r.post_title){if(r.ID&&r.post_type){l[r.post_title]={ID:r.ID,object_type:r.post_type}}return r.post_title}}},o=function(p,t,q,s){if(p&&p[0]){var r=h.parseJSON(p[0]);if(r.post_title){return r.post_title}}},b=function(v,u){if(!v){return false}u=u||document;var q=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-append","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],p={},r=u.getElementsByTagName("input"),t=r.length,s,w=document.getElementById("nav-menu-meta-object-id").value;while(t--){s=q.length;while(s--){if(r[t]&&r[t].name&&"menu-item["+v+"]["+q[s]+"]"==r[t].name){p[q[s]]=r[t].value}}}return p},c=function(){var t=this.getElementsByTagName("input"),q=t.length,p,s,r;while(q--){if(-1!=t[q].name.indexOf("menu-item-parent-id["+parseInt(this.id.replace("menu-item-",""),10)+"]")){if(!this.parentNode.className||-1==this.parentNode.className.indexOf("sub-menu")){t[q].value=0}else{if("LI"==this.parentNode.parentNode.nodeName&&-1!=this.parentNode.parentNode.id.indexOf("menu-item-")){s=this.parentNode.parentNode;r=s.getElementsByTagName("input");p=r.length;while(p--){if(r[p].name&&-1!=r[p].name.indexOf("menu-item-object-id["+parseInt(s.id.replace("menu-item-",""),10)+"]")){t[q].value=parseInt(r[p].value,10);break}}}}break}}},e=function(p){var q=this;h(p).droppable({accept:".menu li",tolerance:"pointer",drop:function(s,r){q.eventOnDrop(r.draggable[0],this,r,s)},over:function(s,r){q.eventOnDragOver(r.draggable[0],this,r,s)},out:function(s,r){q.eventOnDragOut(r.draggable[0],this,r,s)}})},k,f=function(s){if(!s){return}var q=document.getElementById(s.id+"-dummy-list-item"),p=s.getElementsByTagName("li"),r=p.length;if(!q){q=document.createElement("li");q.id=s.id+"-dummy-list-item";s.appendChild(q);this.setupListItemDragAndDrop(q)}while(r--){this.setupListItemDragAndDrop(p[r])}};return{init:function(){k=document.getElementById("menu-to-edit");this.attachMenuEditListeners();this.attachMenuMetaListeners(document.getElementById("nav-menu-meta"));this.attachTabsPanelListeners();f.call(this,k);this.initToggles()},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(p){h(".field-"+p).removeClass("hidden-field")};columns.unchecked=function(p){h(".field-"+p).addClass("hidden-field")};this.hideAdvancedMenuItemFields()},hideAdvancedMenuItemFields:function(p){p=p||".menu";h(".hide-column-tog").not(":checked").each(function(){h(p).find(".field-"+h(this).val()).addClass("hidden-field")})},attachMenuEditListeners:function(){var p=this;h("#update-nav-menu").bind("click",function(q){if(q.target&&q.target.className){if(-1!=q.target.className.indexOf("item-edit")){return p.eventOnClickEditLink(q.target)}else{if(-1!=q.target.className.indexOf("menu-delete")){return p.eventOnClickMenuDelete(q.target)}else{if(-1!=q.target.className.indexOf("item-delete")){return p.eventOnClickMenuItemDelete(q.target)}else{if(-1!=q.target.className.indexOf("item-close")){return p.eventOnClickCloseLink(q.target)}}}}}})},attachMenuMetaListeners:function(q){if(!q){return}var r=this,p="label-with-default-title";h("."+p).each(function(){var u=h(this),t=u.attr("title"),s=u.val();u.data(p,t);if(""==s){u.val(t)}else{if(t==s){return}else{u.removeClass(p)}}}).focus(function(){var s=h(this);if(s.val()==s.data(p)){s.val("").removeClass(p)}}).blur(function(){var s=h(this);if(""==s.val()){s.val(s.data(p)).addClass(p)}});h("input.quick-search").each(function(s,t){r.setupQuickSearchEventListeners(t)});h(q).bind("submit",function(s){return r.eventSubmitMetaForm.call(r,this,s)});h(q).find("input:submit").click(function(){h(this).siblings("img.waiting").show()})},attachTabsPanelListeners:function(){h("#menu-settings-column").bind("click",function(u){if(u.target&&u.target.className&&-1!=u.target.className.indexOf("nav-tab-link")){var v,q=/#(.*)$/.exec(u.target.href),t,w=h(u.target).parents(".inside").first()[0],p=w?w.getElementsByTagName("input"):[],r=p.length;while(r--){p[r].checked=false}h(".tabs-panel",w).each(function(){if(this.className){this.className=this.className.replace("tabs-panel-active","tabs-panel-inactive")}});h(".tabs",w).each(function(){this.className=this.className.replace("tabs","")});u.target.parentNode.className+=" tabs";if(q&&q[1]){v=document.getElementById(q[1]);if(v){v.className=v.className.replace("tabs-panel-inactive","tabs-panel-active")}}return false}else{if(u.target&&u.target.className&&-1!=u.target.className.indexOf("select-all")){var s=/#(.*)$/.exec(u.target.href);if(s&&s[1]){h("#"+s[1]+" .tabs-panel-active input[type=checkbox]").attr("checked","checked");return false}}}})},setupListItemDragAndDrop:function(r){var p=r.getElementsByTagName("dl"),s=this.makeListItemDropzone(r),q=p.length;e.call(this,s);this.makeListItemDraggable(r);while(q--){e.call(this,p[q])}},setupQuickSearchEventListeners:function(p){var q=this;h(p).autocomplete(ajaxurl+"?action=menu-quick-search&type="+p.name,{delay:500,formatItem:n,formatResult:o,minchars:2,multiple:false}).bind("blur",function(t){var r=l[this.value],s=this;if(r){h.post(ajaxurl+"?action=menu-quick-search&type=get-post-item&response-format=markup",r,function(u){q.processQuickSearchQueryResponse.call(q,u,r);l[s.value]=false})}})},eventOnClickEditLink:function(p){var r,q=/#(.*)$/.exec(p.href);if(q&&q[1]){r=h("#"+q[1]);if(0!=r.length){if(r.hasClass("menu-item-edit-inactive")){r.slideDown("fast").siblings("dl").andSelf().removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{r.slideUp("fast").siblings("dl").andSelf().removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCloseLink:function(p){h(p).closest(".menu-item-settings").siblings("dl").find(".item-edit").click();return false},eventOnClickMenuDelete:function(p){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(p){var s,r,q=this;if(confirm(navMenuL10n.warnDeleteMenuItem)){r=/_wpnonce=([a-zA-Z0-9]*)$/.exec(p.href);if(r&&r[1]){s=parseInt(p.id.replace("delete-",""),10);h.post(ajaxurl,{action:"delete-menu-item","menu-item":s,_wpnonce:r[1]},function(t){if("1"==t){q.removeMenuItem(document.getElementById("menu-item-"+s))}});return false}return true}else{return false}},eventOnDragOver:function(p,q){a=true;j=q;q.className+=" sortable-placeholder"},eventOnDragOut:function(p,q){a=false;(function(r){setTimeout(function(){if(r!=j||(!a&&r.className&&-1!=r.className.indexOf("sortable-placeholder"))){r.className=r.className.replace(/sortable-placeholder/g,"")}},800)})(q)},eventOnDrop:function(s,v){var t=!!(-1==v.className.indexOf("dropzone")),q=v.parentNode.getElementsByTagName("ul"),u=false,r=q.length,p;a=false;v.className=v.className.replace(/sortable-placeholder/g,"");if(t){while(r--){if(q[r]&&1!=q[r].className.indexOf("sub-menu")){u=true;p=q[r]}}if(!u){p=document.createElement("ul");p.className="sub-menu";v.parentNode.appendChild(p)}p.appendChild(s)}else{v.parentNode.parentNode.insertBefore(s,v.parentNode)}this.recalculateSortOrder(k);c.call(s)},eventSubmitMetaForm:function(q,w){var u=q.getElementsByTagName("input"),t=u.length,s,y,p,v,r={},x=function(){},z=new RegExp("menu-item\\[([^\\]]*)");that=this;r.action="";while(t--){if(u[t].name&&-1!=u[t].name.indexOf("menu-item-object-id")&&u[t].checked||("undefined"!=typeof u[t].id&&"custom-menu-item-url"==u[t].id&&""!=u[t].value&&"http://"!=u[t].value)){r.action="add-menu-item";x=that.processAddMenuItemResponse;v=z.exec(u[t].name);p="undefined"==typeof v[1]?0:parseInt(v[1],10);y=b(p);for(s in y){r["menu-item["+p+"]["+s+"]"]=y[s]}u[t].checked=false}else{if(""==r.action&&""!=u[t].value&&u[t].className&&-1!=u[t].className.search(/quick-search\b[^-]/)){r.action="menu-quick-search";r.q=u[t].value;r["response-format"]="markup";r.type=u[t].name;x=that.processQuickSearchQueryResponse}}}r.menu=q.elements.menu.value;r["menu-settings-column-nonce"]=q.elements["menu-settings-column-nonce"].value;h.post(ajaxurl,r,function(A){x.call(that,A,r);h(q).find("img.waiting").hide()});return false},makeListItemDraggable:function(p){h(p).draggable({handle:" > dl",opacity:0.8,addClasses:false,helper:"clone",zIndex:100})},makeListItemDropzone:function(r){if(!r){return false}var q=r.getElementsByTagName("div"),p=q.length,s=document.createElement("div");while(p--){if(q[p].className&&-1!=q[p].className.indexOf("dropzone")&&(r==q[p].parentNode)){return q[p]}}s.className="dropzone";r.insertBefore(s,r.firstChild);return s},processAddMenuItemResponse:function(p,u){if(!u){u={}}var v,q=document.getElementById(k.id+"-dummy-list-item"),s,r,t=document.createElement("ul");t.innerHTML=p;r=t.getElementsByTagName("li");s=r.length;while(s--){this.setupListItemDragAndDrop(r[s]);if(q){k.insertBefore(r[s],q)}else{k.appendChild(r[s])}}this.recalculateSortOrder(k);this.hideAdvancedMenuItemFields(k);h("#custom-menu-item-name").val("").blur();h("#custom-menu-item-url").val("http://")},processQuickSearchQueryResponse:function(t,y){if(!y){y={}}var q=document.createElement("ul"),p=document.getElementById("nav-menu-meta"),u,x,r,z,v,w=new RegExp("menu-item\\[([^\\]]*)"),s;r=w.exec(t);if(r&&r[1]){v=r[1];while(p.elements["menu-item["+v+"][menu-item-type]"]){v--}if(v!=r[1]){t=t.replace(new RegExp("menu-item\\["+r[1]+"\\]","g"),"menu-item["+v+"]")}}q.innerHTML=t;x=q.getElementsByTagName("li");if(x[0]&&y.object_type){s=document.getElementById(y.object_type+"-search-checklist");if(s){s.appendChild(x[0])}}else{if(y.type){r=/quick-search-(posttype|taxonomy)-([a-zA-Z_-]*)/.exec(y.type);if(r&&r[2]){s=document.getElementById(r[2]+"-search-checklist");if(s){u=x.length;if(!u){z=document.createElement("li");z.appendChild(document.createTextNode(navMenuL10n.noResultsFound));s.appendChild(z)}while(u--){s.appendChild(x[u])}}}}}},recalculateSortOrder:function(r){var s=r.getElementsByTagName("input"),q,p=0;for(q=0;q<s.length;q++){if(s[q].name&&-1!=s[q].name.indexOf("menu-item-position")){s[q].value=++p}}},removeMenuItem:function(r){if(!r){return false}var s=r.getElementsByTagName("ul"),q,p;if(s[0]){q=s[0].getElementsByTagName("li");for(p=0;p<q.length;p++){if(q[p].id&&-1!=q[p].id.indexOf("menu-item-")&&q[p].parentNode==s[0]){r.parentNode.insertBefore(q[p],r)}}}r.className+=" deleting";h(r).fadeOut(350,function(){this.parentNode.removeChild(this)});this.recalculateSortOrder(k)}}};var wpNavMenu=new WPNavMenuHandler();jQuery(function(){wpNavMenu.init()}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/8538e388af3255716bf06a97e205913ef8af77cf/nav-menu.js/clean/wp-admin/js/nav-menu.js |
var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachAddMenuItemListeners();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){return a.pxToDepth(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var h=f.exec(b(this).attr("name")),i="undefined"==typeof h[1]?0:parseInt(h[1],10);d[i]=a.getListDataFromID(i)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-close")){return c.eventOnClickCloseLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachAddMenuItemListeners:function(){var c=b("#nav-menu-meta");c.find(".add-to-menu input").click(function(){a.registerChange();b(this).trigger("wp-add-menu-item",[a.addMenuItemToBottom]);return false});c.find(".customlinkdiv").bind("wp-add-menu-item",function(f,d){a.addCustomLink(d)});c.find(".posttypediv, .taxonomydiv").bind("wp-add-menu-item",function(f,d){b(this).addSelectedToMenu(d)})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachAddMenuItemListeners();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){var c=this.eq(0).css("margin-left");return a.pxToDepth(c&&-1!=c.indexOf("px")?c.slice(0,-2):0)},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var h=f.exec(b(this).attr("name")),i="undefined"==typeof h[1]?0:parseInt(h[1],10);d[i]=a.getListDataFromID(i)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-close")){return c.eventOnClickCloseLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachAddMenuItemListeners:function(){var c=b("#nav-menu-meta");c.find(".add-to-menu input").click(function(){a.registerChange();b(this).trigger("wp-add-menu-item",[a.addMenuItemToBottom]);return false});c.find(".customlinkdiv").bind("wp-add-menu-item",function(f,d){a.addCustomLink(d)});c.find(".posttypediv, .taxonomydiv").bind("wp-add-menu-item",function(f,d){b(this).addSelectedToMenu(d)})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachAddMenuItemListeners();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){return a.pxToDepth(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var h=f.exec(b(this).attr("name")),i="undefined"==typeof h[1]?0:parseInt(h[1],10);d[i]=a.getListDataFromID(i)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-close")){return c.eventOnClickCloseLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachAddMenuItemListeners:function(){var c=b("#nav-menu-meta");c.find(".add-to-menu input").click(function(){a.registerChange();b(this).trigger("wp-add-menu-item",[a.addMenuItemToBottom]);return false});c.find(".customlinkdiv").bind("wp-add-menu-item",function(f,d){a.addCustomLink(d)});c.find(".posttypediv, .taxonomydiv").bind("wp-add-menu-item",function(f,d){b(this).addSelectedToMenu(d)})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http://"==e){return false}b(".customlinkdiv img.waiting").show();this.addLinkToMenu(e,d,c,function(){b(".customlinkdiv img.waiting").hide();b("#custom-menu-item-name").val("").blur();b("#custom-menu-item-url").val("http://")})},addLinkToMenu:function(e,d,c,f){c=c||a.addMenuItemToBottom;f=f||function(){};a.addItemToMenu({"-1":{"menu-item-type":"custom","menu-item-url":e,"menu-item-title":d}},c,f)},addItemToMenu:function(e,c,g){var f=b("#menu").val(),d=b("#menu-settings-column-nonce").val();c=c||function(){};g=g||function(){};params={action:"add-menu-item",menu:f,"menu-settings-column-nonce":d,"menu-item":e};b.post(ajaxurl,params,function(h){c(h,params);g()})},addMenuItemToBottom:function(c,d){b(c).hideAdvancedMenuItemFields().appendTo(a.targetList)},addMenuItemToTop:function(c,d){b(c).hideAdvancedMenuItemFields().prependTo(a.targetList)},attachHomeLinkListener:function(){b(".add-home-link",".customlinkdiv").click(function(c){a.addLinkToMenu(navMenuL10n.homeurl,navMenuL10n.home,a.addMenuItemToTop);return false})},attachUnsavedChangesListener:function(){b("#menu-management input, #menu-management select, #menu-management, #menu-management textarea").change(function(){a.registerChange()});window.onbeforeunload=function(){if(a.menusChanged){return navMenuL10n.saveAlert}};b("input.menu-save, input.save-menu-item").click(function(){window.onbeforeunload=null})},registerChange:function(){a.menusChanged=true},attachTabsPanelListeners:function(){b("#menu-settings-column").bind("click",function(h){var f,i,d,j,c,g=b(h.target);if(g.hasClass("nav-tab-link")){d=/#(.*)$/.exec(h.target.href);if(d&&d[1]){d=d[1]}else{return false}j=g.parents(".inside").first();b("input",j).removeAttr("checked");b(".tabs-panel-active",j).removeClass("tabs-panel-active").addClass("tabs-panel-inactive");b("#"+d,j).removeClass("tabs-panel-inactive").addClass("tabs-panel-active");b(".tabs",j).removeClass("tabs");g.parent().addClass("tabs");b(".quick-search",j).focus();return false}else{if(g.hasClass("select-all")){f=/#(.*)$/.exec(h.target.href);if(f&&f[1]){c=b("#"+f[1]+" .tabs-panel-active .menu-item-title input");if(c.length===c.filter(":checked").length){c.removeAttr("checked")}else{c.attr("checked","checked")}return false}}}})},initTabManager:function(){var h=b(".nav-tabs-wrapper"),i=h.children(".nav-tabs"),g=i.children(".nav-tab-active"),l=i.children(".nav-tab"),e=0,m,f,k,d,j=false;function c(){f=h.offset().left;m=f+h.width();g.makeTabVisible()}b.fn.extend({makeTabVisible:function(){var o=this.eq(0),p,n;if(!o.length){return}p=o.offset().left;n=p+o.outerWidth();if(n>m){i.animate({"margin-left":"+="+(m-n)+"px"},"fast")}else{if(p<f){i.animate({"margin-left":"-="+(p-f)+"px"},"fast")}}return o},isTabVisible:function(){var o=this.eq(0),p=o.offset().left,n=p+o.outerWidth();return(n<=m&&p>=f)?true:false}});l.each(function(){e+=b(this).outerWidth(true)});if(e<=h.width()-i.css("padding-left").slice(0,-2)-i.css("padding-right").slice(0,-2)){return}i.css({"margin-right":(-1*e)+"px",padding:0});k=b('<div class="nav-tabs-arrow nav-tabs-arrow-left"><a>«</a></div>');d=b('<div class="nav-tabs-arrow nav-tabs-arrow-right"><a>»</a></div>');h.wrap('<div class="nav-tabs-nav"/>').parent().prepend(k).append(d);c();b(window).resize(function(){if(j){return}j=true;setTimeout(function(){c();j=false},1000)});b.each([{arrow:k,next:"next",last:"first",operator:"+="},{arrow:d,next:"prev",last:"last",operator:"-="}],function(){var n=this;this.arrow.mousedown(function(){var p=l[n.last](),o=function(){if(!p.isTabVisible()){i.animate({"margin-left":n.operator+"90px"},300,"linear",o)}};o()}).mouseup(function(){var p,o;i.stop(true);p=l[n.last]();while((o=p[n.next]())&&o.length&&!o.isTabVisible()){p=o}p.makeTabVisible()})})},eventOnClickEditLink:function(c){var e,d=/#(.*)$/.exec(c.href);if(d&&d[1]){e=b("#"+d[1]);if(0!=e.length){if(e.hasClass("menu-item-edit-inactive")){e.slideDown("fast").siblings("dl").andSelf().removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{e.slideUp("fast").siblings("dl").andSelf().removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCloseLink:function(c){b(c).closest(".menu-item-settings").siblings("dl").find(".item-edit").click();return false},eventOnClickMenuSave:function(c){a.menuList.find(".menu-item-data-position").val(function(d){return d+1});return true},eventOnClickMenuDelete:function(c){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(c){var f,e,d=this;e=/_wpnonce=([a-zA-Z0-9]*)$/.exec(c.href);if(e&&e[1]){f=parseInt(c.id.replace("delete-",""),10);b.post(ajaxurl,{action:"delete-menu-item","menu-item":f,_wpnonce:e[1]},function(g){if("1"==g){d.removeMenuItem(document.getElementById("menu-item-"+f))}});return false}return true},processQuickSearchQueryResponse:function(g,m,c){var h,e,j,f={},d=document.getElementById("nav-menu-meta"),l=new RegExp("menu-item\\[([^\\]]*)","g"),k=g.match(/<li>.*<\/li>/g);if(!k){b(".categorychecklist",c).html("<li><p>"+navMenuL10n.noResultsFound+"</p></li>");b("img.waiting",c).hide();return}h=k.length;while(h--){e=l.exec(k[h]);if(e&&e[1]){j=e[1];while(d.elements["menu-item["+j+"][menu-item-type]"]||f[j]){j--}f[j]=true;if(j!=e[1]){k[h]=k[h].replace(new RegExp("menu-item\\["+e[1]+"\\]","g"),"menu-item["+j+"]")}}}b(".categorychecklist",c).html(k.join(""));b("img.waiting",c).hide()},removeMenuItem:function(d){d=b(d);var c=d.childMenuItems(),e=this;d.addClass("deleting").fadeOut(350,function(){d.remove();c.shiftDepthClass(-1).updateParentMenuItemDBId()})},getListDataFromID:function(k,h){if(!k){return false}h=h||document;var d=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],c={},e=h.getElementsByTagName("input"),g=e.length,f;while(g--){f=d.length;while(f--){if(e[g]&&e[g].name&&"menu-item["+k+"]["+d[f]+"]"==e[g].name){c[d[f]]=e[g].value}}}return c},depthToPx:function(c){return c*a.options.menuItemDepthPerLevel},pxToDepth:function(c){return Math.floor(c/a.options.menuItemDepthPerLevel)}};b(document).ready(function(){wpNavMenu.init()})})(jQuery); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/930bb8e4a0d1e147403f653b24370d64392a0265/nav-menu.js/clean/wp-admin/js/nav-menu.js |
var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){var c=b.slideToggle(150,function(){b.css("display","")}).parent().toggleClass("wp-menu-open").attr("id");if(c){a("li.wp-has-submenu","#adminmenu").each(function(f,g){if(c==g.id){var d=a(g).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+f,d)}})}return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var d=a(this),c=d.val();if(d.attr("checked")){b.checked(c)}else{b.unchecked(c)}columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show()},unchecked:function(b){a(".column-"+b).hide()},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var b=this.id;return b.substring(b,b.length-5)}).get().join(",")}}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(d){var f=false,a,e,c,b;d("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");d("div.updated, div.error").not(".below-h2, .inline").insertAfter(d("div.wrap h2:first"));d("#show-settings-link").click(function(){if(!d("#screen-options-wrap").hasClass("screen-options-open")){d("#contextual-help-link-wrap").css("visibility","hidden")}d("#screen-options-wrap").slideToggle("fast",function(){if(d(this).hasClass("screen-options-open")){d("#show-settings-link").css({backgroundPosition:"top right"});d("#contextual-help-link-wrap").css("visibility","");d(this).removeClass("screen-options-open")}else{d("#show-settings-link").css({backgroundPosition:"bottom right"});d(this).addClass("screen-options-open")}});return false});d("#contextual-help-link").click(function(){if(!d("#contextual-help-wrap").hasClass("contextual-help-open")){d("#screen-options-link-wrap").css("visibility","hidden")}d("#contextual-help-wrap").slideToggle("fast",function(){if(d(this).hasClass("contextual-help-open")){d("#contextual-help-link").css({backgroundPosition:"top right"});d("#screen-options-link-wrap").css("visibility","");d(this).removeClass("contextual-help-open")}else{d("#contextual-help-link").css({backgroundPosition:"bottom right"});d(this).addClass("contextual-help-open")}});return false});d("tbody").children().children(".check-column").find(":checkbox").click(function(g){if("undefined"==g.shiftKey){return true}if(g.shiftKey){if(!f){return true}a=d(f).closest("form").find(":checkbox");e=a.index(f);c=a.index(this);b=d(this).attr("checked");if(0<e&&0<c&&e!=c){a.slice(e,c).attr("checked",function(){if(d(this).closest("tr").is(":visible")){return b?"checked":""}return""})}}f=this;return true});d("thead, tfoot").find(".check-column :checkbox").click(function(i){var j=d(this).attr("checked"),h="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,g=i.shiftKey||h;d(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(d(this).closest("tr").is(":hidden")){return""}if(g){return d(this).attr("checked")?"":"checked"}else{if(j){return"checked"}}return""});d(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(g){return""}else{if(j){return"checked"}}return""})});d("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");d("div.default-password-nag").hide();return false});d("#newcontent").keydown(function(l){if(l.keyCode!=9){return true}var i=l.target,n=i.selectionStart,h=i.selectionEnd,m=i.value,g,k;try{this.lastKey=9}catch(j){}if(document.selection){i.focus();k=document.selection.createRange();k.text="\t"}else{if(n>=0){g=this.scrollTop;i.value=m.substring(0,n).concat("\t",m.substring(h));i.selectionStart=i.selectionEnd=n+1;this.scrollTop=g}}if(l.stopPropagation){l.stopPropagation()}if(l.preventDefault){l.preventDefault()}});d("#newcontent").blur(function(g){if(this.lastKey&&9==this.lastKey){this.focus()}})}); | var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){var c=b.slideToggle(150,function(){b.css("display","")}).parent().toggleClass("wp-menu-open").attr("id");if(c){a("li.wp-has-submenu","#adminmenu").each(function(f,g){if(c==g.id){var d=a(g).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+f,d)}})}return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var d=a(this),c=d.val();if(d.attr("checked")){b.checked(c)}else{b.unchecked(c)}columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show();this.colSpanChange(+1)},unchecked:function(b){a(".column-"+b).hide();this.colSpanChange(-1)},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var b=this.id;return b.substring(b,b.length-5)}).get().join(",")}},colSpanChange:function(b){var d=a("table").find(".colspanchange");if(!d.length){return}var c=parseInt(d.attr("colspan"),10)+b;d.attr("colspan",c.toString())}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(d){var f=false,a,e,c,b;d("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");d("div.updated, div.error").not(".below-h2, .inline").insertAfter(d("div.wrap h2:first"));d("#show-settings-link").click(function(){if(!d("#screen-options-wrap").hasClass("screen-options-open")){d("#contextual-help-link-wrap").css("visibility","hidden")}d("#screen-options-wrap").slideToggle("fast",function(){if(d(this).hasClass("screen-options-open")){d("#show-settings-link").css({backgroundPosition:"top right"});d("#contextual-help-link-wrap").css("visibility","");d(this).removeClass("screen-options-open")}else{d("#show-settings-link").css({backgroundPosition:"bottom right"});d(this).addClass("screen-options-open")}});return false});d("#contextual-help-link").click(function(){if(!d("#contextual-help-wrap").hasClass("contextual-help-open")){d("#screen-options-link-wrap").css("visibility","hidden")}d("#contextual-help-wrap").slideToggle("fast",function(){if(d(this).hasClass("contextual-help-open")){d("#contextual-help-link").css({backgroundPosition:"top right"});d("#screen-options-link-wrap").css("visibility","");d(this).removeClass("contextual-help-open")}else{d("#contextual-help-link").css({backgroundPosition:"bottom right"});d(this).addClass("contextual-help-open")}});return false});d("tbody").children().children(".check-column").find(":checkbox").click(function(g){if("undefined"==g.shiftKey){return true}if(g.shiftKey){if(!f){return true}a=d(f).closest("form").find(":checkbox");e=a.index(f);c=a.index(this);b=d(this).attr("checked");if(0<e&&0<c&&e!=c){a.slice(e,c).attr("checked",function(){if(d(this).closest("tr").is(":visible")){return b?"checked":""}return""})}}f=this;return true});d("thead, tfoot").find(".check-column :checkbox").click(function(i){var j=d(this).attr("checked"),h="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,g=i.shiftKey||h;d(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(d(this).closest("tr").is(":hidden")){return""}if(g){return d(this).attr("checked")?"":"checked"}else{if(j){return"checked"}}return""});d(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(g){return""}else{if(j){return"checked"}}return""})});d("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");d("div.default-password-nag").hide();return false});d("#newcontent").keydown(function(l){if(l.keyCode!=9){return true}var i=l.target,n=i.selectionStart,h=i.selectionEnd,m=i.value,g,k;try{this.lastKey=9}catch(j){}if(document.selection){i.focus();k=document.selection.createRange();k.text="\t"}else{if(n>=0){g=this.scrollTop;i.value=m.substring(0,n).concat("\t",m.substring(h));i.selectionStart=i.selectionEnd=n+1;this.scrollTop=g}}if(l.stopPropagation){l.stopPropagation()}if(l.preventDefault){l.preventDefault()}});d("#newcontent").blur(function(g){if(this.lastKey&&9==this.lastKey){this.focus()}})}); | var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){var c=b.slideToggle(150,function(){b.css("display","")}).parent().toggleClass("wp-menu-open").attr("id");if(c){a("li.wp-has-submenu","#adminmenu").each(function(f,g){if(c==g.id){var d=a(g).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+f,d)}})}return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var d=a(this),c=d.val();if(d.attr("checked")){b.checked(c)}else{b.unchecked(c)}columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show()},unchecked:function(b){a(".column-"+b).hide()},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var b=this.id;return b.substring(b,b.length-5)}).get().join(",")}}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(d){var f=false,a,e,c,b;d("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");d("div.updated, div.error").not(".below-h2, .inline").insertAfter(d("div.wrap h2:first"));d("#show-settings-link").click(function(){if(!d("#screen-options-wrap").hasClass("screen-options-open")){d("#contextual-help-link-wrap").css("visibility","hidden")}d("#screen-options-wrap").slideToggle("fast",function(){if(d(this).hasClass("screen-options-open")){d("#show-settings-link").css({backgroundPosition:"top right"});d("#contextual-help-link-wrap").css("visibility","");d(this).removeClass("screen-options-open")}else{d("#show-settings-link").css({backgroundPosition:"bottom right"});d(this).addClass("screen-options-open")}});return false});d("#contextual-help-link").click(function(){if(!d("#contextual-help-wrap").hasClass("contextual-help-open")){d("#screen-options-link-wrap").css("visibility","hidden")}d("#contextual-help-wrap").slideToggle("fast",function(){if(d(this).hasClass("contextual-help-open")){d("#contextual-help-link").css({backgroundPosition:"top right"});d("#screen-options-link-wrap").css("visibility","");d(this).removeClass("contextual-help-open")}else{d("#contextual-help-link").css({backgroundPosition:"bottom right"});d(this).addClass("contextual-help-open")}});return false});d("tbody").children().children(".check-column").find(":checkbox").click(function(g){if("undefined"==g.shiftKey){return true}if(g.shiftKey){if(!f){return true}a=d(f).closest("form").find(":checkbox");e=a.index(f);c=a.index(this);b=d(this).attr("checked");if(0<e&&0<c&&e!=c){a.slice(e,c).attr("checked",function(){if(d(this).closest("tr").is(":visible")){return b?"checked":""}return""})}}f=this;return true});d("thead, tfoot").find(".check-column :checkbox").click(function(i){var j=d(this).attr("checked"),h="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,g=i.shiftKey||h;d(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(d(this).closest("tr").is(":hidden")){return""}if(g){return d(this).attr("checked")?"":"checked"}else{if(j){return"checked"}}return""});d(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(g){return""}else{if(j){return"checked"}}return""})});d("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");d("div.default-password-nag").hide();return false});d("#newcontent").keydown(function(l){if(l.keyCode!=9){return true}var i=l.target,n=i.selectionStart,h=i.selectionEnd,m=i.value,g,k;try{this.lastKey=9}catch(j){}if(document.selection){i.focus();k=document.selection.createRange();k.text="\t"}else{if(n>=0){g=this.scrollTop;i.value=m.substring(0,n).concat("\t",m.substring(h));i.selectionStart=i.selectionEnd=n+1;this.scrollTop=g}}if(l.stopPropagation){l.stopPropagation()}if(l.preventDefault){l.preventDefault()}});d("#newcontent").blur(function(g){if(this.lastKey&&9==this.lastKey){this.focus()}})}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/63b4ef270e88d5f980c05e004adaffa5185a6d4b/common.js/buggy/wp-admin/js/common.js |
var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,autoCompleteData:{},init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachAddMenuItemListeners();this.attachQuickSearchListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager();this.checkForEmptyMenu()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){return a.pxToDepth(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var h=f.exec(b(this).attr("name")),i="undefined"==typeof h[1]?0:parseInt(h[1],10);d[i]=a.getListDataFromID(i)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var j=0,i,g,c,h,f=a.menuList.offset().left,k,e;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(s,r){var m,q,p,n,o;e=r.item.children(".menu-item-transport");i=(k)?0:r.item.menuItemDepth();d(r,i);p=(r.item.next()[0]==r.placeholder[0])?r.item.next():r.item;n=p.childMenuItems();e.append(n);l(r);m=e.outerHeight();m+=(m>0)?(r.placeholder.css("margin-top").slice(0,-2)*1):0;m+=r.helper.outerHeight();m-=2;r.placeholder.height(m);o=i;n.each(function(){var t=b(this).menuItemDepth();o=(t>o)?t:o});q=r.helper.find(".menu-item-handle").outerWidth();q+=a.depthToPx(o-i);q-=2;r.placeholder.width(q)},stop:function(p,o){var n,m=j-i;n=e.children().insertAfter(o.item);if(m!=0){o.item.updateDepthClass(j);n.shiftDepthClass(m)}o.item.updateParentMenuItemDBId();a.recalculateMenuItemPositions()},change:function(n,m){if(!m.placeholder.parent().hasClass("menu")){m.placeholder.appendTo(a.menuList)}l(m)},sort:function(n,m){var p=m.helper.offset(),o=a.pxToDepth(p.left-f);if(o>c||p.top<h){o=c}else{if(o<g){o=g}}if(o!=j){d(m,o)}}});function l(o){var n=o.placeholder.prev(),m=o.placeholder.next(),p;if(n[0]==o.item[0]){n=n.prev()}if(m[0]==o.item[0]){m=m.next()}h=(n.length)?n.offset().top+n.height():0;g=(m.length)?m.menuItemDepth():0;if(n.length){c=((p=n.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:p}else{c=0}}function d(m,n){m.placeholder.updateDepthClass(n,j);j=n}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-close")){return c.eventOnClickCloseLink(d.target)}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachAddMenuItemListeners:function(){var c=b("#nav-menu-meta");c.find(".add-to-menu input").click(function(){b(this).trigger("wp-add-menu-item",[a.addMenuItemToBottom]);return false});c.find(".customlinkdiv").bind("wp-add-menu-item",function(f,d){a.addCustomLink(d)});c.find(".posttypediv, .taxonomydiv").bind("wp-add-menu-item",function(f,d){b(this).addSelectedToMenu(d)})},attachQuickSearchListeners:function(){var d=this,c=b("#nav-menu-meta");b("input.quick-search").each(function(e,f){d.setupQuickSearchEventListeners(f)});c.find(".quick-search-submit").click(function(){b(this).trigger("wp-quick-search");return false});c.find(".inside").children().bind("wp-quick-search",function(){d.quickSearch(b(this).attr("id"))})},quickSearch:function(j){var e=b("#"+j+" .quick-search").attr("name"),g=b("#"+j+" .quick-search").val(),i=b("#menu").val(),d=b("#menu-settings-column-nonce").val(),h={},f=this,c=function(){};c=f.processQuickSearchQueryResponse;h={action:"menu-quick-search","response-format":"markup",menu:i,"menu-settings-column-nonce":d,q:g,type:e};b.post(ajaxurl,h,function(k){c.call(f,k,h)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,autoCompleteData:{},init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachAddMenuItemListeners();this.attachQuickSearchListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){return a.pxToDepth(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var h=f.exec(b(this).attr("name")),i="undefined"==typeof h[1]?0:parseInt(h[1],10);d[i]=a.getListDataFromID(i)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var j=0,i,g,c,h,f=a.menuList.offset().left,k,e;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(s,r){var m,q,p,n,o;e=r.item.children(".menu-item-transport");i=(k)?0:r.item.menuItemDepth();d(r,i);p=(r.item.next()[0]==r.placeholder[0])?r.item.next():r.item;n=p.childMenuItems();e.append(n);l(r);m=e.outerHeight();m+=(m>0)?(r.placeholder.css("margin-top").slice(0,-2)*1):0;m+=r.helper.outerHeight();m-=2;r.placeholder.height(m);o=i;n.each(function(){var t=b(this).menuItemDepth();o=(t>o)?t:o});q=r.helper.find(".menu-item-handle").outerWidth();q+=a.depthToPx(o-i);q-=2;r.placeholder.width(q)},stop:function(p,o){var n,m=j-i;n=e.children().insertAfter(o.item);if(m!=0){o.item.updateDepthClass(j);n.shiftDepthClass(m)}o.item.updateParentMenuItemDBId();a.recalculateMenuItemPositions()},change:function(n,m){if(!m.placeholder.parent().hasClass("menu")){m.placeholder.appendTo(a.menuList)}l(m)},sort:function(n,m){var p=m.helper.offset(),o=a.pxToDepth(p.left-f);if(o>c||p.top<h){o=c}else{if(o<g){o=g}}if(o!=j){d(m,o)}}});function l(o){var n=o.placeholder.prev(),m=o.placeholder.next(),p;if(n[0]==o.item[0]){n=n.prev()}if(m[0]==o.item[0]){m=m.next()}h=(n.length)?n.offset().top+n.height():0;g=(m.length)?m.menuItemDepth():0;if(n.length){c=((p=n.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:p}else{c=0}}function d(m,n){m.placeholder.updateDepthClass(n,j);j=n}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-close")){return c.eventOnClickCloseLink(d.target)}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachAddMenuItemListeners:function(){var c=b("#nav-menu-meta");c.find(".add-to-menu input").click(function(){b(this).trigger("wp-add-menu-item",[a.addMenuItemToBottom]);return false});c.find(".customlinkdiv").bind("wp-add-menu-item",function(f,d){a.addCustomLink(d)});c.find(".posttypediv, .taxonomydiv").bind("wp-add-menu-item",function(f,d){b(this).addSelectedToMenu(d)})},attachQuickSearchListeners:function(){var d=this,c=b("#nav-menu-meta");b("input.quick-search").each(function(e,f){d.setupQuickSearchEventListeners(f)});c.find(".quick-search-submit").click(function(){b(this).trigger("wp-quick-search");return false});c.find(".inside").children().bind("wp-quick-search",function(){d.quickSearch(b(this).attr("id"))})},quickSearch:function(j){var e=b("#"+j+" .quick-search").attr("name"),g=b("#"+j+" .quick-search").val(),i=b("#menu").val(),d=b("#menu-settings-column-nonce").val(),h={},f=this,c=function(){};c=f.processQuickSearchQueryResponse;h={action:"menu-quick-search","response-format":"markup",menu:i,"menu-settings-column-nonce":d,q:g,type:e};b.post(ajaxurl,h,function(k){c.call(f,k,h)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,autoCompleteData:{},init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachAddMenuItemListeners();this.attachQuickSearchListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager();this.checkForEmptyMenu()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){return a.pxToDepth(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var h=f.exec(b(this).attr("name")),i="undefined"==typeof h[1]?0:parseInt(h[1],10);d[i]=a.getListDataFromID(i)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var j=0,i,g,c,h,f=a.menuList.offset().left,k,e;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(s,r){var m,q,p,n,o;e=r.item.children(".menu-item-transport");i=(k)?0:r.item.menuItemDepth();d(r,i);p=(r.item.next()[0]==r.placeholder[0])?r.item.next():r.item;n=p.childMenuItems();e.append(n);l(r);m=e.outerHeight();m+=(m>0)?(r.placeholder.css("margin-top").slice(0,-2)*1):0;m+=r.helper.outerHeight();m-=2;r.placeholder.height(m);o=i;n.each(function(){var t=b(this).menuItemDepth();o=(t>o)?t:o});q=r.helper.find(".menu-item-handle").outerWidth();q+=a.depthToPx(o-i);q-=2;r.placeholder.width(q)},stop:function(p,o){var n,m=j-i;n=e.children().insertAfter(o.item);if(m!=0){o.item.updateDepthClass(j);n.shiftDepthClass(m)}o.item.updateParentMenuItemDBId();a.recalculateMenuItemPositions()},change:function(n,m){if(!m.placeholder.parent().hasClass("menu")){m.placeholder.appendTo(a.menuList)}l(m)},sort:function(n,m){var p=m.helper.offset(),o=a.pxToDepth(p.left-f);if(o>c||p.top<h){o=c}else{if(o<g){o=g}}if(o!=j){d(m,o)}}});function l(o){var n=o.placeholder.prev(),m=o.placeholder.next(),p;if(n[0]==o.item[0]){n=n.prev()}if(m[0]==o.item[0]){m=m.next()}h=(n.length)?n.offset().top+n.height():0;g=(m.length)?m.menuItemDepth():0;if(n.length){c=((p=n.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:p}else{c=0}}function d(m,n){m.placeholder.updateDepthClass(n,j);j=n}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-close")){return c.eventOnClickCloseLink(d.target)}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachAddMenuItemListeners:function(){var c=b("#nav-menu-meta");c.find(".add-to-menu input").click(function(){b(this).trigger("wp-add-menu-item",[a.addMenuItemToBottom]);return false});c.find(".customlinkdiv").bind("wp-add-menu-item",function(f,d){a.addCustomLink(d)});c.find(".posttypediv, .taxonomydiv").bind("wp-add-menu-item",function(f,d){b(this).addSelectedToMenu(d)})},attachQuickSearchListeners:function(){var d=this,c=b("#nav-menu-meta");b("input.quick-search").each(function(e,f){d.setupQuickSearchEventListeners(f)});c.find(".quick-search-submit").click(function(){b(this).trigger("wp-quick-search");return false});c.find(".inside").children().bind("wp-quick-search",function(){d.quickSearch(b(this).attr("id"))})},quickSearch:function(j){var e=b("#"+j+" .quick-search").attr("name"),g=b("#"+j+" .quick-search").val(),i=b("#menu").val(),d=b("#menu-settings-column-nonce").val(),h={},f=this,c=function(){};c=f.processQuickSearchQueryResponse;h={action:"menu-quick-search","response-format":"markup",menu:i,"menu-settings-column-nonce":d,q:g,type:e};b.post(ajaxurl,h,function(k){c.call(f,k,h)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http://"==e){return false}b(".customlinkdiv img.waiting").show();this.addLinkToMenu(e,d,c,function(){b(".customlinkdiv img.waiting").hide();b("#custom-menu-item-name").val("").blur();b("#custom-menu-item-url").val("http://")})},addLinkToMenu:function(e,d,c,f){c=c||a.addMenuItemToBottom;f=f||function(){};a.addItemToMenu({"-1":{"menu-item-type":"custom","menu-item-url":e,"menu-item-title":d}},c,f)},addItemToMenu:function(e,c,g){var f=b("#menu").val(),d=b("#menu-settings-column-nonce").val();c=c||function(){};g=g||function(){};params={action:"add-menu-item",menu:f,"menu-settings-column-nonce":d,"menu-item":e};b.post(ajaxurl,params,function(h){c(h,params);g()})},addMenuItemToBottom:function(c,d){b(c).hideAdvancedMenuItemFields().appendTo(a.targetList)},addMenuItemToTop:function(c,d){b(c).hideAdvancedMenuItemFields().prependTo(a.targetList)},attachHomeLinkListener:function(){b(".add-home-link",".customlinkdiv").click(function(c){a.addLinkToMenu(navMenuL10n.homeurl,navMenuL10n.home,a.addMenuItemToTop,a.recalculateMenuItemPositions);return false})},attachTabsPanelListeners:function(){b("#menu-settings-column").bind("click",function(j){var h,k,d,l,c,g,f;if(j.target&&j.target.className&&-1!=j.target.className.indexOf("nav-tab-link")){d=/#(.*)$/.exec(j.target.href);l=b(j.target).parents(".inside").first()[0];c=l?l.getElementsByTagName("input"):[];g=c.length;while(g--){c[g].checked=false}b(".tabs-panel",l).each(function(){if(this.className){this.className=this.className.replace("tabs-panel-active","tabs-panel-inactive")}});b(".tabs",l).each(function(){this.className=this.className.replace("tabs","")});j.target.parentNode.className+=" tabs";if(d&&d[1]){k=document.getElementById(d[1]);if(k){k.className=k.className.replace("tabs-panel-inactive","tabs-panel-active")}}return false}else{if(j.target&&j.target.className&&-1!=j.target.className.indexOf("select-all")){h=/#(.*)$/.exec(j.target.href);if(h&&h[1]){f=b("#"+h[1]+" .tabs-panel-active .menu-item-title input");if(f.length===f.filter(":checked").length){f.removeAttr("checked")}else{f.attr("checked","checked")}return false}}}})},initTabManager:function(){var h=b(".nav-tabs-wrapper"),i=h.children(".nav-tabs"),g=i.children(".nav-tab-active"),l=i.children(".nav-tab"),e=0,m,f,k,d,j=false;function c(){f=h.offset().left;m=f+h.width();g.makeTabVisible()}b.fn.extend({makeTabVisible:function(){var o=this.eq(0),p,n;if(!o.length){return}p=o.offset().left;n=p+o.outerWidth();if(n>m){i.animate({"margin-left":"+="+(m-n)+"px"},"fast")}else{if(p<f){i.animate({"margin-left":"-="+(p-f)+"px"},"fast")}}return o},isTabVisible:function(){var o=this.eq(0),p=o.offset().left,n=p+o.outerWidth();return(n<=m&&p>=f)?true:false}});l.each(function(){e+=b(this).outerWidth(true)});if(e<=h.width()-i.css("padding-left").slice(0,-2)-i.css("padding-right").slice(0,-2)){return}i.css({"margin-right":(-1*e)+"px",padding:0});k=b('<div class="nav-tabs-arrow nav-tabs-arrow-left"><a>«</a></div>');d=b('<div class="nav-tabs-arrow nav-tabs-arrow-right"><a>»</a></div>');h.wrap('<div class="nav-tabs-nav"/>').parent().prepend(k).append(d);c();b(window).resize(function(){if(j){return}j=true;setTimeout(function(){c();j=false},1000)});b.each([{arrow:k,next:"next",last:"first",operator:"+="},{arrow:d,next:"prev",last:"last",operator:"-="}],function(){var n=this;this.arrow.mousedown(function(){var p=l[n.last](),o=function(){if(!p.isTabVisible()){i.animate({"margin-left":n.operator+"90px"},300,"linear",o)}};o()}).mouseup(function(){var p,o;i.stop(true);p=l[n.last]();while((o=p[n.next]())&&o.length&&!o.isTabVisible()){p=o}p.makeTabVisible()})})},setupQuickSearchEventListeners:function(c){var d=this;b(c).autocomplete(ajaxurl+"?action=menu-quick-search&type="+c.name,{delay:500,formatItem:a.formatAutocompleteResponse,formatResult:a.formatAutocompleteResult,minchars:2,multiple:false}).bind("blur",function(h){var f=a.autoCompleteData[this.value],g=this;if(f){b.post(ajaxurl+"?action=menu-quick-search&type=get-post-item&response-format=markup",f,function(e){d.processQuickSearchQueryResponse.call(d,e,f);a.autoCompleteData[g.value]=false})}})},eventOnClickEditLink:function(c){var e,d=/#(.*)$/.exec(c.href);if(d&&d[1]){e=b("#"+d[1]);if(0!=e.length){if(e.hasClass("menu-item-edit-inactive")){e.slideDown("fast").siblings("dl").andSelf().removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{e.slideUp("fast").siblings("dl").andSelf().removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCloseLink:function(c){b(c).closest(".menu-item-settings").siblings("dl").find(".item-edit").click();return false},eventOnClickMenuDelete:function(c){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(c){var f,e,d=this;if(confirm(navMenuL10n.warnDeleteMenuItem)){e=/_wpnonce=([a-zA-Z0-9]*)$/.exec(c.href);if(e&&e[1]){f=parseInt(c.id.replace("delete-",""),10);b.post(ajaxurl,{action:"delete-menu-item","menu-item":f,_wpnonce:e[1]},function(g){if("1"==g){d.removeMenuItem(document.getElementById("menu-item-"+f))}});return false}return true}else{return false}},processQuickSearchQueryResponse:function(g,m){if(!m){m={}}var d=document.createElement("ul"),c=document.getElementById("nav-menu-meta"),h,l,e,n,j,k=new RegExp("menu-item\\[([^\\]]*)"),f;e=k.exec(g);if(e&&e[1]){j=e[1];while(c.elements["menu-item["+j+"][menu-item-type]"]){j--}if(j!=e[1]){g=g.replace(new RegExp("menu-item\\["+e[1]+"\\]","g"),"menu-item["+j+"]")}}d.innerHTML=g;l=d.getElementsByTagName("li");if(l[0]&&m.object_type){f=document.getElementById(m.object_type+"-search-checklist");if(f){f.appendChild(l[0])}}else{if(m.type){e=/quick-search-(posttype|taxonomy)-([a-zA-Z_-]*)/.exec(m.type);if(e&&e[2]){f=document.getElementById(e[2]+"-search-checklist");if(f){h=l.length;if(!h){n=document.createElement("li");n.appendChild(document.createTextNode(navMenuL10n.noResultsFound));f.appendChild(n)}while(h--){f.appendChild(l[h])}}}}}},removeMenuItem:function(d){d=b(d);var c=d.childMenuItems(),e=this;d.addClass("deleting").fadeOut(350,function(){d.remove();c.shiftDepthClass(-1).updateParentMenuItemDBId();a.recalculateMenuItemPositions();e.checkForEmptyMenu()})},checkForEmptyMenu:function(){if(a.menuList.children().length){return}a.menuList.height(80).one("sortstop",function(){b(this).height("auto")})},formatAutocompleteResponse:function(c,g,d,f){if(c&&c[0]){var e=b.parseJSON(c[0]);if(e.post_title){if(e.ID&&e.post_type){a.autoCompleteData[e.post_title]={ID:e.ID,object_type:e.post_type}}return e.post_title}}},formatAutocompleteResult:function(c,g,d,f){if(c&&c[0]){var e=b.parseJSON(c[0]);if(e.post_title){return e.post_title}}},getListDataFromID:function(k,h){if(!k){return false}h=h||document;var d=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-append","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],c={},e=h.getElementsByTagName("input"),g=e.length,f;while(g--){f=d.length;while(f--){if(e[g]&&e[g].name&&"menu-item["+k+"]["+d[f]+"]"==e[g].name){c[d[f]]=e[g].value}}}return c},recalculateMenuItemPositions:function(){a.menuList.find(".menu-item-data-position").val(function(c){return c+1})},depthToPx:function(c){return c*a.options.menuItemDepthPerLevel},pxToDepth:function(c){return Math.floor(c/a.options.menuItemDepthPerLevel)}};b(document).ready(function(){wpNavMenu.init()})})(jQuery); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/e82fe934af7146fc01c0aaed34cdaed45e6f9b77/nav-menu.js/buggy/wp-admin/js/nav-menu.js |
var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){var c=this.eq(0).css("margin-left");return a.pxToDepth(c&&-1!=c.indexOf("px")?c.slice(0,-2):0)},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var i=b(this),h=f.exec(i.attr("name")),j="undefined"==typeof h[1]?0:parseInt(h[1],10);if(this.className&&-1!=this.className.indexOf("add-to-top")){c=a.addMenuItemToTop}d[j]=i.closest("li").getItemData("add-menu-item",j)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})},getItemData:function(f,g){f=f||"menu-item";var d={},e,c=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!g&&f=="menu-item"){g=this.find(".menu-item-data-db-id").val()}if(!g){return d}this.find("input").each(function(){var h;e=c.length;while(e--){if(f=="menu-item"){h=c[e]+"["+g+"]"}else{if(f=="add-menu-item"){h="menu-item["+g+"]["+c[e]+"]"}}if(this.name&&h==this.name){d[c[e]]=this.value}}});return d},setItemData:function(c,d,e){d=d||"menu-item";if(!e&&d=="menu-item"){e=b(".menu-item-data-db-id",this).val()}if(!e){return this}this.find("input").each(function(){var f=b(this),g;b.each(c,function(h,i){if(d=="menu-item"){g=h+"["+e+"]"}else{if(d=="add-menu-item"){g="menu-item["+e+"]["+h+"]"}}if(g==f.attr("name")){f.val(i)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-cancel")){return c.eventOnClickCancelLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,isRTL:!!("undefined"!=typeof isRtl&&isRtl),init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){var c=a.isRTL?this.eq(0).css("margin-right"):this.eq(0).css("margin-left");return a.pxToDepth(c&&-1!=c.indexOf("px")?c.slice(0,-2):0)},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var i=b(this),h=f.exec(i.attr("name")),j="undefined"==typeof h[1]?0:parseInt(h[1],10);if(this.className&&-1!=this.className.indexOf("add-to-top")){c=a.addMenuItemToTop}d[j]=i.closest("li").getItemData("add-menu-item",j)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})},getItemData:function(f,g){f=f||"menu-item";var d={},e,c=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!g&&f=="menu-item"){g=this.find(".menu-item-data-db-id").val()}if(!g){return d}this.find("input").each(function(){var h;e=c.length;while(e--){if(f=="menu-item"){h=c[e]+"["+g+"]"}else{if(f=="add-menu-item"){h="menu-item["+g+"]["+c[e]+"]"}}if(this.name&&h==this.name){d[c[e]]=this.value}}});return d},setItemData:function(c,d,e){d=d||"menu-item";if(!e&&d=="menu-item"){e=b(".menu-item-data-db-id",this).val()}if(!e){return this}this.find("input").each(function(){var f=b(this),g;b.each(c,function(h,i){if(d=="menu-item"){g=h+"["+e+"]"}else{if(d=="add-menu-item"){g="menu-item["+e+"]["+h+"]"}}if(g==f.attr("name")){f.val(i)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;if(a.isRTL){v.item[0].style.right="auto"}g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0;if(a.isRTL){r.item[0].style.left="auto";r.item[0].style.right=0}},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=(a.isRTL?-1:1)*a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-cancel")){return c.eventOnClickCancelLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){var c=this.eq(0).css("margin-left");return a.pxToDepth(c&&-1!=c.indexOf("px")?c.slice(0,-2):0)},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var i=b(this),h=f.exec(i.attr("name")),j="undefined"==typeof h[1]?0:parseInt(h[1],10);if(this.className&&-1!=this.className.indexOf("add-to-top")){c=a.addMenuItemToTop}d[j]=i.closest("li").getItemData("add-menu-item",j)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})},getItemData:function(f,g){f=f||"menu-item";var d={},e,c=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!g&&f=="menu-item"){g=this.find(".menu-item-data-db-id").val()}if(!g){return d}this.find("input").each(function(){var h;e=c.length;while(e--){if(f=="menu-item"){h=c[e]+"["+g+"]"}else{if(f=="add-menu-item"){h="menu-item["+g+"]["+c[e]+"]"}}if(this.name&&h==this.name){d[c[e]]=this.value}}});return d},setItemData:function(c,d,e){d=d||"menu-item";if(!e&&d=="menu-item"){e=b(".menu-item-data-db-id",this).val()}if(!e){return this}this.find("input").each(function(){var f=b(this),g;b.each(c,function(h,i){if(d=="menu-item"){g=h+"["+e+"]"}else{if(d=="add-menu-item"){g="menu-item["+e+"]["+h+"]"}}if(g==f.attr("name")){f.val(i)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-cancel")){return c.eventOnClickCancelLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http://"==e){return false}b(".customlinkdiv img.waiting").show();this.addLinkToMenu(e,d,c,function(){b(".customlinkdiv img.waiting").hide();b("#custom-menu-item-name").val("").blur();b("#custom-menu-item-url").val("http://")})},addLinkToMenu:function(e,d,c,f){c=c||a.addMenuItemToBottom;f=f||function(){};a.addItemToMenu({"-1":{"menu-item-type":"custom","menu-item-url":e,"menu-item-title":d}},c,f)},addItemToMenu:function(e,c,g){var f=b("#menu").val(),d=b("#menu-settings-column-nonce").val();c=c||function(){};g=g||function(){};params={action:"add-menu-item",menu:f,"menu-settings-column-nonce":d,"menu-item":e};b.post(ajaxurl,params,function(h){var i=b("#menu-instructions");c(h,params);if(!i.hasClass("menu-instructions-inactive")&&i.siblings().length){i.addClass("menu-instructions-inactive")}g()})},addMenuItemToBottom:function(c,d){b(c).hideAdvancedMenuItemFields().appendTo(a.targetList)},addMenuItemToTop:function(c,d){b(c).hideAdvancedMenuItemFields().prependTo(a.targetList)},attachUnsavedChangesListener:function(){b("#menu-management input, #menu-management select, #menu-management, #menu-management textarea").change(function(){a.registerChange()});window.onbeforeunload=function(){if(a.menusChanged){return navMenuL10n.saveAlert}};b("input.menu-save").click(function(){window.onbeforeunload=null})},registerChange:function(){a.menusChanged=true},attachTabsPanelListeners:function(){b("#menu-settings-column").bind("click",function(h){var f,d,i,c,g=b(h.target);if(g.hasClass("nav-tab-link")){d=/#(.*)$/.exec(h.target.href);if(d&&d[1]){d=d[1]}else{return false}i=g.parents(".inside").first();b("input",i).removeAttr("checked");b(".tabs-panel-active",i).removeClass("tabs-panel-active").addClass("tabs-panel-inactive");b("#"+d,i).removeClass("tabs-panel-inactive").addClass("tabs-panel-active");b(".tabs",i).removeClass("tabs");g.parent().addClass("tabs");b(".quick-search",i).focus();return false}else{if(g.hasClass("select-all")){f=/#(.*)$/.exec(h.target.href);if(f&&f[1]){c=b("#"+f[1]+" .tabs-panel-active .menu-item-title input");if(c.length===c.filter(":checked").length){c.removeAttr("checked")}else{c.attr("checked","checked")}return false}}else{if(g.hasClass("submit-add-to-menu")){a.registerChange();if(h.target.id&&"submit-customlinkdiv"==h.target.id){a.addCustomLink(a.addMenuItemToBottom)}else{if(h.target.id&&-1!=h.target.id.indexOf("submit-")){b("#"+h.target.id.replace(/submit-/,"")).addSelectedToMenu(a.addMenuItemToBottom)}}return false}else{if(g.hasClass("page-numbers")){b.post(ajaxurl,h.target.href.replace(/.*\?/,"").replace(/action=([^&]*)/,"")+"&action=menu-get-metabox",function(m){if(-1==m.indexOf("replace-id")){return}var l=b.parseJSON(m),e=document.getElementById(l["replace-id"]),k=document.createElement("div"),j=document.createElement("div");if(!l.markup||!e){return}j.innerHTML=l.markup?l.markup:"";e.parentNode.insertBefore(k,e);k.parentNode.removeChild(e);k.parentNode.insertBefore(j,k);k.parentNode.removeChild(k)});return false}}}}})},initTabManager:function(){var h=b(".nav-tabs-wrapper"),i=h.children(".nav-tabs"),g=i.children(".nav-tab-active"),l=i.children(".nav-tab"),e=0,m,f,k,d,j=false;function c(){f=h.offset().left;m=f+h.width();g.makeTabVisible()}b.fn.extend({makeTabVisible:function(){var o=this.eq(0),p,n;if(!o.length){return}p=o.offset().left;n=p+o.outerWidth();if(n>m){i.animate({"margin-left":"+="+(m-n)+"px"},"fast")}else{if(p<f){i.animate({"margin-left":"-="+(p-f)+"px"},"fast")}}return o},isTabVisible:function(){var o=this.eq(0),p=o.offset().left,n=p+o.outerWidth();return(n<=m&&p>=f)?true:false}});l.each(function(){e+=b(this).outerWidth(true)});if(e<=h.width()-i.css("padding-left").slice(0,-2)-i.css("padding-right").slice(0,-2)){return}i.css({"margin-right":(-1*e)+"px",padding:0});k=b('<div class="nav-tabs-arrow nav-tabs-arrow-left"><a>«</a></div>');d=b('<div class="nav-tabs-arrow nav-tabs-arrow-right"><a>»</a></div>');h.wrap('<div class="nav-tabs-nav"/>').parent().prepend(k).append(d);c();b(window).resize(function(){if(j){return}j=true;setTimeout(function(){c();j=false},1000)});b.each([{arrow:k,next:"next",last:"first",operator:"+="},{arrow:d,next:"prev",last:"last",operator:"-="}],function(){var n=this;this.arrow.mousedown(function(){var p=l[n.last](),o=function(){if(!p.isTabVisible()){i.animate({"margin-left":n.operator+"90px"},300,"linear",o)}};o()}).mouseup(function(){var p,o;i.stop(true);p=l[n.last]();while((o=p[n.next]())&&o.length&&!o.isTabVisible()){p=o}p.makeTabVisible()})})},eventOnClickEditLink:function(d){var c,e,f=/#(.*)$/.exec(d.href);if(f&&f[1]){c=b("#"+f[1]);e=c.parent();if(0!=e.length){if(e.hasClass("menu-item-edit-inactive")){if(!c.data("menu-item-data")){c.data("menu-item-data",c.getItemData())}c.slideDown("fast");e.removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{c.slideUp("fast");e.removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCancelLink:function(d){var c=b(d).closest(".menu-item-settings");c.setItemData(c.data("menu-item-data"));return false},eventOnClickMenuSave:function(c){var d="";b("#nav-menu-theme-locations select").each(function(){d+='<input type="hidden" name="'+this.name+'" value="'+b(this).val()+'" />'});b("#update-nav-menu").append(d);a.menuList.find(".menu-item-data-position").val(function(e){return e+1});return true},eventOnClickMenuDelete:function(c){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(c){var d=parseInt(c.id.replace("delete-",""),10);a.removeMenuItem(b("#menu-item-"+d));a.registerChange();return false},processQuickSearchQueryResponse:function(g,m,c){var h,e,j,f={},d=document.getElementById("nav-menu-meta"),l=new RegExp("menu-item\\[([^\\]]*)","g"),k=g.match(/<li>.*<\/li>/g);if(!k){b(".categorychecklist",c).html("<li><p>"+navMenuL10n.noResultsFound+"</p></li>");b("img.waiting",c).hide();return}h=k.length;while(h--){e=l.exec(k[h]);if(e&&e[1]){j=e[1];while(d.elements["menu-item["+j+"][menu-item-type]"]||f[j]){j--}f[j]=true;if(j!=e[1]){k[h]=k[h].replace(new RegExp("menu-item\\["+e[1]+"\\]","g"),"menu-item["+j+"]")}}}b(".categorychecklist",c).html(k.join(""));b("img.waiting",c).hide()},removeMenuItem:function(d){var c=d.childMenuItems();d.addClass("deleting").animate({opacity:0,height:0},350,function(){var e=b("#menu-instructions");d.remove();c.shiftDepthClass(-1).updateParentMenuItemDBId();if(!e.siblings().length){e.removeClass("menu-instructions-inactive")}})},depthToPx:function(c){return c*a.options.menuItemDepthPerLevel},pxToDepth:function(c){return Math.floor(c/a.options.menuItemDepthPerLevel)}};b(document).ready(function(){wpNavMenu.init()})})(jQuery); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/5d21940132b7b8f4e22d35ccc1ed3b3bbbc9db0d/nav-menu.js/buggy/wp-admin/js/nav-menu.js |
var wpNavMenu;(function($){var api=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,isRTL:!!("undefined"!=typeof isRtl&&isRtl),init:function(){api.menuList=$("#menu-to-edit");api.targetList=api.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachUnsavedChangesListener();if(api.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){$.fn.extend({menuItemDepth:function(){var margin=api.isRTL?this.eq(0).css("margin-right"):this.eq(0).css("margin-left");return api.pxToDepth(margin&&-1!=margin.indexOf("px")?margin.slice(0,-2):0)},updateDepthClass:function(current,prev){return this.each(function(){var t=$(this);prev=prev||t.menuItemDepth();$(this).removeClass("menu-item-depth-"+prev).addClass("menu-item-depth-"+current)})},shiftDepthClass:function(change){return this.each(function(){var t=$(this),depth=t.menuItemDepth();$(this).removeClass("menu-item-depth-"+depth).addClass("menu-item-depth-"+(depth+change))})},childMenuItems:function(){var result=$();this.each(function(){var t=$(this),depth=t.menuItemDepth(),next=t.next();while(next.length&&next.menuItemDepth()>depth){result=result.add(next);next=next.next()}});return result},updateParentMenuItemDBId:function(){return this.each(function(){var item=$(this),input=item.find(".menu-item-data-parent-id"),depth=item.menuItemDepth(),parent=item.prev();if(depth==0){input.val(0)}else{while(!parent[0]||!parent[0].className||-1==parent[0].className.indexOf("menu-item")||(parent.menuItemDepth()!=depth-1)){parent=parent.prev()}input.val(parent.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var that=$(this);$(".hide-column-tog").not(":checked").each(function(){that.find(".field-"+$(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(processMethod){if(0==$("#menu-to-edit").length){return false}return this.each(function(){var t=$(this),menuItems={},checkboxes=t.find(".tabs-panel-active .categorychecklist li input:checked"),re=new RegExp("menu-item\\[([^\\]]*)");processMethod=processMethod||api.addMenuItemToBottom;if(!checkboxes.length){return false}t.find("img.waiting").show();$(checkboxes).each(function(){var t=$(this),listItemDBIDMatch=re.exec(t.attr("name")),listItemDBID="undefined"==typeof listItemDBIDMatch[1]?0:parseInt(listItemDBIDMatch[1],10);if(this.className&&-1!=this.className.indexOf("add-to-top")){processMethod=api.addMenuItemToTop}menuItems[listItemDBID]=t.closest("li").getItemData("add-menu-item",listItemDBID)});api.addItemToMenu(menuItems,processMethod,function(){checkboxes.removeAttr("checked");t.find("img.waiting").hide()})})},getItemData:function(itemType,id){itemType=itemType||"menu-item";var itemData={},i,fields=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!id&&itemType=="menu-item"){id=this.find(".menu-item-data-db-id").val()}if(!id){return itemData}this.find("input").each(function(){var field;i=fields.length;while(i--){if(itemType=="menu-item"){field=fields[i]+"["+id+"]"}else{if(itemType=="add-menu-item"){field="menu-item["+id+"]["+fields[i]+"]"}}if(this.name&&field==this.name){itemData[fields[i]]=this.value}}});return itemData},setItemData:function(itemData,itemType,id){itemType=itemType||"menu-item";if(!id&&itemType=="menu-item"){id=$(".menu-item-data-db-id",this).val()}if(!id){return this}this.find("input").each(function(){var t=$(this),field;$.each(itemData,function(attr,val){if(itemType=="menu-item"){field=attr+"["+id+"]"}else{if(itemType=="add-menu-item"){field="menu-item["+id+"]["+attr+"]"}}if(field==t.attr("name")){t.val(val)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(field){$(".field-"+field).removeClass("hidden-field")};columns.unchecked=function(field){$(".field-"+field).addClass("hidden-field")};api.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var currentDepth=0,originalDepth,minDepth,maxDepth,prev,next,prevBottom,nextThreshold,helperHeight,transport,menuLeft=api.menuList.offset().left;api.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(e,ui){var height,width,parent,children,maxChildDepth,tempHolder;if(api.isRTL){ui.item[0].style.right="auto"}transport=ui.item.children(".menu-item-transport");originalDepth=ui.item.menuItemDepth();updateCurrentDepth(ui,originalDepth);parent=(ui.item.next()[0]==ui.placeholder[0])?ui.item.next():ui.item;children=parent.childMenuItems();transport.append(children);height=transport.outerHeight();height+=(height>0)?(ui.placeholder.css("margin-top").slice(0,-2)*1):0;height+=ui.helper.outerHeight();helperHeight=height;height-=2;ui.placeholder.height(height);maxChildDepth=originalDepth;children.each(function(){var depth=$(this).menuItemDepth();maxChildDepth=(depth>maxChildDepth)?depth:maxChildDepth});width=ui.helper.find(".menu-item-handle").outerWidth();width+=api.depthToPx(maxChildDepth-originalDepth);width-=2;ui.placeholder.width(width);tempHolder=ui.placeholder.next();tempHolder.css("margin-top",helperHeight+"px");ui.placeholder.detach();$(this).sortable("refresh");ui.item.after(ui.placeholder);tempHolder.css("margin-top",0);updateSharedVars(ui)},stop:function(e,ui){var children,depthChange=currentDepth-originalDepth;children=transport.children().insertAfter(ui.item);if(depthChange!=0){ui.item.updateDepthClass(currentDepth);children.shiftDepthClass(depthChange);api.registerChange()}ui.item.updateParentMenuItemDBId();ui.item[0].style.top=0;if(api.isRTL){ui.item[0].style.left="auto";ui.item[0].style.right=0}},change:function(e,ui){if(!ui.placeholder.parent().hasClass("menu")){(prev.length)?prev.after(ui.placeholder):api.menuList.prepend(ui.placeholder)}updateSharedVars(ui)},sort:function(e,ui){var offset=ui.helper.offset(),depth=(api.isRTL?-1:1)*api.pxToDepth(offset.left-menuLeft);if(depth>maxDepth||offset.top<prevBottom){depth=maxDepth}else{if(depth<minDepth){depth=minDepth}}if(depth!=currentDepth){updateCurrentDepth(ui,depth)}if(nextThreshold&&offset.top+helperHeight>nextThreshold){next.after(ui.placeholder);updateSharedVars(ui);$(this).sortable("refreshPositions")}},update:function(e,ui){api.registerChange()}});function updateSharedVars(ui){var depth;prev=ui.placeholder.prev();next=ui.placeholder.next();if(prev[0]==ui.item[0]){prev=prev.prev()}if(next[0]==ui.item[0]){next=next.next()}prevBottom=(prev.length)?prev.offset().top+prev.height():0;nextThreshold=(next.length)?next.offset().top+next.height()/3:0;minDepth=(next.length)?next.menuItemDepth():0;if(prev.length){maxDepth=((depth=prev.menuItemDepth()+1)>api.options.globalMaxDepth)?api.options.globalMaxDepth:depth}else{maxDepth=0}}function updateCurrentDepth(ui,depth){ui.placeholder.updateDepthClass(depth,currentDepth);currentDepth=depth}},attachMenuEditListeners:function(){var that=this;$("#update-nav-menu").bind("click",function(e){if(e.target&&e.target.className){if(-1!=e.target.className.indexOf("item-edit")){return that.eventOnClickEditLink(e.target)}else{if(-1!=e.target.className.indexOf("menu-save")){return that.eventOnClickMenuSave(e.target)}else{if(-1!=e.target.className.indexOf("menu-delete")){return that.eventOnClickMenuDelete(e.target)}else{if(-1!=e.target.className.indexOf("item-delete")){return that.eventOnClickMenuItemDelete(e.target)}else{if(-1!=e.target.className.indexOf("item-cancel")){return that.eventOnClickCancelLink(e.target)}}}}}}})},setupInputWithDefaultTitle:function(){var name="input-with-default-title";$("."+name).each(function(){var $t=$(this),title=$t.attr("title"),val=$t.val();$t.data(name,title);if(""==val){$t.val(title)}else{if(title==val){return}else{$t.removeClass(name)}}}).focus(function(){var $t=$(this);if($t.val()==$t.data(name)){$t.val("").removeClass(name)}}).blur(function(){var $t=$(this);if(""==$t.val()){$t.addClass(name).val($t.data(name))}})},attachThemeLocationsListeners:function(){var loc=$("#nav-menu-theme-locations"),params={};params.action="menu-locations-save";params["menu-settings-column-nonce"]=$("#menu-settings-column-nonce").val();loc.find("input[type=submit]").click(function(){loc.find("select").each(function(){params[this.name]=$(this).val()});loc.find(".waiting").show();$.post(ajaxurl,params,function(r){loc.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var searchTimer;$(".quick-search").keypress(function(e){var t=$(this);if(13==e.which){api.updateQuickSearchResults(t);return false}if(searchTimer){clearTimeout(searchTimer)}searchTimer=setTimeout(function(){api.updateQuickSearchResults(t)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(input){var panel,params,minSearchLength=2,q=input.val();if(q.length<minSearchLength){return}panel=input.parents(".tabs-panel");params={action:"menu-quick-search","response-format":"markup",menu:$("#menu").val(),"menu-settings-column-nonce":$("#menu-settings-column-nonce").val(),q:q,type:input.attr("name")};$("img.waiting",panel).show();$.post(ajaxurl,params,function(menuMarkup){api.processQuickSearchQueryResponse(menuMarkup,params,panel)})},addCustomLink:function(processMethod){var url=$("#custom-menu-item-url").val(),label=$("#custom-menu-item-name").val();processMethod=processMethod||api.addMenuItemToBottom;if(""==url||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,isRTL:!!("undefined"!=typeof isRtl&&isRtl),negateIfRTL:("undefined"!=typeof isRtl&&isRtl)?-1:1,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){var c=a.isRTL?this.eq(0).css("margin-right"):this.eq(0).css("margin-left");return a.pxToDepth(c&&-1!=c.indexOf("px")?c.slice(0,-2):0)},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(!d[0]||!d[0].className||-1==d[0].className.indexOf("menu-item")||(d.menuItemDepth()!=f-1)){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){if(0==b("#menu-to-edit").length){return false}return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var i=b(this),h=f.exec(i.attr("name")),j="undefined"==typeof h[1]?0:parseInt(h[1],10);if(this.className&&-1!=this.className.indexOf("add-to-top")){c=a.addMenuItemToTop}d[j]=i.closest("li").getItemData("add-menu-item",j)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})},getItemData:function(f,g){f=f||"menu-item";var d={},e,c=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!g&&f=="menu-item"){g=this.find(".menu-item-data-db-id").val()}if(!g){return d}this.find("input").each(function(){var h;e=c.length;while(e--){if(f=="menu-item"){h=c[e]+"["+g+"]"}else{if(f=="add-menu-item"){h="menu-item["+g+"]["+c[e]+"]"}}if(this.name&&h==this.name){d[c[e]]=this.value}}});return d},setItemData:function(c,d,e){d=d||"menu-item";if(!e&&d=="menu-item"){e=b(".menu-item-data-db-id",this).val()}if(!e){return this}this.find("input").each(function(){var f=b(this),g;b.each(c,function(h,i){if(d=="menu-item"){g=h+"["+e+"]"}else{if(d=="add-menu-item"){g="menu-item["+e+"]["+h+"]"}}if(g==f.attr("name")){f.val(i)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;if(a.isRTL){v.item[0].style.right="auto"}g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0;if(a.isRTL){r.item[0].style.left="auto";r.item[0].style.right=0}},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.negateIfRTL*a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-cancel")){return c.eventOnClickCancelLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function($){var api=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,isRTL:!!("undefined"!=typeof isRtl&&isRtl),init:function(){api.menuList=$("#menu-to-edit");api.targetList=api.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachUnsavedChangesListener();if(api.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){$.fn.extend({menuItemDepth:function(){var margin=api.isRTL?this.eq(0).css("margin-right"):this.eq(0).css("margin-left");return api.pxToDepth(margin&&-1!=margin.indexOf("px")?margin.slice(0,-2):0)},updateDepthClass:function(current,prev){return this.each(function(){var t=$(this);prev=prev||t.menuItemDepth();$(this).removeClass("menu-item-depth-"+prev).addClass("menu-item-depth-"+current)})},shiftDepthClass:function(change){return this.each(function(){var t=$(this),depth=t.menuItemDepth();$(this).removeClass("menu-item-depth-"+depth).addClass("menu-item-depth-"+(depth+change))})},childMenuItems:function(){var result=$();this.each(function(){var t=$(this),depth=t.menuItemDepth(),next=t.next();while(next.length&&next.menuItemDepth()>depth){result=result.add(next);next=next.next()}});return result},updateParentMenuItemDBId:function(){return this.each(function(){var item=$(this),input=item.find(".menu-item-data-parent-id"),depth=item.menuItemDepth(),parent=item.prev();if(depth==0){input.val(0)}else{while(!parent[0]||!parent[0].className||-1==parent[0].className.indexOf("menu-item")||(parent.menuItemDepth()!=depth-1)){parent=parent.prev()}input.val(parent.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var that=$(this);$(".hide-column-tog").not(":checked").each(function(){that.find(".field-"+$(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(processMethod){if(0==$("#menu-to-edit").length){return false}return this.each(function(){var t=$(this),menuItems={},checkboxes=t.find(".tabs-panel-active .categorychecklist li input:checked"),re=new RegExp("menu-item\\[([^\\]]*)");processMethod=processMethod||api.addMenuItemToBottom;if(!checkboxes.length){return false}t.find("img.waiting").show();$(checkboxes).each(function(){var t=$(this),listItemDBIDMatch=re.exec(t.attr("name")),listItemDBID="undefined"==typeof listItemDBIDMatch[1]?0:parseInt(listItemDBIDMatch[1],10);if(this.className&&-1!=this.className.indexOf("add-to-top")){processMethod=api.addMenuItemToTop}menuItems[listItemDBID]=t.closest("li").getItemData("add-menu-item",listItemDBID)});api.addItemToMenu(menuItems,processMethod,function(){checkboxes.removeAttr("checked");t.find("img.waiting").hide()})})},getItemData:function(itemType,id){itemType=itemType||"menu-item";var itemData={},i,fields=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"];if(!id&&itemType=="menu-item"){id=this.find(".menu-item-data-db-id").val()}if(!id){return itemData}this.find("input").each(function(){var field;i=fields.length;while(i--){if(itemType=="menu-item"){field=fields[i]+"["+id+"]"}else{if(itemType=="add-menu-item"){field="menu-item["+id+"]["+fields[i]+"]"}}if(this.name&&field==this.name){itemData[fields[i]]=this.value}}});return itemData},setItemData:function(itemData,itemType,id){itemType=itemType||"menu-item";if(!id&&itemType=="menu-item"){id=$(".menu-item-data-db-id",this).val()}if(!id){return this}this.find("input").each(function(){var t=$(this),field;$.each(itemData,function(attr,val){if(itemType=="menu-item"){field=attr+"["+id+"]"}else{if(itemType=="add-menu-item"){field="menu-item["+id+"]["+attr+"]"}}if(field==t.attr("name")){t.val(val)}})});return this}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(field){$(".field-"+field).removeClass("hidden-field")};columns.unchecked=function(field){$(".field-"+field).addClass("hidden-field")};api.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var currentDepth=0,originalDepth,minDepth,maxDepth,prev,next,prevBottom,nextThreshold,helperHeight,transport,menuLeft=api.menuList.offset().left;api.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(e,ui){var height,width,parent,children,maxChildDepth,tempHolder;if(api.isRTL){ui.item[0].style.right="auto"}transport=ui.item.children(".menu-item-transport");originalDepth=ui.item.menuItemDepth();updateCurrentDepth(ui,originalDepth);parent=(ui.item.next()[0]==ui.placeholder[0])?ui.item.next():ui.item;children=parent.childMenuItems();transport.append(children);height=transport.outerHeight();height+=(height>0)?(ui.placeholder.css("margin-top").slice(0,-2)*1):0;height+=ui.helper.outerHeight();helperHeight=height;height-=2;ui.placeholder.height(height);maxChildDepth=originalDepth;children.each(function(){var depth=$(this).menuItemDepth();maxChildDepth=(depth>maxChildDepth)?depth:maxChildDepth});width=ui.helper.find(".menu-item-handle").outerWidth();width+=api.depthToPx(maxChildDepth-originalDepth);width-=2;ui.placeholder.width(width);tempHolder=ui.placeholder.next();tempHolder.css("margin-top",helperHeight+"px");ui.placeholder.detach();$(this).sortable("refresh");ui.item.after(ui.placeholder);tempHolder.css("margin-top",0);updateSharedVars(ui)},stop:function(e,ui){var children,depthChange=currentDepth-originalDepth;children=transport.children().insertAfter(ui.item);if(depthChange!=0){ui.item.updateDepthClass(currentDepth);children.shiftDepthClass(depthChange);api.registerChange()}ui.item.updateParentMenuItemDBId();ui.item[0].style.top=0;if(api.isRTL){ui.item[0].style.left="auto";ui.item[0].style.right=0}},change:function(e,ui){if(!ui.placeholder.parent().hasClass("menu")){(prev.length)?prev.after(ui.placeholder):api.menuList.prepend(ui.placeholder)}updateSharedVars(ui)},sort:function(e,ui){var offset=ui.helper.offset(),depth=(api.isRTL?-1:1)*api.pxToDepth(offset.left-menuLeft);if(depth>maxDepth||offset.top<prevBottom){depth=maxDepth}else{if(depth<minDepth){depth=minDepth}}if(depth!=currentDepth){updateCurrentDepth(ui,depth)}if(nextThreshold&&offset.top+helperHeight>nextThreshold){next.after(ui.placeholder);updateSharedVars(ui);$(this).sortable("refreshPositions")}},update:function(e,ui){api.registerChange()}});function updateSharedVars(ui){var depth;prev=ui.placeholder.prev();next=ui.placeholder.next();if(prev[0]==ui.item[0]){prev=prev.prev()}if(next[0]==ui.item[0]){next=next.next()}prevBottom=(prev.length)?prev.offset().top+prev.height():0;nextThreshold=(next.length)?next.offset().top+next.height()/3:0;minDepth=(next.length)?next.menuItemDepth():0;if(prev.length){maxDepth=((depth=prev.menuItemDepth()+1)>api.options.globalMaxDepth)?api.options.globalMaxDepth:depth}else{maxDepth=0}}function updateCurrentDepth(ui,depth){ui.placeholder.updateDepthClass(depth,currentDepth);currentDepth=depth}},attachMenuEditListeners:function(){var that=this;$("#update-nav-menu").bind("click",function(e){if(e.target&&e.target.className){if(-1!=e.target.className.indexOf("item-edit")){return that.eventOnClickEditLink(e.target)}else{if(-1!=e.target.className.indexOf("menu-save")){return that.eventOnClickMenuSave(e.target)}else{if(-1!=e.target.className.indexOf("menu-delete")){return that.eventOnClickMenuDelete(e.target)}else{if(-1!=e.target.className.indexOf("item-delete")){return that.eventOnClickMenuItemDelete(e.target)}else{if(-1!=e.target.className.indexOf("item-cancel")){return that.eventOnClickCancelLink(e.target)}}}}}}})},setupInputWithDefaultTitle:function(){var name="input-with-default-title";$("."+name).each(function(){var $t=$(this),title=$t.attr("title"),val=$t.val();$t.data(name,title);if(""==val){$t.val(title)}else{if(title==val){return}else{$t.removeClass(name)}}}).focus(function(){var $t=$(this);if($t.val()==$t.data(name)){$t.val("").removeClass(name)}}).blur(function(){var $t=$(this);if(""==$t.val()){$t.addClass(name).val($t.data(name))}})},attachThemeLocationsListeners:function(){var loc=$("#nav-menu-theme-locations"),params={};params.action="menu-locations-save";params["menu-settings-column-nonce"]=$("#menu-settings-column-nonce").val();loc.find("input[type=submit]").click(function(){loc.find("select").each(function(){params[this.name]=$(this).val()});loc.find(".waiting").show();$.post(ajaxurl,params,function(r){loc.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var searchTimer;$(".quick-search").keypress(function(e){var t=$(this);if(13==e.which){api.updateQuickSearchResults(t);return false}if(searchTimer){clearTimeout(searchTimer)}searchTimer=setTimeout(function(){api.updateQuickSearchResults(t)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(input){var panel,params,minSearchLength=2,q=input.val();if(q.length<minSearchLength){return}panel=input.parents(".tabs-panel");params={action:"menu-quick-search","response-format":"markup",menu:$("#menu").val(),"menu-settings-column-nonce":$("#menu-settings-column-nonce").val(),q:q,type:input.attr("name")};$("img.waiting",panel).show();$.post(ajaxurl,params,function(menuMarkup){api.processQuickSearchQueryResponse(menuMarkup,params,panel)})},addCustomLink:function(processMethod){var url=$("#custom-menu-item-url").val(),label=$("#custom-menu-item-name").val();processMethod=processMethod||api.addMenuItemToBottom;if(""==url||"http://"==url){return false}$(".customlinkdiv img.waiting").show();this.addLinkToMenu(url,label,processMethod,function(){$(".customlinkdiv img.waiting").hide();$("#custom-menu-item-name").val("").blur();$("#custom-menu-item-url").val("http://")})},addLinkToMenu:function(url,label,processMethod,callback){processMethod=processMethod||api.addMenuItemToBottom;callback=callback||function(){};api.addItemToMenu({"-1":{"menu-item-type":"custom","menu-item-url":url,"menu-item-title":label}},processMethod,callback)},addItemToMenu:function(menuItem,processMethod,callback){var menu=$("#menu").val(),nonce=$("#menu-settings-column-nonce").val();processMethod=processMethod||function(){};callback=callback||function(){};params={action:"add-menu-item",menu:menu,"menu-settings-column-nonce":nonce,"menu-item":menuItem};$.post(ajaxurl,params,function(menuMarkup){var ins=$("#menu-instructions");processMethod(menuMarkup,params);if(!ins.hasClass("menu-instructions-inactive")&&ins.siblings().length){ins.addClass("menu-instructions-inactive")}callback()})},addMenuItemToBottom:function(menuMarkup,req){$(menuMarkup).hideAdvancedMenuItemFields().appendTo(api.targetList)},addMenuItemToTop:function(menuMarkup,req){$(menuMarkup).hideAdvancedMenuItemFields().prependTo(api.targetList)},attachUnsavedChangesListener:function(){$("#menu-management input, #menu-management select, #menu-management, #menu-management textarea").change(function(){api.registerChange()});if(0!=$("#menu-to-edit").length){window.onbeforeunload=function(){if(api.menusChanged){return navMenuL10n.saveAlert}}}else{$("#menu-settings-column").find("input,select").attr("disabled","disabled").end().find("a").attr("href","#").unbind("click")}},registerChange:function(){api.menusChanged=true},attachTabsPanelListeners:function(){$("#menu-settings-column").bind("click",function(e){var selectAreaMatch,panelId,wrapper,items,target=$(e.target);if(target.hasClass("nav-tab-link")){panelId=/#(.*)$/.exec(e.target.href);if(panelId&&panelId[1]){panelId=panelId[1]}else{return false}wrapper=target.parents(".inside").first();$("input",wrapper).removeAttr("checked");$(".tabs-panel-active",wrapper).removeClass("tabs-panel-active").addClass("tabs-panel-inactive");$("#"+panelId,wrapper).removeClass("tabs-panel-inactive").addClass("tabs-panel-active");$(".tabs",wrapper).removeClass("tabs");target.parent().addClass("tabs");$(".quick-search",wrapper).focus();return false}else{if(target.hasClass("select-all")){selectAreaMatch=/#(.*)$/.exec(e.target.href);if(selectAreaMatch&&selectAreaMatch[1]){items=$("#"+selectAreaMatch[1]+" .tabs-panel-active .menu-item-title input");if(items.length===items.filter(":checked").length){items.removeAttr("checked")}else{items.attr("checked","checked")}return false}}else{if(target.hasClass("submit-add-to-menu")){api.registerChange();if(e.target.id&&"submit-customlinkdiv"==e.target.id){api.addCustomLink(api.addMenuItemToBottom)}else{if(e.target.id&&-1!=e.target.id.indexOf("submit-")){$("#"+e.target.id.replace(/submit-/,"")).addSelectedToMenu(api.addMenuItemToBottom)}}return false}else{if(target.hasClass("page-numbers")){$.post(ajaxurl,e.target.href.replace(/.*\?/,"").replace(/action=([^&]*)/,"")+"&action=menu-get-metabox",function(resp){if(-1==resp.indexOf("replace-id")){return}var metaBoxData=$.parseJSON(resp),toReplace=document.getElementById(metaBoxData["replace-id"]),placeholder=document.createElement("div"),wrap=document.createElement("div");if(!metaBoxData.markup||!toReplace){return}wrap.innerHTML=metaBoxData.markup?metaBoxData.markup:"";toReplace.parentNode.insertBefore(placeholder,toReplace);placeholder.parentNode.removeChild(toReplace);placeholder.parentNode.insertBefore(wrap,placeholder);placeholder.parentNode.removeChild(placeholder)});return false}}}}})},initTabManager:function(){var fixed=$(".nav-tabs-wrapper"),fluid=fixed.children(".nav-tabs"),active=fluid.children(".nav-tab-active"),tabs=fluid.children(".nav-tab"),tabsWidth=0,fixedRight,fixedLeft,arrowLeft,arrowRight,resizing=false;function resetMenuTabs(){fixedLeft=fixed.offset().left;fixedRight=fixedLeft+fixed.width();active.makeTabVisible()}$.fn.extend({makeTabVisible:function(){var t=this.eq(0),left,right;if(!t.length){return}left=t.offset().left;right=left+t.outerWidth();if(right>fixedRight){fluid.animate({"margin-left":"+="+(fixedRight-right)+"px"},"fast")}else{if(left<fixedLeft){fluid.animate({"margin-left":"-="+(left-fixedLeft)+"px"},"fast")}}return t},isTabVisible:function(){var t=this.eq(0),left=t.offset().left,right=left+t.outerWidth();return(right<=fixedRight&&left>=fixedLeft)?true:false}});tabs.each(function(){tabsWidth+=$(this).outerWidth(true)});if(tabsWidth<=fixed.width()-fluid.css("padding-left").slice(0,-2)-fluid.css("padding-right").slice(0,-2)){return}fluid.css({"margin-right":(-1*tabsWidth)+"px",padding:0});arrowLeft=$('<div class="nav-tabs-arrow nav-tabs-arrow-left"><a>«</a></div>');arrowRight=$('<div class="nav-tabs-arrow nav-tabs-arrow-right"><a>»</a></div>');fixed.wrap('<div class="nav-tabs-nav"/>').parent().prepend(arrowLeft).append(arrowRight);resetMenuTabs();$(window).resize(function(){if(resizing){return}resizing=true;setTimeout(function(){resetMenuTabs();resizing=false},1000)});$.each([{arrow:arrowLeft,next:"next",last:"first",operator:"+="},{arrow:arrowRight,next:"prev",last:"last",operator:"-="}],function(){var that=this;this.arrow.mousedown(function(){var last=tabs[that.last](),fn=function(){if(!last.isTabVisible()){fluid.animate({"margin-left":that.operator+"90px"},300,"linear",fn)}};fn()}).mouseup(function(){var tab,next;fluid.stop(true);tab=tabs[that.last]();while((next=tab[that.next]())&&next.length&&!next.isTabVisible()){tab=next}tab.makeTabVisible()})})},eventOnClickEditLink:function(clickedEl){var settings,item,matchedSection=/#(.*)$/.exec(clickedEl.href);if(matchedSection&&matchedSection[1]){settings=$("#"+matchedSection[1]);item=settings.parent();if(0!=item.length){if(item.hasClass("menu-item-edit-inactive")){if(!settings.data("menu-item-data")){settings.data("menu-item-data",settings.getItemData())}settings.slideDown("fast");item.removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{settings.slideUp("fast");item.removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCancelLink:function(clickedEl){var settings=$(clickedEl).closest(".menu-item-settings");settings.setItemData(settings.data("menu-item-data"));return false},eventOnClickMenuSave:function(clickedEl){var locs="";$("#nav-menu-theme-locations select").each(function(){locs+='<input type="hidden" name="'+this.name+'" value="'+$(this).val()+'" />'});$("#update-nav-menu").append(locs);api.menuList.find(".menu-item-data-position").val(function(index){return index+1});window.onbeforeunload=null;return true},eventOnClickMenuDelete:function(clickedEl){if(confirm(navMenuL10n.warnDeleteMenu)){window.onbeforeunload=null;return true}return false},eventOnClickMenuItemDelete:function(clickedEl){var itemID=parseInt(clickedEl.id.replace("delete-",""),10);api.removeMenuItem($("#menu-item-"+itemID));api.registerChange();return false},processQuickSearchQueryResponse:function(resp,req,panel){var i,matched,newID,takenIDs={},form=document.getElementById("nav-menu-meta"),pattern=new RegExp("menu-item\\[([^\\]]*)","g"),items=resp.match(/<li>.*<\/li>/g);if(!items){$(".categorychecklist",panel).html("<li><p>"+navMenuL10n.noResultsFound+"</p></li>");$("img.waiting",panel).hide();return}i=items.length;while(i--){matched=pattern.exec(items[i]);if(matched&&matched[1]){newID=matched[1];while(form.elements["menu-item["+newID+"][menu-item-type]"]||takenIDs[newID]){newID--}takenIDs[newID]=true;if(newID!=matched[1]){items[i]=items[i].replace(new RegExp("menu-item\\["+matched[1]+"\\]","g"),"menu-item["+newID+"]")}}}$(".categorychecklist",panel).html(items.join(""));$("img.waiting",panel).hide()},removeMenuItem:function(el){var children=el.childMenuItems();el.addClass("deleting").animate({opacity:0,height:0},350,function(){var ins=$("#menu-instructions");el.remove();children.shiftDepthClass(-1).updateParentMenuItemDBId();if(!ins.siblings().length){ins.removeClass("menu-instructions-inactive")}})},depthToPx:function(depth){return depth*api.options.menuItemDepthPerLevel},pxToDepth:function(px){return Math.floor(px/api.options.menuItemDepthPerLevel)}};$(document).ready(function(){wpNavMenu.init()})})(jQuery); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/e1e4731c2b170a1396a8d924e776e35fb91e9c83/nav-menu.js/buggy/wp-admin/js/nav-menu.js |
var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){var c=b.slideToggle(150,function(){b.parent().toggleClass("wp-menu-open")}).attr("id");if(c){a("li.wp-has-submenu","#adminmenu").each(function(f,g){if(c==g.id){var d=a(g).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+f,d)}})}return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var d=a(this),c=d.val();if(d.attr("checked")){b.checked(c)}else{b.unchecked(c)}columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show();this.colSpanChange(+1)},unchecked:function(b){a(".column-"+b).hide();this.colSpanChange(-1)},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var b=this.id;return b.substring(b,b.length-5)}).get().join(",")}},colSpanChange:function(b){var d=a("table").find(".colspanchange"),c;if(!d.length){return}c=parseInt(d.attr("colspan"),10)+b;d.attr("colspan",c.toString())}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(e){var g=false,b,f,d,c,a=(isRtl?"left":"right");e("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");e("div.updated, div.error").not(".below-h2, .inline").insertAfter(e("div.wrap h2:first"));e("#show-settings-link").click(function(){if(!e("#screen-options-wrap").hasClass("screen-options-open")){e("#contextual-help-link-wrap").css("visibility","hidden")}e("#screen-options-wrap").slideToggle("fast",function(){if(e(this).hasClass("screen-options-open")){e("#show-settings-link").css({backgroundPosition:"top "+a});e("#contextual-help-link-wrap").css("visibility","");e(this).removeClass("screen-options-open")}else{e("#show-settings-link").css({backgroundPosition:"bottom "+a});e(this).addClass("screen-options-open")}});return false});e("#contextual-help-link").click(function(){if(!e("#contextual-help-wrap").hasClass("contextual-help-open")){e("#screen-options-link-wrap").css("visibility","hidden")}e("#contextual-help-wrap").slideToggle("fast",function(){if(e(this).hasClass("contextual-help-open")){e("#contextual-help-link").css({backgroundPosition:"top "+a});e("#screen-options-link-wrap").css("visibility","");e(this).removeClass("contextual-help-open")}else{e("#contextual-help-link").css({backgroundPosition:"bottom "+a});e(this).addClass("contextual-help-open")}});return false});e("tbody").children().children(".check-column").find(":checkbox").click(function(h){if("undefined"==h.shiftKey){return true}if(h.shiftKey){if(!g){return true}b=e(g).closest("form").find(":checkbox");f=b.index(g);d=b.index(this);c=e(this).attr("checked");if(0<f&&0<d&&f!=d){b.slice(f,d).attr("checked",function(){if(e(this).closest("tr").is(":visible")){return c?"checked":""}return""})}}g=this;return true});e("thead, tfoot").find(".check-column :checkbox").click(function(j){var k=e(this).attr("checked"),i="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,h=j.shiftKey||i;e(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(e(this).closest("tr").is(":hidden")){return""}if(h){return e(this).attr("checked")?"":"checked"}else{if(k){return"checked"}}return""});e(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(h){return""}else{if(k){return"checked"}}return""})});e("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");e("div.default-password-nag").hide();return false});e("#newcontent").keydown(function(m){if(m.keyCode!=9){return true}var j=m.target,o=j.selectionStart,i=j.selectionEnd,n=j.value,h,l;try{this.lastKey=9}catch(k){}if(document.selection){j.focus();l=document.selection.createRange();l.text="\t"}else{if(o>=0){h=this.scrollTop;j.value=n.substring(0,o).concat("\t",n.substring(i));j.selectionStart=j.selectionEnd=o+1;this.scrollTop=h}}if(m.stopPropagation){m.stopPropagation()}if(m.preventDefault){m.preventDefault()}});e("#newcontent").blur(function(h){if(this.lastKey&&9==this.lastKey){this.focus()}})}); | var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){b.slideToggle(150,function(){var c=b.parent().toggleClass("wp-menu-open").attr("id");if(c){a("li.wp-has-submenu","#adminmenu").each(function(f,g){if(c==g.id){var d=a(g).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+f,d)}})}});return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var d=a(this),c=d.val();if(d.attr("checked")){b.checked(c)}else{b.unchecked(c)}columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show();this.colSpanChange(+1)},unchecked:function(b){a(".column-"+b).hide();this.colSpanChange(-1)},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var b=this.id;return b.substring(b,b.length-5)}).get().join(",")}},colSpanChange:function(b){var d=a("table").find(".colspanchange"),c;if(!d.length){return}c=parseInt(d.attr("colspan"),10)+b;d.attr("colspan",c.toString())}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(e){var g=false,b,f,d,c,a=(isRtl?"left":"right");e("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");e("div.updated, div.error").not(".below-h2, .inline").insertAfter(e("div.wrap h2:first"));e("#show-settings-link").click(function(){if(!e("#screen-options-wrap").hasClass("screen-options-open")){e("#contextual-help-link-wrap").css("visibility","hidden")}e("#screen-options-wrap").slideToggle("fast",function(){if(e(this).hasClass("screen-options-open")){e("#show-settings-link").css({backgroundPosition:"top "+a});e("#contextual-help-link-wrap").css("visibility","");e(this).removeClass("screen-options-open")}else{e("#show-settings-link").css({backgroundPosition:"bottom "+a});e(this).addClass("screen-options-open")}});return false});e("#contextual-help-link").click(function(){if(!e("#contextual-help-wrap").hasClass("contextual-help-open")){e("#screen-options-link-wrap").css("visibility","hidden")}e("#contextual-help-wrap").slideToggle("fast",function(){if(e(this).hasClass("contextual-help-open")){e("#contextual-help-link").css({backgroundPosition:"top "+a});e("#screen-options-link-wrap").css("visibility","");e(this).removeClass("contextual-help-open")}else{e("#contextual-help-link").css({backgroundPosition:"bottom "+a});e(this).addClass("contextual-help-open")}});return false});e("tbody").children().children(".check-column").find(":checkbox").click(function(h){if("undefined"==h.shiftKey){return true}if(h.shiftKey){if(!g){return true}b=e(g).closest("form").find(":checkbox");f=b.index(g);d=b.index(this);c=e(this).attr("checked");if(0<f&&0<d&&f!=d){b.slice(f,d).attr("checked",function(){if(e(this).closest("tr").is(":visible")){return c?"checked":""}return""})}}g=this;return true});e("thead, tfoot").find(".check-column :checkbox").click(function(j){var k=e(this).attr("checked"),i="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,h=j.shiftKey||i;e(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(e(this).closest("tr").is(":hidden")){return""}if(h){return e(this).attr("checked")?"":"checked"}else{if(k){return"checked"}}return""});e(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(h){return""}else{if(k){return"checked"}}return""})});e("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");e("div.default-password-nag").hide();return false});e("#newcontent").keydown(function(m){if(m.keyCode!=9){return true}var j=m.target,o=j.selectionStart,i=j.selectionEnd,n=j.value,h,l;try{this.lastKey=9}catch(k){}if(document.selection){j.focus();l=document.selection.createRange();l.text="\t"}else{if(o>=0){h=this.scrollTop;j.value=n.substring(0,o).concat("\t",n.substring(i));j.selectionStart=j.selectionEnd=o+1;this.scrollTop=h}}if(m.stopPropagation){m.stopPropagation()}if(m.preventDefault){m.preventDefault()}});e("#newcontent").blur(function(h){if(this.lastKey&&9==this.lastKey){this.focus()}})}); | var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){var c=b.slideToggle(150,function(){b.parent().toggleClass("wp-menu-open")}).attr("id");if(c){a("li.wp-has-submenu","#adminmenu").each(function(f,g){if(c==g.id){var d=a(g).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+f,d)}})}return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var d=a(this),c=d.val();if(d.attr("checked")){b.checked(c)}else{b.unchecked(c)}columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show();this.colSpanChange(+1)},unchecked:function(b){a(".column-"+b).hide();this.colSpanChange(-1)},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var b=this.id;return b.substring(b,b.length-5)}).get().join(",")}},colSpanChange:function(b){var d=a("table").find(".colspanchange"),c;if(!d.length){return}c=parseInt(d.attr("colspan"),10)+b;d.attr("colspan",c.toString())}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(e){var g=false,b,f,d,c,a=(isRtl?"left":"right");e("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");e("div.updated, div.error").not(".below-h2, .inline").insertAfter(e("div.wrap h2:first"));e("#show-settings-link").click(function(){if(!e("#screen-options-wrap").hasClass("screen-options-open")){e("#contextual-help-link-wrap").css("visibility","hidden")}e("#screen-options-wrap").slideToggle("fast",function(){if(e(this).hasClass("screen-options-open")){e("#show-settings-link").css({backgroundPosition:"top "+a});e("#contextual-help-link-wrap").css("visibility","");e(this).removeClass("screen-options-open")}else{e("#show-settings-link").css({backgroundPosition:"bottom "+a});e(this).addClass("screen-options-open")}});return false});e("#contextual-help-link").click(function(){if(!e("#contextual-help-wrap").hasClass("contextual-help-open")){e("#screen-options-link-wrap").css("visibility","hidden")}e("#contextual-help-wrap").slideToggle("fast",function(){if(e(this).hasClass("contextual-help-open")){e("#contextual-help-link").css({backgroundPosition:"top "+a});e("#screen-options-link-wrap").css("visibility","");e(this).removeClass("contextual-help-open")}else{e("#contextual-help-link").css({backgroundPosition:"bottom "+a});e(this).addClass("contextual-help-open")}});return false});e("tbody").children().children(".check-column").find(":checkbox").click(function(h){if("undefined"==h.shiftKey){return true}if(h.shiftKey){if(!g){return true}b=e(g).closest("form").find(":checkbox");f=b.index(g);d=b.index(this);c=e(this).attr("checked");if(0<f&&0<d&&f!=d){b.slice(f,d).attr("checked",function(){if(e(this).closest("tr").is(":visible")){return c?"checked":""}return""})}}g=this;return true});e("thead, tfoot").find(".check-column :checkbox").click(function(j){var k=e(this).attr("checked"),i="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,h=j.shiftKey||i;e(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(e(this).closest("tr").is(":hidden")){return""}if(h){return e(this).attr("checked")?"":"checked"}else{if(k){return"checked"}}return""});e(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(h){return""}else{if(k){return"checked"}}return""})});e("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");e("div.default-password-nag").hide();return false});e("#newcontent").keydown(function(m){if(m.keyCode!=9){return true}var j=m.target,o=j.selectionStart,i=j.selectionEnd,n=j.value,h,l;try{this.lastKey=9}catch(k){}if(document.selection){j.focus();l=document.selection.createRange();l.text="\t"}else{if(o>=0){h=this.scrollTop;j.value=n.substring(0,o).concat("\t",n.substring(i));j.selectionStart=j.selectionEnd=o+1;this.scrollTop=h}}if(m.stopPropagation){m.stopPropagation()}if(m.preventDefault){m.preventDefault()}});e("#newcontent").blur(function(h){if(this.lastKey&&9==this.lastKey){this.focus()}})}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/6ed33c2d799f6733bcc0f601850b30ed9b5d0c91/common.js/buggy/wp-admin/js/common.js |
var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachAddMenuItemListeners();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){return a.pxToDepth(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var h=f.exec(b(this).attr("name")),i="undefined"==typeof h[1]?0:parseInt(h[1],10);d[i]=a.getListDataFromID(i)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-close")){return c.eventOnClickCloseLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachAddMenuItemListeners:function(){var c=b("#nav-menu-meta");c.find(".add-to-menu input").click(function(){a.registerChange();b(this).trigger("wp-add-menu-item",[a.addMenuItemToBottom]);return false});c.find(".customlinkdiv").bind("wp-add-menu-item",function(f,d){a.addCustomLink(d)});c.find(".posttypediv, .taxonomydiv").bind("wp-add-menu-item",function(f,d){b(this).addSelectedToMenu(d)})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={action:"menu-locations-save","menu-locations":d.find("select").serialize(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val()};d.find("input[type=submit]").click(function(){d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachAddMenuItemListeners();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){return a.pxToDepth(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var h=f.exec(b(this).attr("name")),i="undefined"==typeof h[1]?0:parseInt(h[1],10);d[i]=a.getListDataFromID(i)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-close")){return c.eventOnClickCloseLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachAddMenuItemListeners:function(){var c=b("#nav-menu-meta");c.find(".add-to-menu input").click(function(){a.registerChange();b(this).trigger("wp-add-menu-item",[a.addMenuItemToBottom]);return false});c.find(".customlinkdiv").bind("wp-add-menu-item",function(f,d){a.addCustomLink(d)});c.find(".posttypediv, .taxonomydiv").bind("wp-add-menu-item",function(f,d){b(this).addSelectedToMenu(d)})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={};c.action="menu-locations-save";c["menu-settings-column-nonce"]=b("#menu-settings-column-nonce").val();d.find("input[type=submit]").click(function(){d.find("select").each(function(){c[this.name]=b(this).val()});d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,menusChanged:false,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachAddMenuItemListeners();this.attachQuickSearchListeners();this.attachThemeLocationsListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();this.attachUnsavedChangesListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){return a.pxToDepth(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var h=f.exec(b(this).attr("name")),i="undefined"==typeof h[1]?0:parseInt(h[1],10);d[i]=a.getListDataFromID(i)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p);a.registerChange()}r.item.updateParentMenuItemDBId();r.item[0].style.top=0},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}},update:function(q,p){a.registerChange()}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-close")){return c.eventOnClickCloseLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachAddMenuItemListeners:function(){var c=b("#nav-menu-meta");c.find(".add-to-menu input").click(function(){a.registerChange();b(this).trigger("wp-add-menu-item",[a.addMenuItemToBottom]);return false});c.find(".customlinkdiv").bind("wp-add-menu-item",function(f,d){a.addCustomLink(d)});c.find(".posttypediv, .taxonomydiv").bind("wp-add-menu-item",function(f,d){b(this).addSelectedToMenu(d)})},attachThemeLocationsListeners:function(){var d=b("#nav-menu-theme-locations"),c={action:"menu-locations-save","menu-locations":d.find("select").serialize(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val()};d.find("input[type=submit]").click(function(){d.find(".waiting").show();b.post(ajaxurl,c,function(e){d.find(".waiting").hide()});return false})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http://"==e){return false}b(".customlinkdiv img.waiting").show();this.addLinkToMenu(e,d,c,function(){b(".customlinkdiv img.waiting").hide();b("#custom-menu-item-name").val("").blur();b("#custom-menu-item-url").val("http://")})},addLinkToMenu:function(e,d,c,f){c=c||a.addMenuItemToBottom;f=f||function(){};a.addItemToMenu({"-1":{"menu-item-type":"custom","menu-item-url":e,"menu-item-title":d}},c,f)},addItemToMenu:function(e,c,g){var f=b("#menu").val(),d=b("#menu-settings-column-nonce").val();c=c||function(){};g=g||function(){};params={action:"add-menu-item",menu:f,"menu-settings-column-nonce":d,"menu-item":e};b.post(ajaxurl,params,function(h){c(h,params);g()})},addMenuItemToBottom:function(c,d){b(c).hideAdvancedMenuItemFields().appendTo(a.targetList)},addMenuItemToTop:function(c,d){b(c).hideAdvancedMenuItemFields().prependTo(a.targetList)},attachHomeLinkListener:function(){b(".add-home-link",".customlinkdiv").click(function(c){a.addLinkToMenu(navMenuL10n.homeurl,navMenuL10n.home,a.addMenuItemToTop);return false})},attachUnsavedChangesListener:function(){b("#menu-management input, #menu-management select, #menu-management, #menu-management textarea").change(function(){a.registerChange()});window.onbeforeunload=function(){if(a.menusChanged){return navMenuL10n.saveAlert}};b("input.menu-save, input.save-menu-item").click(function(){window.onbeforeunload=null})},registerChange:function(){a.menusChanged=true},attachTabsPanelListeners:function(){b("#menu-settings-column").bind("click",function(h){var f,i,d,j,c,g=b(h.target);if(g.hasClass("nav-tab-link")){d=/#(.*)$/.exec(h.target.href);if(d&&d[1]){d=d[1]}else{return false}j=g.parents(".inside").first();b("input",j).removeAttr("checked");b(".tabs-panel-active",j).removeClass("tabs-panel-active").addClass("tabs-panel-inactive");b("#"+d,j).removeClass("tabs-panel-inactive").addClass("tabs-panel-active");b(".tabs",j).removeClass("tabs");g.parent().addClass("tabs");b(".quick-search",j).focus();return false}else{if(g.hasClass("select-all")){f=/#(.*)$/.exec(h.target.href);if(f&&f[1]){c=b("#"+f[1]+" .tabs-panel-active .menu-item-title input");if(c.length===c.filter(":checked").length){c.removeAttr("checked")}else{c.attr("checked","checked")}return false}}}})},initTabManager:function(){var h=b(".nav-tabs-wrapper"),i=h.children(".nav-tabs"),g=i.children(".nav-tab-active"),l=i.children(".nav-tab"),e=0,m,f,k,d,j=false;function c(){f=h.offset().left;m=f+h.width();g.makeTabVisible()}b.fn.extend({makeTabVisible:function(){var o=this.eq(0),p,n;if(!o.length){return}p=o.offset().left;n=p+o.outerWidth();if(n>m){i.animate({"margin-left":"+="+(m-n)+"px"},"fast")}else{if(p<f){i.animate({"margin-left":"-="+(p-f)+"px"},"fast")}}return o},isTabVisible:function(){var o=this.eq(0),p=o.offset().left,n=p+o.outerWidth();return(n<=m&&p>=f)?true:false}});l.each(function(){e+=b(this).outerWidth(true)});if(e<=h.width()-i.css("padding-left").slice(0,-2)-i.css("padding-right").slice(0,-2)){return}i.css({"margin-right":(-1*e)+"px",padding:0});k=b('<div class="nav-tabs-arrow nav-tabs-arrow-left"><a>«</a></div>');d=b('<div class="nav-tabs-arrow nav-tabs-arrow-right"><a>»</a></div>');h.wrap('<div class="nav-tabs-nav"/>').parent().prepend(k).append(d);c();b(window).resize(function(){if(j){return}j=true;setTimeout(function(){c();j=false},1000)});b.each([{arrow:k,next:"next",last:"first",operator:"+="},{arrow:d,next:"prev",last:"last",operator:"-="}],function(){var n=this;this.arrow.mousedown(function(){var p=l[n.last](),o=function(){if(!p.isTabVisible()){i.animate({"margin-left":n.operator+"90px"},300,"linear",o)}};o()}).mouseup(function(){var p,o;i.stop(true);p=l[n.last]();while((o=p[n.next]())&&o.length&&!o.isTabVisible()){p=o}p.makeTabVisible()})})},eventOnClickEditLink:function(c){var e,d=/#(.*)$/.exec(c.href);if(d&&d[1]){e=b("#"+d[1]);if(0!=e.length){if(e.hasClass("menu-item-edit-inactive")){e.slideDown("fast").siblings("dl").andSelf().removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{e.slideUp("fast").siblings("dl").andSelf().removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCloseLink:function(c){b(c).closest(".menu-item-settings").siblings("dl").find(".item-edit").click();return false},eventOnClickMenuSave:function(c){a.menuList.find(".menu-item-data-position").val(function(d){return d+1});return true},eventOnClickMenuDelete:function(c){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(c){var f,e,d=this;e=/_wpnonce=([a-zA-Z0-9]*)$/.exec(c.href);if(e&&e[1]){f=parseInt(c.id.replace("delete-",""),10);b.post(ajaxurl,{action:"delete-menu-item","menu-item":f,_wpnonce:e[1]},function(g){if("1"==g){d.removeMenuItem(document.getElementById("menu-item-"+f))}});return false}return true},processQuickSearchQueryResponse:function(g,m,c){var h,e,j,f={},d=document.getElementById("nav-menu-meta"),l=new RegExp("menu-item\\[([^\\]]*)","g"),k=g.match(/<li>.*<\/li>/g);if(!k){b(".categorychecklist",c).html("<li><p>"+navMenuL10n.noResultsFound+"</p></li>");b("img.waiting",c).hide();return}h=k.length;while(h--){e=l.exec(k[h]);if(e&&e[1]){j=e[1];while(d.elements["menu-item["+j+"][menu-item-type]"]||f[j]){j--}f[j]=true;if(j!=e[1]){k[h]=k[h].replace(new RegExp("menu-item\\["+e[1]+"\\]","g"),"menu-item["+j+"]")}}}b(".categorychecklist",c).html(k.join(""));b("img.waiting",c).hide()},removeMenuItem:function(d){d=b(d);var c=d.childMenuItems(),e=this;d.addClass("deleting").fadeOut(350,function(){d.remove();c.shiftDepthClass(-1).updateParentMenuItemDBId()})},getListDataFromID:function(k,h){if(!k){return false}h=h||document;var d=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],c={},e=h.getElementsByTagName("input"),g=e.length,f;while(g--){f=d.length;while(f--){if(e[g]&&e[g].name&&"menu-item["+k+"]["+d[f]+"]"==e[g].name){c[d[f]]=e[g].value}}}return c},depthToPx:function(c){return c*a.options.menuItemDepthPerLevel},pxToDepth:function(c){return Math.floor(c/a.options.menuItemDepthPerLevel)}};b(document).ready(function(){wpNavMenu.init()})})(jQuery); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/535010decade0fbd8b5fffeb78abcf10507dcf49/nav-menu.js/clean/wp-admin/js/nav-menu.js |
var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){var c=b.slideToggle(150,function(){b.css("display","")}).parent().toggleClass("wp-menu-open").attr("id");if(c){a("li.wp-has-submenu","#adminmenu").each(function(f,g){if(c==g.id){var d=a(g).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+f,d)}})}return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var d=a(this),c=d.val();if(d.attr("checked")){b.checked(c)}else{b.unchecked(c)}columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show()},unchecked:function(b){a(".column-"+b).hide()},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var b=this.id;return b.substring(b,b.length-5)}).get().join(",")}}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(d){var f=false,a,e,c,b;d("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");d("div.updated, div.error").not(".below-h2, .inline").insertAfter(d("div.wrap h2:first"));d("#show-settings-link").click(function(){if(!d("#screen-options-wrap").hasClass("screen-options-open")){d("#contextual-help-link-wrap").css("visibility","hidden")}d("#screen-options-wrap").slideToggle("fast",function(){if(d(this).hasClass("screen-options-open")){d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right.gif")'});d("#contextual-help-link-wrap").css("visibility","");d(this).removeClass("screen-options-open")}else{d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right-up.gif")'});d(this).addClass("screen-options-open")}});return false});d("#contextual-help-link").click(function(){if(!d("#contextual-help-wrap").hasClass("contextual-help-open")){d("#screen-options-link-wrap").css("visibility","hidden")}d("#contextual-help-wrap").slideToggle("fast",function(){if(d(this).hasClass("contextual-help-open")){d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right.gif")'});d("#screen-options-link-wrap").css("visibility","");d(this).removeClass("contextual-help-open")}else{d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right-up.gif")'});d(this).addClass("contextual-help-open")}});return false});d("tbody").children().children(".check-column").find(":checkbox").click(function(g){if("undefined"==g.shiftKey){return true}if(g.shiftKey){if(!f){return true}a=d(f).closest("form").find(":checkbox");e=a.index(f);c=a.index(this);b=d(this).attr("checked");if(0<e&&0<c&&e!=c){a.slice(e,c).attr("checked",function(){if(d(this).closest("tr").is(":visible")){return b?"checked":""}return""})}}f=this;return true});d("thead, tfoot").find(":checkbox").click(function(i){var j=d(this).attr("checked"),h="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,g=i.shiftKey||h;d(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(d(this).closest("tr").is(":hidden")){return""}if(g){return d(this).attr("checked")?"":"checked"}else{if(j){return"checked"}}return""});d(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(g){return""}else{if(j){return"checked"}}return""})});d("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");d("div.default-password-nag").hide();return false});d("#newcontent").keydown(function(l){if(l.keyCode!=9){return true}var i=l.target,n=i.selectionStart,h=i.selectionEnd,m=i.value,g,k;try{this.lastKey=9}catch(j){}if(document.selection){i.focus();k=document.selection.createRange();k.text="\t"}else{if(n>=0){g=this.scrollTop;i.value=m.substring(0,n).concat("\t",m.substring(h));i.selectionStart=i.selectionEnd=n+1;this.scrollTop=g}}if(l.stopPropagation){l.stopPropagation()}if(l.preventDefault){l.preventDefault()}});d("#newcontent").blur(function(g){if(this.lastKey&&9==this.lastKey){this.focus()}})}); | var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){var c=b.slideToggle(150,function(){b.css("display","")}).parent().toggleClass("wp-menu-open").attr("id");if(c){a("li.wp-has-submenu","#adminmenu").each(function(f,g){if(c==g.id){var d=a(g).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+f,d)}})}return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var d=a(this),c=d.val();if(d.attr("checked")){b.checked(c)}else{b.unchecked(c)}columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show()},unchecked:function(b){a(".column-"+b).hide()},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var b=this.id;return b.substring(b,b.length-5)}).get().join(",")}}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(d){var f=false,a,e,c,b;d("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");d("div.updated, div.error").not(".below-h2, .inline").insertAfter(d("div.wrap h2:first"));d("#show-settings-link").click(function(){if(!d("#screen-options-wrap").hasClass("screen-options-open")){d("#contextual-help-link-wrap").css("visibility","hidden")}d("#screen-options-wrap").slideToggle("fast",function(){if(d(this).hasClass("screen-options-open")){d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right.gif?ver=20100531")'});d("#contextual-help-link-wrap").css("visibility","");d(this).removeClass("screen-options-open")}else{d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right-up.gif?ver=20100531")'});d(this).addClass("screen-options-open")}});return false});d("#contextual-help-link").click(function(){if(!d("#contextual-help-wrap").hasClass("contextual-help-open")){d("#screen-options-link-wrap").css("visibility","hidden")}d("#contextual-help-wrap").slideToggle("fast",function(){if(d(this).hasClass("contextual-help-open")){d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right.gif?ver=20100531")'});d("#screen-options-link-wrap").css("visibility","");d(this).removeClass("contextual-help-open")}else{d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right-up.gif?ver=20100531")'});d(this).addClass("contextual-help-open")}});return false});d("tbody").children().children(".check-column").find(":checkbox").click(function(g){if("undefined"==g.shiftKey){return true}if(g.shiftKey){if(!f){return true}a=d(f).closest("form").find(":checkbox");e=a.index(f);c=a.index(this);b=d(this).attr("checked");if(0<e&&0<c&&e!=c){a.slice(e,c).attr("checked",function(){if(d(this).closest("tr").is(":visible")){return b?"checked":""}return""})}}f=this;return true});d("thead, tfoot").find(":checkbox").click(function(i){var j=d(this).attr("checked"),h="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,g=i.shiftKey||h;d(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(d(this).closest("tr").is(":hidden")){return""}if(g){return d(this).attr("checked")?"":"checked"}else{if(j){return"checked"}}return""});d(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(g){return""}else{if(j){return"checked"}}return""})});d("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");d("div.default-password-nag").hide();return false});d("#newcontent").keydown(function(l){if(l.keyCode!=9){return true}var i=l.target,n=i.selectionStart,h=i.selectionEnd,m=i.value,g,k;try{this.lastKey=9}catch(j){}if(document.selection){i.focus();k=document.selection.createRange();k.text="\t"}else{if(n>=0){g=this.scrollTop;i.value=m.substring(0,n).concat("\t",m.substring(h));i.selectionStart=i.selectionEnd=n+1;this.scrollTop=g}}if(l.stopPropagation){l.stopPropagation()}if(l.preventDefault){l.preventDefault()}});d("#newcontent").blur(function(g){if(this.lastKey&&9==this.lastKey){this.focus()}})}); | var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){var c=b.slideToggle(150,function(){b.css("display","")}).parent().toggleClass("wp-menu-open").attr("id");if(c){a("li.wp-has-submenu","#adminmenu").each(function(f,g){if(c==g.id){var d=a(g).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+f,d)}})}return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var d=a(this),c=d.val();if(d.attr("checked")){b.checked(c)}else{b.unchecked(c)}columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show()},unchecked:function(b){a(".column-"+b).hide()},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var b=this.id;return b.substring(b,b.length-5)}).get().join(",")}}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(d){var f=false,a,e,c,b;d("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");d("div.updated, div.error").not(".below-h2, .inline").insertAfter(d("div.wrap h2:first"));d("#show-settings-link").click(function(){if(!d("#screen-options-wrap").hasClass("screen-options-open")){d("#contextual-help-link-wrap").css("visibility","hidden")}d("#screen-options-wrap").slideToggle("fast",function(){if(d(this).hasClass("screen-options-open")){d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right.gif")'});d("#contextual-help-link-wrap").css("visibility","");d(this).removeClass("screen-options-open")}else{d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right-up.gif")'});d(this).addClass("screen-options-open")}});return false});d("#contextual-help-link").click(function(){if(!d("#contextual-help-wrap").hasClass("contextual-help-open")){d("#screen-options-link-wrap").css("visibility","hidden")}d("#contextual-help-wrap").slideToggle("fast",function(){if(d(this).hasClass("contextual-help-open")){d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right.gif")'});d("#screen-options-link-wrap").css("visibility","");d(this).removeClass("contextual-help-open")}else{d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right-up.gif")'});d(this).addClass("contextual-help-open")}});return false});d("tbody").children().children(".check-column").find(":checkbox").click(function(g){if("undefined"==g.shiftKey){return true}if(g.shiftKey){if(!f){return true}a=d(f).closest("form").find(":checkbox");e=a.index(f);c=a.index(this);b=d(this).attr("checked");if(0<e&&0<c&&e!=c){a.slice(e,c).attr("checked",function(){if(d(this).closest("tr").is(":visible")){return b?"checked":""}return""})}}f=this;return true});d("thead, tfoot").find(":checkbox").click(function(i){var j=d(this).attr("checked"),h="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,g=i.shiftKey||h;d(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(d(this).closest("tr").is(":hidden")){return""}if(g){return d(this).attr("checked")?"":"checked"}else{if(j){return"checked"}}return""});d(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(g){return""}else{if(j){return"checked"}}return""})});d("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");d("div.default-password-nag").hide();return false});d("#newcontent").keydown(function(l){if(l.keyCode!=9){return true}var i=l.target,n=i.selectionStart,h=i.selectionEnd,m=i.value,g,k;try{this.lastKey=9}catch(j){}if(document.selection){i.focus();k=document.selection.createRange();k.text="\t"}else{if(n>=0){g=this.scrollTop;i.value=m.substring(0,n).concat("\t",m.substring(h));i.selectionStart=i.selectionEnd=n+1;this.scrollTop=g}}if(l.stopPropagation){l.stopPropagation()}if(l.preventDefault){l.preventDefault()}});d("#newcontent").blur(function(g){if(this.lastKey&&9==this.lastKey){this.focus()}})}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/09ada390786fa661872b93f6395a0eaf3afe5325/common.js/buggy/wp-admin/js/common.js |
this.colSpanChange(-1); | unchecked : function(column) { $('.column-' + column).hide(); }, | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/63b4ef270e88d5f980c05e004adaffa5185a6d4b/common.dev.js/buggy/wp-admin/js/common.dev.js |
|
var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,autoCompleteData:{},init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachAddMenuItemListeners();this.attachQuickSearchListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){return a.pxToDepth(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var h=f.exec(b(this).attr("name")),i="undefined"==typeof h[1]?0:parseInt(h[1],10);d[i]=a.getListDataFromID(i)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p)}r.item.updateParentMenuItemDBId()},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-close")){return c.eventOnClickCloseLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachAddMenuItemListeners:function(){var c=b("#nav-menu-meta");c.find(".add-to-menu input").click(function(){b(this).trigger("wp-add-menu-item",[a.addMenuItemToBottom]);return false});c.find(".customlinkdiv").bind("wp-add-menu-item",function(f,d){a.addCustomLink(d)});c.find(".posttypediv, .taxonomydiv").bind("wp-add-menu-item",function(f,d){b(this).addSelectedToMenu(d)})},attachQuickSearchListeners:function(){var d=this,c=b("#nav-menu-meta");b("input.quick-search").each(function(e,f){d.setupQuickSearchEventListeners(f)});c.find(".quick-search-submit").click(function(){b(this).trigger("wp-quick-search");return false});c.find(".inside").children().bind("wp-quick-search",function(){d.quickSearch(b(this).attr("id"))})},quickSearch:function(j){var e=b("#"+j+" .quick-search").attr("name"),g=b("#"+j+" .quick-search").val(),i=b("#menu").val(),d=b("#menu-settings-column-nonce").val(),h={},f=this,c=function(){};c=f.processQuickSearchQueryResponse;h={action:"menu-quick-search","response-format":"markup",menu:i,"menu-settings-column-nonce":d,q:g,type:e};b.post(ajaxurl,h,function(k){c.call(f,k,h)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachAddMenuItemListeners();this.attachQuickSearchListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){return a.pxToDepth(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var h=f.exec(b(this).attr("name")),i="undefined"==typeof h[1]?0:parseInt(h[1],10);d[i]=a.getListDataFromID(i)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p)}r.item.updateParentMenuItemDBId()},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-close")){return c.eventOnClickCloseLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachAddMenuItemListeners:function(){var c=b("#nav-menu-meta");c.find(".add-to-menu input").click(function(){b(this).trigger("wp-add-menu-item",[a.addMenuItemToBottom]);return false});c.find(".customlinkdiv").bind("wp-add-menu-item",function(f,d){a.addCustomLink(d)});c.find(".posttypediv, .taxonomydiv").bind("wp-add-menu-item",function(f,d){b(this).addSelectedToMenu(d)})},attachQuickSearchListeners:function(){var c;b(".quick-search").keypress(function(f){var d=b(this);if(13==f.which){a.updateQuickSearchResults(d);return false}if(c){clearTimeout(c)}c=setTimeout(function(){a.updateQuickSearchResults(d)},400)}).attr("autocomplete","off")},updateQuickSearchResults:function(d){var c,g,e=2,f=d.val();if(f.length<e){return}c=d.parents(".tabs-panel");g={action:"menu-quick-search","response-format":"markup",menu:b("#menu").val(),"menu-settings-column-nonce":b("#menu-settings-column-nonce").val(),q:f,type:d.attr("name")};b("img.waiting",c).show();b.post(ajaxurl,g,function(h){a.processQuickSearchQueryResponse(h,g,c)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http: | var wpNavMenu;(function(b){var a=wpNavMenu={options:{menuItemDepthPerLevel:30,globalMaxDepth:11},menuList:undefined,targetList:undefined,autoCompleteData:{},init:function(){a.menuList=b("#menu-to-edit");a.targetList=a.menuList;this.jQueryExtensions();this.attachMenuEditListeners();this.setupInputWithDefaultTitle();this.attachAddMenuItemListeners();this.attachQuickSearchListeners();this.attachTabsPanelListeners();this.attachHomeLinkListener();if(a.menuList.length){this.initSortables()}this.initToggles();this.initTabManager()},jQueryExtensions:function(){b.fn.extend({menuItemDepth:function(){return a.pxToDepth(this.eq(0).css("margin-left").slice(0,-2))},updateDepthClass:function(d,c){return this.each(function(){var e=b(this);c=c||e.menuItemDepth();b(this).removeClass("menu-item-depth-"+c).addClass("menu-item-depth-"+d)})},shiftDepthClass:function(c){return this.each(function(){var d=b(this),e=d.menuItemDepth();b(this).removeClass("menu-item-depth-"+e).addClass("menu-item-depth-"+(e+c))})},childMenuItems:function(){var c=b();this.each(function(){var d=b(this),f=d.menuItemDepth(),e=d.next();while(e.length&&e.menuItemDepth()>f){c=c.add(e);e=e.next()}});return c},updateParentMenuItemDBId:function(){return this.each(function(){var e=b(this),c=e.find(".menu-item-data-parent-id"),f=e.menuItemDepth(),d=e.prev();if(f==0){c.val(0)}else{while(d.menuItemDepth()!=f-1){d=d.prev()}c.val(d.find(".menu-item-data-db-id").val())}})},hideAdvancedMenuItemFields:function(){return this.each(function(){var c=b(this);b(".hide-column-tog").not(":checked").each(function(){c.find(".field-"+b(this).val()).addClass("hidden-field")})})},addSelectedToMenu:function(c){return this.each(function(){var e=b(this),d={},g=e.find(".tabs-panel-active .categorychecklist li input:checked"),f=new RegExp("menu-item\\[([^\\]]*)");c=c||a.addMenuItemToBottom;if(!g.length){return false}e.find("img.waiting").show();b(g).each(function(){var h=f.exec(b(this).attr("name")),i="undefined"==typeof h[1]?0:parseInt(h[1],10);d[i]=a.getListDataFromID(i)});a.addItemToMenu(d,c,function(){g.removeAttr("checked");e.find("img.waiting").hide()})})}})},initToggles:function(){postboxes.add_postbox_toggles("nav-menus");columns.useCheckboxesForHidden();columns.checked=function(c){b(".field-"+c).removeClass("hidden-field")};columns.unchecked=function(c){b(".field-"+c).addClass("hidden-field")};a.menuList.hideAdvancedMenuItemFields()},initSortables:function(){var m=0,l,j,e,h,n,k,o,d,g,i=a.menuList.offset().left;a.menuList.sortable({handle:".menu-item-handle",placeholder:"sortable-placeholder",start:function(w,v){var p,t,s,q,r,u;g=v.item.children(".menu-item-transport");l=v.item.menuItemDepth();f(v,l);s=(v.item.next()[0]==v.placeholder[0])?v.item.next():v.item;q=s.childMenuItems();g.append(q);p=g.outerHeight();p+=(p>0)?(v.placeholder.css("margin-top").slice(0,-2)*1):0;p+=v.helper.outerHeight();d=p;p-=2;v.placeholder.height(p);r=l;q.each(function(){var x=b(this).menuItemDepth();r=(x>r)?x:r});t=v.helper.find(".menu-item-handle").outerWidth();t+=a.depthToPx(r-l);t-=2;v.placeholder.width(t);u=v.placeholder.next();u.css("margin-top",d+"px");v.placeholder.detach();b(this).sortable("refresh");v.item.after(v.placeholder);u.css("margin-top",0);c(v)},stop:function(s,r){var q,p=m-l;q=g.children().insertAfter(r.item);if(p!=0){r.item.updateDepthClass(m);q.shiftDepthClass(p)}r.item.updateParentMenuItemDBId()},change:function(q,p){if(!p.placeholder.parent().hasClass("menu")){(h.length)?h.after(p.placeholder):a.menuList.prepend(p.placeholder)}c(p)},sort:function(q,p){var s=p.helper.offset(),r=a.pxToDepth(s.left-i);if(r>e||s.top<k){r=e}else{if(r<j){r=j}}if(r!=m){f(p,r)}if(o&&s.top+d>o){n.after(p.placeholder);c(p);b(this).sortable("refreshPositions")}}});function c(p){var q;h=p.placeholder.prev();n=p.placeholder.next();if(h[0]==p.item[0]){h=h.prev()}if(n[0]==p.item[0]){n=n.next()}k=(h.length)?h.offset().top+h.height():0;o=(n.length)?n.offset().top+n.height()/3:0;j=(n.length)?n.menuItemDepth():0;if(h.length){e=((q=h.menuItemDepth()+1)>a.options.globalMaxDepth)?a.options.globalMaxDepth:q}else{e=0}}function f(p,q){p.placeholder.updateDepthClass(q,m);m=q}},attachMenuEditListeners:function(){var c=this;b("#update-nav-menu").bind("click",function(d){if(d.target&&d.target.className){if(-1!=d.target.className.indexOf("item-edit")){return c.eventOnClickEditLink(d.target)}else{if(-1!=d.target.className.indexOf("menu-save")){return c.eventOnClickMenuSave(d.target)}else{if(-1!=d.target.className.indexOf("menu-delete")){return c.eventOnClickMenuDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-delete")){return c.eventOnClickMenuItemDelete(d.target)}else{if(-1!=d.target.className.indexOf("item-close")){return c.eventOnClickCloseLink(d.target)}}}}}}})},setupInputWithDefaultTitle:function(){var c="input-with-default-title";b("."+c).each(function(){var f=b(this),e=f.attr("title"),d=f.val();f.data(c,e);if(""==d){f.val(e)}else{if(e==d){return}else{f.removeClass(c)}}}).focus(function(){var d=b(this);if(d.val()==d.data(c)){d.val("").removeClass(c)}}).blur(function(){var d=b(this);if(""==d.val()){d.addClass(c).val(d.data(c))}})},attachAddMenuItemListeners:function(){var c=b("#nav-menu-meta");c.find(".add-to-menu input").click(function(){b(this).trigger("wp-add-menu-item",[a.addMenuItemToBottom]);return false});c.find(".customlinkdiv").bind("wp-add-menu-item",function(f,d){a.addCustomLink(d)});c.find(".posttypediv, .taxonomydiv").bind("wp-add-menu-item",function(f,d){b(this).addSelectedToMenu(d)})},attachQuickSearchListeners:function(){var d=this,c=b("#nav-menu-meta");b("input.quick-search").each(function(e,f){d.setupQuickSearchEventListeners(f)});c.find(".quick-search-submit").click(function(){b(this).trigger("wp-quick-search");return false});c.find(".inside").children().bind("wp-quick-search",function(){d.quickSearch(b(this).attr("id"))})},quickSearch:function(j){var e=b("#"+j+" .quick-search").attr("name"),g=b("#"+j+" .quick-search").val(),i=b("#menu").val(),d=b("#menu-settings-column-nonce").val(),h={},f=this,c=function(){};c=f.processQuickSearchQueryResponse;h={action:"menu-quick-search","response-format":"markup",menu:i,"menu-settings-column-nonce":d,q:g,type:e};b.post(ajaxurl,h,function(k){c.call(f,k,h)})},addCustomLink:function(c){var e=b("#custom-menu-item-url").val(),d=b("#custom-menu-item-name").val();c=c||a.addMenuItemToBottom;if(""==e||"http://"==e){return false}b(".customlinkdiv img.waiting").show();this.addLinkToMenu(e,d,c,function(){b(".customlinkdiv img.waiting").hide();b("#custom-menu-item-name").val("").blur();b("#custom-menu-item-url").val("http://")})},addLinkToMenu:function(e,d,c,f){c=c||a.addMenuItemToBottom;f=f||function(){};a.addItemToMenu({"-1":{"menu-item-type":"custom","menu-item-url":e,"menu-item-title":d}},c,f)},addItemToMenu:function(e,c,g){var f=b("#menu").val(),d=b("#menu-settings-column-nonce").val();c=c||function(){};g=g||function(){};params={action:"add-menu-item",menu:f,"menu-settings-column-nonce":d,"menu-item":e};b.post(ajaxurl,params,function(h){c(h,params);g()})},addMenuItemToBottom:function(c,d){b(c).hideAdvancedMenuItemFields().appendTo(a.targetList)},addMenuItemToTop:function(c,d){b(c).hideAdvancedMenuItemFields().prependTo(a.targetList)},attachHomeLinkListener:function(){b(".add-home-link",".customlinkdiv").click(function(c){a.addLinkToMenu(navMenuL10n.homeurl,navMenuL10n.home,a.addMenuItemToTop);return false})},attachTabsPanelListeners:function(){b("#menu-settings-column").bind("click",function(j){var h,k,d,l,c,g,f;if(j.target&&j.target.className&&-1!=j.target.className.indexOf("nav-tab-link")){d=/#(.*)$/.exec(j.target.href);l=b(j.target).parents(".inside").first()[0];c=l?l.getElementsByTagName("input"):[];g=c.length;while(g--){c[g].checked=false}b(".tabs-panel",l).each(function(){if(this.className){this.className=this.className.replace("tabs-panel-active","tabs-panel-inactive")}});b(".tabs",l).each(function(){this.className=this.className.replace("tabs","")});j.target.parentNode.className+=" tabs";if(d&&d[1]){k=document.getElementById(d[1]);if(k){k.className=k.className.replace("tabs-panel-inactive","tabs-panel-active")}}return false}else{if(j.target&&j.target.className&&-1!=j.target.className.indexOf("select-all")){h=/#(.*)$/.exec(j.target.href);if(h&&h[1]){f=b("#"+h[1]+" .tabs-panel-active .menu-item-title input");if(f.length===f.filter(":checked").length){f.removeAttr("checked")}else{f.attr("checked","checked")}return false}}}})},initTabManager:function(){var h=b(".nav-tabs-wrapper"),i=h.children(".nav-tabs"),g=i.children(".nav-tab-active"),l=i.children(".nav-tab"),e=0,m,f,k,d,j=false;function c(){f=h.offset().left;m=f+h.width();g.makeTabVisible()}b.fn.extend({makeTabVisible:function(){var o=this.eq(0),p,n;if(!o.length){return}p=o.offset().left;n=p+o.outerWidth();if(n>m){i.animate({"margin-left":"+="+(m-n)+"px"},"fast")}else{if(p<f){i.animate({"margin-left":"-="+(p-f)+"px"},"fast")}}return o},isTabVisible:function(){var o=this.eq(0),p=o.offset().left,n=p+o.outerWidth();return(n<=m&&p>=f)?true:false}});l.each(function(){e+=b(this).outerWidth(true)});if(e<=h.width()-i.css("padding-left").slice(0,-2)-i.css("padding-right").slice(0,-2)){return}i.css({"margin-right":(-1*e)+"px",padding:0});k=b('<div class="nav-tabs-arrow nav-tabs-arrow-left"><a>«</a></div>');d=b('<div class="nav-tabs-arrow nav-tabs-arrow-right"><a>»</a></div>');h.wrap('<div class="nav-tabs-nav"/>').parent().prepend(k).append(d);c();b(window).resize(function(){if(j){return}j=true;setTimeout(function(){c();j=false},1000)});b.each([{arrow:k,next:"next",last:"first",operator:"+="},{arrow:d,next:"prev",last:"last",operator:"-="}],function(){var n=this;this.arrow.mousedown(function(){var p=l[n.last](),o=function(){if(!p.isTabVisible()){i.animate({"margin-left":n.operator+"90px"},300,"linear",o)}};o()}).mouseup(function(){var p,o;i.stop(true);p=l[n.last]();while((o=p[n.next]())&&o.length&&!o.isTabVisible()){p=o}p.makeTabVisible()})})},setupQuickSearchEventListeners:function(c){var d=this;b(c).autocomplete(ajaxurl+"?action=menu-quick-search&type="+c.name,{delay:500,formatItem:a.formatAutocompleteResponse,formatResult:a.formatAutocompleteResult,minchars:2,multiple:false}).bind("blur",function(h){var f=a.autoCompleteData[this.value],g=this;if(f){b.post(ajaxurl+"?action=menu-quick-search&type=get-post-item&response-format=markup",f,function(e){d.processQuickSearchQueryResponse.call(d,e,f);a.autoCompleteData[g.value]=false})}})},eventOnClickEditLink:function(c){var e,d=/#(.*)$/.exec(c.href);if(d&&d[1]){e=b("#"+d[1]);if(0!=e.length){if(e.hasClass("menu-item-edit-inactive")){e.slideDown("fast").siblings("dl").andSelf().removeClass("menu-item-edit-inactive").addClass("menu-item-edit-active")}else{e.slideUp("fast").siblings("dl").andSelf().removeClass("menu-item-edit-active").addClass("menu-item-edit-inactive")}return false}}},eventOnClickCloseLink:function(c){b(c).closest(".menu-item-settings").siblings("dl").find(".item-edit").click();return false},eventOnClickMenuSave:function(c){a.menuList.find(".menu-item-data-position").val(function(d){return d+1});return true},eventOnClickMenuDelete:function(c){if(confirm(navMenuL10n.warnDeleteMenu)){return true}else{return false}},eventOnClickMenuItemDelete:function(c){var f,e,d=this;if(confirm(navMenuL10n.warnDeleteMenuItem)){e=/_wpnonce=([a-zA-Z0-9]*)$/.exec(c.href);if(e&&e[1]){f=parseInt(c.id.replace("delete-",""),10);b.post(ajaxurl,{action:"delete-menu-item","menu-item":f,_wpnonce:e[1]},function(g){if("1"==g){d.removeMenuItem(document.getElementById("menu-item-"+f))}});return false}return true}else{return false}},processQuickSearchQueryResponse:function(g,m){if(!m){m={}}var d=document.createElement("ul"),c=document.getElementById("nav-menu-meta"),h,l,e,n,j,k=new RegExp("menu-item\\[([^\\]]*)"),f;e=k.exec(g);if(e&&e[1]){j=e[1];while(c.elements["menu-item["+j+"][menu-item-type]"]){j--}if(j!=e[1]){g=g.replace(new RegExp("menu-item\\["+e[1]+"\\]","g"),"menu-item["+j+"]")}}d.innerHTML=g;l=d.getElementsByTagName("li");if(l[0]&&m.object_type){f=document.getElementById(m.object_type+"-search-checklist");if(f){f.appendChild(l[0])}}else{if(m.type){e=/quick-search-(posttype|taxonomy)-([a-zA-Z_-]*)/.exec(m.type);if(e&&e[2]){f=document.getElementById(e[2]+"-search-checklist");if(f){h=l.length;if(!h){n=document.createElement("li");n.appendChild(document.createTextNode(navMenuL10n.noResultsFound));f.appendChild(n)}while(h--){f.appendChild(l[h])}}}}}},removeMenuItem:function(d){d=b(d);var c=d.childMenuItems(),e=this;d.addClass("deleting").fadeOut(350,function(){d.remove();c.shiftDepthClass(-1).updateParentMenuItemDBId()})},formatAutocompleteResponse:function(c,g,d,f){if(c&&c[0]){var e=b.parseJSON(c[0]);if(e.post_title){if(e.ID&&e.post_type){a.autoCompleteData[e.post_title]={ID:e.ID,object_type:e.post_type}}return e.post_title}}},formatAutocompleteResult:function(c,g,d,f){if(c&&c[0]){var e=b.parseJSON(c[0]);if(e.post_title){return e.post_title}}},getListDataFromID:function(k,h){if(!k){return false}h=h||document;var d=["menu-item-db-id","menu-item-object-id","menu-item-object","menu-item-parent-id","menu-item-position","menu-item-type","menu-item-title","menu-item-url","menu-item-description","menu-item-attr-title","menu-item-target","menu-item-classes","menu-item-xfn"],c={},e=h.getElementsByTagName("input"),g=e.length,f;while(g--){f=d.length;while(f--){if(e[g]&&e[g].name&&"menu-item["+k+"]["+d[f]+"]"==e[g].name){c[d[f]]=e[g].value}}}return c},depthToPx:function(c){return c*a.options.menuItemDepthPerLevel},pxToDepth:function(c){return Math.floor(c/a.options.menuItemDepthPerLevel)}};b(document).ready(function(){wpNavMenu.init()})})(jQuery); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/1bc4078e898cdfdb67e82b316f7d36bc25088852/nav-menu.js/clean/wp-admin/js/nav-menu.js |
var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){var c=b.slideToggle(150,function(){b.css("display","")}).parent().toggleClass("wp-menu-open").attr("id");if(c){a("li.wp-has-submenu","#adminmenu").each(function(f,g){if(c==g.id){var d=a(g).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+f,d)}})}return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var d=a(this),c=d.val();if(d.attr("checked")){b.checked(c)}else{b.unchecked(c)}columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show()},unchecked:function(b){a(".column-"+b).hide()},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var b=this.id;return b.substring(b,b.length-5)}).get().join(",")}}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(d){var f=false,a,e,c,b;d("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");d("div.updated, div.error").not(".below-h2, .inline").insertAfter(d("div.wrap h2:first"));d("#show-settings-link").click(function(){if(!d("#screen-options-wrap").hasClass("screen-options-open")){d("#contextual-help-link-wrap").css("visibility","hidden")}d("#screen-options-wrap").slideToggle("fast",function(){if(d(this).hasClass("screen-options-open")){d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right.gif?ver=20100531")'});d("#contextual-help-link-wrap").css("visibility","");d(this).removeClass("screen-options-open")}else{d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right-up.gif?ver=20100531")'});d(this).addClass("screen-options-open")}});return false});d("#contextual-help-link").click(function(){if(!d("#contextual-help-wrap").hasClass("contextual-help-open")){d("#screen-options-link-wrap").css("visibility","hidden")}d("#contextual-help-wrap").slideToggle("fast",function(){if(d(this).hasClass("contextual-help-open")){d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right.gif?ver=20100531")'});d("#screen-options-link-wrap").css("visibility","");d(this).removeClass("contextual-help-open")}else{d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right-up.gif?ver=20100531")'});d(this).addClass("contextual-help-open")}});return false});d("tbody").children().children(".check-column").find(":checkbox").click(function(g){if("undefined"==g.shiftKey){return true}if(g.shiftKey){if(!f){return true}a=d(f).closest("form").find(":checkbox");e=a.index(f);c=a.index(this);b=d(this).attr("checked");if(0<e&&0<c&&e!=c){a.slice(e,c).attr("checked",function(){if(d(this).closest("tr").is(":visible")){return b?"checked":""}return""})}}f=this;return true});d("thead, tfoot").find(":checkbox").click(function(i){var j=d(this).attr("checked"),h="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,g=i.shiftKey||h;d(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(d(this).closest("tr").is(":hidden")){return""}if(g){return d(this).attr("checked")?"":"checked"}else{if(j){return"checked"}}return""});d(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(g){return""}else{if(j){return"checked"}}return""})});d("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");d("div.default-password-nag").hide();return false});d("#newcontent").keydown(function(l){if(l.keyCode!=9){return true}var i=l.target,n=i.selectionStart,h=i.selectionEnd,m=i.value,g,k;try{this.lastKey=9}catch(j){}if(document.selection){i.focus();k=document.selection.createRange();k.text="\t"}else{if(n>=0){g=this.scrollTop;i.value=m.substring(0,n).concat("\t",m.substring(h));i.selectionStart=i.selectionEnd=n+1;this.scrollTop=g}}if(l.stopPropagation){l.stopPropagation()}if(l.preventDefault){l.preventDefault()}});d("#newcontent").blur(function(g){if(this.lastKey&&9==this.lastKey){this.focus()}})}); | var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){var c=b.slideToggle(150,function(){b.css("display","")}).parent().toggleClass("wp-menu-open").attr("id");if(c){a("li.wp-has-submenu","#adminmenu").each(function(f,g){if(c==g.id){var d=a(g).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+f,d)}})}return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var d=a(this),c=d.val();if(d.attr("checked")){b.checked(c)}else{b.unchecked(c)}columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show()},unchecked:function(b){a(".column-"+b).hide()},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var b=this.id;return b.substring(b,b.length-5)}).get().join(",")}}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(d){var f=false,a,e,c,b;d("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");d("div.updated, div.error").not(".below-h2, .inline").insertAfter(d("div.wrap h2:first"));d("#show-settings-link").click(function(){if(!d("#screen-options-wrap").hasClass("screen-options-open")){d("#contextual-help-link-wrap").css("visibility","hidden")}d("#screen-options-wrap").slideToggle("fast",function(){if(d(this).hasClass("screen-options-open")){d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right.gif?ver=20100531")'});d("#contextual-help-link-wrap").css("visibility","");d(this).removeClass("screen-options-open")}else{d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right-up.gif?ver=20100531")'});d(this).addClass("screen-options-open")}});return false});d("#contextual-help-link").click(function(){if(!d("#contextual-help-wrap").hasClass("contextual-help-open")){d("#screen-options-link-wrap").css("visibility","hidden")}d("#contextual-help-wrap").slideToggle("fast",function(){if(d(this).hasClass("contextual-help-open")){d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right.gif?ver=20100531")'});d("#screen-options-link-wrap").css("visibility","");d(this).removeClass("contextual-help-open")}else{d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right-up.gif?ver=20100531")'});d(this).addClass("contextual-help-open")}});return false});d("tbody").children().children(".check-column").find(":checkbox").click(function(g){if("undefined"==g.shiftKey){return true}if(g.shiftKey){if(!f){return true}a=d(f).closest("form").find(":checkbox");e=a.index(f);c=a.index(this);b=d(this).attr("checked");if(0<e&&0<c&&e!=c){a.slice(e,c).attr("checked",function(){if(d(this).closest("tr").is(":visible")){return b?"checked":""}return""})}}f=this;return true});d("thead, tfoot").find(".check-column :checkbox").click(function(i){var j=d(this).attr("checked"),h="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,g=i.shiftKey||h;d(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(d(this).closest("tr").is(":hidden")){return""}if(g){return d(this).attr("checked")?"":"checked"}else{if(j){return"checked"}}return""});d(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(g){return""}else{if(j){return"checked"}}return""})});d("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");d("div.default-password-nag").hide();return false});d("#newcontent").keydown(function(l){if(l.keyCode!=9){return true}var i=l.target,n=i.selectionStart,h=i.selectionEnd,m=i.value,g,k;try{this.lastKey=9}catch(j){}if(document.selection){i.focus();k=document.selection.createRange();k.text="\t"}else{if(n>=0){g=this.scrollTop;i.value=m.substring(0,n).concat("\t",m.substring(h));i.selectionStart=i.selectionEnd=n+1;this.scrollTop=g}}if(l.stopPropagation){l.stopPropagation()}if(l.preventDefault){l.preventDefault()}});d("#newcontent").blur(function(g){if(this.lastKey&&9==this.lastKey){this.focus()}})}); | var showNotice,adminMenu,columns,validateForm;(function(a){adminMenu={init:function(){var b=a("#adminmenu");a(".wp-menu-toggle",b).each(function(){var c=a(this),d=c.siblings(".wp-submenu");if(d.length){c.click(function(){adminMenu.toggle(d)})}else{c.hide()}});this.favorites();a(".separator",b).click(function(){if(a("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if(a("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){a("li.wp-has-submenu","#adminmenu").each(function(c,d){var b=getUserSetting("m"+c);if(a(d).hasClass("wp-has-current-submenu")){return true}if("o"==b){a(d).addClass("wp-menu-open")}else{if("c"==b){a(d).removeClass("wp-menu-open")}}})},toggle:function(b){var c=b.slideToggle(150,function(){b.css("display","")}).parent().toggleClass("wp-menu-open").attr("id");if(c){a("li.wp-has-submenu","#adminmenu").each(function(f,g){if(c==g.id){var d=a(g).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+f,d)}})}return false},fold:function(b){if(b){a("body").removeClass("folded");a("#adminmenu li.wp-has-submenu").unbind()}else{a("body").addClass("folded");a("#adminmenu li.wp-has-submenu").hoverIntent({over:function(j){var d,c,g,k,i;d=a(this).find(".wp-submenu");c=a(this).offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a(window).scrollTop()-15;if(i<(c-k)){k=c-i}if(k>1){d.css({marginTop:"-"+k+"px"})}else{if(d.css("marginTop")){d.css({marginTop:""})}}d.addClass("sub-open")},out:function(){a(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){a("#favorite-inside").width(a("#favorite-actions").width()-4);a("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){a("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if(a("#favorite-inside").hasClass("slideDown")){a("#favorite-inside").slideDown(100);a("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){a("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if(a("#favorite-inside").hasClass("slideUp")){a("#favorite-inside").slideUp(100,function(){a("#favorite-first").removeClass("slide-down")})}},300)})}};a(document).ready(function(){adminMenu.init()});columns={init:function(){var b=this;a(".hide-column-tog","#adv-settings").click(function(){var d=a(this),c=d.val();if(d.attr("checked")){b.checked(c)}else{b.unchecked(c)}columns.saveManageColumnsState()})},saveManageColumnsState:function(){var b=this.hidden();a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})},checked:function(b){a(".column-"+b).show()},unchecked:function(b){a(".column-"+b).hide()},hidden:function(){return a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return a(".hide-column-tog").not(":checked").map(function(){var b=this.id;return b.substring(b,b.length-5)}).get().join(",")}}};a(document).ready(function(){columns.init()});validateForm=function(b){return !a(b).find(".form-required").filter(function(){return a("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){a(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var a=commonL10n.warnDelete||"";if(confirm(a)){return true}return false},note:function(a){alert(a)}};jQuery(document).ready(function(d){var f=false,a,e,c,b;d("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");d("div.updated, div.error").not(".below-h2, .inline").insertAfter(d("div.wrap h2:first"));d("#show-settings-link").click(function(){if(!d("#screen-options-wrap").hasClass("screen-options-open")){d("#contextual-help-link-wrap").css("visibility","hidden")}d("#screen-options-wrap").slideToggle("fast",function(){if(d(this).hasClass("screen-options-open")){d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right.gif?ver=20100531")'});d("#contextual-help-link-wrap").css("visibility","");d(this).removeClass("screen-options-open")}else{d("#show-settings-link").css({backgroundImage:'url("images/screen-options-right-up.gif?ver=20100531")'});d(this).addClass("screen-options-open")}});return false});d("#contextual-help-link").click(function(){if(!d("#contextual-help-wrap").hasClass("contextual-help-open")){d("#screen-options-link-wrap").css("visibility","hidden")}d("#contextual-help-wrap").slideToggle("fast",function(){if(d(this).hasClass("contextual-help-open")){d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right.gif?ver=20100531")'});d("#screen-options-link-wrap").css("visibility","");d(this).removeClass("contextual-help-open")}else{d("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right-up.gif?ver=20100531")'});d(this).addClass("contextual-help-open")}});return false});d("tbody").children().children(".check-column").find(":checkbox").click(function(g){if("undefined"==g.shiftKey){return true}if(g.shiftKey){if(!f){return true}a=d(f).closest("form").find(":checkbox");e=a.index(f);c=a.index(this);b=d(this).attr("checked");if(0<e&&0<c&&e!=c){a.slice(e,c).attr("checked",function(){if(d(this).closest("tr").is(":visible")){return b?"checked":""}return""})}}f=this;return true});d("thead, tfoot").find(":checkbox").click(function(i){var j=d(this).attr("checked"),h="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,g=i.shiftKey||h;d(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(d(this).closest("tr").is(":hidden")){return""}if(g){return d(this).attr("checked")?"":"checked"}else{if(j){return"checked"}}return""});d(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(g){return""}else{if(j){return"checked"}}return""})});d("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");d("div.default-password-nag").hide();return false});d("#newcontent").keydown(function(l){if(l.keyCode!=9){return true}var i=l.target,n=i.selectionStart,h=i.selectionEnd,m=i.value,g,k;try{this.lastKey=9}catch(j){}if(document.selection){i.focus();k=document.selection.createRange();k.text="\t"}else{if(n>=0){g=this.scrollTop;i.value=m.substring(0,n).concat("\t",m.substring(h));i.selectionStart=i.selectionEnd=n+1;this.scrollTop=g}}if(l.stopPropagation){l.stopPropagation()}if(l.preventDefault){l.preventDefault()}});d("#newcontent").blur(function(g){if(this.lastKey&&9==this.lastKey){this.focus()}})}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/6cab5a0d0975e2c5e0e77c812c3f3288583243fd/common.js/buggy/wp-admin/js/common.js |
!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}}, | a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d= | !a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}}, | 3959 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/3959/6ffc2de1d5816f49b1cdf002161144b28f2dc6e5/jquery.js/clean/javascript/jquery.js |
undelegate: function( selector, types, fn ) { if ( arguments.length === 0 ) { return this.unbind( "live" ); } else { return this.die( types, null, fn, selector ); } }, | a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d= | undelegate: function( selector, types, fn ) { if ( arguments.length === 0 ) { return this.unbind( "live" ); } else { return this.die( types, null, fn, selector ); } }, | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/337f8a7f8f1bd9e61727ac292aa76724b4cf7a46/jquery.js/clean/wp-includes/js/jquery/jquery.js |
!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}}, | a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d= | !a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}}, | 8656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8656/debb161f7671ff5bddc8def2221db94ff111ff1b/jquery.js/clean/js/jquery.js |
!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}}, | a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d= | !a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}}, | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/8e2f21f44411204c60060f830cb1a800533462d2/jquery.js/buggy/wp-includes/js/jquery/jquery.js |
underscore: function() { return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase(); }, | function underscore() { return this.replace(/::/g, '/') .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2') .replace(/([a-z\d])([A-Z])/g, '$1_$2') .replace(/-/g, '_') .toLowerCase(); } | underscore: function() { return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase(); }, | 6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/34175877c50897fdc4ecb46e3a9bd06ea70ff4fa/prototype.js/buggy/web/src/main/webapp/js/prototype.js |
if (!element._overflow) return; | if (!element._overflow) return element; | undoClipping: function(element) { element = $(element); if (!element._overflow) return; element.style.overflow = element._overflow == 'auto' ? '' : element._overflow; element._overflow = null; return element; } | 6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/prototype.js/clean/web/src/main/webapp/js/prototype.js |
} | }, | undoClipping: function(element) { element = $(element); if (!element._overflow) return; element.style.overflow = element._overflow == 'auto' ? '' : element._overflow; element._overflow = null; return element; } | 6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/prototype.js/clean/web/src/main/webapp/js/prototype.js |
var div = document.createElement('div'); div.innerHTML = this.stripTags(); return div.childNodes[0] ? div.childNodes[0].nodeValue : ''; }, | return this.stripTags().replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); } | unescapeHTML: function() { var div = document.createElement('div'); div.innerHTML = this.stripTags(); return div.childNodes[0] ? div.childNodes[0].nodeValue : ''; }, | 6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/prototype.js/clean/web/src/main/webapp/js/prototype.js |
unescapeHTML: function() { return this.stripTags().replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); | function unescapeHTML() { return this.stripTags().replace(/</g,'<').replace(/>/g,'>').replace(/&/g,'&'); | unescapeHTML: function() { return this.stripTags().replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); } | 6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/34175877c50897fdc4ecb46e3a9bd06ea70ff4fa/prototype.js/buggy/web/src/main/webapp/js/prototype.js |
unfilterJSON: function(filter) { return this.sub(filter || Prototype.JSONFilter, '#{1}'); }, | function unfilterJSON(filter) { return this.replace(filter || Prototype.JSONFilter, '$1'); } | unfilterJSON: function(filter) { return this.sub(filter || Prototype.JSONFilter, '#{1}'); }, | 6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/34175877c50897fdc4ecb46e3a9bd06ea70ff4fa/prototype.js/buggy/web/src/main/webapp/js/prototype.js |
var ss = prefs.getValue("originalPreferenceSessionStore", true); | uninstallHandler: function() { //TODO: this doesn't work. dunno how to catch the secret FUEL notifications yet... //TODO: explain to user what will be uninstalled and offer extra // options (e.g. "Uninstall KeePass too?") // Reset prefs to pre-KeeFox settings var rs = prefs.getValue("originalPreferenceRememberSignons", false); var ss = prefs.getValue("originalPreferenceSessionStore", true); Application.prefs.setValue("signon.rememberSignons", rs); Application.prefs.setValue("browser.sessionstore.enabled", ss); }, | 2656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2656/cbc75d8f871199fb76139ca322f7071472469394/KF.js/clean/Firefox addon/KeeFox/modules/KF.js |
|
Application.prefs.setValue("browser.sessionstore.enabled", ss); | uninstallHandler: function() { //TODO: this doesn't work. dunno how to catch the secret FUEL notifications yet... //TODO: explain to user what will be uninstalled and offer extra // options (e.g. "Uninstall KeePass too?") // Reset prefs to pre-KeeFox settings var rs = prefs.getValue("originalPreferenceRememberSignons", false); var ss = prefs.getValue("originalPreferenceSessionStore", true); Application.prefs.setValue("signon.rememberSignons", rs); Application.prefs.setValue("browser.sessionstore.enabled", ss); }, | 2656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2656/cbc75d8f871199fb76139ca322f7071472469394/KF.js/clean/Firefox addon/KeeFox/modules/KF.js |
|
uninstallHandler: function() { //TODO: explain to user what will be uninstalled and offer extra // options (e.g. "Uninstall KeePass too?") // Reset prefs to pre-KeeFox settings var rs = prefs.getValue("originalPreferenceRememberSignons", false); var ss = prefs.getValue("originalPreferenceSessionStore", true); Application.prefs.setValue("signon.rememberSignons", rs); Application.prefs.setValue("browser.sessionstore.enabled", ss); }, | 2656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2656/3c2592e5e9d3dc4551a8872f0bf488025f5d20a0/KF.js/clean/Firefox addon/KeeFox/modules/KF.js |
||
uniq: function() { return this.inject([], function(array, value) { return array.include(value) ? array : array.concat([value]); | uniq: function(sorted) { return this.inject([], function(array, value, index) { if (0 == index || (sorted ? array.last() != value : !array.include(value))) array.push(value); return array; | uniq: function() { return this.inject([], function(array, value) { return array.include(value) ? array : array.concat([value]); }); }, | 6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/prototype.js/clean/web/src/main/webapp/js/prototype.js |
uniq: function(sorted) { | function uniq(sorted) { | uniq: function(sorted) { return this.inject([], function(array, value, index) { if (0 == index || (sorted ? array.last() != value : !array.include(value))) array.push(value); return array; }); }, | 6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/34175877c50897fdc4ecb46e3a9bd06ea70ff4fa/prototype.js/buggy/web/src/main/webapp/js/prototype.js |
}, | } | uniq: function(sorted) { return this.inject([], function(array, value, index) { if (0 == index || (sorted ? array.last() != value : !array.include(value))) array.push(value); return array; }); }, | 6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/34175877c50897fdc4ecb46e3a9bd06ea70ff4fa/prototype.js/buggy/web/src/main/webapp/js/prototype.js |
g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[]; | q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h= l;g.sort(w);if(h)for(var i=1;i<g.length;i++)g[i]===g[i-1]&&g.splice(i--,1)}return g};k.matches=function(g,i){return k(g,null,null,i)};k.matchesSelector=function(g,i){return k(i,null,null,[g]).length>0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p<q;p++){var u,y=o.order[p];if(u=o.leftMatch[y].exec(g)){var F=u[1];u.splice(1,1);if(F.substr(F.length-1)!=="\\"){u[1]=(u[1]||"").replace(/\\/g,"");m=o.find[y](u,i,n);if(m!=null){g=g.replace(o.match[y],"");break}}}}m||(m=i.getElementsByTagName("*")); | g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[]; | 3959 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/3959/6ffc2de1d5816f49b1cdf002161144b28f2dc6e5/jquery.js/clean/javascript/jquery.js |
y[g].nodeType===1&&k.push(t[g]);else k.push.apply(k,y);else A(y,k);if(R){o(R,q,k,l);o.uniqueSort(k)}return k};o.uniqueSort=function(g){if(C){j=n;g.sort(C);if(j)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};o.matches=function(g,h){return o(g,null,null,h)};o.find=function(g,h,k){var l,q;if(!g)return[];for(var p=0,u=m.order.length;p<u;p++){var t=m.order[p];if(q=m.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");l=m.find[t](q, | g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[]; | y[g].nodeType===1&&k.push(t[g]);else k.push.apply(k,y);else A(y,k);if(R){o(R,q,k,l);o.uniqueSort(k)}return k};o.uniqueSort=function(g){if(C){j=n;g.sort(C);if(j)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};o.matches=function(g,h){return o(g,null,null,h)};o.find=function(g,h,k){var l,q;if(!g)return[];for(var p=0,u=m.order.length;p<u;p++){var t=m.order[p];if(q=m.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");l=m.find[t](q, | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/e67dc72e11289d294cc6b462fc98149983bd62f4/jquery.js/clean/wp-includes/js/jquery/jquery.js |
t.set):t.set;if(q.length>0)C=D(x);else N=false;for(;q.length;){t=L=q.pop();if(n.relative[L])t=q.pop();else L="";if(t==null)t=j;n.relative[L](C,t,R)}}else C=[]}C||(C=x);C||l.error(L||g);if(f.call(C)==="[object Array]")if(N)if(j&&j.nodeType===1)for(g=0;C[g]!=null;g++){if(C[g]&&(C[g]===true||C[g].nodeType===1&&l.contains(j,C[g])))o.push(x[g])}else for(g=0;C[g]!=null;g++)C[g]&&C[g].nodeType===1&&o.push(x[g]);else o.push.apply(o,C);else D(C,o);if(P){l(P,p,o,m);l.uniqueSort(o)}return o};l.uniqueSort=function(g){if(w){h= k;g.sort(w);if(h)for(var j=1;j<g.length;j++)g[j]===g[j-1]&&g.splice(j--,1)}return g};l.matches=function(g,j){return l(g,null,null,j)};l.matchesSelector=function(g,j){return l(j,null,null,[g]).length>0};l.find=function(g,j,o){var m;if(!g)return[];for(var p=0,q=n.order.length;p<q;p++){var t=n.order[p],x;if(x=n.leftMatch[t].exec(g)){var C=x[1];x.splice(1,1);if(C.substr(C.length-1)!=="\\"){x[1]=(x[1]||"").replace(/\\/g,"");m=n.find[t](x,j,o);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=j.getElementsByTagName("*")); | q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h= l;g.sort(w);if(h)for(var i=1;i<g.length;i++)g[i]===g[i-1]&&g.splice(i--,1)}return g};k.matches=function(g,i){return k(g,null,null,i)};k.matchesSelector=function(g,i){return k(i,null,null,[g]).length>0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p<q;p++){var u,y=o.order[p];if(u=o.leftMatch[y].exec(g)){var F=u[1];u.splice(1,1);if(F.substr(F.length-1)!=="\\"){u[1]=(u[1]||"").replace(/\\/g,"");m=o.find[y](u,i,n);if(m!=null){g=g.replace(o.match[y],"");break}}}}m||(m=i.getElementsByTagName("*")); | t.set):t.set;if(q.length>0)C=D(x);else N=false;for(;q.length;){t=L=q.pop();if(n.relative[L])t=q.pop();else L="";if(t==null)t=j;n.relative[L](C,t,R)}}else C=[]}C||(C=x);C||l.error(L||g);if(f.call(C)==="[object Array]")if(N)if(j&&j.nodeType===1)for(g=0;C[g]!=null;g++){if(C[g]&&(C[g]===true||C[g].nodeType===1&&l.contains(j,C[g])))o.push(x[g])}else for(g=0;C[g]!=null;g++)C[g]&&C[g].nodeType===1&&o.push(x[g]);else o.push.apply(o,C);else D(C,o);if(P){l(P,p,o,m);l.uniqueSort(o)}return o};l.uniqueSort=function(g){if(w){h=k;g.sort(w);if(h)for(var j=1;j<g.length;j++)g[j]===g[j-1]&&g.splice(j--,1)}return g};l.matches=function(g,j){return l(g,null,null,j)};l.matchesSelector=function(g,j){return l(j,null,null,[g]).length>0};l.find=function(g,j,o){var m;if(!g)return[];for(var p=0,q=n.order.length;p<q;p++){var t=n.order[p],x;if(x=n.leftMatch[t].exec(g)){var C=x[1];x.splice(1,1);if(C.substr(C.length-1)!=="\\"){x[1]=(x[1]||"").replace(/\\/g,"");m=n.find[t](x,j,o);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=j.getElementsByTagName("*")); | 2459 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2459/224f99709ae7b631dc0e80310148eb2c54d2198a/jquery.js/buggy/default_www/frontend/core/js/jquery/jquery.js |
Sizzle.uniqueSort = function(results){ if ( sortOrder ) { hasDuplicate = baseHasDuplicate; results.sort(sortOrder); if ( hasDuplicate ) { for ( var i = 1; i < results.length; i++ ) { if ( results[i] === results[i-1] ) { results.splice(i--, 1); } } } } return results; }; | q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h= l;g.sort(w);if(h)for(var i=1;i<g.length;i++)g[i]===g[i-1]&&g.splice(i--,1)}return g};k.matches=function(g,i){return k(g,null,null,i)};k.matchesSelector=function(g,i){return k(i,null,null,[g]).length>0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p<q;p++){var u,y=o.order[p];if(u=o.leftMatch[y].exec(g)){var F=u[1];u.splice(1,1);if(F.substr(F.length-1)!=="\\"){u[1]=(u[1]||"").replace(/\\/g,"");m=o.find[y](u,i,n);if(m!=null){g=g.replace(o.match[y],"");break}}}}m||(m=i.getElementsByTagName("*")); | Sizzle.uniqueSort = function(results){ if ( sortOrder ) { hasDuplicate = baseHasDuplicate; results.sort(sortOrder); if ( hasDuplicate ) { for ( var i = 1; i < results.length; i++ ) { if ( results[i] === results[i-1] ) { results.splice(i--, 1); } } } } return results;}; | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/337f8a7f8f1bd9e61727ac292aa76724b4cf7a46/jquery.js/clean/wp-includes/js/jquery/jquery.js |
g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[]; | t.set):t.set;if(q.length>0)C=D(x);else N=false;for(;q.length;){t=L=q.pop();if(n.relative[L])t=q.pop();else L="";if(t==null)t=j;n.relative[L](C,t,R)}}else C=[]}C||(C=x);C||l.error(L||g);if(f.call(C)==="[object Array]")if(N)if(j&&j.nodeType===1)for(g=0;C[g]!=null;g++){if(C[g]&&(C[g]===true||C[g].nodeType===1&&l.contains(j,C[g])))o.push(x[g])}else for(g=0;C[g]!=null;g++)C[g]&&C[g].nodeType===1&&o.push(x[g]);else o.push.apply(o,C);else D(C,o);if(P){l(P,p,o,m);l.uniqueSort(o)}return o};l.uniqueSort=function(g){if(w){h= k;g.sort(w);if(h)for(var j=1;j<g.length;j++)g[j]===g[j-1]&&g.splice(j--,1)}return g};l.matches=function(g,j){return l(g,null,null,j)};l.matchesSelector=function(g,j){return l(j,null,null,[g]).length>0};l.find=function(g,j,o){var m;if(!g)return[];for(var p=0,q=n.order.length;p<q;p++){var t=n.order[p],x;if(x=n.leftMatch[t].exec(g)){var C=x[1];x.splice(1,1);if(C.substr(C.length-1)!=="\\"){x[1]=(x[1]||"").replace(/\\/g,"");m=n.find[t](x,j,o);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=j.getElementsByTagName("*")); | g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[]; | 8656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8656/debb161f7671ff5bddc8def2221db94ff111ff1b/jquery.js/clean/js/jquery.js |
t.set):t.set;if(q.length>0)C=D(x);else N=false;for(;q.length;){t=L=q.pop();if(n.relative[L])t=q.pop();else L="";if(t==null)t=j;n.relative[L](C,t,R)}}else C=[]}C||(C=x);C||l.error(L||g);if(f.call(C)==="[object Array]")if(N)if(j&&j.nodeType===1)for(g=0;C[g]!=null;g++){if(C[g]&&(C[g]===true||C[g].nodeType===1&&l.contains(j,C[g])))o.push(x[g])}else for(g=0;C[g]!=null;g++)C[g]&&C[g].nodeType===1&&o.push(x[g]);else o.push.apply(o,C);else D(C,o);if(P){l(P,p,o,m);l.uniqueSort(o)}return o};l.uniqueSort=function(g){if(w){h= k;g.sort(w);if(h)for(var j=1;j<g.length;j++)g[j]===g[j-1]&&g.splice(j--,1)}return g};l.matches=function(g,j){return l(g,null,null,j)};l.matchesSelector=function(g,j){return l(j,null,null,[g]).length>0};l.find=function(g,j,o){var m;if(!g)return[];for(var p=0,q=n.order.length;p<q;p++){var t=n.order[p],x;if(x=n.leftMatch[t].exec(g)){var C=x[1];x.splice(1,1);if(C.substr(C.length-1)!=="\\"){x[1]=(x[1]||"").replace(/\\/g,"");m=n.find[t](x,j,o);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=j.getElementsByTagName("*")); | q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h= l;g.sort(w);if(h)for(var i=1;i<g.length;i++)g[i]===g[i-1]&&g.splice(i--,1)}return g};k.matches=function(g,i){return k(g,null,null,i)};k.matchesSelector=function(g,i){return k(i,null,null,[g]).length>0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p<q;p++){var u,y=o.order[p];if(u=o.leftMatch[y].exec(g)){var F=u[1];u.splice(1,1);if(F.substr(F.length-1)!=="\\"){u[1]=(u[1]||"").replace(/\\/g,"");m=o.find[y](u,i,n);if(m!=null){g=g.replace(o.match[y],"");break}}}}m||(m=i.getElementsByTagName("*")); | t.set):t.set;if(q.length>0)C=D(x);else N=false;for(;q.length;){t=L=q.pop();if(n.relative[L])t=q.pop();else L="";if(t==null)t=j;n.relative[L](C,t,R)}}else C=[]}C||(C=x);C||l.error(L||g);if(f.call(C)==="[object Array]")if(N)if(j&&j.nodeType===1)for(g=0;C[g]!=null;g++){if(C[g]&&(C[g]===true||C[g].nodeType===1&&l.contains(j,C[g])))o.push(x[g])}else for(g=0;C[g]!=null;g++)C[g]&&C[g].nodeType===1&&o.push(x[g]);else o.push.apply(o,C);else D(C,o);if(P){l(P,p,o,m);l.uniqueSort(o)}return o};l.uniqueSort=function(g){if(w){h=k;g.sort(w);if(h)for(var j=1;j<g.length;j++)g[j]===g[j-1]&&g.splice(j--,1)}return g};l.matches=function(g,j){return l(g,null,null,j)};l.matchesSelector=function(g,j){return l(j,null,null,[g]).length>0};l.find=function(g,j,o){var m;if(!g)return[];for(var p=0,q=n.order.length;p<q;p++){var t=n.order[p],x;if(x=n.leftMatch[t].exec(g)){var C=x[1];x.splice(1,1);if(C.substr(C.length-1)!=="\\"){x[1]=(x[1]||"").replace(/\\/g,"");m=n.find[t](x,j,o);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=j.getElementsByTagName("*")); | 2459 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2459/224f99709ae7b631dc0e80310148eb2c54d2198a/jquery.js/buggy/default_www/backend/core/js/jquery/jquery.js |
y[g].nodeType===1&&k.push(t[g]);else k.push.apply(k,y);else A(y,k);if(R){o(R,q,k,l);o.uniqueSort(k)}return k};o.uniqueSort=function(g){if(C){j=n;g.sort(C);if(j)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};o.matches=function(g,h){return o(g,null,null,h)};o.find=function(g,h,k){var l,q;if(!g)return[];for(var p=0,u=m.order.length;p<u;p++){var t=m.order[p];if(q=m.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");l=m.find[t](q, | g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[]; | y[g].nodeType===1&&k.push(t[g]);else k.push.apply(k,y);else A(y,k);if(R){o(R,q,k,l);o.uniqueSort(k)}return k};o.uniqueSort=function(g){if(C){j=n;g.sort(C);if(j)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};o.matches=function(g,h){return o(g,null,null,h)};o.find=function(g,h,k){var l,q;if(!g)return[];for(var p=0,u=m.order.length;p<u;p++){var t=m.order[p];if(q=m.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");l=m.find[t](q, | 8560 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8560/4d748e5cbfcbd91691b089e42cffdf43918e6201/jquery.min.js/clean/web/javascript/jquery/jquery.min.js |
g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[]; | t.set):t.set;if(q.length>0)C=D(x);else N=false;for(;q.length;){t=L=q.pop();if(n.relative[L])t=q.pop();else L="";if(t==null)t=j;n.relative[L](C,t,R)}}else C=[]}C||(C=x);C||l.error(L||g);if(f.call(C)==="[object Array]")if(N)if(j&&j.nodeType===1)for(g=0;C[g]!=null;g++){if(C[g]&&(C[g]===true||C[g].nodeType===1&&l.contains(j,C[g])))o.push(x[g])}else for(g=0;C[g]!=null;g++)C[g]&&C[g].nodeType===1&&o.push(x[g]);else o.push.apply(o,C);else D(C,o);if(P){l(P,p,o,m);l.uniqueSort(o)}return o};l.uniqueSort=function(g){if(w){h= k;g.sort(w);if(h)for(var j=1;j<g.length;j++)g[j]===g[j-1]&&g.splice(j--,1)}return g};l.matches=function(g,j){return l(g,null,null,j)};l.matchesSelector=function(g,j){return l(j,null,null,[g]).length>0};l.find=function(g,j,o){var m;if(!g)return[];for(var p=0,q=n.order.length;p<q;p++){var t=n.order[p],x;if(x=n.leftMatch[t].exec(g)){var C=x[1];x.splice(1,1);if(C.substr(C.length-1)!=="\\"){x[1]=(x[1]||"").replace(/\\/g,"");m=n.find[t](x,j,o);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=j.getElementsByTagName("*")); | g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[]; | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/8e2f21f44411204c60060f830cb1a800533462d2/jquery.js/buggy/wp-includes/js/jquery/jquery.js |
0;u[c]!=null;c++)u[c]&&u[c].nodeType===1&&i.push(s[c]);else i.push.apply(i,u);else K(u,i);if(J){p(J,n,i,j);p.uniqueSort(i)}return i};p.uniqueSort=function(c){if(L){l=q;c.sort(L);if(l)for(var f=1;f<c.length;f++)c[f]===c[f-1]&&c.splice(f--,1)}return c};p.matches=function(c,f){return p(c,null,null,f)};p.find=function(c,f,i){var j,n;if(!c)return[];for(var m=0,t=o.order.length;m<t;m++){var s=o.order[m];if(n=o.leftMatch[s].exec(c)){var u=n[1];n.splice(1,1);if(u.substr(u.length-1)!=="\\"){n[1]=(n[1]||"").replace(/\\/g, | 0;u[d]!=null;d++)u[d]&&u[d].nodeType===1&&i.push(s[d]);else i.push.apply(i,u);else K(u,i);if(J){p(J,n,i,j);p.uniqueSort(i)}return i};p.uniqueSort=function(d){if(L){l=q;d.sort(L);if(l)for(var g=1;g<d.length;g++)d[g]===d[g-1]&&d.splice(g--,1)}return d};p.matches=function(d,g){return p(d,null,null,g)};p.find=function(d,g,i){var j,n;if(!d)return[];for(var m=0,t=o.order.length;m<t;m++){var s=o.order[m];if(n=o.leftMatch[s].exec(d)){var u=n[1];n.splice(1,1);if(u.substr(u.length-1)!=="\\"){n[1]=(n[1]||"").replace(/\\/g, | 0;u[c]!=null;c++)u[c]&&u[c].nodeType===1&&i.push(s[c]);else i.push.apply(i,u);else K(u,i);if(J){p(J,n,i,j);p.uniqueSort(i)}return i};p.uniqueSort=function(c){if(L){l=q;c.sort(L);if(l)for(var f=1;f<c.length;f++)c[f]===c[f-1]&&c.splice(f--,1)}return c};p.matches=function(c,f){return p(c,null,null,f)};p.find=function(c,f,i){var j,n;if(!c)return[];for(var m=0,t=o.order.length;m<t;m++){var s=o.order[m];if(n=o.leftMatch[s].exec(c)){var u=n[1];n.splice(1,1);if(u.substr(u.length-1)!=="\\"){n[1]=(n[1]||"").replace(/\\/g, | 5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/bb76d586bec69eabec79913009e9ba30d248e123/jquery.min.js/buggy/src/web/skeleton/jquery.min.js |
(E||g);if(i.call(y)==="[object Array]")if(I)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&F(h,y[g])))k.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&k.push(u[g]);else k.push.apply(k,y);else B(y,k);if(S){p(S,r,k,m);p.uniqueSort(k)}return k};p.uniqueSort=function(g){if(D){j=o;g.sort(D);if(j)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};p.matches=function(g,h){return p(g,null,null,h)};p.find=function(g,h,k){var m,r;if(!g)return[]; | y[g].nodeType===1&&k.push(t[g]);else k.push.apply(k,y);else A(y,k);if(R){o(R,q,k,l);o.uniqueSort(k)}return k};o.uniqueSort=function(g){if(C){j=n;g.sort(C);if(j)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};o.matches=function(g,h){return o(g,null,null,h)};o.find=function(g,h,k){var l,q;if(!g)return[];for(var p=0,u=m.order.length;p<u;p++){var t=m.order[p];if(q=m.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");l=m.find[t](q, | (E||g);if(i.call(y)==="[object Array]")if(I)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&F(h,y[g])))k.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&k.push(u[g]);else k.push.apply(k,y);else B(y,k);if(S){p(S,r,k,m);p.uniqueSort(k)}return k};p.uniqueSort=function(g){if(D){j=o;g.sort(D);if(j)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};p.matches=function(g,h){return p(g,null,null,h)};p.find=function(g,h,k){var m,r;if(!g)return[]; | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/59fd2fb902fce80768d38770b0d96a19623d08d2/jquery.js/buggy/wp-includes/js/jquery/jquery.js |
l.on('selectionChange',function(m){var n=l.getCommand('unlink'),o=m.data.path.lastElement.getAscendant('a',true);if(o&&o.getName()=='a'&&o.getAttribute('href'))n.setState(2);else n.setState(0);});if(l.addMenuItems)l.addMenuItems({anchor:{label:l.lang.anchor.menu,command:'anchor',group:'anchor'},link:{label:l.lang.link.menu,command:'link',group:'link',order:1},unlink:{label:l.lang.unlink,command:'unlink',group:'link',order:5}});if(l.contextMenu)l.contextMenu.addListener(function(m,n){if(!m)return null;var o=m.is('img')&&m.getAttribute('_cke_real_element_type')=='anchor';if(!o){if(!(m=j.link.getSelectedLink(l)))return null;o=m.getAttribute('name')&&!m.getAttribute('href');}return o?{anchor:2}:{link:2,unlink:2};});},afterInit:function(l){var m=l.dataProcessor,n=m&&m.dataFilter;if(n)n.addRules({elements:{a:function(o){var p=o.attributes;if(p.name&&!p.href)return l.createFakeParserElement(o,'cke_anchor','anchor');}}});},requires:['fakeobjects']});j.link={getSelectedLink:function(l){var m;try{m=l.getSelection().getRanges()[0];}catch(o){return null;}m.shrink(a.SHRINK_TEXT);var n=m.getCommonAncestor();return n.getAscendant('a',true);}};a.unlinkCommand=function(){};a.unlinkCommand.prototype={exec:function(l){var m=l.getSelection(),n=m.createBookmarks(),o=m.getRanges(),p,q;for(var r=0;r<o.length;r++){p=o[r].getCommonAncestor(true);q=p.getAscendant('a',true);if(!q)continue;o[r].selectNodeContents(q);}m.selectRanges(o);l.document.$.execCommand('unlink',false,null);m.selectBookmarks(n);},startDisabled:true};e.extend(i,{linkShowAdvancedTab:true,linkShowTargetTab:true});(function(){var l={ol:1,ul:1},m=/^[\n\r\t ]*$/;j.list={listToArray:function(A,B,C,D,E){if(!l[A.getName()])return[];if(!D)D=0;if(!C)C=[];for(var F=0,G=A.getChildCount();F<G;F++){var H=A.getChild(F);if(H.$.nodeName.toLowerCase()!='li')continue;var I={parent:A,indent:D,element:H,contents:[]};if(!E){I.grandparent=A.getParent();if(I.grandparent&&I.grandparent.$.nodeName.toLowerCase()=='li')I.grandparent=I.grandparent.getParent();}else I.grandparent=E;if(B)h.setMarker(B,H,'listarray_index',C.length);C.push(I);for(var J=0,K=H.getChildCount(),L;J<K;J++){L=H.getChild(J);if(L.type==1&&l[L.getName()])j.list.listToArray(L,B,C,D+1,I.grandparent);else I.contents.push(L);}}return C;},arrayToList:function(A,B,C,D){if(!C)C=0;if(!A||A.length<C+1)return null;var E=A[C].parent.getDocument(),F=new d.documentFragment(E),G=null,H=C,I=Math.max(A[C].indent,0),J=null,K=D==1?'p':'div';for(;;){var L=A[H];if(L.indent==I){if(!G||A[H].parent.getName()!=G.getName()){G=A[H].parent.clone(false,true); | j.add('link',{init:function(l){l.addCommand('link',new a.dialogCommand('link'));l.addCommand('anchor',new a.dialogCommand('anchor'));l.addCommand('unlink',new a.unlinkCommand());l.ui.addButton('Link',{label:l.lang.link.toolbar,command:'link'});l.ui.addButton('Unlink',{label:l.lang.unlink,command:'unlink'});l.ui.addButton('Anchor',{label:l.lang.anchor.toolbar,command:'anchor'});a.dialog.add('link',this.path+'dialogs/link.js');a.dialog.add('anchor',this.path+'dialogs/anchor.js');l.addCss('img.cke_anchor{background-image: url('+a.getUrl(this.path+'images/anchor.gif')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'width: 18px !important;'+'height: 18px !important;'+'}\n'+'a.cke_anchor'+'{'+'background-image: url('+a.getUrl(this.path+'images/anchor.gif')+');'+'background-position: 0 center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'padding-left: 18px;'+'}');l.on('selectionChange',function(m){var n=l.getCommand('unlink'),o=m.data.path.lastElement&&m.data.path.lastElement.getAscendant('a',true);if(o&&o.getName()=='a'&&o.getAttribute('href'))n.setState(2);else n.setState(0);});l.on('doubleclick',function(m){var n=j.link.getSelectedLink(l)||m.data.element;if(n.is('a'))m.data.dialog=n.getAttribute('name')&&!n.getAttribute('href')?'anchor':'link';else if(n.is('img')&&n.getAttribute('_cke_real_element_type')=='anchor')m.data.dialog='anchor';});if(l.addMenuItems)l.addMenuItems({anchor:{label:l.lang.anchor.menu,command:'anchor',group:'anchor'},link:{label:l.lang.link.menu,command:'link',group:'link',order:1},unlink:{label:l.lang.unlink,command:'unlink',group:'link',order:5}});if(l.contextMenu)l.contextMenu.addListener(function(m,n){if(!m||m.isReadOnly())return null;var o=m.is('img')&&m.getAttribute('_cke_real_element_type')=='anchor';if(!o){if(!(m=j.link.getSelectedLink(l)))return null;o=m.getAttribute('name')&&!m.getAttribute('href');}return o?{anchor:2}:{link:2,unlink:2};});},afterInit:function(l){var m=l.dataProcessor,n=m&&m.dataFilter;if(n)n.addRules({elements:{a:function(o){var p=o.attributes;if(p.name&&!p.href)return l.createFakeParserElement(o,'cke_anchor','anchor');}}});},requires:['fakeobjects']});j.link={getSelectedLink:function(l){try{var m=l.getSelection();if(m.getType()==3){var n=m.getSelectedElement();if(n.is('a'))return n;}var o=m.getRanges(true)[0];o.shrink(2);var p=o.getCommonAncestor();return p.getAscendant('a',true);}catch(q){return null;}}};a.unlinkCommand=function(){};a.unlinkCommand.prototype={exec:function(l){var m=l.getSelection(),n=m.createBookmarks(),o=m.getRanges(),p,q; | l.on('selectionChange',function(m){var n=l.getCommand('unlink'),o=m.data.path.lastElement.getAscendant('a',true);if(o&&o.getName()=='a'&&o.getAttribute('href'))n.setState(2);else n.setState(0);});if(l.addMenuItems)l.addMenuItems({anchor:{label:l.lang.anchor.menu,command:'anchor',group:'anchor'},link:{label:l.lang.link.menu,command:'link',group:'link',order:1},unlink:{label:l.lang.unlink,command:'unlink',group:'link',order:5}});if(l.contextMenu)l.contextMenu.addListener(function(m,n){if(!m)return null;var o=m.is('img')&&m.getAttribute('_cke_real_element_type')=='anchor';if(!o){if(!(m=j.link.getSelectedLink(l)))return null;o=m.getAttribute('name')&&!m.getAttribute('href');}return o?{anchor:2}:{link:2,unlink:2};});},afterInit:function(l){var m=l.dataProcessor,n=m&&m.dataFilter;if(n)n.addRules({elements:{a:function(o){var p=o.attributes;if(p.name&&!p.href)return l.createFakeParserElement(o,'cke_anchor','anchor');}}});},requires:['fakeobjects']});j.link={getSelectedLink:function(l){var m;try{m=l.getSelection().getRanges()[0];}catch(o){return null;}m.shrink(a.SHRINK_TEXT);var n=m.getCommonAncestor();return n.getAscendant('a',true);}};a.unlinkCommand=function(){};a.unlinkCommand.prototype={exec:function(l){var m=l.getSelection(),n=m.createBookmarks(),o=m.getRanges(),p,q;for(var r=0;r<o.length;r++){p=o[r].getCommonAncestor(true);q=p.getAscendant('a',true);if(!q)continue;o[r].selectNodeContents(q);}m.selectRanges(o);l.document.$.execCommand('unlink',false,null);m.selectBookmarks(n);},startDisabled:true};e.extend(i,{linkShowAdvancedTab:true,linkShowTargetTab:true});(function(){var l={ol:1,ul:1},m=/^[\n\r\t ]*$/;j.list={listToArray:function(A,B,C,D,E){if(!l[A.getName()])return[];if(!D)D=0;if(!C)C=[];for(var F=0,G=A.getChildCount();F<G;F++){var H=A.getChild(F);if(H.$.nodeName.toLowerCase()!='li')continue;var I={parent:A,indent:D,element:H,contents:[]};if(!E){I.grandparent=A.getParent();if(I.grandparent&&I.grandparent.$.nodeName.toLowerCase()=='li')I.grandparent=I.grandparent.getParent();}else I.grandparent=E;if(B)h.setMarker(B,H,'listarray_index',C.length);C.push(I);for(var J=0,K=H.getChildCount(),L;J<K;J++){L=H.getChild(J);if(L.type==1&&l[L.getName()])j.list.listToArray(L,B,C,D+1,I.grandparent);else I.contents.push(L);}}return C;},arrayToList:function(A,B,C,D){if(!C)C=0;if(!A||A.length<C+1)return null;var E=A[C].parent.getDocument(),F=new d.documentFragment(E),G=null,H=C,I=Math.max(A[C].indent,0),J=null,K=D==1?'p':'div';for(;;){var L=A[H];if(L.indent==I){if(!G||A[H].parent.getName()!=G.getName()){G=A[H].parent.clone(false,true); | 8656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8656/debb161f7671ff5bddc8def2221db94ff111ff1b/ckeditor.js/buggy/ckeditor/ckeditor.js |
return f},show:function(){a.style.height=I+"px";if(l)l.style.height=G+"px";return f},isHidden:function(){return l&&parseInt(l.style.height,10)===0},load:function(g){if(!l&&f._fireEvent("onBeforeLoad")!==false){o(e,function(){this.unload()});if((F=a.innerHTML)&&!flashembed.isSupported(b.version))a.innerHTML="";flashembed(a,b,{config:c});if(g){g.cached=true;y(w,"onLoad",g)}}return f},unload:function(){if(F.replace(/\s/g,"")!==""){if(f._fireEvent("onBeforeUnload")===false)return f;try{if(l){l.fp_close(); | return f},show:function(){a.style.height=G+"px";if(l)l.style.height=H+"px";return f},isHidden:function(){return l&&parseInt(l.style.height,10)===0},load:function(g){if(!l&&f._fireEvent("onBeforeLoad")!==false){o(e,function(){this.unload()});if((F=a.innerHTML)&&!flashembed.isSupported(b.version))a.innerHTML="";flashembed(a,b,{config:c});if(g){g.cached=true;y(w,"onLoad",g)}}return f},unload:function(){if(F.replace(/\s/g,"")!==""){if(f._fireEvent("onBeforeUnload")===false)return f;try{if(l){l.fp_close(); | return f},show:function(){a.style.height=I+"px";if(l)l.style.height=G+"px";return f},isHidden:function(){return l&&parseInt(l.style.height,10)===0},load:function(g){if(!l&&f._fireEvent("onBeforeLoad")!==false){o(e,function(){this.unload()});if((F=a.innerHTML)&&!flashembed.isSupported(b.version))a.innerHTML="";flashembed(a,b,{config:c});if(g){g.cached=true;y(w,"onLoad",g)}}return f},unload:function(){if(F.replace(/\s/g,"")!==""){if(f._fireEvent("onBeforeUnload")===false)return f;try{if(l){l.fp_close();f._fireEvent("onUnload")}}catch(g){}l=null;a.innerHTML=F}return f},getClip:function(g){if(g===undefined)g=x;return k[g]},getCommonClip:function(){return h},getPlaylist:function(){return k},getPlugin:function(g){var q=r[g];if(!q&&f.isLoaded()){var i=f._api().fp_getPlugin(g);if(i){q=new d(g,i,f);r[g]=q}}return q},getScreen:function(){return f.getPlugin("screen")},getControls:function(){return f.getPlugin("controls")},getConfig:function(g){return g?z(c):c},getFlashParams:function(){return b},loadPlugin:function(g, | 2604 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2604/7afbf9795e0d90b71fcbf9a5261296dc645382ce/html5media.min.js/clean/conference/static/conference/html5media-1.1.2/html5media/html5media.min.js |
}}});}});a.on('dialogDefinition',function(p){var q=p.data.name;if(q=='table'||q=='tableProperties'){var r=p.data.definition,s=r.getContents('info'),t=s.get('txtBorder'),u=t.commit;t.commit=e.override(u,function(v){return function(w,x){v.apply(this,arguments);var y=parseInt(this.getValue(),10);x[!y||y<=0?'addClass':'removeClass'](l);};});}});})();j.add('sourcearea',{requires:['editingblock'],init:function(l){var m=j.sourcearea,n=a.document.getWindow();l.on('editingBlockReady',function(){var o,p;l.addMode('source',{load:function(q,r){if(c&&b.version<8)q.setStyle('position','relative');l.textarea=o=new h('textarea');o.setAttributes({dir:'ltr',tabIndex:l.tabIndex,role:'textbox','aria-label':l.lang.editorTitle.replace('%1',l.name)});o.addClass('cke_source');o.addClass('cke_enable_context_menu');var s={width:b.ie7Compat?'99%':'100%',height:'100%',resize:'none',outline:'none','text-align':'left'};if(c){p=function(){o.hide();o.setStyle('height',q.$.clientHeight+'px');o.setStyle('width',q.$.clientWidth+'px');o.show();};l.on('resize',p);n.on('resize',p);setTimeout(p,0);}else o.on('mousedown',function(u){u.data.stopPropagation();});q.setHtml('');q.append(o);o.setStyles(s);l.fire('ariaWidget',o);o.on('blur',function(){l.focusManager.blur();});o.on('focus',function(){l.focusManager.focus();});l.mayBeDirty=true;this.loadData(r);var t=l.keystrokeHandler;if(t)t.attach(o);setTimeout(function(){l.mode='source';l.fire('mode');},b.gecko||b.webkit?100:0);},loadData:function(q){o.setValue(q);l.fire('dataReady');},getData:function(){return o.getValue();},getSnapshotData:function(){return o.getValue();},unload:function(q){o.clearCustomData();l.textarea=o=null;if(p){l.removeListener('resize',p);n.removeListener('resize',p);}if(c&&b.version<8)q.removeStyle('position');},focus:function(){o.focus();}});});l.addCommand('source',m.commands.source);if(l.ui.addButton)l.ui.addButton('Source',{label:l.lang.source,command:'source'});l.on('mode',function(){l.getCommand('source').setState(l.mode=='source'?1:2);});}});j.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},exec:function(l){if(l.mode=='wysiwyg')l.fire('saveSnapshot');l.getCommand('source').setState(0);l.setMode(l.mode=='source'?'wysiwyg':'source');},canUndo:false}}};(function(){j.add('stylescombo',{requires:['richcombo','styles'],init:function(m){var n=m.config,o=m.lang.stylesCombo,p={},q=[];function r(s){m.getStylesSet(function(t){if(!q.length){var u,v;for(var w=0;w<t.length;w++){var x=t[w];v=x.name;u=p[v]=new a.style(x);u._name=v; | l.fire('ariaWidget',o);o.on('blur',function(){l.focusManager.blur();});o.on('focus',function(){l.focusManager.focus();});l.mayBeDirty=true;this.loadData(r);var t=l.keystrokeHandler;if(t)t.attach(o);setTimeout(function(){l.mode='source';l.fire('mode');},b.gecko||b.webkit?100:0);},loadData:function(q){o.setValue(q);l.fire('dataReady');},getData:function(){return o.getValue();},getSnapshotData:function(){return o.getValue();},unload:function(q){o.clearCustomData();l.textarea=o=null;if(p){l.removeListener('resize',p);n.removeListener('resize',p);}if(c&&b.version<8)q.removeStyle('position');},focus:function(){o.focus();}});});l.addCommand('source',m.commands.source);if(l.ui.addButton)l.ui.addButton('Source',{label:l.lang.source,command:'source'});l.on('mode',function(){l.getCommand('source').setState(l.mode=='source'?1:2);});}});j.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:false,exec:function(l){if(l.mode=='wysiwyg')l.fire('saveSnapshot');l.getCommand('source').setState(0);l.setMode(l.mode=='source'?'wysiwyg':'source');},canUndo:false}}};(function(){j.add('stylescombo',{requires:['richcombo','styles'],init:function(m){var n=m.config,o=m.lang.stylesCombo,p={},q=[];function r(s){m.getStylesSet(function(t){if(!q.length){var u,v;for(var w=0;w<t.length;w++){var x=t[w];v=x.name;u=p[v]=new a.style(x);u._name=v;u._.enterMode=n.enterMode;q.push(u);}q.sort(l);}s&&s();});};m.ui.addRichCombo('Styles',{label:o.label,title:o.panelTitle,className:'cke_styles',panel:{css:m.skin.editor.css.concat(n.contentsCss),multiSelect:true,attributes:{'aria-label':o.panelTitle}},init:function(){var s=this;r(function(){var t,u,v;for(var w=0;w<q.length;w++){t=q[w];u=t._name;var x=t.type;if(x!=v){s.startGroup(o['panelTitle'+String(x)]);v=x;}s.add(u,t.type==3?u:t.buildPreview(),u);}s.commit();s.onOpen();});},onClick:function(s){m.focus();m.fire('saveSnapshot');var t=p[s],u=m.getSelection(),v=new d.elementPath(u.getStartElement());if(t.type==2&&t.checkActive(v))t.remove(m.document);else if(t.type==3&&t.checkActive(v))t.remove(m.document);else t.apply(m.document);m.fire('saveSnapshot');},onRender:function(){m.on('selectionChange',function(s){var t=this.getValue(),u=s.data.path,v=u.elements;for(var w=0,x;w<v.length;w++){x=v[w];for(var y in p){if(p[y].checkElementRemovable(x,true)){if(y!=t)this.setValue(y);return;}}}this.setValue('');},this);},onOpen:function(){var z=this;if(c||b.webkit)m.focus();var s=m.getSelection(),t=s.getSelectedElement(),u=new d.elementPath(t||s.getStartElement()),v=[0,0,0,0]; | }}});}});a.on('dialogDefinition',function(p){var q=p.data.name;if(q=='table'||q=='tableProperties'){var r=p.data.definition,s=r.getContents('info'),t=s.get('txtBorder'),u=t.commit;t.commit=e.override(u,function(v){return function(w,x){v.apply(this,arguments);var y=parseInt(this.getValue(),10);x[!y||y<=0?'addClass':'removeClass'](l);};});}});})();j.add('sourcearea',{requires:['editingblock'],init:function(l){var m=j.sourcearea,n=a.document.getWindow();l.on('editingBlockReady',function(){var o,p;l.addMode('source',{load:function(q,r){if(c&&b.version<8)q.setStyle('position','relative');l.textarea=o=new h('textarea');o.setAttributes({dir:'ltr',tabIndex:l.tabIndex,role:'textbox','aria-label':l.lang.editorTitle.replace('%1',l.name)});o.addClass('cke_source');o.addClass('cke_enable_context_menu');var s={width:b.ie7Compat?'99%':'100%',height:'100%',resize:'none',outline:'none','text-align':'left'};if(c){p=function(){o.hide();o.setStyle('height',q.$.clientHeight+'px');o.setStyle('width',q.$.clientWidth+'px');o.show();};l.on('resize',p);n.on('resize',p);setTimeout(p,0);}else o.on('mousedown',function(u){u.data.stopPropagation();});q.setHtml('');q.append(o);o.setStyles(s);l.fire('ariaWidget',o);o.on('blur',function(){l.focusManager.blur();});o.on('focus',function(){l.focusManager.focus();});l.mayBeDirty=true;this.loadData(r);var t=l.keystrokeHandler;if(t)t.attach(o);setTimeout(function(){l.mode='source';l.fire('mode');},b.gecko||b.webkit?100:0);},loadData:function(q){o.setValue(q);l.fire('dataReady');},getData:function(){return o.getValue();},getSnapshotData:function(){return o.getValue();},unload:function(q){o.clearCustomData();l.textarea=o=null;if(p){l.removeListener('resize',p);n.removeListener('resize',p);}if(c&&b.version<8)q.removeStyle('position');},focus:function(){o.focus();}});});l.addCommand('source',m.commands.source);if(l.ui.addButton)l.ui.addButton('Source',{label:l.lang.source,command:'source'});l.on('mode',function(){l.getCommand('source').setState(l.mode=='source'?1:2);});}});j.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},exec:function(l){if(l.mode=='wysiwyg')l.fire('saveSnapshot');l.getCommand('source').setState(0);l.setMode(l.mode=='source'?'wysiwyg':'source');},canUndo:false}}};(function(){j.add('stylescombo',{requires:['richcombo','styles'],init:function(m){var n=m.config,o=m.lang.stylesCombo,p={},q=[];function r(s){m.getStylesSet(function(t){if(!q.length){var u,v;for(var w=0;w<t.length;w++){var x=t[w];v=x.name;u=p[v]=new a.style(x);u._name=v; | 8656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8656/debb161f7671ff5bddc8def2221db94ff111ff1b/ckeditor.js/buggy/ckeditor/ckeditor.js |
node.removeAttribute('_countedByPrototype'); | node._countedByPrototype = undefined; | unmark: function(nodes) { for (var i = 0, node; node = nodes[i]; i++) node.removeAttribute('_countedByPrototype'); return nodes; } | 6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/34175877c50897fdc4ecb46e3a9bd06ea70ff4fa/prototype.js/clean/web/src/main/webapp/js/prototype.js |
} | }, | unmark: function(nodes) { for (var i = 0, node; node = nodes[i]; i++) node.removeAttribute('_countedByPrototype'); return nodes; } | 6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/34175877c50897fdc4ecb46e3a9bd06ea70ff4fa/prototype.js/clean/web/src/main/webapp/js/prototype.js |
if(Sortable._marker) Element.hide(Sortable._marker); | if(Sortable._marker) Sortable._marker.hide(); | unmark: function() { if(Sortable._marker) Element.hide(Sortable._marker); }, | 6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/dragdrop.js/buggy/web/src/main/webapp/js/dragdrop.js |
} | }; | fb.unpack = function (color) { if (color.length == 7) { return [parseInt('0x' + color.substring(1, 3)) / 255, parseInt('0x' + color.substring(3, 5)) / 255, parseInt('0x' + color.substring(5, 7)) / 255]; } else if (color.length == 4) { return [parseInt('0x' + color.substring(1, 2)) / 15, parseInt('0x' + color.substring(2, 3)) / 15, parseInt('0x' + color.substring(3, 4)) / 15]; } } | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/d60ded9228f166049d90a7f9237a2faeb9423b47/farbtastic.js/clean/wp-admin/js/farbtastic.js |
unregister: function(responderToRemove) { this.responders = this.responders.without(responderToRemove); | unregister: function(responder) { this.responders = this.responders.without(responder); | unregister: function(responderToRemove) { this.responders = this.responders.without(responderToRemove); }, | 6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/prototype.js/clean/web/src/main/webapp/js/prototype.js |
unset: function(key) { var value = this._object[key]; delete this._object[key]; return value; }, | function unset(key) { var value = this._object[key]; delete this._object[key]; return value; } | unset: function(key) { var value = this._object[key]; delete this._object[key]; return value; }, | 6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/34175877c50897fdc4ecb46e3a9bd06ea70ff4fa/prototype.js/buggy/web/src/main/webapp/js/prototype.js |
g.getElement(a))&&a.parentNode.removeChild(a)};this.unstub=function(a,b,e){if(e==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8); | b){return a.nodeType==1&&a.tagName.toUpperCase()===b};this.insertAt=function(a,b,e){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[e])};this.remove=function(a){(a=h.getElement(a))&&a.parentNode.removeChild(a)};this.unstub=function(a,b,e){if(e==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width= a.style.width};this.unwrap=function(a){a=h.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);h.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(h.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img"); | g.getElement(a))&&a.parentNode.removeChild(a)};this.unstub=function(a,b,e){if(e==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8); | 5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/3b5851a0b7bf3537f85cb0ca962bb299b0ff8b6f/Wt.min.js/clean/src/web/skeleton/Wt.min.js |
b){return a.nodeType==1&&a.tagName.toUpperCase()===b};this.insertAt=function(a,b,f){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[f])};this.remove=function(a){(a=g.getElement(a))&&a.parentNode.removeChild(a)};this.unstub=function(a,b,f){if(f==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width= a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img"); | b){return a.nodeType==1&&a.tagName.toUpperCase()===b};this.insertAt=function(a,b,f){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[f])};this.remove=function(a){(a=g.getElement(a))&&a.parentNode.removeChild(a)};this.contains=function(a,b){for(b=b.parentNode;b!=null&&b.tagName.toLowerCase()!="body";){if(b==a)return true;b=b.parentNode}return false};this.unstub=function(a,b,f){if(f==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position; b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")== | b){return a.nodeType==1&&a.tagName.toUpperCase()===b};this.insertAt=function(a,b,f){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[f])};this.remove=function(a){(a=g.getElement(a))&&a.parentNode.removeChild(a)};this.unstub=function(a,b,f){if(f==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img"); | 5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/ca3c6e1b6446cca6cde3b6ac8be698303e362058/Wt.min.js/buggy/src/web/skeleton/Wt.min.js |
0?a.appendChild(b):a.insertBefore(b,a.childNodes[e])};this.unstub=function(a,b,e){if(e==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=h.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8); | 0?a.appendChild(b):a.insertBefore(b,a.childNodes[e])};this.unstub=function(a,b,e){if(e==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8); | 0?a.appendChild(b):a.insertBefore(b,a.childNodes[e])};this.unstub=function(a,b,e){if(e==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=h.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8); | 5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/39b9f5b40482b7e33a2708ec6d23efea2fa51ac4/Wt.min.js/clean/src/web/skeleton/Wt.min.js |
0?a.appendChild(b):a.insertBefore(b,a.childNodes[e])};this.unstub=function(a,b,e){if(e==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8); | 0?a.appendChild(b):a.insertBefore(b,a.childNodes[e])};this.unstub=function(a,b,e){if(e==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=h.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8); | 0?a.appendChild(b):a.insertBefore(b,a.childNodes[e])};this.unstub=function(a,b,e){if(e==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8); | 5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/65fe37986780ab872c458deb4869dc6cf286a0cf/Wt.min.js/buggy/src/web/skeleton/Wt.min.js |
this.hasTag=function(a,b){return a.tagName.toUpperCase()===b};this.insertAt=function(a,b,f){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[f])};this.unstub=function(a,b,f){if(f==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=k.getElement(a); | "application/xhtml+xml").documentElement;if(l.nodeType!=1)l=l.nextSibling;if(!f)a.innerHTML="";b=0;for(f=l.childNodes.length;b<f;)a.appendChild(m(l.childNodes[b++],true))}};this.hasTag=function(a,b){return a.tagName.toUpperCase()===b};this.insertAt=function(a,b,f){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[f])};this.unstub=function(a,b,f){if(f==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left; b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=k.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;b.style.margin=a.style.margin;a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(k.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a, | this.hasTag=function(a,b){return a.tagName.toUpperCase()===b};this.insertAt=function(a,b,f){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[f])};this.unstub=function(a,b,f){if(f==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=k.getElement(a); | 5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/a369471cf3758972a67918133124dc8066bd63aa/Wt.min.js/buggy/src/web/skeleton/Wt.min.js |
g.getElement(a))&&a.parentNode.removeChild(a)};this.unstub=function(a,b,e){if(e==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8); g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var e,k;e=0;for(k=a.attributes.length;e<k;e++){var h=a.attributes[e].nodeName; h!="type"&&h!="name"&&b.setAttribute(h,a.getAttribute(h))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&& | a.style.width};this.unwrap=function(a){a=h.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);h.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(h.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img"); if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var e,j;e=0;for(j=a.attributes.length;e<j;e++){var l=a.attributes[e].nodeName;l!="type"&&l!="name"&&b.setAttribute(l,a.getAttribute(l))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?h.CancelAll:b;if(b&h.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b& | g.getElement(a))&&a.parentNode.removeChild(a)};this.unstub=function(a,b,e){if(e==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var e,k;e=0;for(k=a.attributes.length;e<k;e++){var h=a.attributes[e].nodeName;h!="type"&&h!="name"&&b.setAttribute(h,a.getAttribute(h))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&& | 5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/3b5851a0b7bf3537f85cb0ca962bb299b0ff8b6f/Wt.min.js/clean/src/web/skeleton/Wt.min.js |
a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img"); if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,l;f=0;for(l=a.attributes.length;f<l;f++){var n=a.attributes[f].nodeName;n!="type"&&n!="name"&&b.setAttribute(n,a.getAttribute(n))}}a.parentNode.replaceChild(b,a)}}};var N=false;this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){if(!N){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue= | b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")== "submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,l;f=0;for(l=a.attributes.length;f<l;f++){var n=a.attributes[f].nodeName;n!="type"&&n!="name"&&b.setAttribute(n,a.getAttribute(n))}}a.parentNode.replaceChild(b,a)}}};var N=false;this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll= | a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,l;f=0;for(l=a.attributes.length;f<l;f++){var n=a.attributes[f].nodeName;n!="type"&&n!="name"&&b.setAttribute(n,a.getAttribute(n))}}a.parentNode.replaceChild(b,a)}}};var N=false;this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){if(!N){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue= | 5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/ca3c6e1b6446cca6cde3b6ac8be698303e362058/Wt.min.js/buggy/src/web/skeleton/Wt.min.js |
d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments, | wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, | d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments, | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/e67dc72e11289d294cc6b462fc98149983bd62f4/jquery.js/clean/wp-includes/js/jquery/jquery.js |
wrapped.setAttribute('style', e.getAttribute('style')); | if (WT.isIE) wrapped.style.setAttribute('cssText', e.getAttribute('style')); else wrapped.setAttribute('style', e.getAttribute('style')); | this.unwrap = function(e) { e = WT.getElement(e); if (e.parentNode.className.indexOf('Wt-wrap') == 0) { var wrapped = e; e = e.parentNode; if (e.className.length >= 8) wrapped.className = e.className.substring(8); wrapped.setAttribute('style', e.getAttribute('style')); e.parentNode.replaceChild(wrapped, e); } else { if (e.getAttribute('type') == 'submit') { e.setAttribute('type', 'button'); e.removeAttribute('name'); } if (WT.hasTag(e, 'INPUT') && e.getAttribute('type') == 'image') { // change <input> to <image> var img = document.createElement('img'); if (img.mergeAttributes) { img.mergeAttributes(e, false); img.src = e.src; } else { if (e.attributes && e.attributes.length > 0) { var i, il; for (i = 0, il = e.attributes.length; i < il; i++) { var n = e.attributes[i].nodeName; if (n != 'type' && n != 'name') img.setAttribute(n, e.getAttribute(n)); } } } e.parentNode.replaceChild(img, e); } }}; | 5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/dfbd550b32d0c9b0fe9bdb4216e5f31ac6d97dd0/Wt.js/buggy/src/web/skeleton/Wt.js |
unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a= | wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, | unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a= | 2459 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2459/224f99709ae7b631dc0e80310148eb2c54d2198a/jquery.js/buggy/default_www/frontend/core/js/jquery/jquery.js |
if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,l;f=0;for(l=a.attributes.length;f<l;f++){var n=a.attributes[f].nodeName;n!="type"&&n!="name"&&b.setAttribute(n,a.getAttribute(n))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b& | if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,l;f=0;for(l=a.attributes.length;f<l;f++){var n=a.attributes[f].nodeName;n!="type"&&n!="name"&&b.setAttribute(n,a.getAttribute(n))}}a.parentNode.replaceChild(b,a)}}};var N=false;this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){if(!N){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue= | a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,l;f=0;for(l=a.attributes.length;f<l;f++){var n=a.attributes[f].nodeName;n!="type"&&n!="name"&&b.setAttribute(n,a.getAttribute(n))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b& | 5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/9764be5213b30962ec04b94ad969bd447eb5c10a/Wt.min.js/clean/src/web/skeleton/Wt.min.js |
unwrap: function() { return this.parent().each(function() { if ( !jQuery.nodeName( this, "body" ) ) { jQuery( this ).replaceWith( this.childNodes ); } }).end(); }, | wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, | unwrap: function() { return this.parent().each(function() { if ( !jQuery.nodeName( this, "body" ) ) { jQuery( this ).replaceWith( this.childNodes ); } }).end(); }, | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/337f8a7f8f1bd9e61727ac292aa76724b4cf7a46/jquery.js/clean/wp-includes/js/jquery/jquery.js |
0?a.appendChild(b):a.insertBefore(b,a.childNodes[e])};this.unstub=function(a,b,e){if(e==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=h.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8); h.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(h.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var e,k;e=0;for(k=a.attributes.length;e<k;e++){var i=a.attributes[e].nodeName; i!="type"&&i!="name"&&b.setAttribute(i,a.getAttribute(i))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?h.CancelAll:b;if(b&h.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&h.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;document.activeElement&&document.activeElement.blur&&h.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}}; | 0?a.appendChild(b):a.insertBefore(b,a.childNodes[e])};this.unstub=function(a,b,e){if(e==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8); g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var e,j;e=0;for(j=a.attributes.length;e<j;e++){var i=a.attributes[e].nodeName; i!="type"&&i!="name"&&b.setAttribute(i,a.getAttribute(i))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}}; | 0?a.appendChild(b):a.insertBefore(b,a.childNodes[e])};this.unstub=function(a,b,e){if(e==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=h.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);h.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(h.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var e,k;e=0;for(k=a.attributes.length;e<k;e++){var i=a.attributes[e].nodeName;i!="type"&&i!="name"&&b.setAttribute(i,a.getAttribute(i))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?h.CancelAll:b;if(b&h.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&h.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;document.activeElement&&document.activeElement.blur&&h.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}}; | 5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/39b9f5b40482b7e33a2708ec6d23efea2fa51ac4/Wt.min.js/clean/src/web/skeleton/Wt.min.js |
0?a.appendChild(b):a.insertBefore(b,a.childNodes[e])};this.unstub=function(a,b,e){if(e==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8); g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var e,k;e=0;for(k=a.attributes.length;e<k;e++){var i=a.attributes[e].nodeName; i!="type"&&i!="name"&&b.setAttribute(i,a.getAttribute(i))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}}; | 0?a.appendChild(b):a.insertBefore(b,a.childNodes[e])};this.unstub=function(a,b,e){if(e==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=h.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8); h.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(h.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var e,k;e=0;for(k=a.attributes.length;e<k;e++){var i=a.attributes[e].nodeName; i!="type"&&i!="name"&&b.setAttribute(i,a.getAttribute(i))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?h.CancelAll:b;if(b&h.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&h.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;document.activeElement&&document.activeElement.blur&&h.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}}; | 0?a.appendChild(b):a.insertBefore(b,a.childNodes[e])};this.unstub=function(a,b,e){if(e==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=g.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;if(a.className.length>=8)b.className=a.className.substring(8);g.isIE?b.style.setAttribute("cssText",a.getAttribute("style")):b.setAttribute("style",a.getAttribute("style"));a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(g.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var e,k;e=0;for(k=a.attributes.length;e<k;e++){var i=a.attributes[e].nodeName;i!="type"&&i!="name"&&b.setAttribute(i,a.getAttribute(i))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?g.CancelAll:b;if(b&g.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}}; | 5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/65fe37986780ab872c458deb4869dc6cf286a0cf/Wt.min.js/buggy/src/web/skeleton/Wt.min.js |
wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, | unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a= | wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, | 8656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8656/debb161f7671ff5bddc8def2221db94ff111ff1b/jquery.js/clean/js/jquery.js |
unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a= | wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, | unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a= | 2459 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2459/224f99709ae7b631dc0e80310148eb2c54d2198a/jquery.js/buggy/default_www/backend/core/js/jquery/jquery.js |
this.hasTag=function(a,b){return a.tagName.toUpperCase()===b};this.insertAt=function(a,b,f){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[f])};this.unstub=function(a,b,f){if(f==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=k.getElement(a); if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;b.style.margin=a.style.margin;a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(k.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,m;f=0;for(m=a.attributes.length;f<m;f++){var l=a.attributes[f].nodeName; l!="type"&&l!="name"&&b.setAttribute(l,a.getAttribute(l))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?k.CancelAll:b;if(b&k.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&k.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;document.activeElement&&document.activeElement.blur&&k.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}}; | b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=k.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;b.style.margin=a.style.margin;a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(k.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a, false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,m;f=0;for(m=a.attributes.length;f<m;f++){var l=a.attributes[f].nodeName;l!="type"&&l!="name"&&b.setAttribute(l,a.getAttribute(l))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?k.CancelAll:b;if(b&k.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&k.CancelPropagate){if(a.stopPropagation)a.stopPropagation(); | this.hasTag=function(a,b){return a.tagName.toUpperCase()===b};this.insertAt=function(a,b,f){a.childNodes.length==0?a.appendChild(b):a.insertBefore(b,a.childNodes[f])};this.unstub=function(a,b,f){if(f==1){if(a.style.display!="none")b.style.display=a.style.display}else{b.style.position=a.style.position;b.style.left=a.style.left;b.style.visibility=a.style.visibility}if(a.style.height)b.style.height=a.style.height;if(a.style.width)b.style.width=a.style.width};this.unwrap=function(a){a=k.getElement(a);if(a.parentNode.className.indexOf("Wt-wrap")==0){var b=a;a=a.parentNode;b.style.margin=a.style.margin;a.parentNode.replaceChild(b,a)}else{if(a.getAttribute("type")=="submit"){a.setAttribute("type","button");a.removeAttribute("name")}if(k.hasTag(a,"INPUT")&&a.getAttribute("type")=="image"){b=document.createElement("img");if(b.mergeAttributes){b.mergeAttributes(a,false);b.src=a.src}else if(a.attributes&&a.attributes.length>0){var f,m;f=0;for(m=a.attributes.length;f<m;f++){var l=a.attributes[f].nodeName;l!="type"&&l!="name"&&b.setAttribute(l,a.getAttribute(l))}}a.parentNode.replaceChild(b,a)}}};this.CancelPropagate=1;this.CancelDefaultAction=2;this.CancelAll=3;this.cancelEvent=function(a,b){b=b===undefined?k.CancelAll:b;if(b&k.CancelDefaultAction)if(a.preventDefault)a.preventDefault();else a.returnValue=false;if(b&k.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;document.activeElement&&document.activeElement.blur&&k.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}}; | 5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/a369471cf3758972a67918133124dc8066bd63aa/Wt.min.js/buggy/src/web/skeleton/Wt.min.js |
d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments, | wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, | d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments, | 8560 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8560/4d748e5cbfcbd91691b089e42cffdf43918e6201/jquery.min.js/clean/web/javascript/jquery/jquery.min.js |
wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, | unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a= | wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/8e2f21f44411204c60060f830cb1a800533462d2/jquery.js/buggy/wp-includes/js/jquery/jquery.js |
e))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var e=this;e.firstChild&&e.firstChild.nodeType===1;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(a){return this.each(function(){d(this).contents().wrapAll(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()}, | unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a= | e))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var e=this;e.firstChild&&e.firstChild.nodeType===1;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(a){return this.each(function(){d(this).contents().wrapAll(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()}, | 5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/bb76d586bec69eabec79913009e9ba30d248e123/jquery.min.js/buggy/src/web/skeleton/jquery.min.js |
wrapInner:function(a){return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&& | d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments, | wrapInner:function(a){return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&& | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/59fd2fb902fce80768d38770b0d96a19623d08d2/jquery.js/buggy/wp-includes/js/jquery/jquery.js |
return Selector.findElement($(element).ancestors(), expression, index); | element = $(element); if (arguments.length == 1) return $(element.parentNode); var ancestors = element.ancestors(); return Object.isNumber(expression) ? ancestors[expression] : Selector.findElement(ancestors, expression, index); | up: function(element, expression, index) { return Selector.findElement($(element).ancestors(), expression, index); }, | 6136 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6136/5543d40f16e51501a8d1e97b08f3ff550d8f9214/prototype.js/clean/web/src/main/webapp/js/prototype.js |