rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 13
136k
| meta
stringlengths 132
347
|
---|---|---|---|
updateStatusbar: function() { var torrents = this.getAllTorrents(); var torrentCount = torrents.length; var visibleCount = this.getVisibleTorrents().length; // calculate the overall speed var upSpeed = 0; var downSpeed = 0; for( var i=0, row; row=torrents[i]; ++i ) { upSpeed += row.uploadSpeed( ); downSpeed += row.downloadSpeed( ); } // update torrent count label var s; if( torrentCount == visibleCount ) s = torrentCount + ' Transfers'; else s = visibleCount + ' of ' + torrentCount + ' Transfers'; setInnerHTML( $('#torrent_global_transfer')[0], s ); // update the speeds s = Transmission.fmt.speed( upSpeed ); if( iPhone ) s = 'UL: ' + s; setInnerHTML( $('#torrent_global_upload')[0], s ); // download speeds s = Transmission.fmt.speed( downSpeed ); if( iPhone ) s = 'DL: ' + s; setInnerHTML( $('#torrent_global_download')[0], s ); }, | 8560 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8560/ad9814612d62f8069f4c5993934c66dfc5b804f9/transmission.js/clean/web/javascript/transmission.js |
||
updateStatusbar: function() { var torrents = this.getAllTorrents(); var torrentCount = torrents.length; var visibleCount = this.getVisibleTorrents().length; // calculate the overall speed var upSpeed = 0; var downSpeed = 0; for( var i=0, row; row=torrents[i]; ++i ) { upSpeed += row.uploadSpeed( ); downSpeed += row.downloadSpeed( ); } // update torrent count label var s; if( torrentCount == visibleCount ) s = torrentCount + ' Transfers'; else s = visibleCount + ' of ' + torrentCount + ' Transfers'; setInnerHTML( $('#torrent_global_transfer')[0], s ); // update the speeds s = Transmission.fmt.speed( upSpeed ); if( iPhone ) s = 'UL: ' + s; setInnerHTML( $('#torrent_global_upload')[0], s ); // download speeds s = Transmission.fmt.speed( downSpeed ); if( iPhone ) s = 'DL: ' + s; setInnerHTML( $('#torrent_global_download')[0], s ); }, | 8560 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8560/ad9814612d62f8069f4c5993934c66dfc5b804f9/transmission.js/clean/web/javascript/transmission.js |
||
updateStatusbar: function() { var torrents = this.getAllTorrents(); var torrentCount = torrents.length; var visibleCount = this.getVisibleTorrents().length; // calculate the overall speed var upSpeed = 0; var downSpeed = 0; for( var i=0, row; row=torrents[i]; ++i ) { upSpeed += row.uploadSpeed( ); downSpeed += row.downloadSpeed( ); } // update torrent count label var s; if( torrentCount == visibleCount ) s = torrentCount + ' Transfers'; else s = visibleCount + ' of ' + torrentCount + ' Transfers'; setInnerHTML( $('#torrent_global_transfer')[0], s ); // update the speeds s = Transmission.fmt.speed( upSpeed ); if( iPhone ) s = 'UL: ' + s; setInnerHTML( $('#torrent_global_upload')[0], s ); // download speeds s = Transmission.fmt.speed( downSpeed ); if( iPhone ) s = 'DL: ' + s; setInnerHTML( $('#torrent_global_download')[0], s ); }, | 8560 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8560/ad9814612d62f8069f4c5993934c66dfc5b804f9/transmission.js/clean/web/javascript/transmission.js |
||
updateStyle : function(ty) { var dom = tinyMCEPopup.dom, st, v, f = document.forms[0], img = dom.create('img', {style : f.img_style.value}); if (tinyMCEPopup.editor.settings.inline_styles) { if (ty == 'align') { dom.setStyle(img, 'float', ''); dom.setStyle(img, 'vertical-align', ''); v = f.align.value; if (v) { if (v == 'left' || v == 'right') dom.setStyle(img, 'float', v); else img.style.verticalAlign = v; } } if (ty == 'border') { dom.setStyle(img, 'border', ''); v = f.border.value; if (v || v == '0') { if (v == '0') img.style.border = '0'; else img.style.border = v + 'px solid black'; } } if (ty == 'hspace') { dom.setStyle(img, 'marginLeft', ''); dom.setStyle(img, 'marginRight', ''); v = f.hspace.value; if (v) { img.style.marginLeft = v + 'px'; img.style.marginRight = v + 'px'; } } if (ty == 'vspace') { dom.setStyle(img, 'marginTop', ''); dom.setStyle(img, 'marginBottom', ''); v = f.vspace.value; if (v) { img.style.marginTop = v + 'px'; img.style.marginBottom = v + 'px'; } } f.img_style.value = dom.serializeStyle(dom.parseStyle(img.style.cssText)); this.demoSetStyle(); } }, | var tinymce=null,tinyMCEPopup,tinyMCE,wpImage;tinyMCEPopup={init:function(){var d=this,b,a,f,c,e;a=(""+document.location.search).replace(/^\?/,"").split("&");f={};for(c=0;c<a.length;c++){e=a[c].split("=");f[unescape(e[0])]=unescape(e[1])}if(f.mce_rdomain){document.domain=f.mce_rdomain}b=d.getWin();tinymce=b.tinymce;tinyMCE=b.tinyMCE;d.editor=tinymce.EditorManager.activeEditor;d.params=d.editor.windowManager.params;d.dom=d.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document);d.editor.windowManager.onOpen.dispatch(d.editor.windowManager,window)},getWin:function(){return window.dialogArguments||opener||parent||top},getParam:function(b,a){return this.editor.getParam(b,a)},close:function(){var a=this,b=a.getWin();function c(){b.tb_remove();tinymce=tinyMCE=a.editor=a.dom=a.dom.doc=null}if(tinymce.isOpera){b.setTimeout(c,0)}else{c()}},execCommand:function(d,c,e,b){b=b||{};b.skip_focus=1;this.restoreSelection();return this.editor.execCommand(d,c,e,b)},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark("simple")},restoreSelection:function(){var a=tinyMCEPopup;if(tinymce.isIE){a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}}};tinyMCEPopup.init();wpImage={preInit:function(){var d=tinyMCEPopup.getWin(),c=d.document.styleSheets,a,b;for(b=0;b<c.length;b++){a=c.item(b).href;if(a&&a.indexOf("colors")!=-1){document.write('<link rel="stylesheet" href="'+a+'" type="text/css" media="all" />')}}},I:function(a){return document.getElementById(a)},current:"",link:"",link_rel:"",target_value:"",current_size_sel:"s100",width:"",height:"",align:"",img_alt:"",setTabs:function(b){var a=this;if("current"==b.className){return false}a.I("div_advanced").style.display=("tab_advanced"==b.id)?"block":"none";a.I("div_basic").style.display=("tab_basic"==b.id)?"block":"none";a.I("tab_basic").className=a.I("tab_advanced").className="";b.className="current";return false},img_seturl:function(b){var c=this,a=c.I("link_rel").value;if("current"==b){c.I("link_href").value=c.current;c.I("link_rel").value=c.link_rel}else{c.I("link_href").value=c.link;if(a){a=a.replace(/attachment|wp-att-[0-9]+/gi,"");c.I("link_rel").value=tinymce.trim(a)}}},imgAlignCls:function(b){var c=this,a=c.I("img_classes").value;c.I("img_demo").className=c.align=b;a=a.replace(/align[^ "']+/gi,"");a+=(" "+b);a=a.replace(/\s+/g," ").replace(/^\s/,"");if("aligncenter"==b){c.I("hspace").value="";c.updateStyle("hspace")}c.I("img_classes").value=a},showSize:function(e){var c=this,f=c.I("img_demo"),a=c.width,d=c.height,g=e.id||"s100",b;b=parseInt(g.substring(1))/200;f.width=Math.round(a*b);f.height=Math.round(d*b);c.showSizeClear();e.style.borderColor="#A3A3A3";e.style.backgroundColor="#E5E5E5"},showSizeSet:function(){var b=this,d,c,a;if((b.width*1.3)>parseInt(b.preloadImg.width)){d=b.I("s130"),c=b.I("s120"),a=b.I("s110");d.onclick=c.onclick=a.onclick=null;d.onmouseover=c.onmouseover=a.onmouseover=null;d.style.color=c.style.color=a.style.color="#aaa"}},showSizeRem:function(){var a=this,c=a.I("img_demo"),b=document.forms[0];c.width=Math.round(b.width.value*0.5);c.height=Math.round(b.height.value*0.5);a.showSizeClear();a.I(a.current_size_sel).style.borderColor="#A3A3A3";a.I(a.current_size_sel).style.backgroundColor="#E5E5E5";return false},showSizeClear:function(){var b=this.I("img_size").getElementsByTagName("div"),a;for(a=0;a<b.length;a++){b[a].style.borderColor="#f1f1f1";b[a].style.backgroundColor="#f1f1f1"}},imgEditSize:function(g){var d=this,i=document.forms[0],a,c,b,e,j;if(!d.preloadImg||!d.preloadImg.width||!d.preloadImg.height){return}a=parseInt(d.preloadImg.width),c=parseInt(d.preloadImg.height),b=d.width||a,e=d.height||c,j=g.id||"s100";size=parseInt(j.substring(1))/100;b=Math.round(b*size);e=Math.round(e*size);i.width.value=Math.min(a,b);i.height.value=Math.min(c,e);d.current_size_sel=j;d.demoSetSize()},demoSetSize:function(a){var c=this.I("img_demo"),b=document.forms[0];c.width=b.width.value?Math.round(b.width.value*0.5):"";c.height=b.height.value?Math.round(b.height.value*0.5):""},demoSetStyle:function(){var b=document.forms[0],a=this.I("img_demo"),c=tinyMCEPopup.editor.dom;if(a){c.setAttrib(a,"style",b.img_style.value);c.setStyle(a,"width","");c.setStyle(a,"height","")}},origSize:function(){var a=this,c=document.forms[0],b=a.I("s100");c.width.value=a.width=a.preloadImg.width;c.height.value=a.height=a.preloadImg.height;a.showSizeSet();a.demoSetSize();a.showSize(b)},init:function(){var a=tinyMCEPopup.editor,b;b=document.body.innerHTML;document.body.innerHTML=a.translate(b);window.setTimeout(function(){wpImage.setup()},500)},setup:function(){var p=this,k,b,l,e,i=document.forms[0],h=tinyMCEPopup.editor,j=p.I("img_demo"),g=tinyMCEPopup.dom,a,o="",n,m;document.dir=tinyMCEPopup.editor.getParam("directionality","");if(tinyMCEPopup.editor.getParam("wpeditimage_disable_captions",false)){p.I("cap_field").style.display="none"}tinyMCEPopup.restoreSelection();b=h.selection.getNode();if(b.nodeName!="IMG"){return}i.img_src.value=j.src=l=h.dom.getAttrib(b,"src");h.dom.setStyle(b,"float","");p.getImageData();k=h.dom.getAttrib(b,"class");if(a=g.getParent(b,"dl")){n=h.dom.getAttrib(a,"class");n=n.match(/align[^ "']+/i);if(n&&!g.hasClass(b,n)){k+=" "+n;tinymce.trim(k)}tinymce.each(a.childNodes,function(c){if(c.nodeName=="DD"&&g.hasClass(c,"wp-caption-dd")){o=c.innerHTML;return}})}i.img_cap.value=o;i.img_title.value=h.dom.getAttrib(b,"title");i.img_alt.value=h.dom.getAttrib(b,"alt");i.border.value=h.dom.getAttrib(b,"border");i.vspace.value=h.dom.getAttrib(b,"vspace");i.hspace.value=h.dom.getAttrib(b,"hspace");i.align.value=h.dom.getAttrib(b,"align");i.width.value=p.width=h.dom.getAttrib(b,"width");i.height.value=p.height=h.dom.getAttrib(b,"height");i.img_classes.value=k;i.img_style.value=h.dom.getAttrib(b,"style");if(g.getAttrib(b,"hspace")){p.updateStyle("hspace")}if(g.getAttrib(b,"border")){p.updateStyle("border")}if(g.getAttrib(b,"vspace")){p.updateStyle("vspace")}if(m=h.dom.getParent(b,"A")){i.link_href.value=p.current=h.dom.getAttrib(m,"href");i.link_title.value=h.dom.getAttrib(m,"title");i.link_rel.value=p.link_rel=h.dom.getAttrib(m,"rel");i.link_style.value=h.dom.getAttrib(m,"style");p.target_value=h.dom.getAttrib(m,"target");i.link_classes.value=h.dom.getAttrib(m,"class")}i.link_target.checked=(p.target_value&&p.target_value=="_blank")?"checked":"";e=l.substring(l.lastIndexOf("/"));e=e.replace(/-[0-9]{2,4}x[0-9]{2,4}/,"");p.link=l.substring(0,l.lastIndexOf("/"))+e;if(k.indexOf("alignleft")!=-1){p.I("alignleft").checked="checked";j.className=p.align="alignleft"}else{if(k.indexOf("aligncenter")!=-1){p.I("aligncenter").checked="checked";j.className=p.align="aligncenter"}else{if(k.indexOf("alignright")!=-1){p.I("alignright").checked="checked";j.className=p.align="alignright"}else{if(k.indexOf("alignnone")!=-1){p.I("alignnone").checked="checked";j.className=p.align="alignnone"}}}}if(p.width&&p.preloadImg.width){p.showSizeSet()}document.body.style.display=""},remove:function(){var a=tinyMCEPopup.editor,c,b;tinyMCEPopup.restoreSelection();b=a.selection.getNode();if(b.nodeName!="IMG"){return}if((c=a.dom.getParent(b,"div"))&&a.dom.hasClass(c,"mceTemp")){a.dom.remove(c)}else{if((c=a.dom.getParent(b,"A"))&&c.childNodes.length==1){a.dom.remove(c)}else{a.dom.remove(b)}}a.execCommand("mceRepaint");tinyMCEPopup.close();return},update:function(){var m=this,v=document.forms[0],g=tinyMCEPopup.editor,e,x,d=null,n,h,p,r,o=null,k=v.img_classes.value,l,q,u="",j,i,s,a,z,w="",c,y;tinyMCEPopup.restoreSelection();e=g.selection.getNode();if(e.nodeName!="IMG"){return}if(v.img_src.value===""){m.remove();return}if(v.img_cap.value!=""&&v.width.value!=""){o=1;k=k.replace(/align[^ "']+\s?/gi,"")}p=g.dom.getParent(e,"a");h=g.dom.getParent(e,"p");n=g.dom.getParent(e,"dl");r=g.dom.getParent(e,"div");tinyMCEPopup.execCommand("mceBeginUndoLevel");g.dom.setAttribs(e,{src:v.img_src.value,title:v.img_title.value,alt:v.img_alt.value,width:v.width.value,height:v.height.value,style:v.img_style.value,"class":k});if(v.link_href.value){if(p==null){if(!v.link_href.value.match(/https?:\/\ | updateStyle : function(ty) { var dom = tinyMCEPopup.dom, st, v, f = document.forms[0], img = dom.create('img', {style : f.img_style.value}); if (tinyMCEPopup.editor.settings.inline_styles) { // Handle align if (ty == 'align') { dom.setStyle(img, 'float', ''); dom.setStyle(img, 'vertical-align', ''); v = f.align.value; if (v) { if (v == 'left' || v == 'right') dom.setStyle(img, 'float', v); else img.style.verticalAlign = v; } } // Handle border if (ty == 'border') { dom.setStyle(img, 'border', ''); v = f.border.value; if (v || v == '0') { if (v == '0') img.style.border = '0'; else img.style.border = v + 'px solid black'; } } // Handle hspace if (ty == 'hspace') { dom.setStyle(img, 'marginLeft', ''); dom.setStyle(img, 'marginRight', ''); v = f.hspace.value; if (v) { img.style.marginLeft = v + 'px'; img.style.marginRight = v + 'px'; } } // Handle vspace if (ty == 'vspace') { dom.setStyle(img, 'marginTop', ''); dom.setStyle(img, 'marginBottom', ''); v = f.vspace.value; if (v) { img.style.marginTop = v + 'px'; img.style.marginBottom = v + 'px'; } } // Merge f.img_style.value = dom.serializeStyle(dom.parseStyle(img.style.cssText)); this.demoSetStyle(); } }, | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/61365a44c046fe2812bdbc16cc6993b6a4ed8684/editimage.js/buggy/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js |
var tagBox,commentsBox,editPermalink,makeSlugeditClickable,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail;function array_unique_noempty(a){var out=[];jQuery.each(a,function(key,val){val=jQuery.trim(val);if(val&&jQuery.inArray(val,out)==-1){out.push(val)}});return out}(function($){tagBox={clean:function(tags){return tags.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"")},parseTags:function(el){var id=el.id,num=id.split("-check-num-")[1],taxbox=$(el).closest(".tagsdiv"),thetags=taxbox.find(".the-tags"),current_tags=thetags.val().split(","),new_tags=[];delete current_tags[num];$.each(current_tags,function(key,val){val=$.trim(val);if(val){new_tags.push(val)}});thetags.val(this.clean(new_tags.join(",")));this.quickClicks(taxbox);return false},quickClicks:function(el){var thetags=$(".the-tags",el),tagchecklist=$(".tagchecklist",el),current_tags;if(!thetags.length){return}var disabled=thetags.attr("disabled");current_tags=thetags.val().split(",");tagchecklist.empty();$.each(current_tags,function(key,val){var txt,button_id,id=$(el).attr("id");val=$.trim(val);if(!val.match(/^\s+$/)&&""!=val){button_id=id+"-check-num-"+key;if(disabled){txt="<span>"+val+"</span> "}else{txt='<span><a id="'+button_id+'" class="ntdelbutton">X</a> '+val+"</span> "}tagchecklist.append(txt);if(!disabled){$("#"+button_id).click(function(){tagBox.parseTags(this)})}}})},flushTags:function(el,a,f){a=a||false;var text,tags=$(".the-tags",el),newtag=$("input.newtag",el),newtags;text=a?$(a).text():newtag.val();tagsval=tags.val();newtags=tagsval?tagsval+","+text:text;newtags=this.clean(newtags);newtags=array_unique_noempty(newtags.split(",")).join(",");tags.val(newtags);this.quickClicks(el);if(!a){newtag.val("")}if("undefined"==typeof(f)){newtag.focus()}return false},get:function(id){var tax=id.substr(id.indexOf("-")+1);$.post(ajaxurl,{action:"get-tagcloud",tax:tax},function(r,stat){if(0==r||"success"!=stat){r=wpAjax.broken}r=$('<p id="tagcloud-'+tax+'" class="the-tagcloud">'+r+"</p>");$("a",r).click(function(){tagBox.flushTags($(this).closest(".inside").children(".tagsdiv"),this);return false});$("#"+id).after(r)})},init:function(){var t=this,ajaxtag=$("div.ajaxtag");$(".tagsdiv").each(function(){tagBox.quickClicks(this)});$("input.tagadd",ajaxtag).click(function(){t.flushTags($(this).closest(".tagsdiv"))});$("div.taghint",ajaxtag).click(function(){$(this).css("visibility","hidden").siblings(".newtag").focus()});$("input.newtag",ajaxtag).blur(function(){if(this.value==""){$(this).siblings(".taghint").css("visibility","")}}).focus(function(){$(this).siblings(".taghint").css("visibility","hidden")}).keyup(function(e){if(13==e.which){tagBox.flushTags($(this).closest(".tagsdiv"));return false}}).keypress(function(e){if(13==e.which){e.preventDefault();return false}}).each(function(){var tax=$(this).closest("div.tagsdiv").attr("id");$(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+tax,{delay:500,minchars:2,multiple:true,multipleSep:","})});$("#post").submit(function(){$("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});$("a.tagcloud-link").click(function(){tagBox.get($(this).attr("id"));$(this).unbind().click(function(){$(this).siblings(".the-tagcloud").toggle();return false});return false})}};commentsBox={st:0,get:function(total,num){var st=this.st,data;if(!num){num=20}this.st+=num;this.total=total;$("#commentsdiv img.waiting").show();data={action:"get-comments",mode:"single",_ajax_nonce:$("#add_comment_nonce").val(),post_ID:$("#post_ID").val(),start:st,num:num};$.post(ajaxurl,data,function(r){r=wpAjax.parseAjaxResponse(r);$("#commentsdiv .widefat").show();$("#commentsdiv img.waiting").hide();if("object"==typeof r&&r.responses[0]){$("#the-comment-list").append(r.responses[0].data);theList=theExtraList=null;$("a[className*=':']").unbind();setCommentsList();if(commentsBox.st>commentsBox.total){$("#show-comments").hide()}else{$("#show-comments").html(postL10n.showcomm)}return}else{if(1==r){$("#show-comments").parent().html(postL10n.endcomm);return}}$("#the-comment-list").append('<tr><td colspan="2">'+wpAjax.broken+"</td></tr>")});return false}};WPSetThumbnailHTML=function(html){$(".inside","#postimagediv").html(html)};WPSetThumbnailID=function(id){var field=$("input[value=_thumbnail_id]","#list-table");if(field.size()>0){$("#meta\\["+field.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(id)}};WPRemoveThumbnail=function(){$.post(ajaxurl,{action:"set-post-thumbnail",post_id:$("#post_ID").val(),thumbnail_id:-1,cookie:encodeURIComponent(document.cookie)},function(str){if(str=="0"){alert(setPostThumbnailL10n.error)}else{WPSetThumbnailHTML(str)}})}})(jQuery);jQuery(document).ready(function($){var stamp,visibility,sticky="";postboxes.add_postbox_toggles(pagenow);if($("#tagsdiv-post_tag").length){tagBox.init()}else{$("#side-sortables, #normal-sortables, #advanced-sortables").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}})}$(".categorydiv").each(function(){var this_id=$(this).attr("id"),noSyncChecks=false,syncChecks,catAddAfter,taxonomyParts,taxonomy,settingName;taxonomyParts=this_id.split("-");taxonomyParts.shift();taxonomy=taxonomyParts.join("-");settingName=taxonomy+"_tab";if(taxonomy=="category"){settingName="cats"}$("a","#"+taxonomy+"-tabs").click(function(){var t=$(this).attr("href");$(this).parent().addClass("tabs").siblings("li").removeClass("tabs");$("#"+taxonomy+"-tabs").siblings(".tabs-panel").hide();$(t).show();if("#"+taxonomy+"-all"==t){deleteUserSetting(settingName)}else{setUserSetting(settingName,"pop")}return false});if(getUserSetting(settingName)){$('a[href="#'+taxonomy+'-pop"]',"#"+taxonomy+"-tabs").click()}$("#new"+taxonomy).one("focus",function(){$(this).val("").removeClass("form-input-tip")});$("#"+taxonomy+"-add-submit").click(function(){$("#new"+taxonomy).focus()});syncChecks=function(){if(noSyncChecks){return}noSyncChecks=true;var th=jQuery(this),c=th.is(":checked"),id=th.val().toString();$("#in-"+taxonomy+"-"+id+", #in-"+taxonomy+"-category-"+id).attr("checked",c);noSyncChecks=false};catAddBefore=function(s){if(!$("#new"+taxonomy).val()){return false}s.data+="&"+$(":checked","#"+taxonomy+"checklist").serialize();return s};catAddAfter=function(r,s){var sup,drop=$("#new"+taxonomy+"_parent");if("undefined"!=s.parsed.responses[0]&&(sup=s.parsed.responses[0].supplemental.newcat_parent)){drop.before(sup);drop.remove()}};$("#"+taxonomy+"checklist").wpList({alt:"",response:taxonomy+"-ajax-response",addBefore:catAddBefore,addAfter:catAddAfter});$("#"+taxonomy+"-add-toggle").click(function(){$("#"+taxonomy+"-adder").toggleClass("wp-hidden-children");$('a[href="#'+taxonomy+'-all"]',"#"+taxonomy+"-tabs").click();return false});$("#"+taxonomy+"checklist li.popular-category :checkbox, #"+taxonomy+"checklist-pop :checkbox").live("click",function(){var t=$(this),c=t.is(":checked"),id=t.val();if(id&&t.parents("#taxonomy-"+taxonomy).length){$("#in-"+taxonomy+"-"+id+", #in-popular-"+taxonomy+"-"+id).attr("checked",c)}})});if($("#postcustom").length){$("#the-list").wpList({addAfter:function(xml,s){$("table#list-table").show();if(typeof(autosave_update_post_ID)!="undefined"){autosave_update_post_ID(s.parsed.responses[0].supplemental.postid)}},addBefore:function(s){s.data+="&post_id="+$("#post_ID").val();return s}})}if($("#submitdiv").length){stamp=$("#timestamp").html();visibility=$("#post-visibility-display").html();function updateVisibility(){var pvSelect=$("#post-visibility-select");if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false);$("#sticky-span").hide()}else{$("#sticky-span").show()}if($("input:radio:checked",pvSelect).val()!="password"){$("#password-span").hide()}else{$("#password-span").show()}}function updateText(){var attemptedDate,originalDate,currentDate,publishOn,page="page"==pagenow||"page-new"==pagenow,postStatus=$("#post_status"),optPublish=$("option[value=publish]",postStatus),aa=$("#aa").val(),mm=$("#mm").val(),jj=$("#jj").val(),hh=$("#hh").val(),mn=$("#mn").val();attemptedDate=new Date(aa,mm-1,jj,hh,mn);originalDate=new Date($("#hidden_aa").val(),$("#hidden_mm").val()-1,$("#hidden_jj").val(),$("#hidden_hh").val(),$("#hidden_mn").val());currentDate=new Date($("#cur_aa").val(),$("#cur_mm").val()-1,$("#cur_jj").val(),$("#cur_hh").val(),$("#cur_mn").val());if(attemptedDate.getFullYear()!=aa||(1+attemptedDate.getMonth())!=mm||attemptedDate.getDate()!=jj||attemptedDate.getMinutes()!=mn){$(".timestamp-wrap","#timestampdiv").addClass("form-invalid");return false}else{$(".timestamp-wrap","#timestampdiv").removeClass("form-invalid")}if(attemptedDate>currentDate&&$("#original_post_status").val()!="future"){publishOn=postL10n.publishOnFuture;$("#publish").val(postL10n.schedule)}else{if(attemptedDate<=currentDate&&$("#original_post_status").val()!="publish"){publishOn=postL10n.publishOn;$("#publish").val(postL10n.publish)}else{publishOn=postL10n.publishOnPast;if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}}}if(originalDate.toUTCString()==attemptedDate.toUTCString()){$("#timestamp").html(stamp)}else{$("#timestamp").html(publishOn+" <b>"+$("option[value="+$("#mm").val()+"]","#mm").text()+" "+jj+", "+aa+" @ "+hh+":"+mn+"</b> ")}if($("input:radio:checked","#post-visibility-select").val()=="private"){if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}if(optPublish.length==0){postStatus.append('<option value="publish">'+postL10n.privatelyPublished+"</option>")}else{optPublish.html(postL10n.privatelyPublished)}$("option[value=publish]",postStatus).attr("selected",true);$(".edit-post-status","#misc-publishing-actions").hide()}else{if($("#original_post_status").val()=="future"||$("#original_post_status").val()=="draft"){if(optPublish.length){optPublish.remove();postStatus.val($("#hidden_post_status").val())}}else{optPublish.html(postL10n.published)}if(postStatus.is(":hidden")){$(".edit-post-status","#misc-publishing-actions").show()}}$("#post-status-display").html($("option:selected",postStatus).text());if($("option:selected",postStatus).val()=="private"||$("option:selected",postStatus).val()=="publish"){$("#save-post").hide()}else{$("#save-post").show();if($("option:selected",postStatus).val()=="pending"){$("#save-post").show().val(postL10n.savePending)}else{$("#save-post").show().val(postL10n.saveDraft)}}return true}$(".edit-visibility","#visibility").click(function(){if($("#post-visibility-select").is(":hidden")){updateVisibility();$("#post-visibility-select").slideDown("normal");$(this).hide()}return false});$(".cancel-post-visibility","#post-visibility-select").click(function(){$("#post-visibility-select").slideUp("normal");$("#visibility-radio-"+$("#hidden-post-visibility").val()).attr("checked",true);$("#post_password").val($("#hidden_post_password").val());$("#sticky").attr("checked",$("#hidden-post-sticky").attr("checked"));$("#post-visibility-display").html(visibility);$(".edit-visibility","#visibility").show();updateText();return false});$(".save-post-visibility","#post-visibility-select").click(function(){var pvSelect=$("#post-visibility-select");pvSelect.slideUp("normal");$(".edit-visibility","#visibility").show();updateText();if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false)}if(true==$("#sticky").attr("checked")){sticky="Sticky"}else{sticky=""}$("#post-visibility-display").html(postL10n[$("input:radio:checked",pvSelect).val()+sticky]);return false});$("input:radio","#post-visibility-select").change(function(){updateVisibility()});$("#timestampdiv").siblings("a.edit-timestamp").click(function(){if($("#timestampdiv").is(":hidden")){$("#timestampdiv").slideDown("normal");$(this).hide()}return false});$(".cancel-timestamp","#timestampdiv").click(function(){$("#timestampdiv").slideUp("normal");$("#mm").val($("#hidden_mm").val());$("#jj").val($("#hidden_jj").val());$("#aa").val($("#hidden_aa").val());$("#hh").val($("#hidden_hh").val());$("#mn").val($("#hidden_mn").val());$("#timestampdiv").siblings("a.edit-timestamp").show();updateText();return false});$(".save-timestamp","#timestampdiv").click(function(){if(updateText()){$("#timestampdiv").slideUp("normal");$("#timestampdiv").siblings("a.edit-timestamp").show()}return false});$("#post-status-select").siblings("a.edit-post-status").click(function(){if($("#post-status-select").is(":hidden")){$("#post-status-select").slideDown("normal");$(this).hide()}return false});$(".save-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false});$(".cancel-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post_status").val($("#hidden_post_status").val());$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false})}if($("#edit-slug-box").length){editPermalink=function(post_id){var i,c=0,e=$("#editable-post-name"),revert_e=e.html(),real_slug=$("#post_name"),revert_slug=real_slug.val(),b=$("#edit-slug-buttons"),revert_b=b.html(),full=$("#editable-post-name-full").html();$("#view-post-btn").hide();b.html('<a href="#" class="save button">'+postL10n.ok+'</a> <a class="cancel" href="#">'+postL10n.cancel+"</a>");b.children(".save").click(function(){var new_slug=e.children("input").val();$.post(ajaxurl,{action:"sample-permalink",post_id:post_id,new_slug:new_slug,new_title:$("#title").val(),samplepermalinknonce:$("#samplepermalinknonce").val()},function(data){$("#edit-slug-box").html(data);b.html(revert_b);real_slug.attr("value",new_slug);makeSlugeditClickable();$("#view-post-btn").show()});return false});$(".cancel","#edit-slug-buttons").click(function(){$("#view-post-btn").show();e.html(revert_e);b.html(revert_b);real_slug.attr("value",revert_slug);return false});for(i=0;i<full.length;++i){if("%"==full.charAt(i)){c++}}slug_value=(c>full.length/4)?"":full;e.html('<input type="text" id="new-post-slug" value="'+slug_value+'" />').children("input").keypress(function(e){var key=e.keyCode||0;if(13==key){b.children(".save").click();return false}if(27==key){b.children(".cancel").click();return false}real_slug.attr("value",this.value)}).focus()};makeSlugeditClickable=function(){$("#editable-post-name").click(function(){$("#edit-slug-buttons").children(".edit-slug").click()})};makeSlugeditClickable()}if($("#title").val()==""){$("#title").siblings("#title-prompt-text").css("visibility","")}$("#title-prompt-text").click(function(){$(this).css("visibility","hidden").siblings("#title").focus()});$("#title").blur(function(){if(this.value==""){$(this).siblings("#title-prompt-text").css("visibility","")}}).focus(function(){$(this).siblings("#title-prompt-text").css("visibility","hidden")}).keydown(function(e){$(this).siblings("#title-prompt-text").css("visibility","hidden");$(this).unbind(e)})}); | var tagBox,commentsBox,editPermalink,makeSlugeditClickable,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail;function array_unique_noempty(a){var out=[];jQuery.each(a,function(key,val){val=jQuery.trim(val);if(val&&jQuery.inArray(val,out)==-1){out.push(val)}});return out}(function($){tagBox={clean:function(tags){return tags.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"")},parseTags:function(el){var id=el.id,num=id.split("-check-num-")[1],taxbox=$(el).closest(".tagsdiv"),thetags=taxbox.find(".the-tags"),current_tags=thetags.val().split(","),new_tags=[];delete current_tags[num];$.each(current_tags,function(key,val){val=$.trim(val);if(val){new_tags.push(val)}});thetags.val(this.clean(new_tags.join(",")));this.quickClicks(taxbox);return false},quickClicks:function(el){var thetags=$(".the-tags",el),tagchecklist=$(".tagchecklist",el),current_tags;if(!thetags.length){return}var disabled=thetags.attr("disabled");current_tags=thetags.val().split(",");tagchecklist.empty();$.each(current_tags,function(key,val){var txt,button_id,id=$(el).attr("id");val=$.trim(val);if(!val.match(/^\s+$/)&&""!=val){button_id=id+"-check-num-"+key;if(disabled){txt="<span>"+val+"</span> "}else{txt='<span><a id="'+button_id+'" class="ntdelbutton">X</a> '+val+"</span> "}tagchecklist.append(txt);if(!disabled){$("#"+button_id).click(function(){tagBox.parseTags(this)})}}})},flushTags:function(el,a,f){a=a||false;var text,tags=$(".the-tags",el),newtag=$("input.newtag",el),newtags;text=a?$(a).text():newtag.val();tagsval=tags.val();newtags=tagsval?tagsval+","+text:text;newtags=this.clean(newtags);newtags=array_unique_noempty(newtags.split(",")).join(",");tags.val(newtags);this.quickClicks(el);if(!a){newtag.val("")}if("undefined"==typeof(f)){newtag.focus()}return false},get:function(id){var tax=id.substr(id.indexOf("-")+1);$.post(ajaxurl,{action:"get-tagcloud",tax:tax},function(r,stat){if(0==r||"success"!=stat){r=wpAjax.broken}r=$('<p id="tagcloud-'+tax+'" class="the-tagcloud">'+r+"</p>");$("a",r).click(function(){tagBox.flushTags($(this).closest(".inside").children(".tagsdiv"),this);return false});$("#"+id).after(r)})},init:function(){var t=this,ajaxtag=$("div.ajaxtag");$(".tagsdiv").each(function(){tagBox.quickClicks(this)});$("input.tagadd",ajaxtag).click(function(){t.flushTags($(this).closest(".tagsdiv"))});$("div.taghint",ajaxtag).click(function(){$(this).css("visibility","hidden").parent().siblings(".newtag").focus()});$("input.newtag",ajaxtag).blur(function(){if(this.value==""){$(this).parent().siblings(".taghint").css("visibility","")}}).focus(function(){$(this).parent().siblings(".taghint").css("visibility","hidden")}).keyup(function(e){if(13==e.which){tagBox.flushTags($(this).closest(".tagsdiv"));return false}}).keypress(function(e){if(13==e.which){e.preventDefault();return false}}).each(function(){var tax=$(this).closest("div.tagsdiv").attr("id");$(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+tax,{delay:500,minchars:2,multiple:true,multipleSep:","})});$("#post").submit(function(){$("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});$("a.tagcloud-link").click(function(){tagBox.get($(this).attr("id"));$(this).unbind().click(function(){$(this).siblings(".the-tagcloud").toggle();return false});return false})}};commentsBox={st:0,get:function(total,num){var st=this.st,data;if(!num){num=20}this.st+=num;this.total=total;$("#commentsdiv img.waiting").show();data={action:"get-comments",mode:"single",_ajax_nonce:$("#add_comment_nonce").val(),post_ID:$("#post_ID").val(),start:st,num:num};$.post(ajaxurl,data,function(r){r=wpAjax.parseAjaxResponse(r);$("#commentsdiv .widefat").show();$("#commentsdiv img.waiting").hide();if("object"==typeof r&&r.responses[0]){$("#the-comment-list").append(r.responses[0].data);theList=theExtraList=null;$("a[className*=':']").unbind();setCommentsList();if(commentsBox.st>commentsBox.total){$("#show-comments").hide()}else{$("#show-comments").html(postL10n.showcomm)}return}else{if(1==r){$("#show-comments").parent().html(postL10n.endcomm);return}}$("#the-comment-list").append('<tr><td colspan="2">'+wpAjax.broken+"</td></tr>")});return false}};WPSetThumbnailHTML=function(html){$(".inside","#postimagediv").html(html)};WPSetThumbnailID=function(id){var field=$("input[value=_thumbnail_id]","#list-table");if(field.size()>0){$("#meta\\["+field.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(id)}};WPRemoveThumbnail=function(){$.post(ajaxurl,{action:"set-post-thumbnail",post_id:$("#post_ID").val(),thumbnail_id:-1,cookie:encodeURIComponent(document.cookie)},function(str){if(str=="0"){alert(setPostThumbnailL10n.error)}else{WPSetThumbnailHTML(str)}})}})(jQuery);jQuery(document).ready(function($){var stamp,visibility,sticky="";postboxes.add_postbox_toggles(pagenow);if($("#tagsdiv-post_tag").length){tagBox.init()}else{$("#side-sortables, #normal-sortables, #advanced-sortables").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}})}$(".categorydiv").each(function(){var this_id=$(this).attr("id"),noSyncChecks=false,syncChecks,catAddAfter,taxonomyParts,taxonomy,settingName;taxonomyParts=this_id.split("-");taxonomyParts.shift();taxonomy=taxonomyParts.join("-");settingName=taxonomy+"_tab";if(taxonomy=="category"){settingName="cats"}$("a","#"+taxonomy+"-tabs").click(function(){var t=$(this).attr("href");$(this).parent().addClass("tabs").siblings("li").removeClass("tabs");$("#"+taxonomy+"-tabs").siblings(".tabs-panel").hide();$(t).show();if("#"+taxonomy+"-all"==t){deleteUserSetting(settingName)}else{setUserSetting(settingName,"pop")}return false});if(getUserSetting(settingName)){$('a[href="#'+taxonomy+'-pop"]',"#"+taxonomy+"-tabs").click()}$("#new"+taxonomy).one("focus",function(){$(this).val("").removeClass("form-input-tip")});$("#"+taxonomy+"-add-submit").click(function(){$("#new"+taxonomy).focus()});syncChecks=function(){if(noSyncChecks){return}noSyncChecks=true;var th=jQuery(this),c=th.is(":checked"),id=th.val().toString();$("#in-"+taxonomy+"-"+id+", #in-"+taxonomy+"-category-"+id).attr("checked",c);noSyncChecks=false};catAddBefore=function(s){if(!$("#new"+taxonomy).val()){return false}s.data+="&"+$(":checked","#"+taxonomy+"checklist").serialize();return s};catAddAfter=function(r,s){var sup,drop=$("#new"+taxonomy+"_parent");if("undefined"!=s.parsed.responses[0]&&(sup=s.parsed.responses[0].supplemental.newcat_parent)){drop.before(sup);drop.remove()}};$("#"+taxonomy+"checklist").wpList({alt:"",response:taxonomy+"-ajax-response",addBefore:catAddBefore,addAfter:catAddAfter});$("#"+taxonomy+"-add-toggle").click(function(){$("#"+taxonomy+"-adder").toggleClass("wp-hidden-children");$('a[href="#'+taxonomy+'-all"]',"#"+taxonomy+"-tabs").click();return false});$("#"+taxonomy+"checklist li.popular-category :checkbox, #"+taxonomy+"checklist-pop :checkbox").live("click",function(){var t=$(this),c=t.is(":checked"),id=t.val();if(id&&t.parents("#taxonomy-"+taxonomy).length){$("#in-"+taxonomy+"-"+id+", #in-popular-"+taxonomy+"-"+id).attr("checked",c)}})});if($("#postcustom").length){$("#the-list").wpList({addAfter:function(xml,s){$("table#list-table").show();if(typeof(autosave_update_post_ID)!="undefined"){autosave_update_post_ID(s.parsed.responses[0].supplemental.postid)}},addBefore:function(s){s.data+="&post_id="+$("#post_ID").val();return s}})}if($("#submitdiv").length){stamp=$("#timestamp").html();visibility=$("#post-visibility-display").html();function updateVisibility(){var pvSelect=$("#post-visibility-select");if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false);$("#sticky-span").hide()}else{$("#sticky-span").show()}if($("input:radio:checked",pvSelect).val()!="password"){$("#password-span").hide()}else{$("#password-span").show()}}function updateText(){var attemptedDate,originalDate,currentDate,publishOn,page="page"==pagenow||"page-new"==pagenow,postStatus=$("#post_status"),optPublish=$("option[value=publish]",postStatus),aa=$("#aa").val(),mm=$("#mm").val(),jj=$("#jj").val(),hh=$("#hh").val(),mn=$("#mn").val();attemptedDate=new Date(aa,mm-1,jj,hh,mn);originalDate=new Date($("#hidden_aa").val(),$("#hidden_mm").val()-1,$("#hidden_jj").val(),$("#hidden_hh").val(),$("#hidden_mn").val());currentDate=new Date($("#cur_aa").val(),$("#cur_mm").val()-1,$("#cur_jj").val(),$("#cur_hh").val(),$("#cur_mn").val());if(attemptedDate.getFullYear()!=aa||(1+attemptedDate.getMonth())!=mm||attemptedDate.getDate()!=jj||attemptedDate.getMinutes()!=mn){$(".timestamp-wrap","#timestampdiv").addClass("form-invalid");return false}else{$(".timestamp-wrap","#timestampdiv").removeClass("form-invalid")}if(attemptedDate>currentDate&&$("#original_post_status").val()!="future"){publishOn=postL10n.publishOnFuture;$("#publish").val(postL10n.schedule)}else{if(attemptedDate<=currentDate&&$("#original_post_status").val()!="publish"){publishOn=postL10n.publishOn;$("#publish").val(postL10n.publish)}else{publishOn=postL10n.publishOnPast;if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}}}if(originalDate.toUTCString()==attemptedDate.toUTCString()){$("#timestamp").html(stamp)}else{$("#timestamp").html(publishOn+" <b>"+$("option[value="+$("#mm").val()+"]","#mm").text()+" "+jj+", "+aa+" @ "+hh+":"+mn+"</b> ")}if($("input:radio:checked","#post-visibility-select").val()=="private"){if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}if(optPublish.length==0){postStatus.append('<option value="publish">'+postL10n.privatelyPublished+"</option>")}else{optPublish.html(postL10n.privatelyPublished)}$("option[value=publish]",postStatus).attr("selected",true);$(".edit-post-status","#misc-publishing-actions").hide()}else{if($("#original_post_status").val()=="future"||$("#original_post_status").val()=="draft"){if(optPublish.length){optPublish.remove();postStatus.val($("#hidden_post_status").val())}}else{optPublish.html(postL10n.published)}if(postStatus.is(":hidden")){$(".edit-post-status","#misc-publishing-actions").show()}}$("#post-status-display").html($("option:selected",postStatus).text());if($("option:selected",postStatus).val()=="private"||$("option:selected",postStatus).val()=="publish"){$("#save-post").hide()}else{$("#save-post").show();if($("option:selected",postStatus).val()=="pending"){$("#save-post").show().val(postL10n.savePending)}else{$("#save-post").show().val(postL10n.saveDraft)}}return true}$(".edit-visibility","#visibility").click(function(){if($("#post-visibility-select").is(":hidden")){updateVisibility();$("#post-visibility-select").slideDown("normal");$(this).hide()}return false});$(".cancel-post-visibility","#post-visibility-select").click(function(){$("#post-visibility-select").slideUp("normal");$("#visibility-radio-"+$("#hidden-post-visibility").val()).attr("checked",true);$("#post_password").val($("#hidden_post_password").val());$("#sticky").attr("checked",$("#hidden-post-sticky").attr("checked"));$("#post-visibility-display").html(visibility);$(".edit-visibility","#visibility").show();updateText();return false});$(".save-post-visibility","#post-visibility-select").click(function(){var pvSelect=$("#post-visibility-select");pvSelect.slideUp("normal");$(".edit-visibility","#visibility").show();updateText();if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false)}if(true==$("#sticky").attr("checked")){sticky="Sticky"}else{sticky=""}$("#post-visibility-display").html(postL10n[$("input:radio:checked",pvSelect).val()+sticky]);return false});$("input:radio","#post-visibility-select").change(function(){updateVisibility()});$("#timestampdiv").siblings("a.edit-timestamp").click(function(){if($("#timestampdiv").is(":hidden")){$("#timestampdiv").slideDown("normal");$(this).hide()}return false});$(".cancel-timestamp","#timestampdiv").click(function(){$("#timestampdiv").slideUp("normal");$("#mm").val($("#hidden_mm").val());$("#jj").val($("#hidden_jj").val());$("#aa").val($("#hidden_aa").val());$("#hh").val($("#hidden_hh").val());$("#mn").val($("#hidden_mn").val());$("#timestampdiv").siblings("a.edit-timestamp").show();updateText();return false});$(".save-timestamp","#timestampdiv").click(function(){if(updateText()){$("#timestampdiv").slideUp("normal");$("#timestampdiv").siblings("a.edit-timestamp").show()}return false});$("#post-status-select").siblings("a.edit-post-status").click(function(){if($("#post-status-select").is(":hidden")){$("#post-status-select").slideDown("normal");$(this).hide()}return false});$(".save-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false});$(".cancel-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post_status").val($("#hidden_post_status").val());$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false})}if($("#edit-slug-box").length){editPermalink=function(post_id){var i,c=0,e=$("#editable-post-name"),revert_e=e.html(),real_slug=$("#post_name"),revert_slug=real_slug.val(),b=$("#edit-slug-buttons"),revert_b=b.html(),full=$("#editable-post-name-full").html();$("#view-post-btn").hide();b.html('<a href="#" class="save button">'+postL10n.ok+'</a> <a class="cancel" href="#">'+postL10n.cancel+"</a>");b.children(".save").click(function(){var new_slug=e.children("input").val();$.post(ajaxurl,{action:"sample-permalink",post_id:post_id,new_slug:new_slug,new_title:$("#title").val(),samplepermalinknonce:$("#samplepermalinknonce").val()},function(data){$("#edit-slug-box").html(data);b.html(revert_b);real_slug.attr("value",new_slug);makeSlugeditClickable();$("#view-post-btn").show()});return false});$(".cancel","#edit-slug-buttons").click(function(){$("#view-post-btn").show();e.html(revert_e);b.html(revert_b);real_slug.attr("value",revert_slug);return false});for(i=0;i<full.length;++i){if("%"==full.charAt(i)){c++}}slug_value=(c>full.length/4)?"":full;e.html('<input type="text" id="new-post-slug" value="'+slug_value+'" />').children("input").keypress(function(e){var key=e.keyCode||0;if(13==key){b.children(".save").click();return false}if(27==key){b.children(".cancel").click();return false}real_slug.attr("value",this.value)}).focus()};makeSlugeditClickable=function(){$("#editable-post-name").click(function(){$("#edit-slug-buttons").children(".edit-slug").click()})};makeSlugeditClickable()}if($("#title").val()==""){$("#title").siblings("#title-prompt-text").css("visibility","")}$("#title-prompt-text").click(function(){$(this).css("visibility","hidden").siblings("#title").focus()});$("#title").blur(function(){if(this.value==""){$(this).siblings("#title-prompt-text").css("visibility","")}}).focus(function(){$(this).siblings("#title-prompt-text").css("visibility","hidden")}).keydown(function(e){$(this).siblings("#title-prompt-text").css("visibility","hidden");$(this).unbind(e)})}); | var tagBox,commentsBox,editPermalink,makeSlugeditClickable,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail;function array_unique_noempty(a){var out=[];jQuery.each(a,function(key,val){val=jQuery.trim(val);if(val&&jQuery.inArray(val,out)==-1){out.push(val)}});return out}(function($){tagBox={clean:function(tags){return tags.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"")},parseTags:function(el){var id=el.id,num=id.split("-check-num-")[1],taxbox=$(el).closest(".tagsdiv"),thetags=taxbox.find(".the-tags"),current_tags=thetags.val().split(","),new_tags=[];delete current_tags[num];$.each(current_tags,function(key,val){val=$.trim(val);if(val){new_tags.push(val)}});thetags.val(this.clean(new_tags.join(",")));this.quickClicks(taxbox);return false},quickClicks:function(el){var thetags=$(".the-tags",el),tagchecklist=$(".tagchecklist",el),current_tags;if(!thetags.length){return}var disabled=thetags.attr("disabled");current_tags=thetags.val().split(",");tagchecklist.empty();$.each(current_tags,function(key,val){var txt,button_id,id=$(el).attr("id");val=$.trim(val);if(!val.match(/^\s+$/)&&""!=val){button_id=id+"-check-num-"+key;if(disabled){txt="<span>"+val+"</span> "}else{txt='<span><a id="'+button_id+'" class="ntdelbutton">X</a> '+val+"</span> "}tagchecklist.append(txt);if(!disabled){$("#"+button_id).click(function(){tagBox.parseTags(this)})}}})},flushTags:function(el,a,f){a=a||false;var text,tags=$(".the-tags",el),newtag=$("input.newtag",el),newtags;text=a?$(a).text():newtag.val();tagsval=tags.val();newtags=tagsval?tagsval+","+text:text;newtags=this.clean(newtags);newtags=array_unique_noempty(newtags.split(",")).join(",");tags.val(newtags);this.quickClicks(el);if(!a){newtag.val("")}if("undefined"==typeof(f)){newtag.focus()}return false},get:function(id){var tax=id.substr(id.indexOf("-")+1);$.post(ajaxurl,{action:"get-tagcloud",tax:tax},function(r,stat){if(0==r||"success"!=stat){r=wpAjax.broken}r=$('<p id="tagcloud-'+tax+'" class="the-tagcloud">'+r+"</p>");$("a",r).click(function(){tagBox.flushTags($(this).closest(".inside").children(".tagsdiv"),this);return false});$("#"+id).after(r)})},init:function(){var t=this,ajaxtag=$("div.ajaxtag");$(".tagsdiv").each(function(){tagBox.quickClicks(this)});$("input.tagadd",ajaxtag).click(function(){t.flushTags($(this).closest(".tagsdiv"))});$("div.taghint",ajaxtag).click(function(){$(this).css("visibility","hidden").siblings(".newtag").focus()});$("input.newtag",ajaxtag).blur(function(){if(this.value==""){$(this).siblings(".taghint").css("visibility","")}}).focus(function(){$(this).siblings(".taghint").css("visibility","hidden")}).keyup(function(e){if(13==e.which){tagBox.flushTags($(this).closest(".tagsdiv"));return false}}).keypress(function(e){if(13==e.which){e.preventDefault();return false}}).each(function(){var tax=$(this).closest("div.tagsdiv").attr("id");$(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+tax,{delay:500,minchars:2,multiple:true,multipleSep:","})});$("#post").submit(function(){$("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});$("a.tagcloud-link").click(function(){tagBox.get($(this).attr("id"));$(this).unbind().click(function(){$(this).siblings(".the-tagcloud").toggle();return false});return false})}};commentsBox={st:0,get:function(total,num){var st=this.st,data;if(!num){num=20}this.st+=num;this.total=total;$("#commentsdiv img.waiting").show();data={action:"get-comments",mode:"single",_ajax_nonce:$("#add_comment_nonce").val(),post_ID:$("#post_ID").val(),start:st,num:num};$.post(ajaxurl,data,function(r){r=wpAjax.parseAjaxResponse(r);$("#commentsdiv .widefat").show();$("#commentsdiv img.waiting").hide();if("object"==typeof r&&r.responses[0]){$("#the-comment-list").append(r.responses[0].data);theList=theExtraList=null;$("a[className*=':']").unbind();setCommentsList();if(commentsBox.st>commentsBox.total){$("#show-comments").hide()}else{$("#show-comments").html(postL10n.showcomm)}return}else{if(1==r){$("#show-comments").parent().html(postL10n.endcomm);return}}$("#the-comment-list").append('<tr><td colspan="2">'+wpAjax.broken+"</td></tr>")});return false}};WPSetThumbnailHTML=function(html){$(".inside","#postimagediv").html(html)};WPSetThumbnailID=function(id){var field=$("input[value=_thumbnail_id]","#list-table");if(field.size()>0){$("#meta\\["+field.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(id)}};WPRemoveThumbnail=function(){$.post(ajaxurl,{action:"set-post-thumbnail",post_id:$("#post_ID").val(),thumbnail_id:-1,cookie:encodeURIComponent(document.cookie)},function(str){if(str=="0"){alert(setPostThumbnailL10n.error)}else{WPSetThumbnailHTML(str)}})}})(jQuery);jQuery(document).ready(function($){var stamp,visibility,sticky="";postboxes.add_postbox_toggles(pagenow);if($("#tagsdiv-post_tag").length){tagBox.init()}else{$("#side-sortables, #normal-sortables, #advanced-sortables").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}})}$(".categorydiv").each(function(){var this_id=$(this).attr("id"),noSyncChecks=false,syncChecks,catAddAfter,taxonomyParts,taxonomy,settingName;taxonomyParts=this_id.split("-");taxonomyParts.shift();taxonomy=taxonomyParts.join("-");settingName=taxonomy+"_tab";if(taxonomy=="category"){settingName="cats"}$("a","#"+taxonomy+"-tabs").click(function(){var t=$(this).attr("href");$(this).parent().addClass("tabs").siblings("li").removeClass("tabs");$("#"+taxonomy+"-tabs").siblings(".tabs-panel").hide();$(t).show();if("#"+taxonomy+"-all"==t){deleteUserSetting(settingName)}else{setUserSetting(settingName,"pop")}return false});if(getUserSetting(settingName)){$('a[href="#'+taxonomy+'-pop"]',"#"+taxonomy+"-tabs").click()}$("#new"+taxonomy).one("focus",function(){$(this).val("").removeClass("form-input-tip")});$("#"+taxonomy+"-add-submit").click(function(){$("#new"+taxonomy).focus()});syncChecks=function(){if(noSyncChecks){return}noSyncChecks=true;var th=jQuery(this),c=th.is(":checked"),id=th.val().toString();$("#in-"+taxonomy+"-"+id+", #in-"+taxonomy+"-category-"+id).attr("checked",c);noSyncChecks=false};catAddBefore=function(s){if(!$("#new"+taxonomy).val()){return false}s.data+="&"+$(":checked","#"+taxonomy+"checklist").serialize();return s};catAddAfter=function(r,s){var sup,drop=$("#new"+taxonomy+"_parent");if("undefined"!=s.parsed.responses[0]&&(sup=s.parsed.responses[0].supplemental.newcat_parent)){drop.before(sup);drop.remove()}};$("#"+taxonomy+"checklist").wpList({alt:"",response:taxonomy+"-ajax-response",addBefore:catAddBefore,addAfter:catAddAfter});$("#"+taxonomy+"-add-toggle").click(function(){$("#"+taxonomy+"-adder").toggleClass("wp-hidden-children");$('a[href="#'+taxonomy+'-all"]',"#"+taxonomy+"-tabs").click();return false});$("#"+taxonomy+"checklist li.popular-category :checkbox, #"+taxonomy+"checklist-pop :checkbox").live("click",function(){var t=$(this),c=t.is(":checked"),id=t.val();if(id&&t.parents("#taxonomy-"+taxonomy).length){$("#in-"+taxonomy+"-"+id+", #in-popular-"+taxonomy+"-"+id).attr("checked",c)}})});if($("#postcustom").length){$("#the-list").wpList({addAfter:function(xml,s){$("table#list-table").show();if(typeof(autosave_update_post_ID)!="undefined"){autosave_update_post_ID(s.parsed.responses[0].supplemental.postid)}},addBefore:function(s){s.data+="&post_id="+$("#post_ID").val();return s}})}if($("#submitdiv").length){stamp=$("#timestamp").html();visibility=$("#post-visibility-display").html();function updateVisibility(){var pvSelect=$("#post-visibility-select");if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false);$("#sticky-span").hide()}else{$("#sticky-span").show()}if($("input:radio:checked",pvSelect).val()!="password"){$("#password-span").hide()}else{$("#password-span").show()}}function updateText(){var attemptedDate,originalDate,currentDate,publishOn,page="page"==pagenow||"page-new"==pagenow,postStatus=$("#post_status"),optPublish=$("option[value=publish]",postStatus),aa=$("#aa").val(),mm=$("#mm").val(),jj=$("#jj").val(),hh=$("#hh").val(),mn=$("#mn").val();attemptedDate=new Date(aa,mm-1,jj,hh,mn);originalDate=new Date($("#hidden_aa").val(),$("#hidden_mm").val()-1,$("#hidden_jj").val(),$("#hidden_hh").val(),$("#hidden_mn").val());currentDate=new Date($("#cur_aa").val(),$("#cur_mm").val()-1,$("#cur_jj").val(),$("#cur_hh").val(),$("#cur_mn").val());if(attemptedDate.getFullYear()!=aa||(1+attemptedDate.getMonth())!=mm||attemptedDate.getDate()!=jj||attemptedDate.getMinutes()!=mn){$(".timestamp-wrap","#timestampdiv").addClass("form-invalid");return false}else{$(".timestamp-wrap","#timestampdiv").removeClass("form-invalid")}if(attemptedDate>currentDate&&$("#original_post_status").val()!="future"){publishOn=postL10n.publishOnFuture;$("#publish").val(postL10n.schedule)}else{if(attemptedDate<=currentDate&&$("#original_post_status").val()!="publish"){publishOn=postL10n.publishOn;$("#publish").val(postL10n.publish)}else{publishOn=postL10n.publishOnPast;if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}}}if(originalDate.toUTCString()==attemptedDate.toUTCString()){$("#timestamp").html(stamp)}else{$("#timestamp").html(publishOn+" <b>"+$("option[value="+$("#mm").val()+"]","#mm").text()+" "+jj+", "+aa+" @ "+hh+":"+mn+"</b> ")}if($("input:radio:checked","#post-visibility-select").val()=="private"){if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}if(optPublish.length==0){postStatus.append('<option value="publish">'+postL10n.privatelyPublished+"</option>")}else{optPublish.html(postL10n.privatelyPublished)}$("option[value=publish]",postStatus).attr("selected",true);$(".edit-post-status","#misc-publishing-actions").hide()}else{if($("#original_post_status").val()=="future"||$("#original_post_status").val()=="draft"){if(optPublish.length){optPublish.remove();postStatus.val($("#hidden_post_status").val())}}else{optPublish.html(postL10n.published)}if(postStatus.is(":hidden")){$(".edit-post-status","#misc-publishing-actions").show()}}$("#post-status-display").html($("option:selected",postStatus).text());if($("option:selected",postStatus).val()=="private"||$("option:selected",postStatus).val()=="publish"){$("#save-post").hide()}else{$("#save-post").show();if($("option:selected",postStatus).val()=="pending"){$("#save-post").show().val(postL10n.savePending)}else{$("#save-post").show().val(postL10n.saveDraft)}}return true}$(".edit-visibility","#visibility").click(function(){if($("#post-visibility-select").is(":hidden")){updateVisibility();$("#post-visibility-select").slideDown("normal");$(this).hide()}return false});$(".cancel-post-visibility","#post-visibility-select").click(function(){$("#post-visibility-select").slideUp("normal");$("#visibility-radio-"+$("#hidden-post-visibility").val()).attr("checked",true);$("#post_password").val($("#hidden_post_password").val());$("#sticky").attr("checked",$("#hidden-post-sticky").attr("checked"));$("#post-visibility-display").html(visibility);$(".edit-visibility","#visibility").show();updateText();return false});$(".save-post-visibility","#post-visibility-select").click(function(){var pvSelect=$("#post-visibility-select");pvSelect.slideUp("normal");$(".edit-visibility","#visibility").show();updateText();if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false)}if(true==$("#sticky").attr("checked")){sticky="Sticky"}else{sticky=""}$("#post-visibility-display").html(postL10n[$("input:radio:checked",pvSelect).val()+sticky]);return false});$("input:radio","#post-visibility-select").change(function(){updateVisibility()});$("#timestampdiv").siblings("a.edit-timestamp").click(function(){if($("#timestampdiv").is(":hidden")){$("#timestampdiv").slideDown("normal");$(this).hide()}return false});$(".cancel-timestamp","#timestampdiv").click(function(){$("#timestampdiv").slideUp("normal");$("#mm").val($("#hidden_mm").val());$("#jj").val($("#hidden_jj").val());$("#aa").val($("#hidden_aa").val());$("#hh").val($("#hidden_hh").val());$("#mn").val($("#hidden_mn").val());$("#timestampdiv").siblings("a.edit-timestamp").show();updateText();return false});$(".save-timestamp","#timestampdiv").click(function(){if(updateText()){$("#timestampdiv").slideUp("normal");$("#timestampdiv").siblings("a.edit-timestamp").show()}return false});$("#post-status-select").siblings("a.edit-post-status").click(function(){if($("#post-status-select").is(":hidden")){$("#post-status-select").slideDown("normal");$(this).hide()}return false});$(".save-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false});$(".cancel-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post_status").val($("#hidden_post_status").val());$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false})}if($("#edit-slug-box").length){editPermalink=function(post_id){var i,c=0,e=$("#editable-post-name"),revert_e=e.html(),real_slug=$("#post_name"),revert_slug=real_slug.val(),b=$("#edit-slug-buttons"),revert_b=b.html(),full=$("#editable-post-name-full").html();$("#view-post-btn").hide();b.html('<a href="#" class="save button">'+postL10n.ok+'</a> <a class="cancel" href="#">'+postL10n.cancel+"</a>");b.children(".save").click(function(){var new_slug=e.children("input").val();$.post(ajaxurl,{action:"sample-permalink",post_id:post_id,new_slug:new_slug,new_title:$("#title").val(),samplepermalinknonce:$("#samplepermalinknonce").val()},function(data){$("#edit-slug-box").html(data);b.html(revert_b);real_slug.attr("value",new_slug);makeSlugeditClickable();$("#view-post-btn").show()});return false});$(".cancel","#edit-slug-buttons").click(function(){$("#view-post-btn").show();e.html(revert_e);b.html(revert_b);real_slug.attr("value",revert_slug);return false});for(i=0;i<full.length;++i){if("%"==full.charAt(i)){c++}}slug_value=(c>full.length/4)?"":full;e.html('<input type="text" id="new-post-slug" value="'+slug_value+'" />').children("input").keypress(function(e){var key=e.keyCode||0;if(13==key){b.children(".save").click();return false}if(27==key){b.children(".cancel").click();return false}real_slug.attr("value",this.value)}).focus()};makeSlugeditClickable=function(){$("#editable-post-name").click(function(){$("#edit-slug-buttons").children(".edit-slug").click()})};makeSlugeditClickable()}if($("#title").val()==""){$("#title").siblings("#title-prompt-text").css("visibility","")}$("#title-prompt-text").click(function(){$(this).css("visibility","hidden").siblings("#title").focus()});$("#title").blur(function(){if(this.value==""){$(this).siblings("#title-prompt-text").css("visibility","")}}).focus(function(){$(this).siblings("#title-prompt-text").css("visibility","hidden")}).keydown(function(e){$(this).siblings("#title-prompt-text").css("visibility","hidden");$(this).unbind(e)})}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/689a9bed1ba9ed444c2e4895ace34e75d59f01e6/post.js/buggy/wp-admin/js/post.js |
var tagBox,commentsBox,editPermalink,makeSlugeditClickable,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail;function array_unique_noempty(a){var out=[];jQuery.each(a,function(key,val){val=jQuery.trim(val);if(val&&jQuery.inArray(val,out)==-1){out.push(val)}});return out}(function($){tagBox={clean:function(tags){return tags.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"")},parseTags:function(el){var id=el.id,num=id.split("-check-num-")[1],taxbox=$(el).closest(".tagsdiv"),thetags=taxbox.find(".the-tags"),current_tags=thetags.val().split(","),new_tags=[];delete current_tags[num];$.each(current_tags,function(key,val){val=$.trim(val);if(val){new_tags.push(val)}});thetags.val(this.clean(new_tags.join(",")));this.quickClicks(taxbox);return false},quickClicks:function(el){var thetags=$(".the-tags",el),tagchecklist=$(".tagchecklist",el),current_tags;if(!thetags.length){return}var disabled=thetags.attr("disabled");current_tags=thetags.val().split(",");tagchecklist.empty();$.each(current_tags,function(key,val){var txt,button_id,id=$(el).attr("id");val=$.trim(val);if(!val.match(/^\s+$/)&&""!=val){button_id=id+"-check-num-"+key;if(disabled){txt="<span>"+val+"</span> "}else{txt='<span><a id="'+button_id+'" class="ntdelbutton">X</a> '+val+"</span> "}tagchecklist.append(txt);if(!disabled){$("#"+button_id).click(function(){tagBox.parseTags(this)})}}})},flushTags:function(el,a,f){a=a||false;var text,tags=$(".the-tags",el),newtag=$("input.newtag",el),newtags;text=a?$(a).text():newtag.val();tagsval=tags.val();newtags=tagsval?tagsval+","+text:text;newtags=this.clean(newtags);newtags=array_unique_noempty(newtags.split(",")).join(",");tags.val(newtags);this.quickClicks(el);if(!a){newtag.val("")}if("undefined"==typeof(f)){newtag.focus()}return false},get:function(id){var tax=id.substr(id.indexOf("-")+1);$.post(ajaxurl,{action:"get-tagcloud",tax:tax},function(r,stat){if(0==r||"success"!=stat){r=wpAjax.broken}r=$('<p id="tagcloud-'+tax+'" class="the-tagcloud">'+r+"</p>");$("a",r).click(function(){tagBox.flushTags($(this).closest(".inside").children(".tagsdiv"),this);return false});$("#"+id).after(r)})},init:function(){var t=this,ajaxtag=$("div.ajaxtag");$(".tagsdiv").each(function(){tagBox.quickClicks(this)});$("input.tagadd",ajaxtag).click(function(){t.flushTags($(this).closest(".tagsdiv"))});$("div.taghint",ajaxtag).click(function(){$(this).css("visibility","hidden").siblings(".newtag").focus()});$("input.newtag",ajaxtag).blur(function(){if(this.value==""){$(this).siblings(".taghint").css("visibility","")}}).focus(function(){$(this).siblings(".taghint").css("visibility","hidden")}).keyup(function(e){if(13==e.which){tagBox.flushTags($(this).closest(".tagsdiv"));return false}}).keypress(function(e){if(13==e.which){e.preventDefault();return false}}).each(function(){var tax=$(this).closest("div.tagsdiv").attr("id");$(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+tax,{delay:500,minchars:2,multiple:true,multipleSep:", "})});$("#post").submit(function(){$("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});$("a.tagcloud-link").click(function(){tagBox.get($(this).attr("id"));$(this).unbind().click(function(){$(this).siblings(".the-tagcloud").toggle();return false});return false})}};commentsBox={st:0,get:function(total,num){var st=this.st,data;if(!num){num=20}this.st+=num;this.total=total;$("#commentsdiv img.waiting").show();data={action:"get-comments",mode:"single",_ajax_nonce:$("#add_comment_nonce").val(),post_ID:$("#post_ID").val(),start:st,num:num};$.post(ajaxurl,data,function(r){r=wpAjax.parseAjaxResponse(r);$("#commentsdiv .widefat").show();$("#commentsdiv img.waiting").hide();if("object"==typeof r&&r.responses[0]){$("#the-comment-list").append(r.responses[0].data);theList=theExtraList=null;$("a[className*=':']").unbind();setCommentsList();if(commentsBox.st>commentsBox.total){$("#show-comments").hide()}else{$("#show-comments").html(postL10n.showcomm)}return}else{if(1==r){$("#show-comments").parent().html(postL10n.endcomm);return}}$("#the-comment-list").append('<tr><td colspan="2">'+wpAjax.broken+"</td></tr>")});return false}};WPSetThumbnailHTML=function(html){$(".inside","#postimagediv").html(html)};WPSetThumbnailID=function(id){var field=$("input[value=_thumbnail_id]","#list-table");if(field.size()>0){$("#meta\\["+field.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(id)}};WPRemoveThumbnail=function(){$.post(ajaxurl,{action:"set-post-thumbnail",post_id:$("#post_ID").val(),thumbnail_id:-1,cookie:encodeURIComponent(document.cookie)},function(str){if(str=="0"){alert(setPostThumbnailL10n.error)}else{WPSetThumbnailHTML(str)}})}})(jQuery);jQuery(document).ready(function($){var stamp,visibility,sticky="";postboxes.add_postbox_toggles(pagenow);if($("#tagsdiv-post_tag").length){tagBox.init()}else{$("#side-sortables, #normal-sortables, #advanced-sortables").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}})}$(".categorydiv").each(function(){var this_id=$(this).attr("id"),noSyncChecks=false,syncChecks,catAddAfter,taxonomyParts,taxonomy,settingName;taxonomyParts=this_id.split("-");taxonomyParts.shift();taxonomy=taxonomyParts.join("-");settingName=taxonomy+"_tab";if(taxonomy=="category"){settingName="cats"}$("a","#"+taxonomy+"-tabs").click(function(){var t=$(this).attr("href");$(this).parent().addClass("tabs").siblings("li").removeClass("tabs");$("#"+taxonomy+"-tabs").siblings(".tabs-panel").hide();$(t).show();if("#"+taxonomy+"-all"==t){deleteUserSetting(settingName)}else{setUserSetting(settingName,"pop")}return false});if(getUserSetting(settingName)){$('a[href="#'+taxonomy+'-pop"]',"#"+taxonomy+"-tabs").click()}$("#new"+taxonomy).one("focus",function(){$(this).val("").removeClass("form-input-tip")});$("#"+taxonomy+"-add-submit").click(function(){$("#new"+taxonomy).focus()});syncChecks=function(){if(noSyncChecks){return}noSyncChecks=true;var th=jQuery(this),c=th.is(":checked"),id=th.val().toString();$("#in-"+taxonomy+"-"+id+", #in-"+taxonomy+"-category-"+id).attr("checked",c);noSyncChecks=false};catAddBefore=function(s){if(!$("#new"+taxonomy).val()){return false}s.data+="&"+$(":checked","#"+taxonomy+"checklist").serialize();return s};catAddAfter=function(r,s){var sup,drop=$("#new"+taxonomy+"_parent");if("undefined"!=s.parsed.responses[0]&&(sup=s.parsed.responses[0].supplemental.newcat_parent)){drop.before(sup);drop.remove()}};$("#"+taxonomy+"checklist").wpList({alt:"",response:taxonomy+"-ajax-response",addBefore:catAddBefore,addAfter:catAddAfter});$("#"+taxonomy+"-add-toggle").click(function(){$("#"+taxonomy+"-adder").toggleClass("wp-hidden-children");$('a[href="#'+taxonomy+'-all"]',"#"+taxonomy+"-tabs").click();return false});$("#"+taxonomy+"checklist li.popular-category :checkbox, #"+taxonomy+"checklist-pop :checkbox").live("click",function(){var t=$(this),c=t.is(":checked"),id=t.val();if(id&&t.parents("#taxonomy-"+taxonomy).length){$("#in-"+taxonomy+"-"+id+", #in-popular-"+taxonomy+"-"+id).attr("checked",c)}})});if($("#postcustom").length){$("#the-list").wpList({addAfter:function(xml,s){$("table#list-table").show();if(typeof(autosave_update_post_ID)!="undefined"){autosave_update_post_ID(s.parsed.responses[0].supplemental.postid)}},addBefore:function(s){s.data+="&post_id="+$("#post_ID").val();return s}})}if($("#submitdiv").length){stamp=$("#timestamp").html();visibility=$("#post-visibility-display").html();function updateVisibility(){var pvSelect=$("#post-visibility-select");if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false);$("#sticky-span").hide()}else{$("#sticky-span").show()}if($("input:radio:checked",pvSelect).val()!="password"){$("#password-span").hide()}else{$("#password-span").show()}}function updateText(){var attemptedDate,originalDate,currentDate,publishOn,page="page"==pagenow||"page-new"==pagenow,postStatus=$("#post_status"),optPublish=$("option[value=publish]",postStatus),aa=$("#aa").val(),mm=$("#mm").val(),jj=$("#jj").val(),hh=$("#hh").val(),mn=$("#mn").val();attemptedDate=new Date(aa,mm-1,jj,hh,mn);originalDate=new Date($("#hidden_aa").val(),$("#hidden_mm").val()-1,$("#hidden_jj").val(),$("#hidden_hh").val(),$("#hidden_mn").val());currentDate=new Date($("#cur_aa").val(),$("#cur_mm").val()-1,$("#cur_jj").val(),$("#cur_hh").val(),$("#cur_mn").val());if(attemptedDate.getFullYear()!=aa||(1+attemptedDate.getMonth())!=mm||attemptedDate.getDate()!=jj||attemptedDate.getMinutes()!=mn){$(".timestamp-wrap","#timestampdiv").addClass("form-invalid");return false}else{$(".timestamp-wrap","#timestampdiv").removeClass("form-invalid")}if(attemptedDate>currentDate&&$("#original_post_status").val()!="future"){publishOn=postL10n.publishOnFuture;$("#publish").val(postL10n.schedule)}else{if(attemptedDate<=currentDate&&$("#original_post_status").val()!="publish"){publishOn=postL10n.publishOn;$("#publish").val(postL10n.publish)}else{publishOn=postL10n.publishOnPast;if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}}}if(originalDate.toUTCString()==attemptedDate.toUTCString()){$("#timestamp").html(stamp)}else{$("#timestamp").html(publishOn+" <b>"+$("option[value="+$("#mm").val()+"]","#mm").text()+" "+jj+", "+aa+" @ "+hh+":"+mn+"</b> ")}if($("input:radio:checked","#post-visibility-select").val()=="private"){if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}if(optPublish.length==0){postStatus.append('<option value="publish">'+postL10n.privatelyPublished+"</option>")}else{optPublish.html(postL10n.privatelyPublished)}$("option[value=publish]",postStatus).attr("selected",true);$(".edit-post-status","#misc-publishing-actions").hide()}else{if($("#original_post_status").val()=="future"||$("#original_post_status").val()=="draft"){if(optPublish.length){optPublish.remove();postStatus.val($("#hidden_post_status").val())}}else{optPublish.html(postL10n.published)}if(postStatus.is(":hidden")){$(".edit-post-status","#misc-publishing-actions").show()}}$("#post-status-display").html($("option:selected",postStatus).text());if($("option:selected",postStatus).val()=="private"||$("option:selected",postStatus).val()=="publish"){$("#save-post").hide()}else{$("#save-post").show();if($("option:selected",postStatus).val()=="pending"){$("#save-post").show().val(postL10n.savePending)}else{$("#save-post").show().val(postL10n.saveDraft)}}return true}$(".edit-visibility","#visibility").click(function(){if($("#post-visibility-select").is(":hidden")){updateVisibility();$("#post-visibility-select").slideDown("normal");$(this).hide()}return false});$(".cancel-post-visibility","#post-visibility-select").click(function(){$("#post-visibility-select").slideUp("normal");$("#visibility-radio-"+$("#hidden-post-visibility").val()).attr("checked",true);$("#post_password").val($("#hidden_post_password").val());$("#sticky").attr("checked",$("#hidden-post-sticky").attr("checked"));$("#post-visibility-display").html(visibility);$(".edit-visibility","#visibility").show();updateText();return false});$(".save-post-visibility","#post-visibility-select").click(function(){var pvSelect=$("#post-visibility-select");pvSelect.slideUp("normal");$(".edit-visibility","#visibility").show();updateText();if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false)}if(true==$("#sticky").attr("checked")){sticky="Sticky"}else{sticky=""}$("#post-visibility-display").html(postL10n[$("input:radio:checked",pvSelect).val()+sticky]);return false});$("input:radio","#post-visibility-select").change(function(){updateVisibility()});$("#timestampdiv").siblings("a.edit-timestamp").click(function(){if($("#timestampdiv").is(":hidden")){$("#timestampdiv").slideDown("normal");$(this).hide()}return false});$(".cancel-timestamp","#timestampdiv").click(function(){$("#timestampdiv").slideUp("normal");$("#mm").val($("#hidden_mm").val());$("#jj").val($("#hidden_jj").val());$("#aa").val($("#hidden_aa").val());$("#hh").val($("#hidden_hh").val());$("#mn").val($("#hidden_mn").val());$("#timestampdiv").siblings("a.edit-timestamp").show();updateText();return false});$(".save-timestamp","#timestampdiv").click(function(){if(updateText()){$("#timestampdiv").slideUp("normal");$("#timestampdiv").siblings("a.edit-timestamp").show()}return false});$("#post-status-select").siblings("a.edit-post-status").click(function(){if($("#post-status-select").is(":hidden")){$("#post-status-select").slideDown("normal");$(this).hide()}return false});$(".save-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false});$(".cancel-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post_status").val($("#hidden_post_status").val());$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false})}if($("#edit-slug-box").length){editPermalink=function(post_id){var i,c=0,e=$("#editable-post-name"),revert_e=e.html(),real_slug=$("#post_name"),revert_slug=real_slug.val(),b=$("#edit-slug-buttons"),revert_b=b.html(),full=$("#editable-post-name-full").html();$("#view-post-btn").hide();b.html('<a href="#" class="save button">'+postL10n.ok+'</a> <a class="cancel" href="#">'+postL10n.cancel+"</a>");b.children(".save").click(function(){var new_slug=e.children("input").val();$.post(ajaxurl,{action:"sample-permalink",post_id:post_id,new_slug:new_slug,new_title:$("#title").val(),samplepermalinknonce:$("#samplepermalinknonce").val()},function(data){$("#edit-slug-box").html(data);b.html(revert_b);real_slug.attr("value",new_slug);makeSlugeditClickable();$("#view-post-btn").show()});return false});$(".cancel","#edit-slug-buttons").click(function(){$("#view-post-btn").show();e.html(revert_e);b.html(revert_b);real_slug.attr("value",revert_slug);return false});for(i=0;i<full.length;++i){if("%"==full.charAt(i)){c++}}slug_value=(c>full.length/4)?"":full;e.html('<input type="text" id="new-post-slug" value="'+slug_value+'" />').children("input").keypress(function(e){var key=e.keyCode||0;if(13==key){b.children(".save").click();return false}if(27==key){b.children(".cancel").click();return false}real_slug.attr("value",this.value)}).focus()};makeSlugeditClickable=function(){$("#editable-post-name").click(function(){$("#edit-slug-buttons").children(".edit-slug").click()})};makeSlugeditClickable()}if($("#title").val()==""){$("#title").siblings("#title-prompt-text").css("visibility","")}$("#title-prompt-text").click(function(){$(this).css("visibility","hidden").siblings("#title").focus()});$("#title").blur(function(){if(this.value==""){$(this).siblings("#title-prompt-text").css("visibility","")}}).focus(function(){$(this).siblings("#title-prompt-text").css("visibility","hidden")}).keydown(function(e){$(this).siblings("#title-prompt-text").css("visibility","hidden");$(this).unbind(e)})}); | var tagBox,commentsBox,editPermalink,makeSlugeditClickable,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail;function array_unique_noempty(a){var out=[];jQuery.each(a,function(key,val){val=jQuery.trim(val);if(val&&jQuery.inArray(val,out)==-1){out.push(val)}});return out}(function($){tagBox={clean:function(tags){return tags.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"")},parseTags:function(el){var id=el.id,num=id.split("-check-num-")[1],taxbox=$(el).closest(".tagsdiv"),thetags=taxbox.find(".the-tags"),current_tags=thetags.val().split(","),new_tags=[];delete current_tags[num];$.each(current_tags,function(key,val){val=$.trim(val);if(val){new_tags.push(val)}});thetags.val(this.clean(new_tags.join(",")));this.quickClicks(taxbox);return false},quickClicks:function(el){var thetags=$(".the-tags",el),tagchecklist=$(".tagchecklist",el),current_tags;if(!thetags.length){return}var disabled=thetags.attr("disabled");current_tags=thetags.val().split(",");tagchecklist.empty();$.each(current_tags,function(key,val){var txt,button_id,id=$(el).attr("id");val=$.trim(val);if(!val.match(/^\s+$/)&&""!=val){button_id=id+"-check-num-"+key;if(disabled){txt="<span>"+val+"</span> "}else{txt='<span><a id="'+button_id+'" class="ntdelbutton">X</a> '+val+"</span> "}tagchecklist.append(txt);if(!disabled){$("#"+button_id).click(function(){tagBox.parseTags(this)})}}})},flushTags:function(el,a,f){a=a||false;var text,tags=$(".the-tags",el),newtag=$("input.newtag",el),newtags;text=a?$(a).text():newtag.val();tagsval=tags.val();newtags=tagsval?tagsval+","+text:text;newtags=this.clean(newtags);newtags=array_unique_noempty(newtags.split(",")).join(",");tags.val(newtags);this.quickClicks(el);if(!a){newtag.val("")}if("undefined"==typeof(f)){newtag.focus()}return false},get:function(id){var tax=id.substr(id.indexOf("-")+1);$.post(ajaxurl,{action:"get-tagcloud",tax:tax},function(r,stat){if(0==r||"success"!=stat){r=wpAjax.broken}r=$('<p id="tagcloud-'+tax+'" class="the-tagcloud">'+r+"</p>");$("a",r).click(function(){tagBox.flushTags($(this).closest(".inside").children(".tagsdiv"),this);return false});$("#"+id).after(r)})},init:function(){var t=this,ajaxtag=$("div.ajaxtag");$(".tagsdiv").each(function(){tagBox.quickClicks(this)});$("input.tagadd",ajaxtag).click(function(){t.flushTags($(this).closest(".tagsdiv"))});$("div.taghint",ajaxtag).click(function(){$(this).css("visibility","hidden").siblings(".newtag").focus()});$("input.newtag",ajaxtag).blur(function(){if(this.value==""){$(this).siblings(".taghint").css("visibility","")}}).focus(function(){$(this).siblings(".taghint").css("visibility","hidden")}).keyup(function(e){if(13==e.which){tagBox.flushTags($(this).closest(".tagsdiv"));return false}}).keypress(function(e){if(13==e.which){e.preventDefault();return false}}).each(function(){var tax=$(this).closest("div.tagsdiv").attr("id");$(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+tax,{delay:500,minchars:2,multiple:true,multipleSep:","})});$("#post").submit(function(){$("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});$("a.tagcloud-link").click(function(){tagBox.get($(this).attr("id"));$(this).unbind().click(function(){$(this).siblings(".the-tagcloud").toggle();return false});return false})}};commentsBox={st:0,get:function(total,num){var st=this.st,data;if(!num){num=20}this.st+=num;this.total=total;$("#commentsdiv img.waiting").show();data={action:"get-comments",mode:"single",_ajax_nonce:$("#add_comment_nonce").val(),post_ID:$("#post_ID").val(),start:st,num:num};$.post(ajaxurl,data,function(r){r=wpAjax.parseAjaxResponse(r);$("#commentsdiv .widefat").show();$("#commentsdiv img.waiting").hide();if("object"==typeof r&&r.responses[0]){$("#the-comment-list").append(r.responses[0].data);theList=theExtraList=null;$("a[className*=':']").unbind();setCommentsList();if(commentsBox.st>commentsBox.total){$("#show-comments").hide()}else{$("#show-comments").html(postL10n.showcomm)}return}else{if(1==r){$("#show-comments").parent().html(postL10n.endcomm);return}}$("#the-comment-list").append('<tr><td colspan="2">'+wpAjax.broken+"</td></tr>")});return false}};WPSetThumbnailHTML=function(html){$(".inside","#postimagediv").html(html)};WPSetThumbnailID=function(id){var field=$("input[value=_thumbnail_id]","#list-table");if(field.size()>0){$("#meta\\["+field.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(id)}};WPRemoveThumbnail=function(){$.post(ajaxurl,{action:"set-post-thumbnail",post_id:$("#post_ID").val(),thumbnail_id:-1,cookie:encodeURIComponent(document.cookie)},function(str){if(str=="0"){alert(setPostThumbnailL10n.error)}else{WPSetThumbnailHTML(str)}})}})(jQuery);jQuery(document).ready(function($){var stamp,visibility,sticky="";postboxes.add_postbox_toggles(pagenow);if($("#tagsdiv-post_tag").length){tagBox.init()}else{$("#side-sortables, #normal-sortables, #advanced-sortables").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}})}$(".categorydiv").each(function(){var this_id=$(this).attr("id"),noSyncChecks=false,syncChecks,catAddAfter,taxonomyParts,taxonomy,settingName;taxonomyParts=this_id.split("-");taxonomyParts.shift();taxonomy=taxonomyParts.join("-");settingName=taxonomy+"_tab";if(taxonomy=="category"){settingName="cats"}$("a","#"+taxonomy+"-tabs").click(function(){var t=$(this).attr("href");$(this).parent().addClass("tabs").siblings("li").removeClass("tabs");$("#"+taxonomy+"-tabs").siblings(".tabs-panel").hide();$(t).show();if("#"+taxonomy+"-all"==t){deleteUserSetting(settingName)}else{setUserSetting(settingName,"pop")}return false});if(getUserSetting(settingName)){$('a[href="#'+taxonomy+'-pop"]',"#"+taxonomy+"-tabs").click()}$("#new"+taxonomy).one("focus",function(){$(this).val("").removeClass("form-input-tip")});$("#"+taxonomy+"-add-submit").click(function(){$("#new"+taxonomy).focus()});syncChecks=function(){if(noSyncChecks){return}noSyncChecks=true;var th=jQuery(this),c=th.is(":checked"),id=th.val().toString();$("#in-"+taxonomy+"-"+id+", #in-"+taxonomy+"-category-"+id).attr("checked",c);noSyncChecks=false};catAddBefore=function(s){if(!$("#new"+taxonomy).val()){return false}s.data+="&"+$(":checked","#"+taxonomy+"checklist").serialize();return s};catAddAfter=function(r,s){var sup,drop=$("#new"+taxonomy+"_parent");if("undefined"!=s.parsed.responses[0]&&(sup=s.parsed.responses[0].supplemental.newcat_parent)){drop.before(sup);drop.remove()}};$("#"+taxonomy+"checklist").wpList({alt:"",response:taxonomy+"-ajax-response",addBefore:catAddBefore,addAfter:catAddAfter});$("#"+taxonomy+"-add-toggle").click(function(){$("#"+taxonomy+"-adder").toggleClass("wp-hidden-children");$('a[href="#'+taxonomy+'-all"]',"#"+taxonomy+"-tabs").click();return false});$("#"+taxonomy+"checklist li.popular-category :checkbox, #"+taxonomy+"checklist-pop :checkbox").live("click",function(){var t=$(this),c=t.is(":checked"),id=t.val();if(id&&t.parents("#taxonomy-"+taxonomy).length){$("#in-"+taxonomy+"-"+id+", #in-popular-"+taxonomy+"-"+id).attr("checked",c)}})});if($("#postcustom").length){$("#the-list").wpList({addAfter:function(xml,s){$("table#list-table").show();if(typeof(autosave_update_post_ID)!="undefined"){autosave_update_post_ID(s.parsed.responses[0].supplemental.postid)}},addBefore:function(s){s.data+="&post_id="+$("#post_ID").val();return s}})}if($("#submitdiv").length){stamp=$("#timestamp").html();visibility=$("#post-visibility-display").html();function updateVisibility(){var pvSelect=$("#post-visibility-select");if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false);$("#sticky-span").hide()}else{$("#sticky-span").show()}if($("input:radio:checked",pvSelect).val()!="password"){$("#password-span").hide()}else{$("#password-span").show()}}function updateText(){var attemptedDate,originalDate,currentDate,publishOn,page="page"==pagenow||"page-new"==pagenow,postStatus=$("#post_status"),optPublish=$("option[value=publish]",postStatus),aa=$("#aa").val(),mm=$("#mm").val(),jj=$("#jj").val(),hh=$("#hh").val(),mn=$("#mn").val();attemptedDate=new Date(aa,mm-1,jj,hh,mn);originalDate=new Date($("#hidden_aa").val(),$("#hidden_mm").val()-1,$("#hidden_jj").val(),$("#hidden_hh").val(),$("#hidden_mn").val());currentDate=new Date($("#cur_aa").val(),$("#cur_mm").val()-1,$("#cur_jj").val(),$("#cur_hh").val(),$("#cur_mn").val());if(attemptedDate.getFullYear()!=aa||(1+attemptedDate.getMonth())!=mm||attemptedDate.getDate()!=jj||attemptedDate.getMinutes()!=mn){$(".timestamp-wrap","#timestampdiv").addClass("form-invalid");return false}else{$(".timestamp-wrap","#timestampdiv").removeClass("form-invalid")}if(attemptedDate>currentDate&&$("#original_post_status").val()!="future"){publishOn=postL10n.publishOnFuture;$("#publish").val(postL10n.schedule)}else{if(attemptedDate<=currentDate&&$("#original_post_status").val()!="publish"){publishOn=postL10n.publishOn;$("#publish").val(postL10n.publish)}else{publishOn=postL10n.publishOnPast;if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}}}if(originalDate.toUTCString()==attemptedDate.toUTCString()){$("#timestamp").html(stamp)}else{$("#timestamp").html(publishOn+" <b>"+$("option[value="+$("#mm").val()+"]","#mm").text()+" "+jj+", "+aa+" @ "+hh+":"+mn+"</b> ")}if($("input:radio:checked","#post-visibility-select").val()=="private"){if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}if(optPublish.length==0){postStatus.append('<option value="publish">'+postL10n.privatelyPublished+"</option>")}else{optPublish.html(postL10n.privatelyPublished)}$("option[value=publish]",postStatus).attr("selected",true);$(".edit-post-status","#misc-publishing-actions").hide()}else{if($("#original_post_status").val()=="future"||$("#original_post_status").val()=="draft"){if(optPublish.length){optPublish.remove();postStatus.val($("#hidden_post_status").val())}}else{optPublish.html(postL10n.published)}if(postStatus.is(":hidden")){$(".edit-post-status","#misc-publishing-actions").show()}}$("#post-status-display").html($("option:selected",postStatus).text());if($("option:selected",postStatus).val()=="private"||$("option:selected",postStatus).val()=="publish"){$("#save-post").hide()}else{$("#save-post").show();if($("option:selected",postStatus).val()=="pending"){$("#save-post").show().val(postL10n.savePending)}else{$("#save-post").show().val(postL10n.saveDraft)}}return true}$(".edit-visibility","#visibility").click(function(){if($("#post-visibility-select").is(":hidden")){updateVisibility();$("#post-visibility-select").slideDown("normal");$(this).hide()}return false});$(".cancel-post-visibility","#post-visibility-select").click(function(){$("#post-visibility-select").slideUp("normal");$("#visibility-radio-"+$("#hidden-post-visibility").val()).attr("checked",true);$("#post_password").val($("#hidden_post_password").val());$("#sticky").attr("checked",$("#hidden-post-sticky").attr("checked"));$("#post-visibility-display").html(visibility);$(".edit-visibility","#visibility").show();updateText();return false});$(".save-post-visibility","#post-visibility-select").click(function(){var pvSelect=$("#post-visibility-select");pvSelect.slideUp("normal");$(".edit-visibility","#visibility").show();updateText();if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false)}if(true==$("#sticky").attr("checked")){sticky="Sticky"}else{sticky=""}$("#post-visibility-display").html(postL10n[$("input:radio:checked",pvSelect).val()+sticky]);return false});$("input:radio","#post-visibility-select").change(function(){updateVisibility()});$("#timestampdiv").siblings("a.edit-timestamp").click(function(){if($("#timestampdiv").is(":hidden")){$("#timestampdiv").slideDown("normal");$(this).hide()}return false});$(".cancel-timestamp","#timestampdiv").click(function(){$("#timestampdiv").slideUp("normal");$("#mm").val($("#hidden_mm").val());$("#jj").val($("#hidden_jj").val());$("#aa").val($("#hidden_aa").val());$("#hh").val($("#hidden_hh").val());$("#mn").val($("#hidden_mn").val());$("#timestampdiv").siblings("a.edit-timestamp").show();updateText();return false});$(".save-timestamp","#timestampdiv").click(function(){if(updateText()){$("#timestampdiv").slideUp("normal");$("#timestampdiv").siblings("a.edit-timestamp").show()}return false});$("#post-status-select").siblings("a.edit-post-status").click(function(){if($("#post-status-select").is(":hidden")){$("#post-status-select").slideDown("normal");$(this).hide()}return false});$(".save-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false});$(".cancel-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post_status").val($("#hidden_post_status").val());$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false})}if($("#edit-slug-box").length){editPermalink=function(post_id){var i,c=0,e=$("#editable-post-name"),revert_e=e.html(),real_slug=$("#post_name"),revert_slug=real_slug.val(),b=$("#edit-slug-buttons"),revert_b=b.html(),full=$("#editable-post-name-full").html();$("#view-post-btn").hide();b.html('<a href="#" class="save button">'+postL10n.ok+'</a> <a class="cancel" href="#">'+postL10n.cancel+"</a>");b.children(".save").click(function(){var new_slug=e.children("input").val();$.post(ajaxurl,{action:"sample-permalink",post_id:post_id,new_slug:new_slug,new_title:$("#title").val(),samplepermalinknonce:$("#samplepermalinknonce").val()},function(data){$("#edit-slug-box").html(data);b.html(revert_b);real_slug.attr("value",new_slug);makeSlugeditClickable();$("#view-post-btn").show()});return false});$(".cancel","#edit-slug-buttons").click(function(){$("#view-post-btn").show();e.html(revert_e);b.html(revert_b);real_slug.attr("value",revert_slug);return false});for(i=0;i<full.length;++i){if("%"==full.charAt(i)){c++}}slug_value=(c>full.length/4)?"":full;e.html('<input type="text" id="new-post-slug" value="'+slug_value+'" />').children("input").keypress(function(e){var key=e.keyCode||0;if(13==key){b.children(".save").click();return false}if(27==key){b.children(".cancel").click();return false}real_slug.attr("value",this.value)}).focus()};makeSlugeditClickable=function(){$("#editable-post-name").click(function(){$("#edit-slug-buttons").children(".edit-slug").click()})};makeSlugeditClickable()}if($("#title").val()==""){$("#title").siblings("#title-prompt-text").css("visibility","")}$("#title-prompt-text").click(function(){$(this).css("visibility","hidden").siblings("#title").focus()});$("#title").blur(function(){if(this.value==""){$(this).siblings("#title-prompt-text").css("visibility","")}}).focus(function(){$(this).siblings("#title-prompt-text").css("visibility","hidden")}).keydown(function(e){$(this).siblings("#title-prompt-text").css("visibility","hidden");$(this).unbind(e)})}); | var tagBox,commentsBox,editPermalink,makeSlugeditClickable,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail;function array_unique_noempty(a){var out=[];jQuery.each(a,function(key,val){val=jQuery.trim(val);if(val&&jQuery.inArray(val,out)==-1){out.push(val)}});return out}(function($){tagBox={clean:function(tags){return tags.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"")},parseTags:function(el){var id=el.id,num=id.split("-check-num-")[1],taxbox=$(el).closest(".tagsdiv"),thetags=taxbox.find(".the-tags"),current_tags=thetags.val().split(","),new_tags=[];delete current_tags[num];$.each(current_tags,function(key,val){val=$.trim(val);if(val){new_tags.push(val)}});thetags.val(this.clean(new_tags.join(",")));this.quickClicks(taxbox);return false},quickClicks:function(el){var thetags=$(".the-tags",el),tagchecklist=$(".tagchecklist",el),current_tags;if(!thetags.length){return}var disabled=thetags.attr("disabled");current_tags=thetags.val().split(",");tagchecklist.empty();$.each(current_tags,function(key,val){var txt,button_id,id=$(el).attr("id");val=$.trim(val);if(!val.match(/^\s+$/)&&""!=val){button_id=id+"-check-num-"+key;if(disabled){txt="<span>"+val+"</span> "}else{txt='<span><a id="'+button_id+'" class="ntdelbutton">X</a> '+val+"</span> "}tagchecklist.append(txt);if(!disabled){$("#"+button_id).click(function(){tagBox.parseTags(this)})}}})},flushTags:function(el,a,f){a=a||false;var text,tags=$(".the-tags",el),newtag=$("input.newtag",el),newtags;text=a?$(a).text():newtag.val();tagsval=tags.val();newtags=tagsval?tagsval+","+text:text;newtags=this.clean(newtags);newtags=array_unique_noempty(newtags.split(",")).join(",");tags.val(newtags);this.quickClicks(el);if(!a){newtag.val("")}if("undefined"==typeof(f)){newtag.focus()}return false},get:function(id){var tax=id.substr(id.indexOf("-")+1);$.post(ajaxurl,{action:"get-tagcloud",tax:tax},function(r,stat){if(0==r||"success"!=stat){r=wpAjax.broken}r=$('<p id="tagcloud-'+tax+'" class="the-tagcloud">'+r+"</p>");$("a",r).click(function(){tagBox.flushTags($(this).closest(".inside").children(".tagsdiv"),this);return false});$("#"+id).after(r)})},init:function(){var t=this,ajaxtag=$("div.ajaxtag");$(".tagsdiv").each(function(){tagBox.quickClicks(this)});$("input.tagadd",ajaxtag).click(function(){t.flushTags($(this).closest(".tagsdiv"))});$("div.taghint",ajaxtag).click(function(){$(this).css("visibility","hidden").siblings(".newtag").focus()});$("input.newtag",ajaxtag).blur(function(){if(this.value==""){$(this).siblings(".taghint").css("visibility","")}}).focus(function(){$(this).siblings(".taghint").css("visibility","hidden")}).keyup(function(e){if(13==e.which){tagBox.flushTags($(this).closest(".tagsdiv"));return false}}).keypress(function(e){if(13==e.which){e.preventDefault();return false}}).each(function(){var tax=$(this).closest("div.tagsdiv").attr("id");$(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+tax,{delay:500,minchars:2,multiple:true,multipleSep:", "})});$("#post").submit(function(){$("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});$("a.tagcloud-link").click(function(){tagBox.get($(this).attr("id"));$(this).unbind().click(function(){$(this).siblings(".the-tagcloud").toggle();return false});return false})}};commentsBox={st:0,get:function(total,num){var st=this.st,data;if(!num){num=20}this.st+=num;this.total=total;$("#commentsdiv img.waiting").show();data={action:"get-comments",mode:"single",_ajax_nonce:$("#add_comment_nonce").val(),post_ID:$("#post_ID").val(),start:st,num:num};$.post(ajaxurl,data,function(r){r=wpAjax.parseAjaxResponse(r);$("#commentsdiv .widefat").show();$("#commentsdiv img.waiting").hide();if("object"==typeof r&&r.responses[0]){$("#the-comment-list").append(r.responses[0].data);theList=theExtraList=null;$("a[className*=':']").unbind();setCommentsList();if(commentsBox.st>commentsBox.total){$("#show-comments").hide()}else{$("#show-comments").html(postL10n.showcomm)}return}else{if(1==r){$("#show-comments").parent().html(postL10n.endcomm);return}}$("#the-comment-list").append('<tr><td colspan="2">'+wpAjax.broken+"</td></tr>")});return false}};WPSetThumbnailHTML=function(html){$(".inside","#postimagediv").html(html)};WPSetThumbnailID=function(id){var field=$("input[value=_thumbnail_id]","#list-table");if(field.size()>0){$("#meta\\["+field.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(id)}};WPRemoveThumbnail=function(){$.post(ajaxurl,{action:"set-post-thumbnail",post_id:$("#post_ID").val(),thumbnail_id:-1,cookie:encodeURIComponent(document.cookie)},function(str){if(str=="0"){alert(setPostThumbnailL10n.error)}else{WPSetThumbnailHTML(str)}})}})(jQuery);jQuery(document).ready(function($){var stamp,visibility,sticky="";postboxes.add_postbox_toggles(pagenow);if($("#tagsdiv-post_tag").length){tagBox.init()}else{$("#side-sortables, #normal-sortables, #advanced-sortables").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}})}$(".categorydiv").each(function(){var this_id=$(this).attr("id"),noSyncChecks=false,syncChecks,catAddAfter,taxonomyParts,taxonomy,settingName;taxonomyParts=this_id.split("-");taxonomyParts.shift();taxonomy=taxonomyParts.join("-");settingName=taxonomy+"_tab";if(taxonomy=="category"){settingName="cats"}$("a","#"+taxonomy+"-tabs").click(function(){var t=$(this).attr("href");$(this).parent().addClass("tabs").siblings("li").removeClass("tabs");$("#"+taxonomy+"-tabs").siblings(".tabs-panel").hide();$(t).show();if("#"+taxonomy+"-all"==t){deleteUserSetting(settingName)}else{setUserSetting(settingName,"pop")}return false});if(getUserSetting(settingName)){$('a[href="#'+taxonomy+'-pop"]',"#"+taxonomy+"-tabs").click()}$("#new"+taxonomy).one("focus",function(){$(this).val("").removeClass("form-input-tip")});$("#"+taxonomy+"-add-submit").click(function(){$("#new"+taxonomy).focus()});syncChecks=function(){if(noSyncChecks){return}noSyncChecks=true;var th=jQuery(this),c=th.is(":checked"),id=th.val().toString();$("#in-"+taxonomy+"-"+id+", #in-"+taxonomy+"-category-"+id).attr("checked",c);noSyncChecks=false};catAddBefore=function(s){if(!$("#new"+taxonomy).val()){return false}s.data+="&"+$(":checked","#"+taxonomy+"checklist").serialize();return s};catAddAfter=function(r,s){var sup,drop=$("#new"+taxonomy+"_parent");if("undefined"!=s.parsed.responses[0]&&(sup=s.parsed.responses[0].supplemental.newcat_parent)){drop.before(sup);drop.remove()}};$("#"+taxonomy+"checklist").wpList({alt:"",response:taxonomy+"-ajax-response",addBefore:catAddBefore,addAfter:catAddAfter});$("#"+taxonomy+"-add-toggle").click(function(){$("#"+taxonomy+"-adder").toggleClass("wp-hidden-children");$('a[href="#'+taxonomy+'-all"]',"#"+taxonomy+"-tabs").click();return false});$("#"+taxonomy+"checklist li.popular-category :checkbox, #"+taxonomy+"checklist-pop :checkbox").live("click",function(){var t=$(this),c=t.is(":checked"),id=t.val();if(id&&t.parents("#taxonomy-"+taxonomy).length){$("#in-"+taxonomy+"-"+id+", #in-popular-"+taxonomy+"-"+id).attr("checked",c)}})});if($("#postcustom").length){$("#the-list").wpList({addAfter:function(xml,s){$("table#list-table").show();if(typeof(autosave_update_post_ID)!="undefined"){autosave_update_post_ID(s.parsed.responses[0].supplemental.postid)}},addBefore:function(s){s.data+="&post_id="+$("#post_ID").val();return s}})}if($("#submitdiv").length){stamp=$("#timestamp").html();visibility=$("#post-visibility-display").html();function updateVisibility(){var pvSelect=$("#post-visibility-select");if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false);$("#sticky-span").hide()}else{$("#sticky-span").show()}if($("input:radio:checked",pvSelect).val()!="password"){$("#password-span").hide()}else{$("#password-span").show()}}function updateText(){var attemptedDate,originalDate,currentDate,publishOn,page="page"==pagenow||"page-new"==pagenow,postStatus=$("#post_status"),optPublish=$("option[value=publish]",postStatus),aa=$("#aa").val(),mm=$("#mm").val(),jj=$("#jj").val(),hh=$("#hh").val(),mn=$("#mn").val();attemptedDate=new Date(aa,mm-1,jj,hh,mn);originalDate=new Date($("#hidden_aa").val(),$("#hidden_mm").val()-1,$("#hidden_jj").val(),$("#hidden_hh").val(),$("#hidden_mn").val());currentDate=new Date($("#cur_aa").val(),$("#cur_mm").val()-1,$("#cur_jj").val(),$("#cur_hh").val(),$("#cur_mn").val());if(attemptedDate.getFullYear()!=aa||(1+attemptedDate.getMonth())!=mm||attemptedDate.getDate()!=jj||attemptedDate.getMinutes()!=mn){$(".timestamp-wrap","#timestampdiv").addClass("form-invalid");return false}else{$(".timestamp-wrap","#timestampdiv").removeClass("form-invalid")}if(attemptedDate>currentDate&&$("#original_post_status").val()!="future"){publishOn=postL10n.publishOnFuture;$("#publish").val(postL10n.schedule)}else{if(attemptedDate<=currentDate&&$("#original_post_status").val()!="publish"){publishOn=postL10n.publishOn;$("#publish").val(postL10n.publish)}else{publishOn=postL10n.publishOnPast;if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}}}if(originalDate.toUTCString()==attemptedDate.toUTCString()){$("#timestamp").html(stamp)}else{$("#timestamp").html(publishOn+" <b>"+$("option[value="+$("#mm").val()+"]","#mm").text()+" "+jj+", "+aa+" @ "+hh+":"+mn+"</b> ")}if($("input:radio:checked","#post-visibility-select").val()=="private"){if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}if(optPublish.length==0){postStatus.append('<option value="publish">'+postL10n.privatelyPublished+"</option>")}else{optPublish.html(postL10n.privatelyPublished)}$("option[value=publish]",postStatus).attr("selected",true);$(".edit-post-status","#misc-publishing-actions").hide()}else{if($("#original_post_status").val()=="future"||$("#original_post_status").val()=="draft"){if(optPublish.length){optPublish.remove();postStatus.val($("#hidden_post_status").val())}}else{optPublish.html(postL10n.published)}if(postStatus.is(":hidden")){$(".edit-post-status","#misc-publishing-actions").show()}}$("#post-status-display").html($("option:selected",postStatus).text());if($("option:selected",postStatus).val()=="private"||$("option:selected",postStatus).val()=="publish"){$("#save-post").hide()}else{$("#save-post").show();if($("option:selected",postStatus).val()=="pending"){$("#save-post").show().val(postL10n.savePending)}else{$("#save-post").show().val(postL10n.saveDraft)}}return true}$(".edit-visibility","#visibility").click(function(){if($("#post-visibility-select").is(":hidden")){updateVisibility();$("#post-visibility-select").slideDown("normal");$(this).hide()}return false});$(".cancel-post-visibility","#post-visibility-select").click(function(){$("#post-visibility-select").slideUp("normal");$("#visibility-radio-"+$("#hidden-post-visibility").val()).attr("checked",true);$("#post_password").val($("#hidden_post_password").val());$("#sticky").attr("checked",$("#hidden-post-sticky").attr("checked"));$("#post-visibility-display").html(visibility);$(".edit-visibility","#visibility").show();updateText();return false});$(".save-post-visibility","#post-visibility-select").click(function(){var pvSelect=$("#post-visibility-select");pvSelect.slideUp("normal");$(".edit-visibility","#visibility").show();updateText();if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false)}if(true==$("#sticky").attr("checked")){sticky="Sticky"}else{sticky=""}$("#post-visibility-display").html(postL10n[$("input:radio:checked",pvSelect).val()+sticky]);return false});$("input:radio","#post-visibility-select").change(function(){updateVisibility()});$("#timestampdiv").siblings("a.edit-timestamp").click(function(){if($("#timestampdiv").is(":hidden")){$("#timestampdiv").slideDown("normal");$(this).hide()}return false});$(".cancel-timestamp","#timestampdiv").click(function(){$("#timestampdiv").slideUp("normal");$("#mm").val($("#hidden_mm").val());$("#jj").val($("#hidden_jj").val());$("#aa").val($("#hidden_aa").val());$("#hh").val($("#hidden_hh").val());$("#mn").val($("#hidden_mn").val());$("#timestampdiv").siblings("a.edit-timestamp").show();updateText();return false});$(".save-timestamp","#timestampdiv").click(function(){if(updateText()){$("#timestampdiv").slideUp("normal");$("#timestampdiv").siblings("a.edit-timestamp").show()}return false});$("#post-status-select").siblings("a.edit-post-status").click(function(){if($("#post-status-select").is(":hidden")){$("#post-status-select").slideDown("normal");$(this).hide()}return false});$(".save-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false});$(".cancel-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post_status").val($("#hidden_post_status").val());$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false})}if($("#edit-slug-box").length){editPermalink=function(post_id){var i,c=0,e=$("#editable-post-name"),revert_e=e.html(),real_slug=$("#post_name"),revert_slug=real_slug.val(),b=$("#edit-slug-buttons"),revert_b=b.html(),full=$("#editable-post-name-full").html();$("#view-post-btn").hide();b.html('<a href="#" class="save button">'+postL10n.ok+'</a> <a class="cancel" href="#">'+postL10n.cancel+"</a>");b.children(".save").click(function(){var new_slug=e.children("input").val();$.post(ajaxurl,{action:"sample-permalink",post_id:post_id,new_slug:new_slug,new_title:$("#title").val(),samplepermalinknonce:$("#samplepermalinknonce").val()},function(data){$("#edit-slug-box").html(data);b.html(revert_b);real_slug.attr("value",new_slug);makeSlugeditClickable();$("#view-post-btn").show()});return false});$(".cancel","#edit-slug-buttons").click(function(){$("#view-post-btn").show();e.html(revert_e);b.html(revert_b);real_slug.attr("value",revert_slug);return false});for(i=0;i<full.length;++i){if("%"==full.charAt(i)){c++}}slug_value=(c>full.length/4)?"":full;e.html('<input type="text" id="new-post-slug" value="'+slug_value+'" />').children("input").keypress(function(e){var key=e.keyCode||0;if(13==key){b.children(".save").click();return false}if(27==key){b.children(".cancel").click();return false}real_slug.attr("value",this.value)}).focus()};makeSlugeditClickable=function(){$("#editable-post-name").click(function(){$("#edit-slug-buttons").children(".edit-slug").click()})};makeSlugeditClickable()}if($("#title").val()==""){$("#title").siblings("#title-prompt-text").css("visibility","")}$("#title-prompt-text").click(function(){$(this).css("visibility","hidden").siblings("#title").focus()});$("#title").blur(function(){if(this.value==""){$(this).siblings("#title-prompt-text").css("visibility","")}}).focus(function(){$(this).siblings("#title-prompt-text").css("visibility","hidden")}).keydown(function(e){$(this).siblings("#title-prompt-text").css("visibility","hidden");$(this).unbind(e)})}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/560c524bf1e5fe52e4798ad1823074714caeda74/post.js/buggy/wp-admin/js/post.js |
var tagBox,commentsBox,editPermalink,makeSlugeditClickable,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail;function array_unique_noempty(a){var out=[];jQuery.each(a,function(key,val){val=jQuery.trim(val);if(val&&jQuery.inArray(val,out)==-1){out.push(val)}});return out}(function($){tagBox={clean:function(tags){return tags.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"")},parseTags:function(el){var id=el.id,num=id.split("-check-num-")[1],taxbox=$(el).closest(".tagsdiv"),thetags=taxbox.find(".the-tags"),current_tags=thetags.val().split(","),new_tags=[];delete current_tags[num];$.each(current_tags,function(key,val){val=$.trim(val);if(val){new_tags.push(val)}});thetags.val(this.clean(new_tags.join(",")));this.quickClicks(taxbox);return false},quickClicks:function(el){var thetags=$(".the-tags",el),tagchecklist=$(".tagchecklist",el),current_tags;if(!thetags.length){return}var disabled=thetags.attr("disabled");current_tags=thetags.val().split(",");tagchecklist.empty();$.each(current_tags,function(key,val){var txt,button_id,id=$(el).attr("id");val=$.trim(val);if(!val.match(/^\s+$/)&&""!=val){button_id=id+"-check-num-"+key;if(disabled){txt="<span>"+val+"</span> "}else{txt='<span><a id="'+button_id+'" class="ntdelbutton">X</a> '+val+"</span> "}tagchecklist.append(txt);if(!disabled){$("#"+button_id).click(function(){tagBox.parseTags(this)})}}})},flushTags:function(el,a,f){a=a||false;var text,tags=$(".the-tags",el),newtag=$("input.newtag",el),newtags;text=a?$(a).text():newtag.val();tagsval=tags.val();newtags=tagsval?tagsval+","+text:text;newtags=this.clean(newtags);newtags=array_unique_noempty(newtags.split(",")).join(",");tags.val(newtags);this.quickClicks(el);if(!a){newtag.val("")}if("undefined"==typeof(f)){newtag.focus()}return false},get:function(id){var tax=id.substr(id.indexOf("-")+1);$.post(ajaxurl,{action:"get-tagcloud",tax:tax},function(r,stat){if(0==r||"success"!=stat){r=wpAjax.broken}r=$('<p id="tagcloud-'+tax+'" class="the-tagcloud">'+r+"</p>");$("a",r).click(function(){tagBox.flushTags($(this).closest(".inside").children(".tagsdiv"),this);return false});$("#"+id).after(r)})},init:function(){var t=this,ajaxtag=$("div.ajaxtag");$(".tagsdiv").each(function(){tagBox.quickClicks(this)});$("input.tagadd",ajaxtag).click(function(){t.flushTags($(this).closest(".tagsdiv"))});$("div.taghint",ajaxtag).click(function(){$(this).css("visibility","hidden").siblings(".newtag").focus()});$("input.newtag",ajaxtag).blur(function(){if(this.value==""){$(this).siblings(".taghint").css("visibility","")}}).focus(function(){$(this).siblings(".taghint").css("visibility","hidden")}).keyup(function(e){if(13==e.which){tagBox.flushTags($(this).closest(".tagsdiv"));return false}}).keypress(function(e){if(13==e.which){e.preventDefault();return false}}).each(function(){var tax=$(this).closest("div.tagsdiv").attr("id");$(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+tax,{delay:500,minchars:2,multiple:true,multipleSep:", "})});$("#post").submit(function(){$("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});$("a.tagcloud-link").click(function(){tagBox.get($(this).attr("id"));$(this).unbind().click(function(){$(this).siblings(".the-tagcloud").toggle();return false});return false})}};commentsBox={st:0,get:function(total,num){var st=this.st,data;if(!num){num=20}this.st+=num;this.total=total;$("#commentsdiv img.waiting").show();data={action:"get-comments",mode:"single",_ajax_nonce:$("#add_comment_nonce").val(),post_ID:$("#post_ID").val(),start:st,num:num};$.post(ajaxurl,data,function(r){r=wpAjax.parseAjaxResponse(r);$("#commentsdiv .widefat").show();$("#commentsdiv img.waiting").hide();if("object"==typeof r&&r.responses[0]){$("#the-comment-list").append(r.responses[0].data);theList=theExtraList=null;$("a[className*=':']").unbind();setCommentsList();if(commentsBox.st>commentsBox.total){$("#show-comments").hide()}else{$("#show-comments").html(postL10n.showcomm)}return}else{if(1==r){$("#show-comments").parent().html(postL10n.endcomm);return}}$("#the-comment-list").append('<tr><td colspan="2">'+wpAjax.broken+"</td></tr>")});return false}};WPSetThumbnailHTML=function(html){$(".inside","#postimagediv").html(html)};WPSetThumbnailID=function(id){var field=$("input[value=_thumbnail_id]","#list-table");if(field.size()>0){$("#meta\\["+field.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(id)}};WPRemoveThumbnail=function(){$.post(ajaxurl,{action:"set-post-thumbnail",post_id:$("#post_ID").val(),thumbnail_id:-1,cookie:encodeURIComponent(document.cookie)},function(str){if(str=="0"){alert(setPostThumbnailL10n.error)}else{WPSetThumbnailHTML(str)}})}})(jQuery);jQuery(document).ready(function($){var stamp,visibility,sticky="";postboxes.add_postbox_toggles(pagenow);if($("#tagsdiv-post_tag").length){tagBox.init()}else{$("#side-sortables, #normal-sortables, #advanced-sortables").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}})}$(".categorydiv").each(function(){var this_id=$(this).attr("id"),noSyncChecks=false,syncChecks,catAddAfter,taxonomyParts,taxonomy,settingName;taxonomyParts=this_id.split("-");taxonomyParts.shift();taxonomy=taxonomyParts.join("-");settingName=taxonomy+"_tab";if(taxonomy=="category"){settingName="cats"}$("a","#"+taxonomy+"-tabs").click(function(){var t=$(this).attr("href");$(this).parent().addClass("tabs").siblings("li").removeClass("tabs");$("#"+taxonomy+"-tabs").siblings(".tabs-panel").hide();$(t).show();if("#"+taxonomy+"-all"==t){deleteUserSetting(settingName)}else{setUserSetting(settingName,"pop")}return false});if(getUserSetting(settingName)){$('a[href="#'+taxonomy+'-pop"]',"#"+taxonomy+"-tabs").click()}$("#new"+taxonomy).one("focus",function(){$(this).val("").removeClass("form-input-tip")});$("#"+taxonomy+"-add-submit").click(function(){$("#new"+taxonomy).focus()});syncChecks=function(){if(noSyncChecks){return}noSyncChecks=true;var th=jQuery(this),c=th.is(":checked"),id=th.val().toString();$("#in-"+taxonomy+"-"+id+", #in-"+taxonomy+"-category-"+id).attr("checked",c);noSyncChecks=false};catAddBefore=function(s){if(!$("#new"+taxonomy).val()){return false}s.data+="&"+$(":checked","#"+taxonomy+"checklist").serialize();return s};catAddAfter=function(r,s){var sup,drop=$("#new"+taxonomy+"_parent");if("undefined"!=s.parsed.responses[0]&&(sup=s.parsed.responses[0].supplemental.newcat_parent)){drop.before(sup);drop.remove()}};$("#"+taxonomy+"checklist").wpList({alt:"",response:taxonomy+"-ajax-response",addBefore:catAddBefore,addAfter:catAddAfter});$("#"+taxonomy+"-add-toggle").click(function(){$("#"+taxonomy+"-adder").toggleClass("wp-hidden-children");$('a[href="#'+taxonomy+'-all"]',"#"+taxonomy+"-tabs").click();return false});$("#"+taxonomy+"checklist li.popular-category :checkbox, #"+taxonomy+"checklist-pop :checkbox").live("click",function(){var t=$(this),c=t.is(":checked"),id=t.val();if(id&&t.parents("#taxonomy-"+taxonomy).length){$("#in-"+taxonomy+"-"+id+", #in-popular-"+taxonomy+"-"+id).attr("checked",c)}})});if($("#postcustom").length){$("#the-list").wpList({addAfter:function(xml,s){$("table#list-table").show();if(typeof(autosave_update_post_ID)!="undefined"){autosave_update_post_ID(s.parsed.responses[0].supplemental.postid)}},addBefore:function(s){s.data+="&post_id="+$("#post_ID").val();return s}})}if($("#submitdiv").length){stamp=$("#timestamp").html();visibility=$("#post-visibility-display").html();function updateVisibility(){var pvSelect=$("#post-visibility-select");if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false);$("#sticky-span").hide()}else{$("#sticky-span").show()}if($("input:radio:checked",pvSelect).val()!="password"){$("#password-span").hide()}else{$("#password-span").show()}}function updateText(){var attemptedDate,originalDate,currentDate,publishOn,postStatus=$("#post_status"),optPublish=$("option[value=publish]",postStatus),aa=$("#aa").val(),mm=$("#mm").val(),jj=$("#jj").val(),hh=$("#hh").val(),mn=$("#mn").val();attemptedDate=new Date(aa,mm-1,jj,hh,mn);originalDate=new Date($("#hidden_aa").val(),$("#hidden_mm").val()-1,$("#hidden_jj").val(),$("#hidden_hh").val(),$("#hidden_mn").val());currentDate=new Date($("#cur_aa").val(),$("#cur_mm").val()-1,$("#cur_jj").val(),$("#cur_hh").val(),$("#cur_mn").val());if(attemptedDate.getFullYear()!=aa||(1+attemptedDate.getMonth())!=mm||attemptedDate.getDate()!=jj||attemptedDate.getMinutes()!=mn){$(".timestamp-wrap","#timestampdiv").addClass("form-invalid");return false}else{$(".timestamp-wrap","#timestampdiv").removeClass("form-invalid")}if(attemptedDate>currentDate&&$("#original_post_status").val()!="future"){publishOn=postL10n.publishOnFuture;$("#publish").val(postL10n.schedule)}else{if(attemptedDate<=currentDate&&$("#original_post_status").val()!="publish"){publishOn=postL10n.publishOn;$("#publish").val(postL10n.publish)}else{publishOn=postL10n.publishOnPast;if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}}}if(originalDate.toUTCString()==attemptedDate.toUTCString()){$("#timestamp").html(stamp)}else{$("#timestamp").html(publishOn+" <b>"+$("option[value="+$("#mm").val()+"]","#mm").text()+" "+jj+", "+aa+" @ "+hh+":"+mn+"</b> ")}if($("input:radio:checked","#post-visibility-select").val()=="private"){if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}if(optPublish.length==0){postStatus.append('<option value="publish">'+postL10n.privatelyPublished+"</option>")}else{optPublish.html(postL10n.privatelyPublished)}$("option[value=publish]",postStatus).attr("selected",true);$(".edit-post-status","#misc-publishing-actions").hide()}else{if($("#original_post_status").val()=="future"||$("#original_post_status").val()=="draft"){if(optPublish.length){optPublish.remove();postStatus.val($("#hidden_post_status").val())}}else{optPublish.html(postL10n.published)}if(postStatus.is(":hidden")){$(".edit-post-status","#misc-publishing-actions").show()}}$("#post-status-display").html($("option:selected",postStatus).text());if($("option:selected",postStatus).val()=="private"||$("option:selected",postStatus).val()=="publish"){$("#save-post").hide()}else{$("#save-post").show();if($("option:selected",postStatus).val()=="pending"){$("#save-post").show().val(postL10n.savePending)}else{$("#save-post").show().val(postL10n.saveDraft)}}return true}$(".edit-visibility","#visibility").click(function(){if($("#post-visibility-select").is(":hidden")){updateVisibility();$("#post-visibility-select").slideDown("normal");$(this).hide()}return false});$(".cancel-post-visibility","#post-visibility-select").click(function(){$("#post-visibility-select").slideUp("normal");$("#visibility-radio-"+$("#hidden-post-visibility").val()).attr("checked",true);$("#post_password").val($("#hidden_post_password").val());$("#sticky").attr("checked",$("#hidden-post-sticky").attr("checked"));$("#post-visibility-display").html(visibility);$(".edit-visibility","#visibility").show();updateText();return false});$(".save-post-visibility","#post-visibility-select").click(function(){var pvSelect=$("#post-visibility-select");pvSelect.slideUp("normal");$(".edit-visibility","#visibility").show();updateText();if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false)}if(true==$("#sticky").attr("checked")){sticky="Sticky"}else{sticky=""}$("#post-visibility-display").html(postL10n[$("input:radio:checked",pvSelect).val()+sticky]);return false});$("input:radio","#post-visibility-select").change(function(){updateVisibility()});$("#timestampdiv").siblings("a.edit-timestamp").click(function(){if($("#timestampdiv").is(":hidden")){$("#timestampdiv").slideDown("normal");$(this).hide()}return false});$(".cancel-timestamp","#timestampdiv").click(function(){$("#timestampdiv").slideUp("normal");$("#mm").val($("#hidden_mm").val());$("#jj").val($("#hidden_jj").val());$("#aa").val($("#hidden_aa").val());$("#hh").val($("#hidden_hh").val());$("#mn").val($("#hidden_mn").val());$("#timestampdiv").siblings("a.edit-timestamp").show();updateText();return false});$(".save-timestamp","#timestampdiv").click(function(){if(updateText()){$("#timestampdiv").slideUp("normal");$("#timestampdiv").siblings("a.edit-timestamp").show()}return false});$("#post-status-select").siblings("a.edit-post-status").click(function(){if($("#post-status-select").is(":hidden")){$("#post-status-select").slideDown("normal");$(this).hide()}return false});$(".save-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false});$(".cancel-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post_status").val($("#hidden_post_status").val());$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false})}if($("#edit-slug-box").length){editPermalink=function(post_id){var i,c=0,e=$("#editable-post-name"),revert_e=e.html(),real_slug=$("#post_name"),revert_slug=real_slug.html(),b=$("#edit-slug-buttons"),revert_b=b.html(),full=$("#editable-post-name-full").html();$("#view-post-btn").hide();b.html('<a href="#" class="save button">'+postL10n.ok+'</a> <a class="cancel" href="#">'+postL10n.cancel+"</a>");b.children(".save").click(function(){var new_slug=e.children("input").val();$.post(ajaxurl,{action:"sample-permalink",post_id:post_id,new_slug:new_slug,new_title:$("#title").val(),samplepermalinknonce:$("#samplepermalinknonce").val()},function(data){$("#edit-slug-box").html(data);b.html(revert_b);real_slug.attr("value",new_slug);makeSlugeditClickable();$("#view-post-btn").show()});return false});$(".cancel","#edit-slug-buttons").click(function(){$("#view-post-btn").show();e.html(revert_e);b.html(revert_b);real_slug.attr("value",revert_slug);return false});for(i=0;i<full.length;++i){if("%"==full.charAt(i)){c++}}slug_value=(c>full.length/4)?"":full;e.html('<input type="text" id="new-post-slug" value="'+slug_value+'" />').children("input").keypress(function(e){var key=e.keyCode||0;if(13==key){b.children(".save").click();return false}if(27==key){b.children(".cancel").click();return false}real_slug.attr("value",this.value)}).focus()};makeSlugeditClickable=function(){$("#editable-post-name").click(function(){$("#edit-slug-buttons").children(".edit-slug").click()})};makeSlugeditClickable()}}); | var tagBox,commentsBox,editPermalink,makeSlugeditClickable,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail;function array_unique_noempty(a){var out=[];jQuery.each(a,function(key,val){val=jQuery.trim(val);if(val&&jQuery.inArray(val,out)==-1){out.push(val)}});return out}(function($){tagBox={clean:function(tags){return tags.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"")},parseTags:function(el){var id=el.id,num=id.split("-check-num-")[1],taxbox=$(el).closest(".tagsdiv"),thetags=taxbox.find(".the-tags"),current_tags=thetags.val().split(","),new_tags=[];delete current_tags[num];$.each(current_tags,function(key,val){val=$.trim(val);if(val){new_tags.push(val)}});thetags.val(this.clean(new_tags.join(",")));this.quickClicks(taxbox);return false},quickClicks:function(el){var thetags=$(".the-tags",el),tagchecklist=$(".tagchecklist",el),current_tags;if(!thetags.length){return}var disabled=thetags.attr("disabled");current_tags=thetags.val().split(",");tagchecklist.empty();$.each(current_tags,function(key,val){var txt,button_id,id=$(el).attr("id");val=$.trim(val);if(!val.match(/^\s+$/)&&""!=val){button_id=id+"-check-num-"+key;if(disabled){txt="<span>"+val+"</span> "}else{txt='<span><a id="'+button_id+'" class="ntdelbutton">X</a> '+val+"</span> "}tagchecklist.append(txt);if(!disabled){$("#"+button_id).click(function(){tagBox.parseTags(this)})}}})},flushTags:function(el,a,f){a=a||false;var text,tags=$(".the-tags",el),newtag=$("input.newtag",el),newtags;text=a?$(a).text():newtag.val();tagsval=tags.val();newtags=tagsval?tagsval+","+text:text;newtags=this.clean(newtags);newtags=array_unique_noempty(newtags.split(",")).join(",");tags.val(newtags);this.quickClicks(el);if(!a){newtag.val("")}if("undefined"==typeof(f)){newtag.focus()}return false},get:function(id){var tax=id.substr(id.indexOf("-")+1);$.post(ajaxurl,{action:"get-tagcloud",tax:tax},function(r,stat){if(0==r||"success"!=stat){r=wpAjax.broken}r=$('<p id="tagcloud-'+tax+'" class="the-tagcloud">'+r+"</p>");$("a",r).click(function(){tagBox.flushTags($(this).closest(".inside").children(".tagsdiv"),this);return false});$("#"+id).after(r)})},init:function(){var t=this,ajaxtag=$("div.ajaxtag");$(".tagsdiv").each(function(){tagBox.quickClicks(this)});$("input.tagadd",ajaxtag).click(function(){t.flushTags($(this).closest(".tagsdiv"))});$("div.taghint",ajaxtag).click(function(){$(this).css("visibility","hidden").siblings(".newtag").focus()});$("input.newtag",ajaxtag).blur(function(){if(this.value==""){$(this).siblings(".taghint").css("visibility","")}}).focus(function(){$(this).siblings(".taghint").css("visibility","hidden")}).keyup(function(e){if(13==e.which){tagBox.flushTags($(this).closest(".tagsdiv"));return false}}).keypress(function(e){if(13==e.which){e.preventDefault();return false}}).each(function(){var tax=$(this).closest("div.tagsdiv").attr("id");$(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+tax,{delay:500,minchars:2,multiple:true,multipleSep:", "})});$("#post").submit(function(){$("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});$("a.tagcloud-link").click(function(){tagBox.get($(this).attr("id"));$(this).unbind().click(function(){$(this).siblings(".the-tagcloud").toggle();return false});return false})}};commentsBox={st:0,get:function(total,num){var st=this.st,data;if(!num){num=20}this.st+=num;this.total=total;$("#commentsdiv img.waiting").show();data={action:"get-comments",mode:"single",_ajax_nonce:$("#add_comment_nonce").val(),post_ID:$("#post_ID").val(),start:st,num:num};$.post(ajaxurl,data,function(r){r=wpAjax.parseAjaxResponse(r);$("#commentsdiv .widefat").show();$("#commentsdiv img.waiting").hide();if("object"==typeof r&&r.responses[0]){$("#the-comment-list").append(r.responses[0].data);theList=theExtraList=null;$("a[className*=':']").unbind();setCommentsList();if(commentsBox.st>commentsBox.total){$("#show-comments").hide()}else{$("#show-comments").html(postL10n.showcomm)}return}else{if(1==r){$("#show-comments").parent().html(postL10n.endcomm);return}}$("#the-comment-list").append('<tr><td colspan="2">'+wpAjax.broken+"</td></tr>")});return false}};WPSetThumbnailHTML=function(html){$(".inside","#postimagediv").html(html)};WPSetThumbnailID=function(id){var field=$("input[value=_thumbnail_id]","#list-table");if(field.size()>0){$("#meta\\["+field.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(id)}};WPRemoveThumbnail=function(){$.post(ajaxurl,{action:"set-post-thumbnail",post_id:$("#post_ID").val(),thumbnail_id:-1,cookie:encodeURIComponent(document.cookie)},function(str){if(str=="0"){alert(setPostThumbnailL10n.error)}else{WPSetThumbnailHTML(str)}})}})(jQuery);jQuery(document).ready(function($){var stamp,visibility,sticky="";postboxes.add_postbox_toggles(pagenow);if($("#tagsdiv-post_tag").length){tagBox.init()}else{$("#side-sortables, #normal-sortables, #advanced-sortables").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}})}$(".categorydiv").each(function(){var this_id=$(this).attr("id"),noSyncChecks=false,syncChecks,catAddAfter,taxonomyParts,taxonomy,settingName;taxonomyParts=this_id.split("-");taxonomyParts.shift();taxonomy=taxonomyParts.join("-");settingName=taxonomy+"_tab";if(taxonomy=="category"){settingName="cats"}$("a","#"+taxonomy+"-tabs").click(function(){var t=$(this).attr("href");$(this).parent().addClass("tabs").siblings("li").removeClass("tabs");$("#"+taxonomy+"-tabs").siblings(".tabs-panel").hide();$(t).show();if("#"+taxonomy+"-all"==t){deleteUserSetting(settingName)}else{setUserSetting(settingName,"pop")}return false});if(getUserSetting(settingName)){$('a[href="#'+taxonomy+'-pop"]',"#"+taxonomy+"-tabs").click()}$("#new"+taxonomy).one("focus",function(){$(this).val("").removeClass("form-input-tip")});$("#"+taxonomy+"-add-submit").click(function(){$("#new"+taxonomy).focus()});syncChecks=function(){if(noSyncChecks){return}noSyncChecks=true;var th=jQuery(this),c=th.is(":checked"),id=th.val().toString();$("#in-"+taxonomy+"-"+id+", #in-"+taxonomy+"-category-"+id).attr("checked",c);noSyncChecks=false};catAddBefore=function(s){if(!$("#new"+taxonomy).val()){return false}s.data+="&"+$(":checked","#"+taxonomy+"checklist").serialize();return s};catAddAfter=function(r,s){var sup,drop=$("#new"+taxonomy+"_parent");if("undefined"!=s.parsed.responses[0]&&(sup=s.parsed.responses[0].supplemental.newcat_parent)){drop.before(sup);drop.remove()}};$("#"+taxonomy+"checklist").wpList({alt:"",response:taxonomy+"-ajax-response",addBefore:catAddBefore,addAfter:catAddAfter});$("#"+taxonomy+"-add-toggle").click(function(){$("#"+taxonomy+"-adder").toggleClass("wp-hidden-children");$('a[href="#'+taxonomy+'-all"]',"#"+taxonomy+"-tabs").click();return false});$("#"+taxonomy+"checklist li.popular-category :checkbox, #"+taxonomy+"checklist-pop :checkbox").live("click",function(){var t=$(this),c=t.is(":checked"),id=t.val();if(id&&t.parents("#taxonomy-"+taxonomy).length){$("#in-"+taxonomy+"-"+id+", #in-popular-"+taxonomy+"-"+id).attr("checked",c)}})});if($("#postcustom").length){$("#the-list").wpList({addAfter:function(xml,s){$("table#list-table").show();if(typeof(autosave_update_post_ID)!="undefined"){autosave_update_post_ID(s.parsed.responses[0].supplemental.postid)}},addBefore:function(s){s.data+="&post_id="+$("#post_ID").val();return s}})}if($("#submitdiv").length){stamp=$("#timestamp").html();visibility=$("#post-visibility-display").html();function updateVisibility(){var pvSelect=$("#post-visibility-select");if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false);$("#sticky-span").hide()}else{$("#sticky-span").show()}if($("input:radio:checked",pvSelect).val()!="password"){$("#password-span").hide()}else{$("#password-span").show()}}function updateText(){var attemptedDate,originalDate,currentDate,publishOn,postStatus=$("#post_status"),optPublish=$("option[value=publish]",postStatus),aa=$("#aa").val(),mm=$("#mm").val(),jj=$("#jj").val(),hh=$("#hh").val(),mn=$("#mn").val();attemptedDate=new Date(aa,mm-1,jj,hh,mn);originalDate=new Date($("#hidden_aa").val(),$("#hidden_mm").val()-1,$("#hidden_jj").val(),$("#hidden_hh").val(),$("#hidden_mn").val());currentDate=new Date($("#cur_aa").val(),$("#cur_mm").val()-1,$("#cur_jj").val(),$("#cur_hh").val(),$("#cur_mn").val());if(attemptedDate.getFullYear()!=aa||(1+attemptedDate.getMonth())!=mm||attemptedDate.getDate()!=jj||attemptedDate.getMinutes()!=mn){$(".timestamp-wrap","#timestampdiv").addClass("form-invalid");return false}else{$(".timestamp-wrap","#timestampdiv").removeClass("form-invalid")}if(attemptedDate>currentDate&&$("#original_post_status").val()!="future"){publishOn=postL10n.publishOnFuture;$("#publish").val(postL10n.schedule)}else{if(attemptedDate<=currentDate&&$("#original_post_status").val()!="publish"){publishOn=postL10n.publishOn;$("#publish").val(postL10n.publish)}else{publishOn=postL10n.publishOnPast;if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}}}if(originalDate.toUTCString()==attemptedDate.toUTCString()){$("#timestamp").html(stamp)}else{$("#timestamp").html(publishOn+" <b>"+$("option[value="+$("#mm").val()+"]","#mm").text()+" "+jj+", "+aa+" @ "+hh+":"+mn+"</b> ")}if($("input:radio:checked","#post-visibility-select").val()=="private"){if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}if(optPublish.length==0){postStatus.append('<option value="publish">'+postL10n.privatelyPublished+"</option>")}else{optPublish.html(postL10n.privatelyPublished)}$("option[value=publish]",postStatus).attr("selected",true);$(".edit-post-status","#misc-publishing-actions").hide()}else{if($("#original_post_status").val()=="future"||$("#original_post_status").val()=="draft"){if(optPublish.length){optPublish.remove();postStatus.val($("#hidden_post_status").val())}}else{optPublish.html(postL10n.published)}if(postStatus.is(":hidden")){$(".edit-post-status","#misc-publishing-actions").show()}}$("#post-status-display").html($("option:selected",postStatus).text());if($("option:selected",postStatus).val()=="private"||$("option:selected",postStatus).val()=="publish"){$("#save-post").hide()}else{$("#save-post").show();if($("option:selected",postStatus).val()=="pending"){$("#save-post").show().val(postL10n.savePending)}else{$("#save-post").show().val(postL10n.saveDraft)}}return true}$(".edit-visibility","#visibility").click(function(){if($("#post-visibility-select").is(":hidden")){updateVisibility();$("#post-visibility-select").slideDown("normal");$(this).hide()}return false});$(".cancel-post-visibility","#post-visibility-select").click(function(){$("#post-visibility-select").slideUp("normal");$("#visibility-radio-"+$("#hidden-post-visibility").val()).attr("checked",true);$("#post_password").val($("#hidden_post_password").val());$("#sticky").attr("checked",$("#hidden-post-sticky").attr("checked"));$("#post-visibility-display").html(visibility);$(".edit-visibility","#visibility").show();updateText();return false});$(".save-post-visibility","#post-visibility-select").click(function(){var pvSelect=$("#post-visibility-select");pvSelect.slideUp("normal");$(".edit-visibility","#visibility").show();updateText();if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false)}if(true==$("#sticky").attr("checked")){sticky="Sticky"}else{sticky=""}$("#post-visibility-display").html(postL10n[$("input:radio:checked",pvSelect).val()+sticky]);return false});$("input:radio","#post-visibility-select").change(function(){updateVisibility()});$("#timestampdiv").siblings("a.edit-timestamp").click(function(){if($("#timestampdiv").is(":hidden")){$("#timestampdiv").slideDown("normal");$(this).hide()}return false});$(".cancel-timestamp","#timestampdiv").click(function(){$("#timestampdiv").slideUp("normal");$("#mm").val($("#hidden_mm").val());$("#jj").val($("#hidden_jj").val());$("#aa").val($("#hidden_aa").val());$("#hh").val($("#hidden_hh").val());$("#mn").val($("#hidden_mn").val());$("#timestampdiv").siblings("a.edit-timestamp").show();updateText();return false});$(".save-timestamp","#timestampdiv").click(function(){if(updateText()){$("#timestampdiv").slideUp("normal");$("#timestampdiv").siblings("a.edit-timestamp").show()}return false});$("#post-status-select").siblings("a.edit-post-status").click(function(){if($("#post-status-select").is(":hidden")){$("#post-status-select").slideDown("normal");$(this).hide()}return false});$(".save-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false});$(".cancel-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post_status").val($("#hidden_post_status").val());$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false})}if($("#edit-slug-box").length){editPermalink=function(post_id){var i,c=0,e=$("#editable-post-name"),revert_e=e.html(),real_slug=$("#post_name"),revert_slug=real_slug.val(),b=$("#edit-slug-buttons"),revert_b=b.html(),full=$("#editable-post-name-full").html();$("#view-post-btn").hide();b.html('<a href="#" class="save button">'+postL10n.ok+'</a> <a class="cancel" href="#">'+postL10n.cancel+"</a>");b.children(".save").click(function(){var new_slug=e.children("input").val();$.post(ajaxurl,{action:"sample-permalink",post_id:post_id,new_slug:new_slug,new_title:$("#title").val(),samplepermalinknonce:$("#samplepermalinknonce").val()},function(data){$("#edit-slug-box").html(data);b.html(revert_b);real_slug.attr("value",new_slug);makeSlugeditClickable();$("#view-post-btn").show()});return false});$(".cancel","#edit-slug-buttons").click(function(){$("#view-post-btn").show();e.html(revert_e);b.html(revert_b);real_slug.attr("value",revert_slug);return false});for(i=0;i<full.length;++i){if("%"==full.charAt(i)){c++}}slug_value=(c>full.length/4)?"":full;e.html('<input type="text" id="new-post-slug" value="'+slug_value+'" />').children("input").keypress(function(e){var key=e.keyCode||0;if(13==key){b.children(".save").click();return false}if(27==key){b.children(".cancel").click();return false}real_slug.attr("value",this.value)}).focus()};makeSlugeditClickable=function(){$("#editable-post-name").click(function(){$("#edit-slug-buttons").children(".edit-slug").click()})};makeSlugeditClickable()}}); | var tagBox,commentsBox,editPermalink,makeSlugeditClickable,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail;function array_unique_noempty(a){var out=[];jQuery.each(a,function(key,val){val=jQuery.trim(val);if(val&&jQuery.inArray(val,out)==-1){out.push(val)}});return out}(function($){tagBox={clean:function(tags){return tags.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"")},parseTags:function(el){var id=el.id,num=id.split("-check-num-")[1],taxbox=$(el).closest(".tagsdiv"),thetags=taxbox.find(".the-tags"),current_tags=thetags.val().split(","),new_tags=[];delete current_tags[num];$.each(current_tags,function(key,val){val=$.trim(val);if(val){new_tags.push(val)}});thetags.val(this.clean(new_tags.join(",")));this.quickClicks(taxbox);return false},quickClicks:function(el){var thetags=$(".the-tags",el),tagchecklist=$(".tagchecklist",el),current_tags;if(!thetags.length){return}var disabled=thetags.attr("disabled");current_tags=thetags.val().split(",");tagchecklist.empty();$.each(current_tags,function(key,val){var txt,button_id,id=$(el).attr("id");val=$.trim(val);if(!val.match(/^\s+$/)&&""!=val){button_id=id+"-check-num-"+key;if(disabled){txt="<span>"+val+"</span> "}else{txt='<span><a id="'+button_id+'" class="ntdelbutton">X</a> '+val+"</span> "}tagchecklist.append(txt);if(!disabled){$("#"+button_id).click(function(){tagBox.parseTags(this)})}}})},flushTags:function(el,a,f){a=a||false;var text,tags=$(".the-tags",el),newtag=$("input.newtag",el),newtags;text=a?$(a).text():newtag.val();tagsval=tags.val();newtags=tagsval?tagsval+","+text:text;newtags=this.clean(newtags);newtags=array_unique_noempty(newtags.split(",")).join(",");tags.val(newtags);this.quickClicks(el);if(!a){newtag.val("")}if("undefined"==typeof(f)){newtag.focus()}return false},get:function(id){var tax=id.substr(id.indexOf("-")+1);$.post(ajaxurl,{action:"get-tagcloud",tax:tax},function(r,stat){if(0==r||"success"!=stat){r=wpAjax.broken}r=$('<p id="tagcloud-'+tax+'" class="the-tagcloud">'+r+"</p>");$("a",r).click(function(){tagBox.flushTags($(this).closest(".inside").children(".tagsdiv"),this);return false});$("#"+id).after(r)})},init:function(){var t=this,ajaxtag=$("div.ajaxtag");$(".tagsdiv").each(function(){tagBox.quickClicks(this)});$("input.tagadd",ajaxtag).click(function(){t.flushTags($(this).closest(".tagsdiv"))});$("div.taghint",ajaxtag).click(function(){$(this).css("visibility","hidden").siblings(".newtag").focus()});$("input.newtag",ajaxtag).blur(function(){if(this.value==""){$(this).siblings(".taghint").css("visibility","")}}).focus(function(){$(this).siblings(".taghint").css("visibility","hidden")}).keyup(function(e){if(13==e.which){tagBox.flushTags($(this).closest(".tagsdiv"));return false}}).keypress(function(e){if(13==e.which){e.preventDefault();return false}}).each(function(){var tax=$(this).closest("div.tagsdiv").attr("id");$(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+tax,{delay:500,minchars:2,multiple:true,multipleSep:", "})});$("#post").submit(function(){$("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});$("a.tagcloud-link").click(function(){tagBox.get($(this).attr("id"));$(this).unbind().click(function(){$(this).siblings(".the-tagcloud").toggle();return false});return false})}};commentsBox={st:0,get:function(total,num){var st=this.st,data;if(!num){num=20}this.st+=num;this.total=total;$("#commentsdiv img.waiting").show();data={action:"get-comments",mode:"single",_ajax_nonce:$("#add_comment_nonce").val(),post_ID:$("#post_ID").val(),start:st,num:num};$.post(ajaxurl,data,function(r){r=wpAjax.parseAjaxResponse(r);$("#commentsdiv .widefat").show();$("#commentsdiv img.waiting").hide();if("object"==typeof r&&r.responses[0]){$("#the-comment-list").append(r.responses[0].data);theList=theExtraList=null;$("a[className*=':']").unbind();setCommentsList();if(commentsBox.st>commentsBox.total){$("#show-comments").hide()}else{$("#show-comments").html(postL10n.showcomm)}return}else{if(1==r){$("#show-comments").parent().html(postL10n.endcomm);return}}$("#the-comment-list").append('<tr><td colspan="2">'+wpAjax.broken+"</td></tr>")});return false}};WPSetThumbnailHTML=function(html){$(".inside","#postimagediv").html(html)};WPSetThumbnailID=function(id){var field=$("input[value=_thumbnail_id]","#list-table");if(field.size()>0){$("#meta\\["+field.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(id)}};WPRemoveThumbnail=function(){$.post(ajaxurl,{action:"set-post-thumbnail",post_id:$("#post_ID").val(),thumbnail_id:-1,cookie:encodeURIComponent(document.cookie)},function(str){if(str=="0"){alert(setPostThumbnailL10n.error)}else{WPSetThumbnailHTML(str)}})}})(jQuery);jQuery(document).ready(function($){var stamp,visibility,sticky="";postboxes.add_postbox_toggles(pagenow);if($("#tagsdiv-post_tag").length){tagBox.init()}else{$("#side-sortables, #normal-sortables, #advanced-sortables").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}})}$(".categorydiv").each(function(){var this_id=$(this).attr("id"),noSyncChecks=false,syncChecks,catAddAfter,taxonomyParts,taxonomy,settingName;taxonomyParts=this_id.split("-");taxonomyParts.shift();taxonomy=taxonomyParts.join("-");settingName=taxonomy+"_tab";if(taxonomy=="category"){settingName="cats"}$("a","#"+taxonomy+"-tabs").click(function(){var t=$(this).attr("href");$(this).parent().addClass("tabs").siblings("li").removeClass("tabs");$("#"+taxonomy+"-tabs").siblings(".tabs-panel").hide();$(t).show();if("#"+taxonomy+"-all"==t){deleteUserSetting(settingName)}else{setUserSetting(settingName,"pop")}return false});if(getUserSetting(settingName)){$('a[href="#'+taxonomy+'-pop"]',"#"+taxonomy+"-tabs").click()}$("#new"+taxonomy).one("focus",function(){$(this).val("").removeClass("form-input-tip")});$("#"+taxonomy+"-add-submit").click(function(){$("#new"+taxonomy).focus()});syncChecks=function(){if(noSyncChecks){return}noSyncChecks=true;var th=jQuery(this),c=th.is(":checked"),id=th.val().toString();$("#in-"+taxonomy+"-"+id+", #in-"+taxonomy+"-category-"+id).attr("checked",c);noSyncChecks=false};catAddBefore=function(s){if(!$("#new"+taxonomy).val()){return false}s.data+="&"+$(":checked","#"+taxonomy+"checklist").serialize();return s};catAddAfter=function(r,s){var sup,drop=$("#new"+taxonomy+"_parent");if("undefined"!=s.parsed.responses[0]&&(sup=s.parsed.responses[0].supplemental.newcat_parent)){drop.before(sup);drop.remove()}};$("#"+taxonomy+"checklist").wpList({alt:"",response:taxonomy+"-ajax-response",addBefore:catAddBefore,addAfter:catAddAfter});$("#"+taxonomy+"-add-toggle").click(function(){$("#"+taxonomy+"-adder").toggleClass("wp-hidden-children");$('a[href="#'+taxonomy+'-all"]',"#"+taxonomy+"-tabs").click();return false});$("#"+taxonomy+"checklist li.popular-category :checkbox, #"+taxonomy+"checklist-pop :checkbox").live("click",function(){var t=$(this),c=t.is(":checked"),id=t.val();if(id&&t.parents("#taxonomy-"+taxonomy).length){$("#in-"+taxonomy+"-"+id+", #in-popular-"+taxonomy+"-"+id).attr("checked",c)}})});if($("#postcustom").length){$("#the-list").wpList({addAfter:function(xml,s){$("table#list-table").show();if(typeof(autosave_update_post_ID)!="undefined"){autosave_update_post_ID(s.parsed.responses[0].supplemental.postid)}},addBefore:function(s){s.data+="&post_id="+$("#post_ID").val();return s}})}if($("#submitdiv").length){stamp=$("#timestamp").html();visibility=$("#post-visibility-display").html();function updateVisibility(){var pvSelect=$("#post-visibility-select");if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false);$("#sticky-span").hide()}else{$("#sticky-span").show()}if($("input:radio:checked",pvSelect).val()!="password"){$("#password-span").hide()}else{$("#password-span").show()}}function updateText(){var attemptedDate,originalDate,currentDate,publishOn,postStatus=$("#post_status"),optPublish=$("option[value=publish]",postStatus),aa=$("#aa").val(),mm=$("#mm").val(),jj=$("#jj").val(),hh=$("#hh").val(),mn=$("#mn").val();attemptedDate=new Date(aa,mm-1,jj,hh,mn);originalDate=new Date($("#hidden_aa").val(),$("#hidden_mm").val()-1,$("#hidden_jj").val(),$("#hidden_hh").val(),$("#hidden_mn").val());currentDate=new Date($("#cur_aa").val(),$("#cur_mm").val()-1,$("#cur_jj").val(),$("#cur_hh").val(),$("#cur_mn").val());if(attemptedDate.getFullYear()!=aa||(1+attemptedDate.getMonth())!=mm||attemptedDate.getDate()!=jj||attemptedDate.getMinutes()!=mn){$(".timestamp-wrap","#timestampdiv").addClass("form-invalid");return false}else{$(".timestamp-wrap","#timestampdiv").removeClass("form-invalid")}if(attemptedDate>currentDate&&$("#original_post_status").val()!="future"){publishOn=postL10n.publishOnFuture;$("#publish").val(postL10n.schedule)}else{if(attemptedDate<=currentDate&&$("#original_post_status").val()!="publish"){publishOn=postL10n.publishOn;$("#publish").val(postL10n.publish)}else{publishOn=postL10n.publishOnPast;if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}}}if(originalDate.toUTCString()==attemptedDate.toUTCString()){$("#timestamp").html(stamp)}else{$("#timestamp").html(publishOn+" <b>"+$("option[value="+$("#mm").val()+"]","#mm").text()+" "+jj+", "+aa+" @ "+hh+":"+mn+"</b> ")}if($("input:radio:checked","#post-visibility-select").val()=="private"){if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}if(optPublish.length==0){postStatus.append('<option value="publish">'+postL10n.privatelyPublished+"</option>")}else{optPublish.html(postL10n.privatelyPublished)}$("option[value=publish]",postStatus).attr("selected",true);$(".edit-post-status","#misc-publishing-actions").hide()}else{if($("#original_post_status").val()=="future"||$("#original_post_status").val()=="draft"){if(optPublish.length){optPublish.remove();postStatus.val($("#hidden_post_status").val())}}else{optPublish.html(postL10n.published)}if(postStatus.is(":hidden")){$(".edit-post-status","#misc-publishing-actions").show()}}$("#post-status-display").html($("option:selected",postStatus).text());if($("option:selected",postStatus).val()=="private"||$("option:selected",postStatus).val()=="publish"){$("#save-post").hide()}else{$("#save-post").show();if($("option:selected",postStatus).val()=="pending"){$("#save-post").show().val(postL10n.savePending)}else{$("#save-post").show().val(postL10n.saveDraft)}}return true}$(".edit-visibility","#visibility").click(function(){if($("#post-visibility-select").is(":hidden")){updateVisibility();$("#post-visibility-select").slideDown("normal");$(this).hide()}return false});$(".cancel-post-visibility","#post-visibility-select").click(function(){$("#post-visibility-select").slideUp("normal");$("#visibility-radio-"+$("#hidden-post-visibility").val()).attr("checked",true);$("#post_password").val($("#hidden_post_password").val());$("#sticky").attr("checked",$("#hidden-post-sticky").attr("checked"));$("#post-visibility-display").html(visibility);$(".edit-visibility","#visibility").show();updateText();return false});$(".save-post-visibility","#post-visibility-select").click(function(){var pvSelect=$("#post-visibility-select");pvSelect.slideUp("normal");$(".edit-visibility","#visibility").show();updateText();if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false)}if(true==$("#sticky").attr("checked")){sticky="Sticky"}else{sticky=""}$("#post-visibility-display").html(postL10n[$("input:radio:checked",pvSelect).val()+sticky]);return false});$("input:radio","#post-visibility-select").change(function(){updateVisibility()});$("#timestampdiv").siblings("a.edit-timestamp").click(function(){if($("#timestampdiv").is(":hidden")){$("#timestampdiv").slideDown("normal");$(this).hide()}return false});$(".cancel-timestamp","#timestampdiv").click(function(){$("#timestampdiv").slideUp("normal");$("#mm").val($("#hidden_mm").val());$("#jj").val($("#hidden_jj").val());$("#aa").val($("#hidden_aa").val());$("#hh").val($("#hidden_hh").val());$("#mn").val($("#hidden_mn").val());$("#timestampdiv").siblings("a.edit-timestamp").show();updateText();return false});$(".save-timestamp","#timestampdiv").click(function(){if(updateText()){$("#timestampdiv").slideUp("normal");$("#timestampdiv").siblings("a.edit-timestamp").show()}return false});$("#post-status-select").siblings("a.edit-post-status").click(function(){if($("#post-status-select").is(":hidden")){$("#post-status-select").slideDown("normal");$(this).hide()}return false});$(".save-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false});$(".cancel-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post_status").val($("#hidden_post_status").val());$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false})}if($("#edit-slug-box").length){editPermalink=function(post_id){var i,c=0,e=$("#editable-post-name"),revert_e=e.html(),real_slug=$("#post_name"),revert_slug=real_slug.html(),b=$("#edit-slug-buttons"),revert_b=b.html(),full=$("#editable-post-name-full").html();$("#view-post-btn").hide();b.html('<a href="#" class="save button">'+postL10n.ok+'</a> <a class="cancel" href="#">'+postL10n.cancel+"</a>");b.children(".save").click(function(){var new_slug=e.children("input").val();$.post(ajaxurl,{action:"sample-permalink",post_id:post_id,new_slug:new_slug,new_title:$("#title").val(),samplepermalinknonce:$("#samplepermalinknonce").val()},function(data){$("#edit-slug-box").html(data);b.html(revert_b);real_slug.attr("value",new_slug);makeSlugeditClickable();$("#view-post-btn").show()});return false});$(".cancel","#edit-slug-buttons").click(function(){$("#view-post-btn").show();e.html(revert_e);b.html(revert_b);real_slug.attr("value",revert_slug);return false});for(i=0;i<full.length;++i){if("%"==full.charAt(i)){c++}}slug_value=(c>full.length/4)?"":full;e.html('<input type="text" id="new-post-slug" value="'+slug_value+'" />').children("input").keypress(function(e){var key=e.keyCode||0;if(13==key){b.children(".save").click();return false}if(27==key){b.children(".cancel").click();return false}real_slug.attr("value",this.value)}).focus()};makeSlugeditClickable=function(){$("#editable-post-name").click(function(){$("#edit-slug-buttons").children(".edit-slug").click()})};makeSlugeditClickable()}}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/51dac4a8c61f888c09dbd51ddc3a2c502be79491/post.js/clean/wp-admin/js/post.js |
var attemptedDate, originalDate, currentDate, publishOn, postStatus = $('#post_status'), optPublish = $('option[value=publish]', postStatus), aa = $('#aa').val(), | var attemptedDate, originalDate, currentDate, publishOn, page = 'page' == pagenow || 'page-new' == pagenow, postStatus = $('#post_status'), optPublish = $('option[value=publish]', postStatus), aa = $('#aa').val(), | function updateText() { var attemptedDate, originalDate, currentDate, publishOn, postStatus = $('#post_status'), optPublish = $('option[value=publish]', postStatus), aa = $('#aa').val(), mm = $('#mm').val(), jj = $('#jj').val(), hh = $('#hh').val(), mn = $('#mn').val(); attemptedDate = new Date( aa, mm - 1, jj, hh, mn ); originalDate = new Date( $('#hidden_aa').val(), $('#hidden_mm').val() -1, $('#hidden_jj').val(), $('#hidden_hh').val(), $('#hidden_mn').val() ); currentDate = new Date( $('#cur_aa').val(), $('#cur_mm').val() -1, $('#cur_jj').val(), $('#cur_hh').val(), $('#cur_mn').val() ); if ( attemptedDate.getFullYear() != aa || (1 + attemptedDate.getMonth()) != mm || attemptedDate.getDate() != jj || attemptedDate.getMinutes() != mn ) { $('.timestamp-wrap', '#timestampdiv').addClass('form-invalid'); return false; } else { $('.timestamp-wrap', '#timestampdiv').removeClass('form-invalid'); } if ( attemptedDate > currentDate && $('#original_post_status').val() != 'future' ) { publishOn = postL10n.publishOnFuture; $('#publish').val( postL10n.schedule ); } else if ( attemptedDate <= currentDate && $('#original_post_status').val() != 'publish' ) { publishOn = postL10n.publishOn; $('#publish').val( postL10n.publish ); } else { publishOn = postL10n.publishOnPast; if ( page ) $('#publish').val( postL10n.updatePage ); else $('#publish').val( postL10n.updatePost ); } if ( originalDate.toUTCString() == attemptedDate.toUTCString() ) { //hack $('#timestamp').html(stamp); } else { $('#timestamp').html( publishOn + ' <b>' + $('option[value=' + $('#mm').val() + ']', '#mm').text() + ' ' + jj + ', ' + aa + ' @ ' + hh + ':' + mn + '</b> ' ); } if ( $('input:radio:checked', '#post-visibility-select').val() == 'private' ) { if ( page ) $('#publish').val( postL10n.updatePage ); else $('#publish').val( postL10n.updatePost ); if ( optPublish.length == 0 ) { postStatus.append('<option value="publish">' + postL10n.privatelyPublished + '</option>'); } else { optPublish.html( postL10n.privatelyPublished ); } $('option[value=publish]', postStatus).attr('selected', true); $('.edit-post-status', '#misc-publishing-actions').hide(); } else { if ( $('#original_post_status').val() == 'future' || $('#original_post_status').val() == 'draft' ) { if ( optPublish.length ) { optPublish.remove(); postStatus.val($('#hidden_post_status').val()); } } else { optPublish.html( postL10n.published ); } if ( postStatus.is(':hidden') ) $('.edit-post-status', '#misc-publishing-actions').show(); } $('#post-status-display').html($('option:selected', postStatus).text()); if ( $('option:selected', postStatus).val() == 'private' || $('option:selected', postStatus).val() == 'publish' ) { $('#save-post').hide(); } else { $('#save-post').show(); if ( $('option:selected', postStatus).val() == 'pending' ) { $('#save-post').show().val( postL10n.savePending ); } else { $('#save-post').show().val( postL10n.saveDraft ); } } return true; } | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/1b2405d5677e2253b61d467d0e5288556f7b1146/post.dev.js/buggy/wp-admin/js/post.dev.js |
t.refresh(this); if(t.isSelected()) refresh_files_for.push(t.id()); } else new_torrent_ids.push(this.id); | t.refresh(this); if(t.isSelected()) refresh_files_for.push(t.id()); } else new_torrent_ids.push(this.id); | updateTorrentsData: function( updated, removed_ids ) { var tr = this; var new_torrent_ids = []; var refresh_files_for = []; jQuery.each( updated, function() { var t = tr._torrents[this.id]; if (t){ t.refresh(this); if(t.isSelected()) refresh_files_for.push(t.id()); } else new_torrent_ids.push(this.id); } ); if(refresh_files_for.length > 0) tr.remote.loadTorrentFiles( refresh_files_for ); if(new_torrent_ids.length > 0) tr.remote.getInitialDataFor(new_torrent_ids, function(torrents){ tr.addTorrents(torrents) } ); var removedAny = tr.deleteTorrents(removed_ids); if( ( new_torrent_ids.length != 0 ) || removedAny ) { tr.hideiPhoneAddressbar(); tr.deselectAll( true ); } this.refilter(); }, | 8560 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8560/ad9814612d62f8069f4c5993934c66dfc5b804f9/transmission.js/clean/web/javascript/transmission.js |
html += '<li class="inspector_tracker_entry ' + parity + '"><div class="tracker_host">' html += tracker.host + '</div><table class="tracker_stats">'; | html += '<li class="inspector_tracker_entry ' + parity + '"><div class="tracker_host" title="' + tracker.announce + '">'; html += tracker.host + '</div>'; html += '<div class="tracker_activity">'; html += '<div>' + lastAnnounceStatusHash['label'] + ': ' + lastAnnounceStatusHash['value'] + '</div>'; html += '<div>' + announceState + '</div>'; html += '<div>' + lastScrapeStatusHash['label'] + ': ' + lastScrapeStatusHash['value'] + '</div>'; html += '</div><table class="tracker_stats">'; | updateTrackersLists: function() { // By building up the HTML as as string, then have the browser // turn this into a DOM tree, this is a fast operation. var html = ''; var na = 'N/A'; var torrents = this.getSelectedTorrents( ); if( $(this._inspector_trackers_list).is(':visible') && torrents.length == 1 ) { for( var i=0, tier; tier=torrents[0]._trackerStats[i]; ++i ) { html += '<div class="inspector_group"><div class="inspector_group_label">'; html += 'Tier ' + (i + 1) + '</div><ul class="tier_list">'; for( var j=0, tracker; tracker=tier[j]; ++j ) { var parity = ((j+1) % 2 == 0 ? 'even' : 'odd'); html += '<li class="inspector_tracker_entry ' + parity + '"><div class="tracker_host">' html += tracker.host + '</div><table class="tracker_stats">'; html += '<tr><th>Seeders:</th><td>' + (tracker.seederCount > -1 ? tracker.seederCount : na) + '</td></tr>'; html += '<tr><th>Leechers:</th><td>' + (tracker.leecherCount > -1 ? tracker.leecherCount : na) + '</td></tr>'; html += '<tr><th>Downloads:</th><td>' + (tracker.downloadCount > -1 ? tracker.downloadCount : na)+ '</td></tr>'; html += '</table></li>'; } html += '</ul></div>'; } } setInnerHTML(this._inspector_trackers_list, html); }, | 8560 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8560/934330327ac5a1e74c6de707235c9c9dfeaa1843/transmission.js/buggy/web/javascript/transmission.js |
} | }; | fb.updateValue = function (event) { if (this.value && this.value != fb.color) { fb.setColor(this.value); } } | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/d60ded9228f166049d90a7f9237a2faeb9423b47/farbtastic.js/clean/wp-admin/js/farbtastic.js |
var tagBox,commentsBox,editPermalink,makeSlugeditClickable,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail;function array_unique_noempty(a){var out=[];jQuery.each(a,function(key,val){val=jQuery.trim(val);if(val&&jQuery.inArray(val,out)==-1){out.push(val)}});return out}(function($){tagBox={clean:function(tags){return tags.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"")},parseTags:function(el){var id=el.id,num=id.split("-check-num-")[1],taxbox=$(el).closest(".tagsdiv"),thetags=taxbox.find(".the-tags"),current_tags=thetags.val().split(","),new_tags=[];delete current_tags[num];$.each(current_tags,function(key,val){val=$.trim(val);if(val){new_tags.push(val)}});thetags.val(this.clean(new_tags.join(",")));this.quickClicks(taxbox);return false},quickClicks:function(el){var thetags=$(".the-tags",el),tagchecklist=$(".tagchecklist",el),current_tags;if(!thetags.length){return}var disabled=thetags.attr("disabled");current_tags=thetags.val().split(",");tagchecklist.empty();$.each(current_tags,function(key,val){var txt,button_id,id=$(el).attr("id");val=$.trim(val);if(!val.match(/^\s+$/)&&""!=val){button_id=id+"-check-num-"+key;if(disabled){txt="<span>"+val+"</span> "}else{txt='<span><a id="'+button_id+'" class="ntdelbutton">X</a> '+val+"</span> "}tagchecklist.append(txt);if(!disabled){$("#"+button_id).click(function(){tagBox.parseTags(this)})}}})},flushTags:function(el,a,f){a=a||false;var text,tags=$(".the-tags",el),newtag=$("input.newtag",el),newtags;text=a?$(a).text():newtag.val();tagsval=tags.val();newtags=tagsval?tagsval+","+text:text;newtags=this.clean(newtags);newtags=array_unique_noempty(newtags.split(",")).join(",");tags.val(newtags);this.quickClicks(el);if(!a){newtag.val("")}if("undefined"==typeof(f)){newtag.focus()}return false},get:function(id){var tax=id.substr(id.indexOf("-")+1);$.post(ajaxurl,{action:"get-tagcloud",tax:tax},function(r,stat){if(0==r||"success"!=stat){r=wpAjax.broken}r=$('<p id="tagcloud-'+tax+'" class="the-tagcloud">'+r+"</p>");$("a",r).click(function(){tagBox.flushTags($(this).closest(".inside").children(".tagsdiv"),this);return false});$("#"+id).after(r)})},init:function(){var t=this,ajaxtag=$("div.ajaxtag");$(".tagsdiv").each(function(){tagBox.quickClicks(this)});$("input.tagadd",ajaxtag).click(function(){t.flushTags($(this).closest(".tagsdiv"))});$("div.taghint",ajaxtag).click(function(){$(this).css("visibility","hidden").siblings(".newtag").focus()});$("input.newtag",ajaxtag).blur(function(){if(this.value==""){$(this).siblings(".taghint").css("visibility","")}}).focus(function(){$(this).siblings(".taghint").css("visibility","hidden")}).keyup(function(e){if(13==e.which){tagBox.flushTags($(this).closest(".tagsdiv"));return false}}).keypress(function(e){if(13==e.which){e.preventDefault();return false}}).each(function(){var tax=$(this).closest("div.tagsdiv").attr("id");$(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+tax,{delay:500,minchars:2,multiple:true,multipleSep:","})});$("#post").submit(function(){$("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});$("a.tagcloud-link").click(function(){tagBox.get($(this).attr("id"));$(this).unbind().click(function(){$(this).siblings(".the-tagcloud").toggle();return false});return false})}};commentsBox={st:0,get:function(total,num){var st=this.st,data;if(!num){num=20}this.st+=num;this.total=total;$("#commentsdiv img.waiting").show();data={action:"get-comments",mode:"single",_ajax_nonce:$("#add_comment_nonce").val(),post_ID:$("#post_ID").val(),start:st,num:num};$.post(ajaxurl,data,function(r){r=wpAjax.parseAjaxResponse(r);$("#commentsdiv .widefat").show();$("#commentsdiv img.waiting").hide();if("object"==typeof r&&r.responses[0]){$("#the-comment-list").append(r.responses[0].data);theList=theExtraList=null;$("a[className*=':']").unbind();setCommentsList();if(commentsBox.st>commentsBox.total){$("#show-comments").hide()}else{$("#show-comments").html(postL10n.showcomm)}return}else{if(1==r){$("#show-comments").parent().html(postL10n.endcomm);return}}$("#the-comment-list").append('<tr><td colspan="2">'+wpAjax.broken+"</td></tr>")});return false}};WPSetThumbnailHTML=function(html){$(".inside","#postimagediv").html(html)};WPSetThumbnailID=function(id){var field=$("input[value=_thumbnail_id]","#list-table");if(field.size()>0){$("#meta\\["+field.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(id)}};WPRemoveThumbnail=function(){$.post(ajaxurl,{action:"set-post-thumbnail",post_id:$("#post_ID").val(),thumbnail_id:-1,cookie:encodeURIComponent(document.cookie)},function(str){if(str=="0"){alert(setPostThumbnailL10n.error)}else{WPSetThumbnailHTML(str)}})}})(jQuery);jQuery(document).ready(function($){var stamp,visibility,sticky="";postboxes.add_postbox_toggles(pagenow);if($("#tagsdiv-post_tag").length){tagBox.init()}else{$("#side-sortables, #normal-sortables, #advanced-sortables").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}})}$(".categorydiv").each(function(){var this_id=$(this).attr("id"),noSyncChecks=false,syncChecks,catAddAfter,taxonomyParts,taxonomy,settingName;taxonomyParts=this_id.split("-");taxonomyParts.shift();taxonomy=taxonomyParts.join("-");settingName=taxonomy+"_tab";if(taxonomy=="category"){settingName="cats"}$("a","#"+taxonomy+"-tabs").click(function(){var t=$(this).attr("href");$(this).parent().addClass("tabs").siblings("li").removeClass("tabs");$("#"+taxonomy+"-tabs").siblings(".tabs-panel").hide();$(t).show();if("#"+taxonomy+"-all"==t){deleteUserSetting(settingName)}else{setUserSetting(settingName,"pop")}return false});if(getUserSetting(settingName)){$('a[href="#'+taxonomy+'-pop"]',"#"+taxonomy+"-tabs").click()}$("#new"+taxonomy).one("focus",function(){$(this).val("").removeClass("form-input-tip")});$("#"+taxonomy+"-add-submit").click(function(){$("#new"+taxonomy).focus()});syncChecks=function(){if(noSyncChecks){return}noSyncChecks=true;var th=jQuery(this),c=th.is(":checked"),id=th.val().toString();$("#in-"+taxonomy+"-"+id+", #in-"+taxonomy+"-category-"+id).attr("checked",c);noSyncChecks=false};catAddBefore=function(s){if(!$("#new"+taxonomy).val()){return false}s.data+="&"+$(":checked","#"+taxonomy+"checklist").serialize();return s};catAddAfter=function(r,s){var sup,drop=$("#new"+taxonomy+"_parent");if("undefined"!=s.parsed.responses[0]&&(sup=s.parsed.responses[0].supplemental.newcat_parent)){drop.before(sup);drop.remove()}};$("#"+taxonomy+"checklist").wpList({alt:"",response:taxonomy+"-ajax-response",addBefore:catAddBefore,addAfter:catAddAfter});$("#"+taxonomy+"-add-toggle").click(function(){$("#"+taxonomy+"-adder").toggleClass("wp-hidden-children");$('a[href="#'+taxonomy+'-all"]',"#"+taxonomy+"-tabs").click();return false});$("#"+taxonomy+"checklist li.popular-category :checkbox, #"+taxonomy+"checklist-pop :checkbox").live("click",function(){var t=$(this),c=t.is(":checked"),id=t.val();if(id&&t.parents("#taxonomy-"+taxonomy).length){$("#in-"+taxonomy+"-"+id+", #in-popular-"+taxonomy+"-"+id).attr("checked",c)}})});if($("#postcustom").length){$("#the-list").wpList({addAfter:function(xml,s){$("table#list-table").show();if(typeof(autosave_update_post_ID)!="undefined"){autosave_update_post_ID(s.parsed.responses[0].supplemental.postid)}},addBefore:function(s){s.data+="&post_id="+$("#post_ID").val();return s}})}if($("#submitdiv").length){stamp=$("#timestamp").html();visibility=$("#post-visibility-display").html();function updateVisibility(){var pvSelect=$("#post-visibility-select");if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false);$("#sticky-span").hide()}else{$("#sticky-span").show()}if($("input:radio:checked",pvSelect).val()!="password"){$("#password-span").hide()}else{$("#password-span").show()}}function updateText(){var attemptedDate,originalDate,currentDate,publishOn,page="page"==pagenow||"page-new"==pagenow,postStatus=$("#post_status"),optPublish=$("option[value=publish]",postStatus),aa=$("#aa").val(),mm=$("#mm").val(),jj=$("#jj").val(),hh=$("#hh").val(),mn=$("#mn").val();attemptedDate=new Date(aa,mm-1,jj,hh,mn);originalDate=new Date($("#hidden_aa").val(),$("#hidden_mm").val()-1,$("#hidden_jj").val(),$("#hidden_hh").val(),$("#hidden_mn").val());currentDate=new Date($("#cur_aa").val(),$("#cur_mm").val()-1,$("#cur_jj").val(),$("#cur_hh").val(),$("#cur_mn").val());if(attemptedDate.getFullYear()!=aa||(1+attemptedDate.getMonth())!=mm||attemptedDate.getDate()!=jj||attemptedDate.getMinutes()!=mn){$(".timestamp-wrap","#timestampdiv").addClass("form-invalid");return false}else{$(".timestamp-wrap","#timestampdiv").removeClass("form-invalid")}if(attemptedDate>currentDate&&$("#original_post_status").val()!="future"){publishOn=postL10n.publishOnFuture;$("#publish").val(postL10n.schedule)}else{if(attemptedDate<=currentDate&&$("#original_post_status").val()!="publish"){publishOn=postL10n.publishOn;$("#publish").val(postL10n.publish)}else{publishOn=postL10n.publishOnPast;if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}}}if(originalDate.toUTCString()==attemptedDate.toUTCString()){$("#timestamp").html(stamp)}else{$("#timestamp").html(publishOn+" <b>"+$("option[value="+$("#mm").val()+"]","#mm").text()+" "+jj+", "+aa+" @ "+hh+":"+mn+"</b> ")}if($("input:radio:checked","#post-visibility-select").val()=="private"){if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}if(optPublish.length==0){postStatus.append('<option value="publish">'+postL10n.privatelyPublished+"</option>")}else{optPublish.html(postL10n.privatelyPublished)}$("option[value=publish]",postStatus).attr("selected",true);$(".edit-post-status","#misc-publishing-actions").hide()}else{if($("#original_post_status").val()=="future"||$("#original_post_status").val()=="draft"){if(optPublish.length){optPublish.remove();postStatus.val($("#hidden_post_status").val())}}else{optPublish.html(postL10n.published)}if(postStatus.is(":hidden")){$(".edit-post-status","#misc-publishing-actions").show()}}$("#post-status-display").html($("option:selected",postStatus).text());if($("option:selected",postStatus).val()=="private"||$("option:selected",postStatus).val()=="publish"){$("#save-post").hide()}else{$("#save-post").show();if($("option:selected",postStatus).val()=="pending"){$("#save-post").show().val(postL10n.savePending)}else{$("#save-post").show().val(postL10n.saveDraft)}}return true}$(".edit-visibility","#visibility").click(function(){if($("#post-visibility-select").is(":hidden")){updateVisibility();$("#post-visibility-select").slideDown("normal");$(this).hide()}return false});$(".cancel-post-visibility","#post-visibility-select").click(function(){$("#post-visibility-select").slideUp("normal");$("#visibility-radio-"+$("#hidden-post-visibility").val()).attr("checked",true);$("#post_password").val($("#hidden_post_password").val());$("#sticky").attr("checked",$("#hidden-post-sticky").attr("checked"));$("#post-visibility-display").html(visibility);$(".edit-visibility","#visibility").show();updateText();return false});$(".save-post-visibility","#post-visibility-select").click(function(){var pvSelect=$("#post-visibility-select");pvSelect.slideUp("normal");$(".edit-visibility","#visibility").show();updateText();if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false)}if(true==$("#sticky").attr("checked")){sticky="Sticky"}else{sticky=""}$("#post-visibility-display").html(postL10n[$("input:radio:checked",pvSelect).val()+sticky]);return false});$("input:radio","#post-visibility-select").change(function(){updateVisibility()});$("#timestampdiv").siblings("a.edit-timestamp").click(function(){if($("#timestampdiv").is(":hidden")){$("#timestampdiv").slideDown("normal");$(this).hide()}return false});$(".cancel-timestamp","#timestampdiv").click(function(){$("#timestampdiv").slideUp("normal");$("#mm").val($("#hidden_mm").val());$("#jj").val($("#hidden_jj").val());$("#aa").val($("#hidden_aa").val());$("#hh").val($("#hidden_hh").val());$("#mn").val($("#hidden_mn").val());$("#timestampdiv").siblings("a.edit-timestamp").show();updateText();return false});$(".save-timestamp","#timestampdiv").click(function(){if(updateText()){$("#timestampdiv").slideUp("normal");$("#timestampdiv").siblings("a.edit-timestamp").show()}return false});$("#post-status-select").siblings("a.edit-post-status").click(function(){if($("#post-status-select").is(":hidden")){$("#post-status-select").slideDown("normal");$(this).hide()}return false});$(".save-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false});$(".cancel-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post_status").val($("#hidden_post_status").val());$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false})}if($("#edit-slug-box").length){editPermalink=function(post_id){var i,c=0,e=$("#editable-post-name"),revert_e=e.html(),real_slug=$("#post_name"),revert_slug=real_slug.val(),b=$("#edit-slug-buttons"),revert_b=b.html(),full=$("#editable-post-name-full").html();$("#view-post-btn").hide();b.html('<a href="#" class="save button">'+postL10n.ok+'</a> <a class="cancel" href="#">'+postL10n.cancel+"</a>");b.children(".save").click(function(){var new_slug=e.children("input").val();$.post(ajaxurl,{action:"sample-permalink",post_id:post_id,new_slug:new_slug,new_title:$("#title").val(),samplepermalinknonce:$("#samplepermalinknonce").val()},function(data){$("#edit-slug-box").html(data);b.html(revert_b);real_slug.attr("value",new_slug);makeSlugeditClickable();$("#view-post-btn").show()});return false});$(".cancel","#edit-slug-buttons").click(function(){$("#view-post-btn").show();e.html(revert_e);b.html(revert_b);real_slug.attr("value",revert_slug);return false});for(i=0;i<full.length;++i){if("%"==full.charAt(i)){c++}}slug_value=(c>full.length/4)?"":full;e.html('<input type="text" id="new-post-slug" value="'+slug_value+'" />').children("input").keypress(function(e){var key=e.keyCode||0;if(13==key){b.children(".save").click();return false}if(27==key){b.children(".cancel").click();return false}real_slug.attr("value",this.value)}).focus()};makeSlugeditClickable=function(){$("#editable-post-name").click(function(){$("#edit-slug-buttons").children(".edit-slug").click()})};makeSlugeditClickable()}if($("#title").val()==""){$("#title").siblings("#title-prompt-text").css("visibility","")}$("#title-prompt-text").click(function(){$(this).css("visibility","hidden").siblings("#title").focus()});$("#title").blur(function(){if(this.value==""){$(this).siblings("#title-prompt-text").css("visibility","")}}).focus(function(){$(this).siblings("#title-prompt-text").css("visibility","hidden")}).keydown(function(e){$(this).siblings("#title-prompt-text").css("visibility","hidden");$(this).unbind(e)})}); | var tagBox,commentsBox,editPermalink,makeSlugeditClickable,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail;function array_unique_noempty(a){var out=[];jQuery.each(a,function(key,val){val=jQuery.trim(val);if(val&&jQuery.inArray(val,out)==-1){out.push(val)}});return out}(function($){tagBox={clean:function(tags){return tags.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"")},parseTags:function(el){var id=el.id,num=id.split("-check-num-")[1],taxbox=$(el).closest(".tagsdiv"),thetags=taxbox.find(".the-tags"),current_tags=thetags.val().split(","),new_tags=[];delete current_tags[num];$.each(current_tags,function(key,val){val=$.trim(val);if(val){new_tags.push(val)}});thetags.val(this.clean(new_tags.join(",")));this.quickClicks(taxbox);return false},quickClicks:function(el){var thetags=$(".the-tags",el),tagchecklist=$(".tagchecklist",el),current_tags;if(!thetags.length){return}var disabled=thetags.attr("disabled");current_tags=thetags.val().split(",");tagchecklist.empty();$.each(current_tags,function(key,val){var txt,button_id,id=$(el).attr("id");val=$.trim(val);if(!val.match(/^\s+$/)&&""!=val){button_id=id+"-check-num-"+key;if(disabled){txt="<span>"+val+"</span> "}else{txt='<span><a id="'+button_id+'" class="ntdelbutton">X</a> '+val+"</span> "}tagchecklist.append(txt);if(!disabled){$("#"+button_id).click(function(){tagBox.parseTags(this)})}}})},flushTags:function(el,a,f){a=a||false;var text,tags=$(".the-tags",el),newtag=$("input.newtag",el),newtags;text=a?$(a).text():newtag.val();tagsval=tags.val();newtags=tagsval?tagsval+","+text:text;newtags=this.clean(newtags);newtags=array_unique_noempty(newtags.split(",")).join(",");tags.val(newtags);this.quickClicks(el);if(!a){newtag.val("")}if("undefined"==typeof(f)){newtag.focus()}return false},get:function(id){var tax=id.substr(id.indexOf("-")+1);$.post(ajaxurl,{action:"get-tagcloud",tax:tax},function(r,stat){if(0==r||"success"!=stat){r=wpAjax.broken}r=$('<p id="tagcloud-'+tax+'" class="the-tagcloud">'+r+"</p>");$("a",r).click(function(){tagBox.flushTags($(this).closest(".inside").children(".tagsdiv"),this);return false});$("#"+id).after(r)})},init:function(){var t=this,ajaxtag=$("div.ajaxtag");$(".tagsdiv").each(function(){tagBox.quickClicks(this)});$("input.tagadd",ajaxtag).click(function(){t.flushTags($(this).closest(".tagsdiv"))});$("div.taghint",ajaxtag).click(function(){$(this).css("visibility","hidden").parent().siblings(".newtag").focus()});$("input.newtag",ajaxtag).blur(function(){if(this.value==""){$(this).parent().siblings(".taghint").css("visibility","")}}).focus(function(){$(this).parent().siblings(".taghint").css("visibility","hidden")}).keyup(function(e){if(13==e.which){tagBox.flushTags($(this).closest(".tagsdiv"));return false}}).keypress(function(e){if(13==e.which){e.preventDefault();return false}}).each(function(){var tax=$(this).closest("div.tagsdiv").attr("id");$(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+tax,{delay:500,minchars:2,multiple:true,multipleSep:","})});$("#post").submit(function(){$("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});$("a.tagcloud-link").click(function(){tagBox.get($(this).attr("id"));$(this).unbind().click(function(){$(this).siblings(".the-tagcloud").toggle();return false});return false})}};commentsBox={st:0,get:function(total,num){var st=this.st,data;if(!num){num=20}this.st+=num;this.total=total;$("#commentsdiv img.waiting").show();data={action:"get-comments",mode:"single",_ajax_nonce:$("#add_comment_nonce").val(),post_ID:$("#post_ID").val(),start:st,num:num};$.post(ajaxurl,data,function(r){r=wpAjax.parseAjaxResponse(r);$("#commentsdiv .widefat").show();$("#commentsdiv img.waiting").hide();if("object"==typeof r&&r.responses[0]){$("#the-comment-list").append(r.responses[0].data);theList=theExtraList=null;$("a[className*=':']").unbind();setCommentsList();if(commentsBox.st>commentsBox.total){$("#show-comments").hide()}else{$("#show-comments").html(postL10n.showcomm)}return}else{if(1==r){$("#show-comments").parent().html(postL10n.endcomm);return}}$("#the-comment-list").append('<tr><td colspan="2">'+wpAjax.broken+"</td></tr>")});return false}};WPSetThumbnailHTML=function(html){$(".inside","#postimagediv").html(html)};WPSetThumbnailID=function(id){var field=$("input[value=_thumbnail_id]","#list-table");if(field.size()>0){$("#meta\\["+field.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(id)}};WPRemoveThumbnail=function(){$.post(ajaxurl,{action:"set-post-thumbnail",post_id:$("#post_ID").val(),thumbnail_id:-1,cookie:encodeURIComponent(document.cookie)},function(str){if(str=="0"){alert(setPostThumbnailL10n.error)}else{WPSetThumbnailHTML(str)}})}})(jQuery);jQuery(document).ready(function($){var stamp,visibility,sticky="";postboxes.add_postbox_toggles(pagenow);if($("#tagsdiv-post_tag").length){tagBox.init()}else{$("#side-sortables, #normal-sortables, #advanced-sortables").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}})}$(".categorydiv").each(function(){var this_id=$(this).attr("id"),noSyncChecks=false,syncChecks,catAddAfter,taxonomyParts,taxonomy,settingName;taxonomyParts=this_id.split("-");taxonomyParts.shift();taxonomy=taxonomyParts.join("-");settingName=taxonomy+"_tab";if(taxonomy=="category"){settingName="cats"}$("a","#"+taxonomy+"-tabs").click(function(){var t=$(this).attr("href");$(this).parent().addClass("tabs").siblings("li").removeClass("tabs");$("#"+taxonomy+"-tabs").siblings(".tabs-panel").hide();$(t).show();if("#"+taxonomy+"-all"==t){deleteUserSetting(settingName)}else{setUserSetting(settingName,"pop")}return false});if(getUserSetting(settingName)){$('a[href="#'+taxonomy+'-pop"]',"#"+taxonomy+"-tabs").click()}$("#new"+taxonomy).one("focus",function(){$(this).val("").removeClass("form-input-tip")});$("#"+taxonomy+"-add-submit").click(function(){$("#new"+taxonomy).focus()});syncChecks=function(){if(noSyncChecks){return}noSyncChecks=true;var th=jQuery(this),c=th.is(":checked"),id=th.val().toString();$("#in-"+taxonomy+"-"+id+", #in-"+taxonomy+"-category-"+id).attr("checked",c);noSyncChecks=false};catAddBefore=function(s){if(!$("#new"+taxonomy).val()){return false}s.data+="&"+$(":checked","#"+taxonomy+"checklist").serialize();return s};catAddAfter=function(r,s){var sup,drop=$("#new"+taxonomy+"_parent");if("undefined"!=s.parsed.responses[0]&&(sup=s.parsed.responses[0].supplemental.newcat_parent)){drop.before(sup);drop.remove()}};$("#"+taxonomy+"checklist").wpList({alt:"",response:taxonomy+"-ajax-response",addBefore:catAddBefore,addAfter:catAddAfter});$("#"+taxonomy+"-add-toggle").click(function(){$("#"+taxonomy+"-adder").toggleClass("wp-hidden-children");$('a[href="#'+taxonomy+'-all"]',"#"+taxonomy+"-tabs").click();return false});$("#"+taxonomy+"checklist li.popular-category :checkbox, #"+taxonomy+"checklist-pop :checkbox").live("click",function(){var t=$(this),c=t.is(":checked"),id=t.val();if(id&&t.parents("#taxonomy-"+taxonomy).length){$("#in-"+taxonomy+"-"+id+", #in-popular-"+taxonomy+"-"+id).attr("checked",c)}})});if($("#postcustom").length){$("#the-list").wpList({addAfter:function(xml,s){$("table#list-table").show();if(typeof(autosave_update_post_ID)!="undefined"){autosave_update_post_ID(s.parsed.responses[0].supplemental.postid)}},addBefore:function(s){s.data+="&post_id="+$("#post_ID").val();return s}})}if($("#submitdiv").length){stamp=$("#timestamp").html();visibility=$("#post-visibility-display").html();function updateVisibility(){var pvSelect=$("#post-visibility-select");if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false);$("#sticky-span").hide()}else{$("#sticky-span").show()}if($("input:radio:checked",pvSelect).val()!="password"){$("#password-span").hide()}else{$("#password-span").show()}}function updateText(){var attemptedDate,originalDate,currentDate,publishOn,page="page"==pagenow||"page-new"==pagenow,postStatus=$("#post_status"),optPublish=$("option[value=publish]",postStatus),aa=$("#aa").val(),mm=$("#mm").val(),jj=$("#jj").val(),hh=$("#hh").val(),mn=$("#mn").val();attemptedDate=new Date(aa,mm-1,jj,hh,mn);originalDate=new Date($("#hidden_aa").val(),$("#hidden_mm").val()-1,$("#hidden_jj").val(),$("#hidden_hh").val(),$("#hidden_mn").val());currentDate=new Date($("#cur_aa").val(),$("#cur_mm").val()-1,$("#cur_jj").val(),$("#cur_hh").val(),$("#cur_mn").val());if(attemptedDate.getFullYear()!=aa||(1+attemptedDate.getMonth())!=mm||attemptedDate.getDate()!=jj||attemptedDate.getMinutes()!=mn){$(".timestamp-wrap","#timestampdiv").addClass("form-invalid");return false}else{$(".timestamp-wrap","#timestampdiv").removeClass("form-invalid")}if(attemptedDate>currentDate&&$("#original_post_status").val()!="future"){publishOn=postL10n.publishOnFuture;$("#publish").val(postL10n.schedule)}else{if(attemptedDate<=currentDate&&$("#original_post_status").val()!="publish"){publishOn=postL10n.publishOn;$("#publish").val(postL10n.publish)}else{publishOn=postL10n.publishOnPast;if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}}}if(originalDate.toUTCString()==attemptedDate.toUTCString()){$("#timestamp").html(stamp)}else{$("#timestamp").html(publishOn+" <b>"+$("option[value="+$("#mm").val()+"]","#mm").text()+" "+jj+", "+aa+" @ "+hh+":"+mn+"</b> ")}if($("input:radio:checked","#post-visibility-select").val()=="private"){if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}if(optPublish.length==0){postStatus.append('<option value="publish">'+postL10n.privatelyPublished+"</option>")}else{optPublish.html(postL10n.privatelyPublished)}$("option[value=publish]",postStatus).attr("selected",true);$(".edit-post-status","#misc-publishing-actions").hide()}else{if($("#original_post_status").val()=="future"||$("#original_post_status").val()=="draft"){if(optPublish.length){optPublish.remove();postStatus.val($("#hidden_post_status").val())}}else{optPublish.html(postL10n.published)}if(postStatus.is(":hidden")){$(".edit-post-status","#misc-publishing-actions").show()}}$("#post-status-display").html($("option:selected",postStatus).text());if($("option:selected",postStatus).val()=="private"||$("option:selected",postStatus).val()=="publish"){$("#save-post").hide()}else{$("#save-post").show();if($("option:selected",postStatus).val()=="pending"){$("#save-post").show().val(postL10n.savePending)}else{$("#save-post").show().val(postL10n.saveDraft)}}return true}$(".edit-visibility","#visibility").click(function(){if($("#post-visibility-select").is(":hidden")){updateVisibility();$("#post-visibility-select").slideDown("normal");$(this).hide()}return false});$(".cancel-post-visibility","#post-visibility-select").click(function(){$("#post-visibility-select").slideUp("normal");$("#visibility-radio-"+$("#hidden-post-visibility").val()).attr("checked",true);$("#post_password").val($("#hidden_post_password").val());$("#sticky").attr("checked",$("#hidden-post-sticky").attr("checked"));$("#post-visibility-display").html(visibility);$(".edit-visibility","#visibility").show();updateText();return false});$(".save-post-visibility","#post-visibility-select").click(function(){var pvSelect=$("#post-visibility-select");pvSelect.slideUp("normal");$(".edit-visibility","#visibility").show();updateText();if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false)}if(true==$("#sticky").attr("checked")){sticky="Sticky"}else{sticky=""}$("#post-visibility-display").html(postL10n[$("input:radio:checked",pvSelect).val()+sticky]);return false});$("input:radio","#post-visibility-select").change(function(){updateVisibility()});$("#timestampdiv").siblings("a.edit-timestamp").click(function(){if($("#timestampdiv").is(":hidden")){$("#timestampdiv").slideDown("normal");$(this).hide()}return false});$(".cancel-timestamp","#timestampdiv").click(function(){$("#timestampdiv").slideUp("normal");$("#mm").val($("#hidden_mm").val());$("#jj").val($("#hidden_jj").val());$("#aa").val($("#hidden_aa").val());$("#hh").val($("#hidden_hh").val());$("#mn").val($("#hidden_mn").val());$("#timestampdiv").siblings("a.edit-timestamp").show();updateText();return false});$(".save-timestamp","#timestampdiv").click(function(){if(updateText()){$("#timestampdiv").slideUp("normal");$("#timestampdiv").siblings("a.edit-timestamp").show()}return false});$("#post-status-select").siblings("a.edit-post-status").click(function(){if($("#post-status-select").is(":hidden")){$("#post-status-select").slideDown("normal");$(this).hide()}return false});$(".save-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false});$(".cancel-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post_status").val($("#hidden_post_status").val());$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false})}if($("#edit-slug-box").length){editPermalink=function(post_id){var i,c=0,e=$("#editable-post-name"),revert_e=e.html(),real_slug=$("#post_name"),revert_slug=real_slug.val(),b=$("#edit-slug-buttons"),revert_b=b.html(),full=$("#editable-post-name-full").html();$("#view-post-btn").hide();b.html('<a href="#" class="save button">'+postL10n.ok+'</a> <a class="cancel" href="#">'+postL10n.cancel+"</a>");b.children(".save").click(function(){var new_slug=e.children("input").val();$.post(ajaxurl,{action:"sample-permalink",post_id:post_id,new_slug:new_slug,new_title:$("#title").val(),samplepermalinknonce:$("#samplepermalinknonce").val()},function(data){$("#edit-slug-box").html(data);b.html(revert_b);real_slug.attr("value",new_slug);makeSlugeditClickable();$("#view-post-btn").show()});return false});$(".cancel","#edit-slug-buttons").click(function(){$("#view-post-btn").show();e.html(revert_e);b.html(revert_b);real_slug.attr("value",revert_slug);return false});for(i=0;i<full.length;++i){if("%"==full.charAt(i)){c++}}slug_value=(c>full.length/4)?"":full;e.html('<input type="text" id="new-post-slug" value="'+slug_value+'" />').children("input").keypress(function(e){var key=e.keyCode||0;if(13==key){b.children(".save").click();return false}if(27==key){b.children(".cancel").click();return false}real_slug.attr("value",this.value)}).focus()};makeSlugeditClickable=function(){$("#editable-post-name").click(function(){$("#edit-slug-buttons").children(".edit-slug").click()})};makeSlugeditClickable()}if($("#title").val()==""){$("#title").siblings("#title-prompt-text").css("visibility","")}$("#title-prompt-text").click(function(){$(this).css("visibility","hidden").siblings("#title").focus()});$("#title").blur(function(){if(this.value==""){$(this).siblings("#title-prompt-text").css("visibility","")}}).focus(function(){$(this).siblings("#title-prompt-text").css("visibility","hidden")}).keydown(function(e){$(this).siblings("#title-prompt-text").css("visibility","hidden");$(this).unbind(e)})}); | var tagBox,commentsBox,editPermalink,makeSlugeditClickable,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail;function array_unique_noempty(a){var out=[];jQuery.each(a,function(key,val){val=jQuery.trim(val);if(val&&jQuery.inArray(val,out)==-1){out.push(val)}});return out}(function($){tagBox={clean:function(tags){return tags.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"")},parseTags:function(el){var id=el.id,num=id.split("-check-num-")[1],taxbox=$(el).closest(".tagsdiv"),thetags=taxbox.find(".the-tags"),current_tags=thetags.val().split(","),new_tags=[];delete current_tags[num];$.each(current_tags,function(key,val){val=$.trim(val);if(val){new_tags.push(val)}});thetags.val(this.clean(new_tags.join(",")));this.quickClicks(taxbox);return false},quickClicks:function(el){var thetags=$(".the-tags",el),tagchecklist=$(".tagchecklist",el),current_tags;if(!thetags.length){return}var disabled=thetags.attr("disabled");current_tags=thetags.val().split(",");tagchecklist.empty();$.each(current_tags,function(key,val){var txt,button_id,id=$(el).attr("id");val=$.trim(val);if(!val.match(/^\s+$/)&&""!=val){button_id=id+"-check-num-"+key;if(disabled){txt="<span>"+val+"</span> "}else{txt='<span><a id="'+button_id+'" class="ntdelbutton">X</a> '+val+"</span> "}tagchecklist.append(txt);if(!disabled){$("#"+button_id).click(function(){tagBox.parseTags(this)})}}})},flushTags:function(el,a,f){a=a||false;var text,tags=$(".the-tags",el),newtag=$("input.newtag",el),newtags;text=a?$(a).text():newtag.val();tagsval=tags.val();newtags=tagsval?tagsval+","+text:text;newtags=this.clean(newtags);newtags=array_unique_noempty(newtags.split(",")).join(",");tags.val(newtags);this.quickClicks(el);if(!a){newtag.val("")}if("undefined"==typeof(f)){newtag.focus()}return false},get:function(id){var tax=id.substr(id.indexOf("-")+1);$.post(ajaxurl,{action:"get-tagcloud",tax:tax},function(r,stat){if(0==r||"success"!=stat){r=wpAjax.broken}r=$('<p id="tagcloud-'+tax+'" class="the-tagcloud">'+r+"</p>");$("a",r).click(function(){tagBox.flushTags($(this).closest(".inside").children(".tagsdiv"),this);return false});$("#"+id).after(r)})},init:function(){var t=this,ajaxtag=$("div.ajaxtag");$(".tagsdiv").each(function(){tagBox.quickClicks(this)});$("input.tagadd",ajaxtag).click(function(){t.flushTags($(this).closest(".tagsdiv"))});$("div.taghint",ajaxtag).click(function(){$(this).css("visibility","hidden").siblings(".newtag").focus()});$("input.newtag",ajaxtag).blur(function(){if(this.value==""){$(this).siblings(".taghint").css("visibility","")}}).focus(function(){$(this).siblings(".taghint").css("visibility","hidden")}).keyup(function(e){if(13==e.which){tagBox.flushTags($(this).closest(".tagsdiv"));return false}}).keypress(function(e){if(13==e.which){e.preventDefault();return false}}).each(function(){var tax=$(this).closest("div.tagsdiv").attr("id");$(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+tax,{delay:500,minchars:2,multiple:true,multipleSep:","})});$("#post").submit(function(){$("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});$("a.tagcloud-link").click(function(){tagBox.get($(this).attr("id"));$(this).unbind().click(function(){$(this).siblings(".the-tagcloud").toggle();return false});return false})}};commentsBox={st:0,get:function(total,num){var st=this.st,data;if(!num){num=20}this.st+=num;this.total=total;$("#commentsdiv img.waiting").show();data={action:"get-comments",mode:"single",_ajax_nonce:$("#add_comment_nonce").val(),post_ID:$("#post_ID").val(),start:st,num:num};$.post(ajaxurl,data,function(r){r=wpAjax.parseAjaxResponse(r);$("#commentsdiv .widefat").show();$("#commentsdiv img.waiting").hide();if("object"==typeof r&&r.responses[0]){$("#the-comment-list").append(r.responses[0].data);theList=theExtraList=null;$("a[className*=':']").unbind();setCommentsList();if(commentsBox.st>commentsBox.total){$("#show-comments").hide()}else{$("#show-comments").html(postL10n.showcomm)}return}else{if(1==r){$("#show-comments").parent().html(postL10n.endcomm);return}}$("#the-comment-list").append('<tr><td colspan="2">'+wpAjax.broken+"</td></tr>")});return false}};WPSetThumbnailHTML=function(html){$(".inside","#postimagediv").html(html)};WPSetThumbnailID=function(id){var field=$("input[value=_thumbnail_id]","#list-table");if(field.size()>0){$("#meta\\["+field.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(id)}};WPRemoveThumbnail=function(){$.post(ajaxurl,{action:"set-post-thumbnail",post_id:$("#post_ID").val(),thumbnail_id:-1,cookie:encodeURIComponent(document.cookie)},function(str){if(str=="0"){alert(setPostThumbnailL10n.error)}else{WPSetThumbnailHTML(str)}})}})(jQuery);jQuery(document).ready(function($){var stamp,visibility,sticky="";postboxes.add_postbox_toggles(pagenow);if($("#tagsdiv-post_tag").length){tagBox.init()}else{$("#side-sortables, #normal-sortables, #advanced-sortables").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}})}$(".categorydiv").each(function(){var this_id=$(this).attr("id"),noSyncChecks=false,syncChecks,catAddAfter,taxonomyParts,taxonomy,settingName;taxonomyParts=this_id.split("-");taxonomyParts.shift();taxonomy=taxonomyParts.join("-");settingName=taxonomy+"_tab";if(taxonomy=="category"){settingName="cats"}$("a","#"+taxonomy+"-tabs").click(function(){var t=$(this).attr("href");$(this).parent().addClass("tabs").siblings("li").removeClass("tabs");$("#"+taxonomy+"-tabs").siblings(".tabs-panel").hide();$(t).show();if("#"+taxonomy+"-all"==t){deleteUserSetting(settingName)}else{setUserSetting(settingName,"pop")}return false});if(getUserSetting(settingName)){$('a[href="#'+taxonomy+'-pop"]',"#"+taxonomy+"-tabs").click()}$("#new"+taxonomy).one("focus",function(){$(this).val("").removeClass("form-input-tip")});$("#"+taxonomy+"-add-submit").click(function(){$("#new"+taxonomy).focus()});syncChecks=function(){if(noSyncChecks){return}noSyncChecks=true;var th=jQuery(this),c=th.is(":checked"),id=th.val().toString();$("#in-"+taxonomy+"-"+id+", #in-"+taxonomy+"-category-"+id).attr("checked",c);noSyncChecks=false};catAddBefore=function(s){if(!$("#new"+taxonomy).val()){return false}s.data+="&"+$(":checked","#"+taxonomy+"checklist").serialize();return s};catAddAfter=function(r,s){var sup,drop=$("#new"+taxonomy+"_parent");if("undefined"!=s.parsed.responses[0]&&(sup=s.parsed.responses[0].supplemental.newcat_parent)){drop.before(sup);drop.remove()}};$("#"+taxonomy+"checklist").wpList({alt:"",response:taxonomy+"-ajax-response",addBefore:catAddBefore,addAfter:catAddAfter});$("#"+taxonomy+"-add-toggle").click(function(){$("#"+taxonomy+"-adder").toggleClass("wp-hidden-children");$('a[href="#'+taxonomy+'-all"]',"#"+taxonomy+"-tabs").click();return false});$("#"+taxonomy+"checklist li.popular-category :checkbox, #"+taxonomy+"checklist-pop :checkbox").live("click",function(){var t=$(this),c=t.is(":checked"),id=t.val();if(id&&t.parents("#taxonomy-"+taxonomy).length){$("#in-"+taxonomy+"-"+id+", #in-popular-"+taxonomy+"-"+id).attr("checked",c)}})});if($("#postcustom").length){$("#the-list").wpList({addAfter:function(xml,s){$("table#list-table").show();if(typeof(autosave_update_post_ID)!="undefined"){autosave_update_post_ID(s.parsed.responses[0].supplemental.postid)}},addBefore:function(s){s.data+="&post_id="+$("#post_ID").val();return s}})}if($("#submitdiv").length){stamp=$("#timestamp").html();visibility=$("#post-visibility-display").html();function updateVisibility(){var pvSelect=$("#post-visibility-select");if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false);$("#sticky-span").hide()}else{$("#sticky-span").show()}if($("input:radio:checked",pvSelect).val()!="password"){$("#password-span").hide()}else{$("#password-span").show()}}function updateText(){var attemptedDate,originalDate,currentDate,publishOn,page="page"==pagenow||"page-new"==pagenow,postStatus=$("#post_status"),optPublish=$("option[value=publish]",postStatus),aa=$("#aa").val(),mm=$("#mm").val(),jj=$("#jj").val(),hh=$("#hh").val(),mn=$("#mn").val();attemptedDate=new Date(aa,mm-1,jj,hh,mn);originalDate=new Date($("#hidden_aa").val(),$("#hidden_mm").val()-1,$("#hidden_jj").val(),$("#hidden_hh").val(),$("#hidden_mn").val());currentDate=new Date($("#cur_aa").val(),$("#cur_mm").val()-1,$("#cur_jj").val(),$("#cur_hh").val(),$("#cur_mn").val());if(attemptedDate.getFullYear()!=aa||(1+attemptedDate.getMonth())!=mm||attemptedDate.getDate()!=jj||attemptedDate.getMinutes()!=mn){$(".timestamp-wrap","#timestampdiv").addClass("form-invalid");return false}else{$(".timestamp-wrap","#timestampdiv").removeClass("form-invalid")}if(attemptedDate>currentDate&&$("#original_post_status").val()!="future"){publishOn=postL10n.publishOnFuture;$("#publish").val(postL10n.schedule)}else{if(attemptedDate<=currentDate&&$("#original_post_status").val()!="publish"){publishOn=postL10n.publishOn;$("#publish").val(postL10n.publish)}else{publishOn=postL10n.publishOnPast;if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}}}if(originalDate.toUTCString()==attemptedDate.toUTCString()){$("#timestamp").html(stamp)}else{$("#timestamp").html(publishOn+" <b>"+$("option[value="+$("#mm").val()+"]","#mm").text()+" "+jj+", "+aa+" @ "+hh+":"+mn+"</b> ")}if($("input:radio:checked","#post-visibility-select").val()=="private"){if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}if(optPublish.length==0){postStatus.append('<option value="publish">'+postL10n.privatelyPublished+"</option>")}else{optPublish.html(postL10n.privatelyPublished)}$("option[value=publish]",postStatus).attr("selected",true);$(".edit-post-status","#misc-publishing-actions").hide()}else{if($("#original_post_status").val()=="future"||$("#original_post_status").val()=="draft"){if(optPublish.length){optPublish.remove();postStatus.val($("#hidden_post_status").val())}}else{optPublish.html(postL10n.published)}if(postStatus.is(":hidden")){$(".edit-post-status","#misc-publishing-actions").show()}}$("#post-status-display").html($("option:selected",postStatus).text());if($("option:selected",postStatus).val()=="private"||$("option:selected",postStatus).val()=="publish"){$("#save-post").hide()}else{$("#save-post").show();if($("option:selected",postStatus).val()=="pending"){$("#save-post").show().val(postL10n.savePending)}else{$("#save-post").show().val(postL10n.saveDraft)}}return true}$(".edit-visibility","#visibility").click(function(){if($("#post-visibility-select").is(":hidden")){updateVisibility();$("#post-visibility-select").slideDown("normal");$(this).hide()}return false});$(".cancel-post-visibility","#post-visibility-select").click(function(){$("#post-visibility-select").slideUp("normal");$("#visibility-radio-"+$("#hidden-post-visibility").val()).attr("checked",true);$("#post_password").val($("#hidden_post_password").val());$("#sticky").attr("checked",$("#hidden-post-sticky").attr("checked"));$("#post-visibility-display").html(visibility);$(".edit-visibility","#visibility").show();updateText();return false});$(".save-post-visibility","#post-visibility-select").click(function(){var pvSelect=$("#post-visibility-select");pvSelect.slideUp("normal");$(".edit-visibility","#visibility").show();updateText();if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false)}if(true==$("#sticky").attr("checked")){sticky="Sticky"}else{sticky=""}$("#post-visibility-display").html(postL10n[$("input:radio:checked",pvSelect).val()+sticky]);return false});$("input:radio","#post-visibility-select").change(function(){updateVisibility()});$("#timestampdiv").siblings("a.edit-timestamp").click(function(){if($("#timestampdiv").is(":hidden")){$("#timestampdiv").slideDown("normal");$(this).hide()}return false});$(".cancel-timestamp","#timestampdiv").click(function(){$("#timestampdiv").slideUp("normal");$("#mm").val($("#hidden_mm").val());$("#jj").val($("#hidden_jj").val());$("#aa").val($("#hidden_aa").val());$("#hh").val($("#hidden_hh").val());$("#mn").val($("#hidden_mn").val());$("#timestampdiv").siblings("a.edit-timestamp").show();updateText();return false});$(".save-timestamp","#timestampdiv").click(function(){if(updateText()){$("#timestampdiv").slideUp("normal");$("#timestampdiv").siblings("a.edit-timestamp").show()}return false});$("#post-status-select").siblings("a.edit-post-status").click(function(){if($("#post-status-select").is(":hidden")){$("#post-status-select").slideDown("normal");$(this).hide()}return false});$(".save-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false});$(".cancel-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post_status").val($("#hidden_post_status").val());$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false})}if($("#edit-slug-box").length){editPermalink=function(post_id){var i,c=0,e=$("#editable-post-name"),revert_e=e.html(),real_slug=$("#post_name"),revert_slug=real_slug.val(),b=$("#edit-slug-buttons"),revert_b=b.html(),full=$("#editable-post-name-full").html();$("#view-post-btn").hide();b.html('<a href="#" class="save button">'+postL10n.ok+'</a> <a class="cancel" href="#">'+postL10n.cancel+"</a>");b.children(".save").click(function(){var new_slug=e.children("input").val();$.post(ajaxurl,{action:"sample-permalink",post_id:post_id,new_slug:new_slug,new_title:$("#title").val(),samplepermalinknonce:$("#samplepermalinknonce").val()},function(data){$("#edit-slug-box").html(data);b.html(revert_b);real_slug.attr("value",new_slug);makeSlugeditClickable();$("#view-post-btn").show()});return false});$(".cancel","#edit-slug-buttons").click(function(){$("#view-post-btn").show();e.html(revert_e);b.html(revert_b);real_slug.attr("value",revert_slug);return false});for(i=0;i<full.length;++i){if("%"==full.charAt(i)){c++}}slug_value=(c>full.length/4)?"":full;e.html('<input type="text" id="new-post-slug" value="'+slug_value+'" />').children("input").keypress(function(e){var key=e.keyCode||0;if(13==key){b.children(".save").click();return false}if(27==key){b.children(".cancel").click();return false}real_slug.attr("value",this.value)}).focus()};makeSlugeditClickable=function(){$("#editable-post-name").click(function(){$("#edit-slug-buttons").children(".edit-slug").click()})};makeSlugeditClickable()}if($("#title").val()==""){$("#title").siblings("#title-prompt-text").css("visibility","")}$("#title-prompt-text").click(function(){$(this).css("visibility","hidden").siblings("#title").focus()});$("#title").blur(function(){if(this.value==""){$(this).siblings("#title-prompt-text").css("visibility","")}}).focus(function(){$(this).siblings("#title-prompt-text").css("visibility","hidden")}).keydown(function(e){$(this).siblings("#title-prompt-text").css("visibility","hidden");$(this).unbind(e)})}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/689a9bed1ba9ed444c2e4895ace34e75d59f01e6/post.js/buggy/wp-admin/js/post.js |
var tagBox,commentsBox,editPermalink,makeSlugeditClickable,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail;function array_unique_noempty(a){var out=[];jQuery.each(a,function(key,val){val=jQuery.trim(val);if(val&&jQuery.inArray(val,out)==-1){out.push(val)}});return out}(function($){tagBox={clean:function(tags){return tags.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"")},parseTags:function(el){var id=el.id,num=id.split("-check-num-")[1],taxbox=$(el).closest(".tagsdiv"),thetags=taxbox.find(".the-tags"),current_tags=thetags.val().split(","),new_tags=[];delete current_tags[num];$.each(current_tags,function(key,val){val=$.trim(val);if(val){new_tags.push(val)}});thetags.val(this.clean(new_tags.join(",")));this.quickClicks(taxbox);return false},quickClicks:function(el){var thetags=$(".the-tags",el),tagchecklist=$(".tagchecklist",el),current_tags;if(!thetags.length){return}var disabled=thetags.attr("disabled");current_tags=thetags.val().split(",");tagchecklist.empty();$.each(current_tags,function(key,val){var txt,button_id,id=$(el).attr("id");val=$.trim(val);if(!val.match(/^\s+$/)&&""!=val){button_id=id+"-check-num-"+key;if(disabled){txt="<span>"+val+"</span> "}else{txt='<span><a id="'+button_id+'" class="ntdelbutton">X</a> '+val+"</span> "}tagchecklist.append(txt);if(!disabled){$("#"+button_id).click(function(){tagBox.parseTags(this)})}}})},flushTags:function(el,a,f){a=a||false;var text,tags=$(".the-tags",el),newtag=$("input.newtag",el),newtags;text=a?$(a).text():newtag.val();tagsval=tags.val();newtags=tagsval?tagsval+","+text:text;newtags=this.clean(newtags);newtags=array_unique_noempty(newtags.split(",")).join(",");tags.val(newtags);this.quickClicks(el);if(!a){newtag.val("")}if("undefined"==typeof(f)){newtag.focus()}return false},get:function(id){var tax=id.substr(id.indexOf("-")+1);$.post(ajaxurl,{action:"get-tagcloud",tax:tax},function(r,stat){if(0==r||"success"!=stat){r=wpAjax.broken}r=$('<p id="tagcloud-'+tax+'" class="the-tagcloud">'+r+"</p>");$("a",r).click(function(){tagBox.flushTags($(this).closest(".inside").children(".tagsdiv"),this);return false});$("#"+id).after(r)})},init:function(){var t=this,ajaxtag=$("div.ajaxtag");$(".tagsdiv").each(function(){tagBox.quickClicks(this)});$("input.tagadd",ajaxtag).click(function(){t.flushTags($(this).closest(".tagsdiv"))});$("div.taghint",ajaxtag).click(function(){$(this).css("visibility","hidden").siblings(".newtag").focus()});$("input.newtag",ajaxtag).blur(function(){if(this.value==""){$(this).siblings(".taghint").css("visibility","")}}).focus(function(){$(this).siblings(".taghint").css("visibility","hidden")}).keyup(function(e){if(13==e.which){tagBox.flushTags($(this).closest(".tagsdiv"));return false}}).keypress(function(e){if(13==e.which){e.preventDefault();return false}}).each(function(){var tax=$(this).closest("div.tagsdiv").attr("id");$(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+tax,{delay:500,minchars:2,multiple:true,multipleSep:", "})});$("#post").submit(function(){$("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});$("a.tagcloud-link").click(function(){tagBox.get($(this).attr("id"));$(this).unbind().click(function(){$(this).siblings(".the-tagcloud").toggle();return false});return false})}};commentsBox={st:0,get:function(total,num){var st=this.st,data;if(!num){num=20}this.st+=num;this.total=total;$("#commentsdiv img.waiting").show();data={action:"get-comments",mode:"single",_ajax_nonce:$("#add_comment_nonce").val(),post_ID:$("#post_ID").val(),start:st,num:num};$.post(ajaxurl,data,function(r){r=wpAjax.parseAjaxResponse(r);$("#commentsdiv .widefat").show();$("#commentsdiv img.waiting").hide();if("object"==typeof r&&r.responses[0]){$("#the-comment-list").append(r.responses[0].data);theList=theExtraList=null;$("a[className*=':']").unbind();setCommentsList();if(commentsBox.st>commentsBox.total){$("#show-comments").hide()}else{$("#show-comments").html(postL10n.showcomm)}return}else{if(1==r){$("#show-comments").parent().html(postL10n.endcomm);return}}$("#the-comment-list").append('<tr><td colspan="2">'+wpAjax.broken+"</td></tr>")});return false}};WPSetThumbnailHTML=function(html){$(".inside","#postimagediv").html(html)};WPSetThumbnailID=function(id){var field=$("input[value=_thumbnail_id]","#list-table");if(field.size()>0){$("#meta\\["+field.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(id)}};WPRemoveThumbnail=function(){$.post(ajaxurl,{action:"set-post-thumbnail",post_id:$("#post_ID").val(),thumbnail_id:-1,cookie:encodeURIComponent(document.cookie)},function(str){if(str=="0"){alert(setPostThumbnailL10n.error)}else{WPSetThumbnailHTML(str)}})}})(jQuery);jQuery(document).ready(function($){var stamp,visibility,sticky="";postboxes.add_postbox_toggles(pagenow);if($("#tagsdiv-post_tag").length){tagBox.init()}else{$("#side-sortables, #normal-sortables, #advanced-sortables").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}})}$(".categorydiv").each(function(){var this_id=$(this).attr("id"),noSyncChecks=false,syncChecks,catAddAfter,taxonomyParts,taxonomy,settingName;taxonomyParts=this_id.split("-");taxonomyParts.shift();taxonomy=taxonomyParts.join("-");settingName=taxonomy+"_tab";if(taxonomy=="category"){settingName="cats"}$("a","#"+taxonomy+"-tabs").click(function(){var t=$(this).attr("href");$(this).parent().addClass("tabs").siblings("li").removeClass("tabs");$("#"+taxonomy+"-tabs").siblings(".tabs-panel").hide();$(t).show();if("#"+taxonomy+"-all"==t){deleteUserSetting(settingName)}else{setUserSetting(settingName,"pop")}return false});if(getUserSetting(settingName)){$('a[href="#'+taxonomy+'-pop"]',"#"+taxonomy+"-tabs").click()}$("#new"+taxonomy).one("focus",function(){$(this).val("").removeClass("form-input-tip")});$("#"+taxonomy+"-add-submit").click(function(){$("#new"+taxonomy).focus()});syncChecks=function(){if(noSyncChecks){return}noSyncChecks=true;var th=jQuery(this),c=th.is(":checked"),id=th.val().toString();$("#in-"+taxonomy+"-"+id+", #in-"+taxonomy+"-category-"+id).attr("checked",c);noSyncChecks=false};catAddBefore=function(s){if(!$("#new"+taxonomy).val()){return false}s.data+="&"+$(":checked","#"+taxonomy+"checklist").serialize();return s};catAddAfter=function(r,s){var sup,drop=$("#new"+taxonomy+"_parent");if("undefined"!=s.parsed.responses[0]&&(sup=s.parsed.responses[0].supplemental.newcat_parent)){drop.before(sup);drop.remove()}};$("#"+taxonomy+"checklist").wpList({alt:"",response:taxonomy+"-ajax-response",addBefore:catAddBefore,addAfter:catAddAfter});$("#"+taxonomy+"-add-toggle").click(function(){$("#"+taxonomy+"-adder").toggleClass("wp-hidden-children");$('a[href="#'+taxonomy+'-all"]',"#"+taxonomy+"-tabs").click();return false});$("#"+taxonomy+"checklist li.popular-category :checkbox, #"+taxonomy+"checklist-pop :checkbox").live("click",function(){var t=$(this),c=t.is(":checked"),id=t.val();if(id&&t.parents("#taxonomy-"+taxonomy).length){$("#in-"+taxonomy+"-"+id+", #in-popular-"+taxonomy+"-"+id).attr("checked",c)}})});if($("#postcustom").length){$("#the-list").wpList({addAfter:function(xml,s){$("table#list-table").show();if(typeof(autosave_update_post_ID)!="undefined"){autosave_update_post_ID(s.parsed.responses[0].supplemental.postid)}},addBefore:function(s){s.data+="&post_id="+$("#post_ID").val();return s}})}if($("#submitdiv").length){stamp=$("#timestamp").html();visibility=$("#post-visibility-display").html();function updateVisibility(){var pvSelect=$("#post-visibility-select");if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false);$("#sticky-span").hide()}else{$("#sticky-span").show()}if($("input:radio:checked",pvSelect).val()!="password"){$("#password-span").hide()}else{$("#password-span").show()}}function updateText(){var attemptedDate,originalDate,currentDate,publishOn,page="page"==pagenow||"page-new"==pagenow,postStatus=$("#post_status"),optPublish=$("option[value=publish]",postStatus),aa=$("#aa").val(),mm=$("#mm").val(),jj=$("#jj").val(),hh=$("#hh").val(),mn=$("#mn").val();attemptedDate=new Date(aa,mm-1,jj,hh,mn);originalDate=new Date($("#hidden_aa").val(),$("#hidden_mm").val()-1,$("#hidden_jj").val(),$("#hidden_hh").val(),$("#hidden_mn").val());currentDate=new Date($("#cur_aa").val(),$("#cur_mm").val()-1,$("#cur_jj").val(),$("#cur_hh").val(),$("#cur_mn").val());if(attemptedDate.getFullYear()!=aa||(1+attemptedDate.getMonth())!=mm||attemptedDate.getDate()!=jj||attemptedDate.getMinutes()!=mn){$(".timestamp-wrap","#timestampdiv").addClass("form-invalid");return false}else{$(".timestamp-wrap","#timestampdiv").removeClass("form-invalid")}if(attemptedDate>currentDate&&$("#original_post_status").val()!="future"){publishOn=postL10n.publishOnFuture;$("#publish").val(postL10n.schedule)}else{if(attemptedDate<=currentDate&&$("#original_post_status").val()!="publish"){publishOn=postL10n.publishOn;$("#publish").val(postL10n.publish)}else{publishOn=postL10n.publishOnPast;if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}}}if(originalDate.toUTCString()==attemptedDate.toUTCString()){$("#timestamp").html(stamp)}else{$("#timestamp").html(publishOn+" <b>"+$("option[value="+$("#mm").val()+"]","#mm").text()+" "+jj+", "+aa+" @ "+hh+":"+mn+"</b> ")}if($("input:radio:checked","#post-visibility-select").val()=="private"){if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}if(optPublish.length==0){postStatus.append('<option value="publish">'+postL10n.privatelyPublished+"</option>")}else{optPublish.html(postL10n.privatelyPublished)}$("option[value=publish]",postStatus).attr("selected",true);$(".edit-post-status","#misc-publishing-actions").hide()}else{if($("#original_post_status").val()=="future"||$("#original_post_status").val()=="draft"){if(optPublish.length){optPublish.remove();postStatus.val($("#hidden_post_status").val())}}else{optPublish.html(postL10n.published)}if(postStatus.is(":hidden")){$(".edit-post-status","#misc-publishing-actions").show()}}$("#post-status-display").html($("option:selected",postStatus).text());if($("option:selected",postStatus).val()=="private"||$("option:selected",postStatus).val()=="publish"){$("#save-post").hide()}else{$("#save-post").show();if($("option:selected",postStatus).val()=="pending"){$("#save-post").show().val(postL10n.savePending)}else{$("#save-post").show().val(postL10n.saveDraft)}}return true}$(".edit-visibility","#visibility").click(function(){if($("#post-visibility-select").is(":hidden")){updateVisibility();$("#post-visibility-select").slideDown("normal");$(this).hide()}return false});$(".cancel-post-visibility","#post-visibility-select").click(function(){$("#post-visibility-select").slideUp("normal");$("#visibility-radio-"+$("#hidden-post-visibility").val()).attr("checked",true);$("#post_password").val($("#hidden_post_password").val());$("#sticky").attr("checked",$("#hidden-post-sticky").attr("checked"));$("#post-visibility-display").html(visibility);$(".edit-visibility","#visibility").show();updateText();return false});$(".save-post-visibility","#post-visibility-select").click(function(){var pvSelect=$("#post-visibility-select");pvSelect.slideUp("normal");$(".edit-visibility","#visibility").show();updateText();if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false)}if(true==$("#sticky").attr("checked")){sticky="Sticky"}else{sticky=""}$("#post-visibility-display").html(postL10n[$("input:radio:checked",pvSelect).val()+sticky]);return false});$("input:radio","#post-visibility-select").change(function(){updateVisibility()});$("#timestampdiv").siblings("a.edit-timestamp").click(function(){if($("#timestampdiv").is(":hidden")){$("#timestampdiv").slideDown("normal");$(this).hide()}return false});$(".cancel-timestamp","#timestampdiv").click(function(){$("#timestampdiv").slideUp("normal");$("#mm").val($("#hidden_mm").val());$("#jj").val($("#hidden_jj").val());$("#aa").val($("#hidden_aa").val());$("#hh").val($("#hidden_hh").val());$("#mn").val($("#hidden_mn").val());$("#timestampdiv").siblings("a.edit-timestamp").show();updateText();return false});$(".save-timestamp","#timestampdiv").click(function(){if(updateText()){$("#timestampdiv").slideUp("normal");$("#timestampdiv").siblings("a.edit-timestamp").show()}return false});$("#post-status-select").siblings("a.edit-post-status").click(function(){if($("#post-status-select").is(":hidden")){$("#post-status-select").slideDown("normal");$(this).hide()}return false});$(".save-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false});$(".cancel-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post_status").val($("#hidden_post_status").val());$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false})}if($("#edit-slug-box").length){editPermalink=function(post_id){var i,c=0,e=$("#editable-post-name"),revert_e=e.html(),real_slug=$("#post_name"),revert_slug=real_slug.val(),b=$("#edit-slug-buttons"),revert_b=b.html(),full=$("#editable-post-name-full").html();$("#view-post-btn").hide();b.html('<a href="#" class="save button">'+postL10n.ok+'</a> <a class="cancel" href="#">'+postL10n.cancel+"</a>");b.children(".save").click(function(){var new_slug=e.children("input").val();$.post(ajaxurl,{action:"sample-permalink",post_id:post_id,new_slug:new_slug,new_title:$("#title").val(),samplepermalinknonce:$("#samplepermalinknonce").val()},function(data){$("#edit-slug-box").html(data);b.html(revert_b);real_slug.attr("value",new_slug);makeSlugeditClickable();$("#view-post-btn").show()});return false});$(".cancel","#edit-slug-buttons").click(function(){$("#view-post-btn").show();e.html(revert_e);b.html(revert_b);real_slug.attr("value",revert_slug);return false});for(i=0;i<full.length;++i){if("%"==full.charAt(i)){c++}}slug_value=(c>full.length/4)?"":full;e.html('<input type="text" id="new-post-slug" value="'+slug_value+'" />').children("input").keypress(function(e){var key=e.keyCode||0;if(13==key){b.children(".save").click();return false}if(27==key){b.children(".cancel").click();return false}real_slug.attr("value",this.value)}).focus()};makeSlugeditClickable=function(){$("#editable-post-name").click(function(){$("#edit-slug-buttons").children(".edit-slug").click()})};makeSlugeditClickable()}if($("#title").val()==""){$("#title").siblings("#title-prompt-text").css("visibility","")}$("#title-prompt-text").click(function(){$(this).css("visibility","hidden").siblings("#title").focus()});$("#title").blur(function(){if(this.value==""){$(this).siblings("#title-prompt-text").css("visibility","")}}).focus(function(){$(this).siblings("#title-prompt-text").css("visibility","hidden")}).keydown(function(e){$(this).siblings("#title-prompt-text").css("visibility","hidden");$(this).unbind(e)})}); | var tagBox,commentsBox,editPermalink,makeSlugeditClickable,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail;function array_unique_noempty(a){var out=[];jQuery.each(a,function(key,val){val=jQuery.trim(val);if(val&&jQuery.inArray(val,out)==-1){out.push(val)}});return out}(function($){tagBox={clean:function(tags){return tags.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"")},parseTags:function(el){var id=el.id,num=id.split("-check-num-")[1],taxbox=$(el).closest(".tagsdiv"),thetags=taxbox.find(".the-tags"),current_tags=thetags.val().split(","),new_tags=[];delete current_tags[num];$.each(current_tags,function(key,val){val=$.trim(val);if(val){new_tags.push(val)}});thetags.val(this.clean(new_tags.join(",")));this.quickClicks(taxbox);return false},quickClicks:function(el){var thetags=$(".the-tags",el),tagchecklist=$(".tagchecklist",el),current_tags;if(!thetags.length){return}var disabled=thetags.attr("disabled");current_tags=thetags.val().split(",");tagchecklist.empty();$.each(current_tags,function(key,val){var txt,button_id,id=$(el).attr("id");val=$.trim(val);if(!val.match(/^\s+$/)&&""!=val){button_id=id+"-check-num-"+key;if(disabled){txt="<span>"+val+"</span> "}else{txt='<span><a id="'+button_id+'" class="ntdelbutton">X</a> '+val+"</span> "}tagchecklist.append(txt);if(!disabled){$("#"+button_id).click(function(){tagBox.parseTags(this)})}}})},flushTags:function(el,a,f){a=a||false;var text,tags=$(".the-tags",el),newtag=$("input.newtag",el),newtags;text=a?$(a).text():newtag.val();tagsval=tags.val();newtags=tagsval?tagsval+","+text:text;newtags=this.clean(newtags);newtags=array_unique_noempty(newtags.split(",")).join(",");tags.val(newtags);this.quickClicks(el);if(!a){newtag.val("")}if("undefined"==typeof(f)){newtag.focus()}return false},get:function(id){var tax=id.substr(id.indexOf("-")+1);$.post(ajaxurl,{action:"get-tagcloud",tax:tax},function(r,stat){if(0==r||"success"!=stat){r=wpAjax.broken}r=$('<p id="tagcloud-'+tax+'" class="the-tagcloud">'+r+"</p>");$("a",r).click(function(){tagBox.flushTags($(this).closest(".inside").children(".tagsdiv"),this);return false});$("#"+id).after(r)})},init:function(){var t=this,ajaxtag=$("div.ajaxtag");$(".tagsdiv").each(function(){tagBox.quickClicks(this)});$("input.tagadd",ajaxtag).click(function(){t.flushTags($(this).closest(".tagsdiv"))});$("div.taghint",ajaxtag).click(function(){$(this).css("visibility","hidden").siblings(".newtag").focus()});$("input.newtag",ajaxtag).blur(function(){if(this.value==""){$(this).siblings(".taghint").css("visibility","")}}).focus(function(){$(this).siblings(".taghint").css("visibility","hidden")}).keyup(function(e){if(13==e.which){tagBox.flushTags($(this).closest(".tagsdiv"));return false}}).keypress(function(e){if(13==e.which){e.preventDefault();return false}}).each(function(){var tax=$(this).closest("div.tagsdiv").attr("id");$(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+tax,{delay:500,minchars:2,multiple:true,multipleSep:","})});$("#post").submit(function(){$("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});$("a.tagcloud-link").click(function(){tagBox.get($(this).attr("id"));$(this).unbind().click(function(){$(this).siblings(".the-tagcloud").toggle();return false});return false})}};commentsBox={st:0,get:function(total,num){var st=this.st,data;if(!num){num=20}this.st+=num;this.total=total;$("#commentsdiv img.waiting").show();data={action:"get-comments",mode:"single",_ajax_nonce:$("#add_comment_nonce").val(),post_ID:$("#post_ID").val(),start:st,num:num};$.post(ajaxurl,data,function(r){r=wpAjax.parseAjaxResponse(r);$("#commentsdiv .widefat").show();$("#commentsdiv img.waiting").hide();if("object"==typeof r&&r.responses[0]){$("#the-comment-list").append(r.responses[0].data);theList=theExtraList=null;$("a[className*=':']").unbind();setCommentsList();if(commentsBox.st>commentsBox.total){$("#show-comments").hide()}else{$("#show-comments").html(postL10n.showcomm)}return}else{if(1==r){$("#show-comments").parent().html(postL10n.endcomm);return}}$("#the-comment-list").append('<tr><td colspan="2">'+wpAjax.broken+"</td></tr>")});return false}};WPSetThumbnailHTML=function(html){$(".inside","#postimagediv").html(html)};WPSetThumbnailID=function(id){var field=$("input[value=_thumbnail_id]","#list-table");if(field.size()>0){$("#meta\\["+field.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(id)}};WPRemoveThumbnail=function(){$.post(ajaxurl,{action:"set-post-thumbnail",post_id:$("#post_ID").val(),thumbnail_id:-1,cookie:encodeURIComponent(document.cookie)},function(str){if(str=="0"){alert(setPostThumbnailL10n.error)}else{WPSetThumbnailHTML(str)}})}})(jQuery);jQuery(document).ready(function($){var stamp,visibility,sticky="";postboxes.add_postbox_toggles(pagenow);if($("#tagsdiv-post_tag").length){tagBox.init()}else{$("#side-sortables, #normal-sortables, #advanced-sortables").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}})}$(".categorydiv").each(function(){var this_id=$(this).attr("id"),noSyncChecks=false,syncChecks,catAddAfter,taxonomyParts,taxonomy,settingName;taxonomyParts=this_id.split("-");taxonomyParts.shift();taxonomy=taxonomyParts.join("-");settingName=taxonomy+"_tab";if(taxonomy=="category"){settingName="cats"}$("a","#"+taxonomy+"-tabs").click(function(){var t=$(this).attr("href");$(this).parent().addClass("tabs").siblings("li").removeClass("tabs");$("#"+taxonomy+"-tabs").siblings(".tabs-panel").hide();$(t).show();if("#"+taxonomy+"-all"==t){deleteUserSetting(settingName)}else{setUserSetting(settingName,"pop")}return false});if(getUserSetting(settingName)){$('a[href="#'+taxonomy+'-pop"]',"#"+taxonomy+"-tabs").click()}$("#new"+taxonomy).one("focus",function(){$(this).val("").removeClass("form-input-tip")});$("#"+taxonomy+"-add-submit").click(function(){$("#new"+taxonomy).focus()});syncChecks=function(){if(noSyncChecks){return}noSyncChecks=true;var th=jQuery(this),c=th.is(":checked"),id=th.val().toString();$("#in-"+taxonomy+"-"+id+", #in-"+taxonomy+"-category-"+id).attr("checked",c);noSyncChecks=false};catAddBefore=function(s){if(!$("#new"+taxonomy).val()){return false}s.data+="&"+$(":checked","#"+taxonomy+"checklist").serialize();return s};catAddAfter=function(r,s){var sup,drop=$("#new"+taxonomy+"_parent");if("undefined"!=s.parsed.responses[0]&&(sup=s.parsed.responses[0].supplemental.newcat_parent)){drop.before(sup);drop.remove()}};$("#"+taxonomy+"checklist").wpList({alt:"",response:taxonomy+"-ajax-response",addBefore:catAddBefore,addAfter:catAddAfter});$("#"+taxonomy+"-add-toggle").click(function(){$("#"+taxonomy+"-adder").toggleClass("wp-hidden-children");$('a[href="#'+taxonomy+'-all"]',"#"+taxonomy+"-tabs").click();return false});$("#"+taxonomy+"checklist li.popular-category :checkbox, #"+taxonomy+"checklist-pop :checkbox").live("click",function(){var t=$(this),c=t.is(":checked"),id=t.val();if(id&&t.parents("#taxonomy-"+taxonomy).length){$("#in-"+taxonomy+"-"+id+", #in-popular-"+taxonomy+"-"+id).attr("checked",c)}})});if($("#postcustom").length){$("#the-list").wpList({addAfter:function(xml,s){$("table#list-table").show();if(typeof(autosave_update_post_ID)!="undefined"){autosave_update_post_ID(s.parsed.responses[0].supplemental.postid)}},addBefore:function(s){s.data+="&post_id="+$("#post_ID").val();return s}})}if($("#submitdiv").length){stamp=$("#timestamp").html();visibility=$("#post-visibility-display").html();function updateVisibility(){var pvSelect=$("#post-visibility-select");if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false);$("#sticky-span").hide()}else{$("#sticky-span").show()}if($("input:radio:checked",pvSelect).val()!="password"){$("#password-span").hide()}else{$("#password-span").show()}}function updateText(){var attemptedDate,originalDate,currentDate,publishOn,page="page"==pagenow||"page-new"==pagenow,postStatus=$("#post_status"),optPublish=$("option[value=publish]",postStatus),aa=$("#aa").val(),mm=$("#mm").val(),jj=$("#jj").val(),hh=$("#hh").val(),mn=$("#mn").val();attemptedDate=new Date(aa,mm-1,jj,hh,mn);originalDate=new Date($("#hidden_aa").val(),$("#hidden_mm").val()-1,$("#hidden_jj").val(),$("#hidden_hh").val(),$("#hidden_mn").val());currentDate=new Date($("#cur_aa").val(),$("#cur_mm").val()-1,$("#cur_jj").val(),$("#cur_hh").val(),$("#cur_mn").val());if(attemptedDate.getFullYear()!=aa||(1+attemptedDate.getMonth())!=mm||attemptedDate.getDate()!=jj||attemptedDate.getMinutes()!=mn){$(".timestamp-wrap","#timestampdiv").addClass("form-invalid");return false}else{$(".timestamp-wrap","#timestampdiv").removeClass("form-invalid")}if(attemptedDate>currentDate&&$("#original_post_status").val()!="future"){publishOn=postL10n.publishOnFuture;$("#publish").val(postL10n.schedule)}else{if(attemptedDate<=currentDate&&$("#original_post_status").val()!="publish"){publishOn=postL10n.publishOn;$("#publish").val(postL10n.publish)}else{publishOn=postL10n.publishOnPast;if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}}}if(originalDate.toUTCString()==attemptedDate.toUTCString()){$("#timestamp").html(stamp)}else{$("#timestamp").html(publishOn+" <b>"+$("option[value="+$("#mm").val()+"]","#mm").text()+" "+jj+", "+aa+" @ "+hh+":"+mn+"</b> ")}if($("input:radio:checked","#post-visibility-select").val()=="private"){if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}if(optPublish.length==0){postStatus.append('<option value="publish">'+postL10n.privatelyPublished+"</option>")}else{optPublish.html(postL10n.privatelyPublished)}$("option[value=publish]",postStatus).attr("selected",true);$(".edit-post-status","#misc-publishing-actions").hide()}else{if($("#original_post_status").val()=="future"||$("#original_post_status").val()=="draft"){if(optPublish.length){optPublish.remove();postStatus.val($("#hidden_post_status").val())}}else{optPublish.html(postL10n.published)}if(postStatus.is(":hidden")){$(".edit-post-status","#misc-publishing-actions").show()}}$("#post-status-display").html($("option:selected",postStatus).text());if($("option:selected",postStatus).val()=="private"||$("option:selected",postStatus).val()=="publish"){$("#save-post").hide()}else{$("#save-post").show();if($("option:selected",postStatus).val()=="pending"){$("#save-post").show().val(postL10n.savePending)}else{$("#save-post").show().val(postL10n.saveDraft)}}return true}$(".edit-visibility","#visibility").click(function(){if($("#post-visibility-select").is(":hidden")){updateVisibility();$("#post-visibility-select").slideDown("normal");$(this).hide()}return false});$(".cancel-post-visibility","#post-visibility-select").click(function(){$("#post-visibility-select").slideUp("normal");$("#visibility-radio-"+$("#hidden-post-visibility").val()).attr("checked",true);$("#post_password").val($("#hidden_post_password").val());$("#sticky").attr("checked",$("#hidden-post-sticky").attr("checked"));$("#post-visibility-display").html(visibility);$(".edit-visibility","#visibility").show();updateText();return false});$(".save-post-visibility","#post-visibility-select").click(function(){var pvSelect=$("#post-visibility-select");pvSelect.slideUp("normal");$(".edit-visibility","#visibility").show();updateText();if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false)}if(true==$("#sticky").attr("checked")){sticky="Sticky"}else{sticky=""}$("#post-visibility-display").html(postL10n[$("input:radio:checked",pvSelect).val()+sticky]);return false});$("input:radio","#post-visibility-select").change(function(){updateVisibility()});$("#timestampdiv").siblings("a.edit-timestamp").click(function(){if($("#timestampdiv").is(":hidden")){$("#timestampdiv").slideDown("normal");$(this).hide()}return false});$(".cancel-timestamp","#timestampdiv").click(function(){$("#timestampdiv").slideUp("normal");$("#mm").val($("#hidden_mm").val());$("#jj").val($("#hidden_jj").val());$("#aa").val($("#hidden_aa").val());$("#hh").val($("#hidden_hh").val());$("#mn").val($("#hidden_mn").val());$("#timestampdiv").siblings("a.edit-timestamp").show();updateText();return false});$(".save-timestamp","#timestampdiv").click(function(){if(updateText()){$("#timestampdiv").slideUp("normal");$("#timestampdiv").siblings("a.edit-timestamp").show()}return false});$("#post-status-select").siblings("a.edit-post-status").click(function(){if($("#post-status-select").is(":hidden")){$("#post-status-select").slideDown("normal");$(this).hide()}return false});$(".save-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false});$(".cancel-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post_status").val($("#hidden_post_status").val());$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false})}if($("#edit-slug-box").length){editPermalink=function(post_id){var i,c=0,e=$("#editable-post-name"),revert_e=e.html(),real_slug=$("#post_name"),revert_slug=real_slug.val(),b=$("#edit-slug-buttons"),revert_b=b.html(),full=$("#editable-post-name-full").html();$("#view-post-btn").hide();b.html('<a href="#" class="save button">'+postL10n.ok+'</a> <a class="cancel" href="#">'+postL10n.cancel+"</a>");b.children(".save").click(function(){var new_slug=e.children("input").val();$.post(ajaxurl,{action:"sample-permalink",post_id:post_id,new_slug:new_slug,new_title:$("#title").val(),samplepermalinknonce:$("#samplepermalinknonce").val()},function(data){$("#edit-slug-box").html(data);b.html(revert_b);real_slug.attr("value",new_slug);makeSlugeditClickable();$("#view-post-btn").show()});return false});$(".cancel","#edit-slug-buttons").click(function(){$("#view-post-btn").show();e.html(revert_e);b.html(revert_b);real_slug.attr("value",revert_slug);return false});for(i=0;i<full.length;++i){if("%"==full.charAt(i)){c++}}slug_value=(c>full.length/4)?"":full;e.html('<input type="text" id="new-post-slug" value="'+slug_value+'" />').children("input").keypress(function(e){var key=e.keyCode||0;if(13==key){b.children(".save").click();return false}if(27==key){b.children(".cancel").click();return false}real_slug.attr("value",this.value)}).focus()};makeSlugeditClickable=function(){$("#editable-post-name").click(function(){$("#edit-slug-buttons").children(".edit-slug").click()})};makeSlugeditClickable()}if($("#title").val()==""){$("#title").siblings("#title-prompt-text").css("visibility","")}$("#title-prompt-text").click(function(){$(this).css("visibility","hidden").siblings("#title").focus()});$("#title").blur(function(){if(this.value==""){$(this).siblings("#title-prompt-text").css("visibility","")}}).focus(function(){$(this).siblings("#title-prompt-text").css("visibility","hidden")}).keydown(function(e){$(this).siblings("#title-prompt-text").css("visibility","hidden");$(this).unbind(e)})}); | var tagBox,commentsBox,editPermalink,makeSlugeditClickable,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail;function array_unique_noempty(a){var out=[];jQuery.each(a,function(key,val){val=jQuery.trim(val);if(val&&jQuery.inArray(val,out)==-1){out.push(val)}});return out}(function($){tagBox={clean:function(tags){return tags.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"")},parseTags:function(el){var id=el.id,num=id.split("-check-num-")[1],taxbox=$(el).closest(".tagsdiv"),thetags=taxbox.find(".the-tags"),current_tags=thetags.val().split(","),new_tags=[];delete current_tags[num];$.each(current_tags,function(key,val){val=$.trim(val);if(val){new_tags.push(val)}});thetags.val(this.clean(new_tags.join(",")));this.quickClicks(taxbox);return false},quickClicks:function(el){var thetags=$(".the-tags",el),tagchecklist=$(".tagchecklist",el),current_tags;if(!thetags.length){return}var disabled=thetags.attr("disabled");current_tags=thetags.val().split(",");tagchecklist.empty();$.each(current_tags,function(key,val){var txt,button_id,id=$(el).attr("id");val=$.trim(val);if(!val.match(/^\s+$/)&&""!=val){button_id=id+"-check-num-"+key;if(disabled){txt="<span>"+val+"</span> "}else{txt='<span><a id="'+button_id+'" class="ntdelbutton">X</a> '+val+"</span> "}tagchecklist.append(txt);if(!disabled){$("#"+button_id).click(function(){tagBox.parseTags(this)})}}})},flushTags:function(el,a,f){a=a||false;var text,tags=$(".the-tags",el),newtag=$("input.newtag",el),newtags;text=a?$(a).text():newtag.val();tagsval=tags.val();newtags=tagsval?tagsval+","+text:text;newtags=this.clean(newtags);newtags=array_unique_noempty(newtags.split(",")).join(",");tags.val(newtags);this.quickClicks(el);if(!a){newtag.val("")}if("undefined"==typeof(f)){newtag.focus()}return false},get:function(id){var tax=id.substr(id.indexOf("-")+1);$.post(ajaxurl,{action:"get-tagcloud",tax:tax},function(r,stat){if(0==r||"success"!=stat){r=wpAjax.broken}r=$('<p id="tagcloud-'+tax+'" class="the-tagcloud">'+r+"</p>");$("a",r).click(function(){tagBox.flushTags($(this).closest(".inside").children(".tagsdiv"),this);return false});$("#"+id).after(r)})},init:function(){var t=this,ajaxtag=$("div.ajaxtag");$(".tagsdiv").each(function(){tagBox.quickClicks(this)});$("input.tagadd",ajaxtag).click(function(){t.flushTags($(this).closest(".tagsdiv"))});$("div.taghint",ajaxtag).click(function(){$(this).css("visibility","hidden").siblings(".newtag").focus()});$("input.newtag",ajaxtag).blur(function(){if(this.value==""){$(this).siblings(".taghint").css("visibility","")}}).focus(function(){$(this).siblings(".taghint").css("visibility","hidden")}).keyup(function(e){if(13==e.which){tagBox.flushTags($(this).closest(".tagsdiv"));return false}}).keypress(function(e){if(13==e.which){e.preventDefault();return false}}).each(function(){var tax=$(this).closest("div.tagsdiv").attr("id");$(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+tax,{delay:500,minchars:2,multiple:true,multipleSep:", "})});$("#post").submit(function(){$("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});$("a.tagcloud-link").click(function(){tagBox.get($(this).attr("id"));$(this).unbind().click(function(){$(this).siblings(".the-tagcloud").toggle();return false});return false})}};commentsBox={st:0,get:function(total,num){var st=this.st,data;if(!num){num=20}this.st+=num;this.total=total;$("#commentsdiv img.waiting").show();data={action:"get-comments",mode:"single",_ajax_nonce:$("#add_comment_nonce").val(),post_ID:$("#post_ID").val(),start:st,num:num};$.post(ajaxurl,data,function(r){r=wpAjax.parseAjaxResponse(r);$("#commentsdiv .widefat").show();$("#commentsdiv img.waiting").hide();if("object"==typeof r&&r.responses[0]){$("#the-comment-list").append(r.responses[0].data);theList=theExtraList=null;$("a[className*=':']").unbind();setCommentsList();if(commentsBox.st>commentsBox.total){$("#show-comments").hide()}else{$("#show-comments").html(postL10n.showcomm)}return}else{if(1==r){$("#show-comments").parent().html(postL10n.endcomm);return}}$("#the-comment-list").append('<tr><td colspan="2">'+wpAjax.broken+"</td></tr>")});return false}};WPSetThumbnailHTML=function(html){$(".inside","#postimagediv").html(html)};WPSetThumbnailID=function(id){var field=$("input[value=_thumbnail_id]","#list-table");if(field.size()>0){$("#meta\\["+field.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(id)}};WPRemoveThumbnail=function(){$.post(ajaxurl,{action:"set-post-thumbnail",post_id:$("#post_ID").val(),thumbnail_id:-1,cookie:encodeURIComponent(document.cookie)},function(str){if(str=="0"){alert(setPostThumbnailL10n.error)}else{WPSetThumbnailHTML(str)}})}})(jQuery);jQuery(document).ready(function($){var stamp,visibility,sticky="";postboxes.add_postbox_toggles(pagenow);if($("#tagsdiv-post_tag").length){tagBox.init()}else{$("#side-sortables, #normal-sortables, #advanced-sortables").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}})}$(".categorydiv").each(function(){var this_id=$(this).attr("id"),noSyncChecks=false,syncChecks,catAddAfter,taxonomyParts,taxonomy,settingName;taxonomyParts=this_id.split("-");taxonomyParts.shift();taxonomy=taxonomyParts.join("-");settingName=taxonomy+"_tab";if(taxonomy=="category"){settingName="cats"}$("a","#"+taxonomy+"-tabs").click(function(){var t=$(this).attr("href");$(this).parent().addClass("tabs").siblings("li").removeClass("tabs");$("#"+taxonomy+"-tabs").siblings(".tabs-panel").hide();$(t).show();if("#"+taxonomy+"-all"==t){deleteUserSetting(settingName)}else{setUserSetting(settingName,"pop")}return false});if(getUserSetting(settingName)){$('a[href="#'+taxonomy+'-pop"]',"#"+taxonomy+"-tabs").click()}$("#new"+taxonomy).one("focus",function(){$(this).val("").removeClass("form-input-tip")});$("#"+taxonomy+"-add-submit").click(function(){$("#new"+taxonomy).focus()});syncChecks=function(){if(noSyncChecks){return}noSyncChecks=true;var th=jQuery(this),c=th.is(":checked"),id=th.val().toString();$("#in-"+taxonomy+"-"+id+", #in-"+taxonomy+"-category-"+id).attr("checked",c);noSyncChecks=false};catAddBefore=function(s){if(!$("#new"+taxonomy).val()){return false}s.data+="&"+$(":checked","#"+taxonomy+"checklist").serialize();return s};catAddAfter=function(r,s){var sup,drop=$("#new"+taxonomy+"_parent");if("undefined"!=s.parsed.responses[0]&&(sup=s.parsed.responses[0].supplemental.newcat_parent)){drop.before(sup);drop.remove()}};$("#"+taxonomy+"checklist").wpList({alt:"",response:taxonomy+"-ajax-response",addBefore:catAddBefore,addAfter:catAddAfter});$("#"+taxonomy+"-add-toggle").click(function(){$("#"+taxonomy+"-adder").toggleClass("wp-hidden-children");$('a[href="#'+taxonomy+'-all"]',"#"+taxonomy+"-tabs").click();return false});$("#"+taxonomy+"checklist li.popular-category :checkbox, #"+taxonomy+"checklist-pop :checkbox").live("click",function(){var t=$(this),c=t.is(":checked"),id=t.val();if(id&&t.parents("#taxonomy-"+taxonomy).length){$("#in-"+taxonomy+"-"+id+", #in-popular-"+taxonomy+"-"+id).attr("checked",c)}})});if($("#postcustom").length){$("#the-list").wpList({addAfter:function(xml,s){$("table#list-table").show();if(typeof(autosave_update_post_ID)!="undefined"){autosave_update_post_ID(s.parsed.responses[0].supplemental.postid)}},addBefore:function(s){s.data+="&post_id="+$("#post_ID").val();return s}})}if($("#submitdiv").length){stamp=$("#timestamp").html();visibility=$("#post-visibility-display").html();function updateVisibility(){var pvSelect=$("#post-visibility-select");if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false);$("#sticky-span").hide()}else{$("#sticky-span").show()}if($("input:radio:checked",pvSelect).val()!="password"){$("#password-span").hide()}else{$("#password-span").show()}}function updateText(){var attemptedDate,originalDate,currentDate,publishOn,page="page"==pagenow||"page-new"==pagenow,postStatus=$("#post_status"),optPublish=$("option[value=publish]",postStatus),aa=$("#aa").val(),mm=$("#mm").val(),jj=$("#jj").val(),hh=$("#hh").val(),mn=$("#mn").val();attemptedDate=new Date(aa,mm-1,jj,hh,mn);originalDate=new Date($("#hidden_aa").val(),$("#hidden_mm").val()-1,$("#hidden_jj").val(),$("#hidden_hh").val(),$("#hidden_mn").val());currentDate=new Date($("#cur_aa").val(),$("#cur_mm").val()-1,$("#cur_jj").val(),$("#cur_hh").val(),$("#cur_mn").val());if(attemptedDate.getFullYear()!=aa||(1+attemptedDate.getMonth())!=mm||attemptedDate.getDate()!=jj||attemptedDate.getMinutes()!=mn){$(".timestamp-wrap","#timestampdiv").addClass("form-invalid");return false}else{$(".timestamp-wrap","#timestampdiv").removeClass("form-invalid")}if(attemptedDate>currentDate&&$("#original_post_status").val()!="future"){publishOn=postL10n.publishOnFuture;$("#publish").val(postL10n.schedule)}else{if(attemptedDate<=currentDate&&$("#original_post_status").val()!="publish"){publishOn=postL10n.publishOn;$("#publish").val(postL10n.publish)}else{publishOn=postL10n.publishOnPast;if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}}}if(originalDate.toUTCString()==attemptedDate.toUTCString()){$("#timestamp").html(stamp)}else{$("#timestamp").html(publishOn+" <b>"+$("option[value="+$("#mm").val()+"]","#mm").text()+" "+jj+", "+aa+" @ "+hh+":"+mn+"</b> ")}if($("input:radio:checked","#post-visibility-select").val()=="private"){if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}if(optPublish.length==0){postStatus.append('<option value="publish">'+postL10n.privatelyPublished+"</option>")}else{optPublish.html(postL10n.privatelyPublished)}$("option[value=publish]",postStatus).attr("selected",true);$(".edit-post-status","#misc-publishing-actions").hide()}else{if($("#original_post_status").val()=="future"||$("#original_post_status").val()=="draft"){if(optPublish.length){optPublish.remove();postStatus.val($("#hidden_post_status").val())}}else{optPublish.html(postL10n.published)}if(postStatus.is(":hidden")){$(".edit-post-status","#misc-publishing-actions").show()}}$("#post-status-display").html($("option:selected",postStatus).text());if($("option:selected",postStatus).val()=="private"||$("option:selected",postStatus).val()=="publish"){$("#save-post").hide()}else{$("#save-post").show();if($("option:selected",postStatus).val()=="pending"){$("#save-post").show().val(postL10n.savePending)}else{$("#save-post").show().val(postL10n.saveDraft)}}return true}$(".edit-visibility","#visibility").click(function(){if($("#post-visibility-select").is(":hidden")){updateVisibility();$("#post-visibility-select").slideDown("normal");$(this).hide()}return false});$(".cancel-post-visibility","#post-visibility-select").click(function(){$("#post-visibility-select").slideUp("normal");$("#visibility-radio-"+$("#hidden-post-visibility").val()).attr("checked",true);$("#post_password").val($("#hidden_post_password").val());$("#sticky").attr("checked",$("#hidden-post-sticky").attr("checked"));$("#post-visibility-display").html(visibility);$(".edit-visibility","#visibility").show();updateText();return false});$(".save-post-visibility","#post-visibility-select").click(function(){var pvSelect=$("#post-visibility-select");pvSelect.slideUp("normal");$(".edit-visibility","#visibility").show();updateText();if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false)}if(true==$("#sticky").attr("checked")){sticky="Sticky"}else{sticky=""}$("#post-visibility-display").html(postL10n[$("input:radio:checked",pvSelect).val()+sticky]);return false});$("input:radio","#post-visibility-select").change(function(){updateVisibility()});$("#timestampdiv").siblings("a.edit-timestamp").click(function(){if($("#timestampdiv").is(":hidden")){$("#timestampdiv").slideDown("normal");$(this).hide()}return false});$(".cancel-timestamp","#timestampdiv").click(function(){$("#timestampdiv").slideUp("normal");$("#mm").val($("#hidden_mm").val());$("#jj").val($("#hidden_jj").val());$("#aa").val($("#hidden_aa").val());$("#hh").val($("#hidden_hh").val());$("#mn").val($("#hidden_mn").val());$("#timestampdiv").siblings("a.edit-timestamp").show();updateText();return false});$(".save-timestamp","#timestampdiv").click(function(){if(updateText()){$("#timestampdiv").slideUp("normal");$("#timestampdiv").siblings("a.edit-timestamp").show()}return false});$("#post-status-select").siblings("a.edit-post-status").click(function(){if($("#post-status-select").is(":hidden")){$("#post-status-select").slideDown("normal");$(this).hide()}return false});$(".save-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false});$(".cancel-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post_status").val($("#hidden_post_status").val());$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false})}if($("#edit-slug-box").length){editPermalink=function(post_id){var i,c=0,e=$("#editable-post-name"),revert_e=e.html(),real_slug=$("#post_name"),revert_slug=real_slug.val(),b=$("#edit-slug-buttons"),revert_b=b.html(),full=$("#editable-post-name-full").html();$("#view-post-btn").hide();b.html('<a href="#" class="save button">'+postL10n.ok+'</a> <a class="cancel" href="#">'+postL10n.cancel+"</a>");b.children(".save").click(function(){var new_slug=e.children("input").val();$.post(ajaxurl,{action:"sample-permalink",post_id:post_id,new_slug:new_slug,new_title:$("#title").val(),samplepermalinknonce:$("#samplepermalinknonce").val()},function(data){$("#edit-slug-box").html(data);b.html(revert_b);real_slug.attr("value",new_slug);makeSlugeditClickable();$("#view-post-btn").show()});return false});$(".cancel","#edit-slug-buttons").click(function(){$("#view-post-btn").show();e.html(revert_e);b.html(revert_b);real_slug.attr("value",revert_slug);return false});for(i=0;i<full.length;++i){if("%"==full.charAt(i)){c++}}slug_value=(c>full.length/4)?"":full;e.html('<input type="text" id="new-post-slug" value="'+slug_value+'" />').children("input").keypress(function(e){var key=e.keyCode||0;if(13==key){b.children(".save").click();return false}if(27==key){b.children(".cancel").click();return false}real_slug.attr("value",this.value)}).focus()};makeSlugeditClickable=function(){$("#editable-post-name").click(function(){$("#edit-slug-buttons").children(".edit-slug").click()})};makeSlugeditClickable()}if($("#title").val()==""){$("#title").siblings("#title-prompt-text").css("visibility","")}$("#title-prompt-text").click(function(){$(this).css("visibility","hidden").siblings("#title").focus()});$("#title").blur(function(){if(this.value==""){$(this).siblings("#title-prompt-text").css("visibility","")}}).focus(function(){$(this).siblings("#title-prompt-text").css("visibility","hidden")}).keydown(function(e){$(this).siblings("#title-prompt-text").css("visibility","hidden");$(this).unbind(e)})}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/560c524bf1e5fe52e4798ad1823074714caeda74/post.js/buggy/wp-admin/js/post.js |
var tagBox,commentsBox,editPermalink,makeSlugeditClickable,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail;function array_unique_noempty(a){var out=[];jQuery.each(a,function(key,val){val=jQuery.trim(val);if(val&&jQuery.inArray(val,out)==-1){out.push(val)}});return out}(function($){tagBox={clean:function(tags){return tags.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"")},parseTags:function(el){var id=el.id,num=id.split("-check-num-")[1],taxbox=$(el).closest(".tagsdiv"),thetags=taxbox.find(".the-tags"),current_tags=thetags.val().split(","),new_tags=[];delete current_tags[num];$.each(current_tags,function(key,val){val=$.trim(val);if(val){new_tags.push(val)}});thetags.val(this.clean(new_tags.join(",")));this.quickClicks(taxbox);return false},quickClicks:function(el){var thetags=$(".the-tags",el),tagchecklist=$(".tagchecklist",el),current_tags;if(!thetags.length){return}var disabled=thetags.attr("disabled");current_tags=thetags.val().split(",");tagchecklist.empty();$.each(current_tags,function(key,val){var txt,button_id,id=$(el).attr("id");val=$.trim(val);if(!val.match(/^\s+$/)&&""!=val){button_id=id+"-check-num-"+key;if(disabled){txt="<span>"+val+"</span> "}else{txt='<span><a id="'+button_id+'" class="ntdelbutton">X</a> '+val+"</span> "}tagchecklist.append(txt);if(!disabled){$("#"+button_id).click(function(){tagBox.parseTags(this)})}}})},flushTags:function(el,a,f){a=a||false;var text,tags=$(".the-tags",el),newtag=$("input.newtag",el),newtags;text=a?$(a).text():newtag.val();tagsval=tags.val();newtags=tagsval?tagsval+","+text:text;newtags=this.clean(newtags);newtags=array_unique_noempty(newtags.split(",")).join(",");tags.val(newtags);this.quickClicks(el);if(!a){newtag.val("")}if("undefined"==typeof(f)){newtag.focus()}return false},get:function(id){var tax=id.substr(id.indexOf("-")+1);$.post(ajaxurl,{action:"get-tagcloud",tax:tax},function(r,stat){if(0==r||"success"!=stat){r=wpAjax.broken}r=$('<p id="tagcloud-'+tax+'" class="the-tagcloud">'+r+"</p>");$("a",r).click(function(){tagBox.flushTags($(this).closest(".inside").children(".tagsdiv"),this);return false});$("#"+id).after(r)})},init:function(){var t=this,ajaxtag=$("div.ajaxtag");$(".tagsdiv").each(function(){tagBox.quickClicks(this)});$("input.tagadd",ajaxtag).click(function(){t.flushTags($(this).closest(".tagsdiv"))});$("div.taghint",ajaxtag).click(function(){$(this).css("visibility","hidden").siblings(".newtag").focus()});$("input.newtag",ajaxtag).blur(function(){if(this.value==""){$(this).siblings(".taghint").css("visibility","")}}).focus(function(){$(this).siblings(".taghint").css("visibility","hidden")}).keyup(function(e){if(13==e.which){tagBox.flushTags($(this).closest(".tagsdiv"));return false}}).keypress(function(e){if(13==e.which){e.preventDefault();return false}}).each(function(){var tax=$(this).closest("div.tagsdiv").attr("id");$(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+tax,{delay:500,minchars:2,multiple:true,multipleSep:", "})});$("#post").submit(function(){$("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});$("a.tagcloud-link").click(function(){tagBox.get($(this).attr("id"));$(this).unbind().click(function(){$(this).siblings(".the-tagcloud").toggle();return false});return false})}};commentsBox={st:0,get:function(total,num){var st=this.st,data;if(!num){num=20}this.st+=num;this.total=total;$("#commentsdiv img.waiting").show();data={action:"get-comments",mode:"single",_ajax_nonce:$("#add_comment_nonce").val(),post_ID:$("#post_ID").val(),start:st,num:num};$.post(ajaxurl,data,function(r){r=wpAjax.parseAjaxResponse(r);$("#commentsdiv .widefat").show();$("#commentsdiv img.waiting").hide();if("object"==typeof r&&r.responses[0]){$("#the-comment-list").append(r.responses[0].data);theList=theExtraList=null;$("a[className*=':']").unbind();setCommentsList();if(commentsBox.st>commentsBox.total){$("#show-comments").hide()}else{$("#show-comments").html(postL10n.showcomm)}return}else{if(1==r){$("#show-comments").parent().html(postL10n.endcomm);return}}$("#the-comment-list").append('<tr><td colspan="2">'+wpAjax.broken+"</td></tr>")});return false}};WPSetThumbnailHTML=function(html){$(".inside","#postimagediv").html(html)};WPSetThumbnailID=function(id){var field=$("input[value=_thumbnail_id]","#list-table");if(field.size()>0){$("#meta\\["+field.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(id)}};WPRemoveThumbnail=function(){$.post(ajaxurl,{action:"set-post-thumbnail",post_id:$("#post_ID").val(),thumbnail_id:-1,cookie:encodeURIComponent(document.cookie)},function(str){if(str=="0"){alert(setPostThumbnailL10n.error)}else{WPSetThumbnailHTML(str)}})}})(jQuery);jQuery(document).ready(function($){var stamp,visibility,sticky="";postboxes.add_postbox_toggles(pagenow);if($("#tagsdiv-post_tag").length){tagBox.init()}else{$("#side-sortables, #normal-sortables, #advanced-sortables").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}})}$(".categorydiv").each(function(){var this_id=$(this).attr("id"),noSyncChecks=false,syncChecks,catAddAfter,taxonomyParts,taxonomy,settingName;taxonomyParts=this_id.split("-");taxonomyParts.shift();taxonomy=taxonomyParts.join("-");settingName=taxonomy+"_tab";if(taxonomy=="category"){settingName="cats"}$("a","#"+taxonomy+"-tabs").click(function(){var t=$(this).attr("href");$(this).parent().addClass("tabs").siblings("li").removeClass("tabs");$("#"+taxonomy+"-tabs").siblings(".tabs-panel").hide();$(t).show();if("#"+taxonomy+"-all"==t){deleteUserSetting(settingName)}else{setUserSetting(settingName,"pop")}return false});if(getUserSetting(settingName)){$('a[href="#'+taxonomy+'-pop"]',"#"+taxonomy+"-tabs").click()}$("#new"+taxonomy).one("focus",function(){$(this).val("").removeClass("form-input-tip")});$("#"+taxonomy+"-add-submit").click(function(){$("#new"+taxonomy).focus()});syncChecks=function(){if(noSyncChecks){return}noSyncChecks=true;var th=jQuery(this),c=th.is(":checked"),id=th.val().toString();$("#in-"+taxonomy+"-"+id+", #in-"+taxonomy+"-category-"+id).attr("checked",c);noSyncChecks=false};catAddBefore=function(s){if(!$("#new"+taxonomy).val()){return false}s.data+="&"+$(":checked","#"+taxonomy+"checklist").serialize();return s};catAddAfter=function(r,s){var sup,drop=$("#new"+taxonomy+"_parent");if("undefined"!=s.parsed.responses[0]&&(sup=s.parsed.responses[0].supplemental.newcat_parent)){drop.before(sup);drop.remove()}};$("#"+taxonomy+"checklist").wpList({alt:"",response:taxonomy+"-ajax-response",addBefore:catAddBefore,addAfter:catAddAfter});$("#"+taxonomy+"-add-toggle").click(function(){$("#"+taxonomy+"-adder").toggleClass("wp-hidden-children");$('a[href="#'+taxonomy+'-all"]',"#"+taxonomy+"-tabs").click();return false});$("#"+taxonomy+"checklist li.popular-category :checkbox, #"+taxonomy+"checklist-pop :checkbox").live("click",function(){var t=$(this),c=t.is(":checked"),id=t.val();if(id&&t.parents("#taxonomy-"+taxonomy).length){$("#in-"+taxonomy+"-"+id+", #in-popular-"+taxonomy+"-"+id).attr("checked",c)}})});if($("#postcustom").length){$("#the-list").wpList({addAfter:function(xml,s){$("table#list-table").show();if(typeof(autosave_update_post_ID)!="undefined"){autosave_update_post_ID(s.parsed.responses[0].supplemental.postid)}},addBefore:function(s){s.data+="&post_id="+$("#post_ID").val();return s}})}if($("#submitdiv").length){stamp=$("#timestamp").html();visibility=$("#post-visibility-display").html();function updateVisibility(){var pvSelect=$("#post-visibility-select");if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false);$("#sticky-span").hide()}else{$("#sticky-span").show()}if($("input:radio:checked",pvSelect).val()!="password"){$("#password-span").hide()}else{$("#password-span").show()}}function updateText(){var attemptedDate,originalDate,currentDate,publishOn,postStatus=$("#post_status"),optPublish=$("option[value=publish]",postStatus),aa=$("#aa").val(),mm=$("#mm").val(),jj=$("#jj").val(),hh=$("#hh").val(),mn=$("#mn").val();attemptedDate=new Date(aa,mm-1,jj,hh,mn);originalDate=new Date($("#hidden_aa").val(),$("#hidden_mm").val()-1,$("#hidden_jj").val(),$("#hidden_hh").val(),$("#hidden_mn").val());currentDate=new Date($("#cur_aa").val(),$("#cur_mm").val()-1,$("#cur_jj").val(),$("#cur_hh").val(),$("#cur_mn").val());if(attemptedDate.getFullYear()!=aa||(1+attemptedDate.getMonth())!=mm||attemptedDate.getDate()!=jj||attemptedDate.getMinutes()!=mn){$(".timestamp-wrap","#timestampdiv").addClass("form-invalid");return false}else{$(".timestamp-wrap","#timestampdiv").removeClass("form-invalid")}if(attemptedDate>currentDate&&$("#original_post_status").val()!="future"){publishOn=postL10n.publishOnFuture;$("#publish").val(postL10n.schedule)}else{if(attemptedDate<=currentDate&&$("#original_post_status").val()!="publish"){publishOn=postL10n.publishOn;$("#publish").val(postL10n.publish)}else{publishOn=postL10n.publishOnPast;if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}}}if(originalDate.toUTCString()==attemptedDate.toUTCString()){$("#timestamp").html(stamp)}else{$("#timestamp").html(publishOn+" <b>"+$("option[value="+$("#mm").val()+"]","#mm").text()+" "+jj+", "+aa+" @ "+hh+":"+mn+"</b> ")}if($("input:radio:checked","#post-visibility-select").val()=="private"){if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}if(optPublish.length==0){postStatus.append('<option value="publish">'+postL10n.privatelyPublished+"</option>")}else{optPublish.html(postL10n.privatelyPublished)}$("option[value=publish]",postStatus).attr("selected",true);$(".edit-post-status","#misc-publishing-actions").hide()}else{if($("#original_post_status").val()=="future"||$("#original_post_status").val()=="draft"){if(optPublish.length){optPublish.remove();postStatus.val($("#hidden_post_status").val())}}else{optPublish.html(postL10n.published)}if(postStatus.is(":hidden")){$(".edit-post-status","#misc-publishing-actions").show()}}$("#post-status-display").html($("option:selected",postStatus).text());if($("option:selected",postStatus).val()=="private"||$("option:selected",postStatus).val()=="publish"){$("#save-post").hide()}else{$("#save-post").show();if($("option:selected",postStatus).val()=="pending"){$("#save-post").show().val(postL10n.savePending)}else{$("#save-post").show().val(postL10n.saveDraft)}}return true}$(".edit-visibility","#visibility").click(function(){if($("#post-visibility-select").is(":hidden")){updateVisibility();$("#post-visibility-select").slideDown("normal");$(this).hide()}return false});$(".cancel-post-visibility","#post-visibility-select").click(function(){$("#post-visibility-select").slideUp("normal");$("#visibility-radio-"+$("#hidden-post-visibility").val()).attr("checked",true);$("#post_password").val($("#hidden_post_password").val());$("#sticky").attr("checked",$("#hidden-post-sticky").attr("checked"));$("#post-visibility-display").html(visibility);$(".edit-visibility","#visibility").show();updateText();return false});$(".save-post-visibility","#post-visibility-select").click(function(){var pvSelect=$("#post-visibility-select");pvSelect.slideUp("normal");$(".edit-visibility","#visibility").show();updateText();if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false)}if(true==$("#sticky").attr("checked")){sticky="Sticky"}else{sticky=""}$("#post-visibility-display").html(postL10n[$("input:radio:checked",pvSelect).val()+sticky]);return false});$("input:radio","#post-visibility-select").change(function(){updateVisibility()});$("#timestampdiv").siblings("a.edit-timestamp").click(function(){if($("#timestampdiv").is(":hidden")){$("#timestampdiv").slideDown("normal");$(this).hide()}return false});$(".cancel-timestamp","#timestampdiv").click(function(){$("#timestampdiv").slideUp("normal");$("#mm").val($("#hidden_mm").val());$("#jj").val($("#hidden_jj").val());$("#aa").val($("#hidden_aa").val());$("#hh").val($("#hidden_hh").val());$("#mn").val($("#hidden_mn").val());$("#timestampdiv").siblings("a.edit-timestamp").show();updateText();return false});$(".save-timestamp","#timestampdiv").click(function(){if(updateText()){$("#timestampdiv").slideUp("normal");$("#timestampdiv").siblings("a.edit-timestamp").show()}return false});$("#post-status-select").siblings("a.edit-post-status").click(function(){if($("#post-status-select").is(":hidden")){$("#post-status-select").slideDown("normal");$(this).hide()}return false});$(".save-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false});$(".cancel-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post_status").val($("#hidden_post_status").val());$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false})}if($("#edit-slug-box").length){editPermalink=function(post_id){var i,c=0,e=$("#editable-post-name"),revert_e=e.html(),real_slug=$("#post_name"),revert_slug=real_slug.html(),b=$("#edit-slug-buttons"),revert_b=b.html(),full=$("#editable-post-name-full").html();$("#view-post-btn").hide();b.html('<a href="#" class="save button">'+postL10n.ok+'</a> <a class="cancel" href="#">'+postL10n.cancel+"</a>");b.children(".save").click(function(){var new_slug=e.children("input").val();$.post(ajaxurl,{action:"sample-permalink",post_id:post_id,new_slug:new_slug,new_title:$("#title").val(),samplepermalinknonce:$("#samplepermalinknonce").val()},function(data){$("#edit-slug-box").html(data);b.html(revert_b);real_slug.attr("value",new_slug);makeSlugeditClickable();$("#view-post-btn").show()});return false});$(".cancel","#edit-slug-buttons").click(function(){$("#view-post-btn").show();e.html(revert_e);b.html(revert_b);real_slug.attr("value",revert_slug);return false});for(i=0;i<full.length;++i){if("%"==full.charAt(i)){c++}}slug_value=(c>full.length/4)?"":full;e.html('<input type="text" id="new-post-slug" value="'+slug_value+'" />').children("input").keypress(function(e){var key=e.keyCode||0;if(13==key){b.children(".save").click();return false}if(27==key){b.children(".cancel").click();return false}real_slug.attr("value",this.value)}).focus()};makeSlugeditClickable=function(){$("#editable-post-name").click(function(){$("#edit-slug-buttons").children(".edit-slug").click()})};makeSlugeditClickable()}}); | var tagBox,commentsBox,editPermalink,makeSlugeditClickable,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail;function array_unique_noempty(a){var out=[];jQuery.each(a,function(key,val){val=jQuery.trim(val);if(val&&jQuery.inArray(val,out)==-1){out.push(val)}});return out}(function($){tagBox={clean:function(tags){return tags.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"")},parseTags:function(el){var id=el.id,num=id.split("-check-num-")[1],taxbox=$(el).closest(".tagsdiv"),thetags=taxbox.find(".the-tags"),current_tags=thetags.val().split(","),new_tags=[];delete current_tags[num];$.each(current_tags,function(key,val){val=$.trim(val);if(val){new_tags.push(val)}});thetags.val(this.clean(new_tags.join(",")));this.quickClicks(taxbox);return false},quickClicks:function(el){var thetags=$(".the-tags",el),tagchecklist=$(".tagchecklist",el),current_tags;if(!thetags.length){return}var disabled=thetags.attr("disabled");current_tags=thetags.val().split(",");tagchecklist.empty();$.each(current_tags,function(key,val){var txt,button_id,id=$(el).attr("id");val=$.trim(val);if(!val.match(/^\s+$/)&&""!=val){button_id=id+"-check-num-"+key;if(disabled){txt="<span>"+val+"</span> "}else{txt='<span><a id="'+button_id+'" class="ntdelbutton">X</a> '+val+"</span> "}tagchecklist.append(txt);if(!disabled){$("#"+button_id).click(function(){tagBox.parseTags(this)})}}})},flushTags:function(el,a,f){a=a||false;var text,tags=$(".the-tags",el),newtag=$("input.newtag",el),newtags;text=a?$(a).text():newtag.val();tagsval=tags.val();newtags=tagsval?tagsval+","+text:text;newtags=this.clean(newtags);newtags=array_unique_noempty(newtags.split(",")).join(",");tags.val(newtags);this.quickClicks(el);if(!a){newtag.val("")}if("undefined"==typeof(f)){newtag.focus()}return false},get:function(id){var tax=id.substr(id.indexOf("-")+1);$.post(ajaxurl,{action:"get-tagcloud",tax:tax},function(r,stat){if(0==r||"success"!=stat){r=wpAjax.broken}r=$('<p id="tagcloud-'+tax+'" class="the-tagcloud">'+r+"</p>");$("a",r).click(function(){tagBox.flushTags($(this).closest(".inside").children(".tagsdiv"),this);return false});$("#"+id).after(r)})},init:function(){var t=this,ajaxtag=$("div.ajaxtag");$(".tagsdiv").each(function(){tagBox.quickClicks(this)});$("input.tagadd",ajaxtag).click(function(){t.flushTags($(this).closest(".tagsdiv"))});$("div.taghint",ajaxtag).click(function(){$(this).css("visibility","hidden").siblings(".newtag").focus()});$("input.newtag",ajaxtag).blur(function(){if(this.value==""){$(this).siblings(".taghint").css("visibility","")}}).focus(function(){$(this).siblings(".taghint").css("visibility","hidden")}).keyup(function(e){if(13==e.which){tagBox.flushTags($(this).closest(".tagsdiv"));return false}}).keypress(function(e){if(13==e.which){e.preventDefault();return false}}).each(function(){var tax=$(this).closest("div.tagsdiv").attr("id");$(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+tax,{delay:500,minchars:2,multiple:true,multipleSep:", "})});$("#post").submit(function(){$("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});$("a.tagcloud-link").click(function(){tagBox.get($(this).attr("id"));$(this).unbind().click(function(){$(this).siblings(".the-tagcloud").toggle();return false});return false})}};commentsBox={st:0,get:function(total,num){var st=this.st,data;if(!num){num=20}this.st+=num;this.total=total;$("#commentsdiv img.waiting").show();data={action:"get-comments",mode:"single",_ajax_nonce:$("#add_comment_nonce").val(),post_ID:$("#post_ID").val(),start:st,num:num};$.post(ajaxurl,data,function(r){r=wpAjax.parseAjaxResponse(r);$("#commentsdiv .widefat").show();$("#commentsdiv img.waiting").hide();if("object"==typeof r&&r.responses[0]){$("#the-comment-list").append(r.responses[0].data);theList=theExtraList=null;$("a[className*=':']").unbind();setCommentsList();if(commentsBox.st>commentsBox.total){$("#show-comments").hide()}else{$("#show-comments").html(postL10n.showcomm)}return}else{if(1==r){$("#show-comments").parent().html(postL10n.endcomm);return}}$("#the-comment-list").append('<tr><td colspan="2">'+wpAjax.broken+"</td></tr>")});return false}};WPSetThumbnailHTML=function(html){$(".inside","#postimagediv").html(html)};WPSetThumbnailID=function(id){var field=$("input[value=_thumbnail_id]","#list-table");if(field.size()>0){$("#meta\\["+field.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(id)}};WPRemoveThumbnail=function(){$.post(ajaxurl,{action:"set-post-thumbnail",post_id:$("#post_ID").val(),thumbnail_id:-1,cookie:encodeURIComponent(document.cookie)},function(str){if(str=="0"){alert(setPostThumbnailL10n.error)}else{WPSetThumbnailHTML(str)}})}})(jQuery);jQuery(document).ready(function($){var stamp,visibility,sticky="";postboxes.add_postbox_toggles(pagenow);if($("#tagsdiv-post_tag").length){tagBox.init()}else{$("#side-sortables, #normal-sortables, #advanced-sortables").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}})}$(".categorydiv").each(function(){var this_id=$(this).attr("id"),noSyncChecks=false,syncChecks,catAddAfter,taxonomyParts,taxonomy,settingName;taxonomyParts=this_id.split("-");taxonomyParts.shift();taxonomy=taxonomyParts.join("-");settingName=taxonomy+"_tab";if(taxonomy=="category"){settingName="cats"}$("a","#"+taxonomy+"-tabs").click(function(){var t=$(this).attr("href");$(this).parent().addClass("tabs").siblings("li").removeClass("tabs");$("#"+taxonomy+"-tabs").siblings(".tabs-panel").hide();$(t).show();if("#"+taxonomy+"-all"==t){deleteUserSetting(settingName)}else{setUserSetting(settingName,"pop")}return false});if(getUserSetting(settingName)){$('a[href="#'+taxonomy+'-pop"]',"#"+taxonomy+"-tabs").click()}$("#new"+taxonomy).one("focus",function(){$(this).val("").removeClass("form-input-tip")});$("#"+taxonomy+"-add-submit").click(function(){$("#new"+taxonomy).focus()});syncChecks=function(){if(noSyncChecks){return}noSyncChecks=true;var th=jQuery(this),c=th.is(":checked"),id=th.val().toString();$("#in-"+taxonomy+"-"+id+", #in-"+taxonomy+"-category-"+id).attr("checked",c);noSyncChecks=false};catAddBefore=function(s){if(!$("#new"+taxonomy).val()){return false}s.data+="&"+$(":checked","#"+taxonomy+"checklist").serialize();return s};catAddAfter=function(r,s){var sup,drop=$("#new"+taxonomy+"_parent");if("undefined"!=s.parsed.responses[0]&&(sup=s.parsed.responses[0].supplemental.newcat_parent)){drop.before(sup);drop.remove()}};$("#"+taxonomy+"checklist").wpList({alt:"",response:taxonomy+"-ajax-response",addBefore:catAddBefore,addAfter:catAddAfter});$("#"+taxonomy+"-add-toggle").click(function(){$("#"+taxonomy+"-adder").toggleClass("wp-hidden-children");$('a[href="#'+taxonomy+'-all"]',"#"+taxonomy+"-tabs").click();return false});$("#"+taxonomy+"checklist li.popular-category :checkbox, #"+taxonomy+"checklist-pop :checkbox").live("click",function(){var t=$(this),c=t.is(":checked"),id=t.val();if(id&&t.parents("#taxonomy-"+taxonomy).length){$("#in-"+taxonomy+"-"+id+", #in-popular-"+taxonomy+"-"+id).attr("checked",c)}})});if($("#postcustom").length){$("#the-list").wpList({addAfter:function(xml,s){$("table#list-table").show();if(typeof(autosave_update_post_ID)!="undefined"){autosave_update_post_ID(s.parsed.responses[0].supplemental.postid)}},addBefore:function(s){s.data+="&post_id="+$("#post_ID").val();return s}})}if($("#submitdiv").length){stamp=$("#timestamp").html();visibility=$("#post-visibility-display").html();function updateVisibility(){var pvSelect=$("#post-visibility-select");if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false);$("#sticky-span").hide()}else{$("#sticky-span").show()}if($("input:radio:checked",pvSelect).val()!="password"){$("#password-span").hide()}else{$("#password-span").show()}}function updateText(){var attemptedDate,originalDate,currentDate,publishOn,postStatus=$("#post_status"),optPublish=$("option[value=publish]",postStatus),aa=$("#aa").val(),mm=$("#mm").val(),jj=$("#jj").val(),hh=$("#hh").val(),mn=$("#mn").val();attemptedDate=new Date(aa,mm-1,jj,hh,mn);originalDate=new Date($("#hidden_aa").val(),$("#hidden_mm").val()-1,$("#hidden_jj").val(),$("#hidden_hh").val(),$("#hidden_mn").val());currentDate=new Date($("#cur_aa").val(),$("#cur_mm").val()-1,$("#cur_jj").val(),$("#cur_hh").val(),$("#cur_mn").val());if(attemptedDate.getFullYear()!=aa||(1+attemptedDate.getMonth())!=mm||attemptedDate.getDate()!=jj||attemptedDate.getMinutes()!=mn){$(".timestamp-wrap","#timestampdiv").addClass("form-invalid");return false}else{$(".timestamp-wrap","#timestampdiv").removeClass("form-invalid")}if(attemptedDate>currentDate&&$("#original_post_status").val()!="future"){publishOn=postL10n.publishOnFuture;$("#publish").val(postL10n.schedule)}else{if(attemptedDate<=currentDate&&$("#original_post_status").val()!="publish"){publishOn=postL10n.publishOn;$("#publish").val(postL10n.publish)}else{publishOn=postL10n.publishOnPast;if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}}}if(originalDate.toUTCString()==attemptedDate.toUTCString()){$("#timestamp").html(stamp)}else{$("#timestamp").html(publishOn+" <b>"+$("option[value="+$("#mm").val()+"]","#mm").text()+" "+jj+", "+aa+" @ "+hh+":"+mn+"</b> ")}if($("input:radio:checked","#post-visibility-select").val()=="private"){if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}if(optPublish.length==0){postStatus.append('<option value="publish">'+postL10n.privatelyPublished+"</option>")}else{optPublish.html(postL10n.privatelyPublished)}$("option[value=publish]",postStatus).attr("selected",true);$(".edit-post-status","#misc-publishing-actions").hide()}else{if($("#original_post_status").val()=="future"||$("#original_post_status").val()=="draft"){if(optPublish.length){optPublish.remove();postStatus.val($("#hidden_post_status").val())}}else{optPublish.html(postL10n.published)}if(postStatus.is(":hidden")){$(".edit-post-status","#misc-publishing-actions").show()}}$("#post-status-display").html($("option:selected",postStatus).text());if($("option:selected",postStatus).val()=="private"||$("option:selected",postStatus).val()=="publish"){$("#save-post").hide()}else{$("#save-post").show();if($("option:selected",postStatus).val()=="pending"){$("#save-post").show().val(postL10n.savePending)}else{$("#save-post").show().val(postL10n.saveDraft)}}return true}$(".edit-visibility","#visibility").click(function(){if($("#post-visibility-select").is(":hidden")){updateVisibility();$("#post-visibility-select").slideDown("normal");$(this).hide()}return false});$(".cancel-post-visibility","#post-visibility-select").click(function(){$("#post-visibility-select").slideUp("normal");$("#visibility-radio-"+$("#hidden-post-visibility").val()).attr("checked",true);$("#post_password").val($("#hidden_post_password").val());$("#sticky").attr("checked",$("#hidden-post-sticky").attr("checked"));$("#post-visibility-display").html(visibility);$(".edit-visibility","#visibility").show();updateText();return false});$(".save-post-visibility","#post-visibility-select").click(function(){var pvSelect=$("#post-visibility-select");pvSelect.slideUp("normal");$(".edit-visibility","#visibility").show();updateText();if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false)}if(true==$("#sticky").attr("checked")){sticky="Sticky"}else{sticky=""}$("#post-visibility-display").html(postL10n[$("input:radio:checked",pvSelect).val()+sticky]);return false});$("input:radio","#post-visibility-select").change(function(){updateVisibility()});$("#timestampdiv").siblings("a.edit-timestamp").click(function(){if($("#timestampdiv").is(":hidden")){$("#timestampdiv").slideDown("normal");$(this).hide()}return false});$(".cancel-timestamp","#timestampdiv").click(function(){$("#timestampdiv").slideUp("normal");$("#mm").val($("#hidden_mm").val());$("#jj").val($("#hidden_jj").val());$("#aa").val($("#hidden_aa").val());$("#hh").val($("#hidden_hh").val());$("#mn").val($("#hidden_mn").val());$("#timestampdiv").siblings("a.edit-timestamp").show();updateText();return false});$(".save-timestamp","#timestampdiv").click(function(){if(updateText()){$("#timestampdiv").slideUp("normal");$("#timestampdiv").siblings("a.edit-timestamp").show()}return false});$("#post-status-select").siblings("a.edit-post-status").click(function(){if($("#post-status-select").is(":hidden")){$("#post-status-select").slideDown("normal");$(this).hide()}return false});$(".save-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false});$(".cancel-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post_status").val($("#hidden_post_status").val());$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false})}if($("#edit-slug-box").length){editPermalink=function(post_id){var i,c=0,e=$("#editable-post-name"),revert_e=e.html(),real_slug=$("#post_name"),revert_slug=real_slug.val(),b=$("#edit-slug-buttons"),revert_b=b.html(),full=$("#editable-post-name-full").html();$("#view-post-btn").hide();b.html('<a href="#" class="save button">'+postL10n.ok+'</a> <a class="cancel" href="#">'+postL10n.cancel+"</a>");b.children(".save").click(function(){var new_slug=e.children("input").val();$.post(ajaxurl,{action:"sample-permalink",post_id:post_id,new_slug:new_slug,new_title:$("#title").val(),samplepermalinknonce:$("#samplepermalinknonce").val()},function(data){$("#edit-slug-box").html(data);b.html(revert_b);real_slug.attr("value",new_slug);makeSlugeditClickable();$("#view-post-btn").show()});return false});$(".cancel","#edit-slug-buttons").click(function(){$("#view-post-btn").show();e.html(revert_e);b.html(revert_b);real_slug.attr("value",revert_slug);return false});for(i=0;i<full.length;++i){if("%"==full.charAt(i)){c++}}slug_value=(c>full.length/4)?"":full;e.html('<input type="text" id="new-post-slug" value="'+slug_value+'" />').children("input").keypress(function(e){var key=e.keyCode||0;if(13==key){b.children(".save").click();return false}if(27==key){b.children(".cancel").click();return false}real_slug.attr("value",this.value)}).focus()};makeSlugeditClickable=function(){$("#editable-post-name").click(function(){$("#edit-slug-buttons").children(".edit-slug").click()})};makeSlugeditClickable()}}); | var tagBox,commentsBox,editPermalink,makeSlugeditClickable,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail;function array_unique_noempty(a){var out=[];jQuery.each(a,function(key,val){val=jQuery.trim(val);if(val&&jQuery.inArray(val,out)==-1){out.push(val)}});return out}(function($){tagBox={clean:function(tags){return tags.replace(/\s*,\s*/g,",").replace(/,+/g,",").replace(/[,\s]+$/,"").replace(/^[,\s]+/,"")},parseTags:function(el){var id=el.id,num=id.split("-check-num-")[1],taxbox=$(el).closest(".tagsdiv"),thetags=taxbox.find(".the-tags"),current_tags=thetags.val().split(","),new_tags=[];delete current_tags[num];$.each(current_tags,function(key,val){val=$.trim(val);if(val){new_tags.push(val)}});thetags.val(this.clean(new_tags.join(",")));this.quickClicks(taxbox);return false},quickClicks:function(el){var thetags=$(".the-tags",el),tagchecklist=$(".tagchecklist",el),current_tags;if(!thetags.length){return}var disabled=thetags.attr("disabled");current_tags=thetags.val().split(",");tagchecklist.empty();$.each(current_tags,function(key,val){var txt,button_id,id=$(el).attr("id");val=$.trim(val);if(!val.match(/^\s+$/)&&""!=val){button_id=id+"-check-num-"+key;if(disabled){txt="<span>"+val+"</span> "}else{txt='<span><a id="'+button_id+'" class="ntdelbutton">X</a> '+val+"</span> "}tagchecklist.append(txt);if(!disabled){$("#"+button_id).click(function(){tagBox.parseTags(this)})}}})},flushTags:function(el,a,f){a=a||false;var text,tags=$(".the-tags",el),newtag=$("input.newtag",el),newtags;text=a?$(a).text():newtag.val();tagsval=tags.val();newtags=tagsval?tagsval+","+text:text;newtags=this.clean(newtags);newtags=array_unique_noempty(newtags.split(",")).join(",");tags.val(newtags);this.quickClicks(el);if(!a){newtag.val("")}if("undefined"==typeof(f)){newtag.focus()}return false},get:function(id){var tax=id.substr(id.indexOf("-")+1);$.post(ajaxurl,{action:"get-tagcloud",tax:tax},function(r,stat){if(0==r||"success"!=stat){r=wpAjax.broken}r=$('<p id="tagcloud-'+tax+'" class="the-tagcloud">'+r+"</p>");$("a",r).click(function(){tagBox.flushTags($(this).closest(".inside").children(".tagsdiv"),this);return false});$("#"+id).after(r)})},init:function(){var t=this,ajaxtag=$("div.ajaxtag");$(".tagsdiv").each(function(){tagBox.quickClicks(this)});$("input.tagadd",ajaxtag).click(function(){t.flushTags($(this).closest(".tagsdiv"))});$("div.taghint",ajaxtag).click(function(){$(this).css("visibility","hidden").siblings(".newtag").focus()});$("input.newtag",ajaxtag).blur(function(){if(this.value==""){$(this).siblings(".taghint").css("visibility","")}}).focus(function(){$(this).siblings(".taghint").css("visibility","hidden")}).keyup(function(e){if(13==e.which){tagBox.flushTags($(this).closest(".tagsdiv"));return false}}).keypress(function(e){if(13==e.which){e.preventDefault();return false}}).each(function(){var tax=$(this).closest("div.tagsdiv").attr("id");$(this).suggest(ajaxurl+"?action=ajax-tag-search&tax="+tax,{delay:500,minchars:2,multiple:true,multipleSep:", "})});$("#post").submit(function(){$("div.tagsdiv").each(function(){tagBox.flushTags(this,false,1)})});$("a.tagcloud-link").click(function(){tagBox.get($(this).attr("id"));$(this).unbind().click(function(){$(this).siblings(".the-tagcloud").toggle();return false});return false})}};commentsBox={st:0,get:function(total,num){var st=this.st,data;if(!num){num=20}this.st+=num;this.total=total;$("#commentsdiv img.waiting").show();data={action:"get-comments",mode:"single",_ajax_nonce:$("#add_comment_nonce").val(),post_ID:$("#post_ID").val(),start:st,num:num};$.post(ajaxurl,data,function(r){r=wpAjax.parseAjaxResponse(r);$("#commentsdiv .widefat").show();$("#commentsdiv img.waiting").hide();if("object"==typeof r&&r.responses[0]){$("#the-comment-list").append(r.responses[0].data);theList=theExtraList=null;$("a[className*=':']").unbind();setCommentsList();if(commentsBox.st>commentsBox.total){$("#show-comments").hide()}else{$("#show-comments").html(postL10n.showcomm)}return}else{if(1==r){$("#show-comments").parent().html(postL10n.endcomm);return}}$("#the-comment-list").append('<tr><td colspan="2">'+wpAjax.broken+"</td></tr>")});return false}};WPSetThumbnailHTML=function(html){$(".inside","#postimagediv").html(html)};WPSetThumbnailID=function(id){var field=$("input[value=_thumbnail_id]","#list-table");if(field.size()>0){$("#meta\\["+field.attr("id").match(/[0-9]+/)+"\\]\\[value\\]").text(id)}};WPRemoveThumbnail=function(){$.post(ajaxurl,{action:"set-post-thumbnail",post_id:$("#post_ID").val(),thumbnail_id:-1,cookie:encodeURIComponent(document.cookie)},function(str){if(str=="0"){alert(setPostThumbnailL10n.error)}else{WPSetThumbnailHTML(str)}})}})(jQuery);jQuery(document).ready(function($){var stamp,visibility,sticky="";postboxes.add_postbox_toggles(pagenow);if($("#tagsdiv-post_tag").length){tagBox.init()}else{$("#side-sortables, #normal-sortables, #advanced-sortables").children("div.postbox").each(function(){if(this.id.indexOf("tagsdiv-")===0){tagBox.init();return false}})}$(".categorydiv").each(function(){var this_id=$(this).attr("id"),noSyncChecks=false,syncChecks,catAddAfter,taxonomyParts,taxonomy,settingName;taxonomyParts=this_id.split("-");taxonomyParts.shift();taxonomy=taxonomyParts.join("-");settingName=taxonomy+"_tab";if(taxonomy=="category"){settingName="cats"}$("a","#"+taxonomy+"-tabs").click(function(){var t=$(this).attr("href");$(this).parent().addClass("tabs").siblings("li").removeClass("tabs");$("#"+taxonomy+"-tabs").siblings(".tabs-panel").hide();$(t).show();if("#"+taxonomy+"-all"==t){deleteUserSetting(settingName)}else{setUserSetting(settingName,"pop")}return false});if(getUserSetting(settingName)){$('a[href="#'+taxonomy+'-pop"]',"#"+taxonomy+"-tabs").click()}$("#new"+taxonomy).one("focus",function(){$(this).val("").removeClass("form-input-tip")});$("#"+taxonomy+"-add-submit").click(function(){$("#new"+taxonomy).focus()});syncChecks=function(){if(noSyncChecks){return}noSyncChecks=true;var th=jQuery(this),c=th.is(":checked"),id=th.val().toString();$("#in-"+taxonomy+"-"+id+", #in-"+taxonomy+"-category-"+id).attr("checked",c);noSyncChecks=false};catAddBefore=function(s){if(!$("#new"+taxonomy).val()){return false}s.data+="&"+$(":checked","#"+taxonomy+"checklist").serialize();return s};catAddAfter=function(r,s){var sup,drop=$("#new"+taxonomy+"_parent");if("undefined"!=s.parsed.responses[0]&&(sup=s.parsed.responses[0].supplemental.newcat_parent)){drop.before(sup);drop.remove()}};$("#"+taxonomy+"checklist").wpList({alt:"",response:taxonomy+"-ajax-response",addBefore:catAddBefore,addAfter:catAddAfter});$("#"+taxonomy+"-add-toggle").click(function(){$("#"+taxonomy+"-adder").toggleClass("wp-hidden-children");$('a[href="#'+taxonomy+'-all"]',"#"+taxonomy+"-tabs").click();return false});$("#"+taxonomy+"checklist li.popular-category :checkbox, #"+taxonomy+"checklist-pop :checkbox").live("click",function(){var t=$(this),c=t.is(":checked"),id=t.val();if(id&&t.parents("#taxonomy-"+taxonomy).length){$("#in-"+taxonomy+"-"+id+", #in-popular-"+taxonomy+"-"+id).attr("checked",c)}})});if($("#postcustom").length){$("#the-list").wpList({addAfter:function(xml,s){$("table#list-table").show();if(typeof(autosave_update_post_ID)!="undefined"){autosave_update_post_ID(s.parsed.responses[0].supplemental.postid)}},addBefore:function(s){s.data+="&post_id="+$("#post_ID").val();return s}})}if($("#submitdiv").length){stamp=$("#timestamp").html();visibility=$("#post-visibility-display").html();function updateVisibility(){var pvSelect=$("#post-visibility-select");if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false);$("#sticky-span").hide()}else{$("#sticky-span").show()}if($("input:radio:checked",pvSelect).val()!="password"){$("#password-span").hide()}else{$("#password-span").show()}}function updateText(){var attemptedDate,originalDate,currentDate,publishOn,postStatus=$("#post_status"),optPublish=$("option[value=publish]",postStatus),aa=$("#aa").val(),mm=$("#mm").val(),jj=$("#jj").val(),hh=$("#hh").val(),mn=$("#mn").val();attemptedDate=new Date(aa,mm-1,jj,hh,mn);originalDate=new Date($("#hidden_aa").val(),$("#hidden_mm").val()-1,$("#hidden_jj").val(),$("#hidden_hh").val(),$("#hidden_mn").val());currentDate=new Date($("#cur_aa").val(),$("#cur_mm").val()-1,$("#cur_jj").val(),$("#cur_hh").val(),$("#cur_mn").val());if(attemptedDate.getFullYear()!=aa||(1+attemptedDate.getMonth())!=mm||attemptedDate.getDate()!=jj||attemptedDate.getMinutes()!=mn){$(".timestamp-wrap","#timestampdiv").addClass("form-invalid");return false}else{$(".timestamp-wrap","#timestampdiv").removeClass("form-invalid")}if(attemptedDate>currentDate&&$("#original_post_status").val()!="future"){publishOn=postL10n.publishOnFuture;$("#publish").val(postL10n.schedule)}else{if(attemptedDate<=currentDate&&$("#original_post_status").val()!="publish"){publishOn=postL10n.publishOn;$("#publish").val(postL10n.publish)}else{publishOn=postL10n.publishOnPast;if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}}}if(originalDate.toUTCString()==attemptedDate.toUTCString()){$("#timestamp").html(stamp)}else{$("#timestamp").html(publishOn+" <b>"+$("option[value="+$("#mm").val()+"]","#mm").text()+" "+jj+", "+aa+" @ "+hh+":"+mn+"</b> ")}if($("input:radio:checked","#post-visibility-select").val()=="private"){if(page){$("#publish").val(postL10n.updatePage)}else{$("#publish").val(postL10n.updatePost)}if(optPublish.length==0){postStatus.append('<option value="publish">'+postL10n.privatelyPublished+"</option>")}else{optPublish.html(postL10n.privatelyPublished)}$("option[value=publish]",postStatus).attr("selected",true);$(".edit-post-status","#misc-publishing-actions").hide()}else{if($("#original_post_status").val()=="future"||$("#original_post_status").val()=="draft"){if(optPublish.length){optPublish.remove();postStatus.val($("#hidden_post_status").val())}}else{optPublish.html(postL10n.published)}if(postStatus.is(":hidden")){$(".edit-post-status","#misc-publishing-actions").show()}}$("#post-status-display").html($("option:selected",postStatus).text());if($("option:selected",postStatus).val()=="private"||$("option:selected",postStatus).val()=="publish"){$("#save-post").hide()}else{$("#save-post").show();if($("option:selected",postStatus).val()=="pending"){$("#save-post").show().val(postL10n.savePending)}else{$("#save-post").show().val(postL10n.saveDraft)}}return true}$(".edit-visibility","#visibility").click(function(){if($("#post-visibility-select").is(":hidden")){updateVisibility();$("#post-visibility-select").slideDown("normal");$(this).hide()}return false});$(".cancel-post-visibility","#post-visibility-select").click(function(){$("#post-visibility-select").slideUp("normal");$("#visibility-radio-"+$("#hidden-post-visibility").val()).attr("checked",true);$("#post_password").val($("#hidden_post_password").val());$("#sticky").attr("checked",$("#hidden-post-sticky").attr("checked"));$("#post-visibility-display").html(visibility);$(".edit-visibility","#visibility").show();updateText();return false});$(".save-post-visibility","#post-visibility-select").click(function(){var pvSelect=$("#post-visibility-select");pvSelect.slideUp("normal");$(".edit-visibility","#visibility").show();updateText();if($("input:radio:checked",pvSelect).val()!="public"){$("#sticky").attr("checked",false)}if(true==$("#sticky").attr("checked")){sticky="Sticky"}else{sticky=""}$("#post-visibility-display").html(postL10n[$("input:radio:checked",pvSelect).val()+sticky]);return false});$("input:radio","#post-visibility-select").change(function(){updateVisibility()});$("#timestampdiv").siblings("a.edit-timestamp").click(function(){if($("#timestampdiv").is(":hidden")){$("#timestampdiv").slideDown("normal");$(this).hide()}return false});$(".cancel-timestamp","#timestampdiv").click(function(){$("#timestampdiv").slideUp("normal");$("#mm").val($("#hidden_mm").val());$("#jj").val($("#hidden_jj").val());$("#aa").val($("#hidden_aa").val());$("#hh").val($("#hidden_hh").val());$("#mn").val($("#hidden_mn").val());$("#timestampdiv").siblings("a.edit-timestamp").show();updateText();return false});$(".save-timestamp","#timestampdiv").click(function(){if(updateText()){$("#timestampdiv").slideUp("normal");$("#timestampdiv").siblings("a.edit-timestamp").show()}return false});$("#post-status-select").siblings("a.edit-post-status").click(function(){if($("#post-status-select").is(":hidden")){$("#post-status-select").slideDown("normal");$(this).hide()}return false});$(".save-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false});$(".cancel-post-status","#post-status-select").click(function(){$("#post-status-select").slideUp("normal");$("#post_status").val($("#hidden_post_status").val());$("#post-status-select").siblings("a.edit-post-status").show();updateText();return false})}if($("#edit-slug-box").length){editPermalink=function(post_id){var i,c=0,e=$("#editable-post-name"),revert_e=e.html(),real_slug=$("#post_name"),revert_slug=real_slug.html(),b=$("#edit-slug-buttons"),revert_b=b.html(),full=$("#editable-post-name-full").html();$("#view-post-btn").hide();b.html('<a href="#" class="save button">'+postL10n.ok+'</a> <a class="cancel" href="#">'+postL10n.cancel+"</a>");b.children(".save").click(function(){var new_slug=e.children("input").val();$.post(ajaxurl,{action:"sample-permalink",post_id:post_id,new_slug:new_slug,new_title:$("#title").val(),samplepermalinknonce:$("#samplepermalinknonce").val()},function(data){$("#edit-slug-box").html(data);b.html(revert_b);real_slug.attr("value",new_slug);makeSlugeditClickable();$("#view-post-btn").show()});return false});$(".cancel","#edit-slug-buttons").click(function(){$("#view-post-btn").show();e.html(revert_e);b.html(revert_b);real_slug.attr("value",revert_slug);return false});for(i=0;i<full.length;++i){if("%"==full.charAt(i)){c++}}slug_value=(c>full.length/4)?"":full;e.html('<input type="text" id="new-post-slug" value="'+slug_value+'" />').children("input").keypress(function(e){var key=e.keyCode||0;if(13==key){b.children(".save").click();return false}if(27==key){b.children(".cancel").click();return false}real_slug.attr("value",this.value)}).focus()};makeSlugeditClickable=function(){$("#editable-post-name").click(function(){$("#edit-slug-buttons").children(".edit-slug").click()})};makeSlugeditClickable()}}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/51dac4a8c61f888c09dbd51ddc3a2c502be79491/post.js/clean/wp-admin/js/post.js |
var topWin=window.dialogArguments||opener||parent||top;function fileDialogStart(){jQuery("#media-upload-error").empty()}function fileQueued(a){jQuery(".media-blank").remove();if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".describe-toggle-on").show();jQuery(".describe-toggle-off").hide();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery("#media-items").append('<div id="media-item-'+a.id+'" class="media-item child-of-'+post_id+'"><div class="progress"><div class="bar"></div></div><div class="filename original"><span class="percent"></span> '+a.name+"</div></div>");jQuery(".progress","#media-item-"+a.id).show();jQuery("#insert-gallery").attr("disabled","disabled");jQuery("#cancel-upload").attr("disabled","")}function uploadStart(a){try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}}catch(b){}return true}function uploadProgress(e,b,d){var a=jQuery("#media-items").width()-2,c=jQuery("#media-item-"+e.id);jQuery(".bar",c).width(a*b/d);jQuery(".percent",c).html(Math.ceil(b/d*100)+"%");if(b==d){jQuery(".bar",c).html('<strong class="crunching">'+swfuploadL10n.crunching+"</strong>")}}function prepareMediaItem(c,a){var d=(typeof shortform=="undefined")?1:2,b=jQuery("#media-item-"+c.id);jQuery(".bar",b).remove();jQuery(".progress",b).hide();try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}}catch(g){}if(isNaN(a)||!a){b.append(a);prepareMediaItemInit(c)}else{b.load("async-upload.php",{attachment_id:a,fetch:d},function(){prepareMediaItemInit(c);updateMediaForm()})}}function prepareMediaItemInit(b){var a=jQuery("#media-item-"+b.id);jQuery(".thumbnail",a).clone().attr("className","pinkynail toggle").prependTo(a);jQuery(".filename.original",a).replaceWith(jQuery(".filename.new",a));jQuery("a.toggle",a).click(function(){jQuery(this).siblings(".slidetoggle").slideToggle(350,function(){var d=jQuery(window).height(),e=jQuery(this).offset().top,f=jQuery(this).height(),c;if(d&&e&&f){c=e+f;if(c>d&&(f+48)<d){window.scrollBy(0,c-d+13)}else{if(c>d){window.scrollTo(0,e-36)}}}});jQuery(this).siblings(".toggle").andSelf().toggle();jQuery(this).siblings("a.toggle").focus();return false});jQuery("a.delete",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",success:deleteSuccess,error:deleteError,id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}});return false});jQuery("a.undo",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(d,e){var c=jQuery("#media-item-"+b.id);if(type=jQuery("#type-of-"+b.id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-0+1)}if(c.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-0+1)}jQuery(".filename .trashnotice",c).remove();jQuery(".filename .title",c).css("font-weight","normal");jQuery("a.undo",c).addClass("hidden");jQuery("a.describe-toggle-on, .menu_order_input",c).show();c.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:false,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}});return false});jQuery("#media-item-"+b.id+".startopen").removeClass("startopen").slideToggle(500).siblings(".toggle").toggle()}function itemAjaxError(c,b){var a=jQuery("#media-item-error"+c);a.html('<div class="file-error"><button type="button" id="dismiss-'+c+'" class="button dismiss">'+swfuploadL10n.dismiss+"</button>"+b+"</div>");jQuery("#dismiss-"+c).click(function(){jQuery(this).parents(".file-error").slideUp(200,function(){jQuery(this).empty()})})}function deleteSuccess(b,d){if(b=="-1"){return itemAjaxError(this.id,"You do not have permission. Has your session expired?")}if(b=="0"){return itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?")}var c=this.id,a=jQuery("#media-item-"+c);if(type=jQuery("#type-of-"+c).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-1)}if(a.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1)}if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".toggle").toggle();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery(".toggle",a).toggle();jQuery(".slidetoggle",a).slideUp(200).siblings().removeClass("hidden");a.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:false,duration:500}).addClass("undo");jQuery(".filename:empty",a).remove();jQuery(".filename .title",a).css("font-weight","bold");jQuery(".filename",a).append('<span class="trashnotice"> '+swfuploadL10n.deleted+" </span>").siblings("a.toggle").hide();jQuery(".filename",a).append(jQuery("a.undo",a).removeClass("hidden"));jQuery(".menu_order_input",a).hide();return}function deleteError(c,b,a){}function updateMediaForm(){var b=jQuery("form.type-form #media-items").children(),a=jQuery("#media-items").children();if(b.length==1){jQuery(".slidetoggle",b).slideDown(500).siblings().addClass("hidden").filter(".toggle").toggle()}if(a.not(".media-blank").length>0){jQuery(".savebutton").show()}else{jQuery(".savebutton").hide()}if(a.length>1){jQuery(".insert-gallery").show()}else{jQuery(".insert-gallery").hide()}}function uploadSuccess(b,a){if(a.match("media-upload-error")){jQuery("#media-item-"+b.id).html(a);return}prepareMediaItem(b,a);updateMediaForm();if(jQuery("#media-item-"+b.id).hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(1*jQuery("#attachments-count").text()+1)}}function uploadComplete(a){if(swfu.getStats().files_queued==0){jQuery("#cancel-upload").attr("disabled","disabled");jQuery("#insert-gallery").attr("disabled","")}}function wpQueueError(a){jQuery("#media-upload-error").show().text(a)}function wpFileError(b,a){jQuery("#media-item-"+b.id+" .filename").after('<div class="file-error"><button type="button" id="dismiss-'+b.id+'" class="button dismiss">'+swfuploadL10n.dismiss+"</button>"+a+"</div>").siblings(".toggle").remove();jQuery("#dismiss-"+b.id).click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function fileQueueError(c,a,b){if(a==SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){wpQueueError(swfuploadL10n.queue_limit_exceeded)}else{if(a==SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT){fileQueued(c);wpFileError(c,swfuploadL10n.file_exceeds_size_limit)}else{if(a==SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE){fileQueued(c);wpFileError(c,swfuploadL10n.zero_byte_file)}else{if(a==SWFUpload.QUEUE_ERROR.INVALID_FILETYPE){fileQueued(c);wpFileError(c,swfuploadL10n.invalid_filetype)}else{wpQueueError(swfuploadL10n.default_error)}}}}}function fileDialogComplete(b){try{if(b>0){this.startUpload()}}catch(a){this.debug(a)}}function switchUploader(b){var c=document.getElementById(swfu.customSettings.swfupload_element_id),a=document.getElementById(swfu.customSettings.degraded_element_id);if(b){c.style.display="block";a.style.display="none"}else{c.style.display="none";a.style.display="block"}}function swfuploadPreLoad(){if(!uploaderMode){switchUploader(1)}else{switchUploader(0)}}function swfuploadLoadFailed(){switchUploader(0);jQuery(".upload-html-bypass").hide()}function uploadError(b,c,a){switch(c){case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:wpFileError(b,swfuploadL10n.missing_upload_url);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:wpFileError(b,swfuploadL10n.upload_limit_exceeded);break;case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:wpQueueError(swfuploadL10n.http_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:wpQueueError(swfuploadL10n.upload_failed);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:wpQueueError(swfuploadL10n.io_error);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:wpQueueError(swfuploadL10n.security_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:jQuery("#media-item-"+b.id).remove();break;default:wpFileError(b,swfuploadL10n.default_error)}}function cancelUpload(){swfu.cancelQueue()}jQuery(document).ready(function(a){a('input[type="radio"]',"#media-items").live("click",function(){var b=a(this).closest("tr");if(a(b).hasClass("align")){setUserSetting("align",a(this).val())}else{if(a(b).hasClass("image-size")){setUserSetting("imgsize",a(this).val())}}});a("button.button","#media-items").live("click",function(){var b=this.className||"";b=b.match(/url([^ '"]+)/);if(b&&b[1]){setUserSetting("urlbutton",b[1]);a(this).siblings(".urlfield").val(a(this).attr("title"))}})}); | var topWin=window.dialogArguments||opener||parent||top;function fileDialogStart(){jQuery("#media-upload-error").empty()}function fileQueued(fileObj){jQuery(".media-blank").remove();if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".describe-toggle-on").show();jQuery(".describe-toggle-off").hide();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery("#media-items").append('<div id="media-item-'+fileObj.id+'" class="media-item child-of-'+post_id+'"><div class="progress"><div class="bar"></div></div><div class="filename original"><span class="percent"></span> '+fileObj.name+"</div></div>");jQuery(".progress","#media-item-"+fileObj.id).show();jQuery("#insert-gallery").attr("disabled","disabled");jQuery("#cancel-upload").attr("disabled","")}function uploadStart(fileObj){try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}}catch(e){}return true}function uploadProgress(fileObj,bytesDone,bytesTotal){var w=jQuery("#media-items").width()-2,item=jQuery("#media-item-"+fileObj.id);jQuery(".bar",item).width(w*bytesDone/bytesTotal);jQuery(".percent",item).html(Math.ceil(bytesDone/bytesTotal*100)+"%");if(bytesDone==bytesTotal){jQuery(".bar",item).html('<strong class="crunching">'+swfuploadL10n.crunching+"</strong>")}}function prepareMediaItem(fileObj,serverData){var f=(typeof shortform=="undefined")?1:2,item=jQuery("#media-item-"+fileObj.id);jQuery(".bar",item).remove();jQuery(".progress",item).hide();try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}}catch(e){}if(isNaN(serverData)||!serverData){item.append(serverData);prepareMediaItemInit(fileObj)}else{item.load("async-upload.php",{attachment_id:serverData,fetch:f},function(){prepareMediaItemInit(fileObj);updateMediaForm()})}}function prepareMediaItemInit(fileObj){var item=jQuery("#media-item-"+fileObj.id);jQuery(".thumbnail",item).clone().attr("className","pinkynail toggle").prependTo(item);jQuery(".filename.original",item).replaceWith(jQuery(".filename.new",item));jQuery("a.toggle",item).click(function(){jQuery(this).siblings(".slidetoggle").slideToggle(350,function(){var w=jQuery(window).height(),t=jQuery(this).offset().top,h=jQuery(this).height(),b;if(w&&t&&h){b=t+h;if(b>w&&(h+48)<w){window.scrollBy(0,b-w+13)}else{if(b>w){window.scrollTo(0,t-36)}}}});jQuery(this).siblings(".toggle").andSelf().toggle();jQuery(this).siblings("a.toggle").focus();return false});jQuery("a.delete",item).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",success:deleteSuccess,error:deleteError,id:fileObj.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}});return false});jQuery("a.undo",item).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",id:fileObj.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(data,textStatus){var item=jQuery("#media-item-"+fileObj.id);if(type=jQuery("#type-of-"+fileObj.id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-0+1)}if(item.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-0+1)}jQuery(".filename .trashnotice",item).remove();jQuery(".filename .title",item).css("font-weight","normal");jQuery("a.undo",item).addClass("hidden");jQuery("a.describe-toggle-on, .menu_order_input",item).show();item.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:false,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}});return false});jQuery("#media-item-"+fileObj.id+".startopen").removeClass("startopen").slideToggle(500).siblings(".toggle").toggle()}function itemAjaxError(id,html){var item=jQuery("#media-item-"+id);var filename=jQuery(".filename",item).text();item.html('<div class="error-div"><a class="dismiss" href="#">'+swfuploadL10n.dismiss+"</a><strong>"+swfuploadL10n.error_uploading.replace("%s",filename)+"</strong><br />"+html+"</div>");item.find("a.dismiss").click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function deleteSuccess(data,textStatus){if(data=="-1"){return itemAjaxError(this.id,"You do not have permission. Has your session expired?")}if(data=="0"){return itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?")}var id=this.id,item=jQuery("#media-item-"+id);if(type=jQuery("#type-of-"+id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-1)}if(item.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1)}if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".toggle").toggle();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery(".toggle",item).toggle();jQuery(".slidetoggle",item).slideUp(200).siblings().removeClass("hidden");item.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:false,duration:500}).addClass("undo");jQuery(".filename:empty",item).remove();jQuery(".filename .title",item).css("font-weight","bold");jQuery(".filename",item).append('<span class="trashnotice"> '+swfuploadL10n.deleted+" </span>").siblings("a.toggle").hide();jQuery(".filename",item).append(jQuery("a.undo",item).removeClass("hidden"));jQuery(".menu_order_input",item).hide();return}function deleteError(X,textStatus,errorThrown){}function updateMediaForm(){var one=jQuery("form.type-form #media-items").children(),items=jQuery("#media-items").children();if(one.length==1){jQuery(".slidetoggle",one).slideDown(500).siblings().addClass("hidden").filter(".toggle").toggle()}if(items.not(".media-blank").length>0){jQuery(".savebutton").show()}else{jQuery(".savebutton").hide()}if(items.length>1){jQuery(".insert-gallery").show()}else{jQuery(".insert-gallery").hide()}}function uploadSuccess(fileObj,serverData){if(serverData.match("media-upload-error")){jQuery("#media-item-"+fileObj.id).html(serverData);return}prepareMediaItem(fileObj,serverData);updateMediaForm();if(jQuery("#media-item-"+fileObj.id).hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(1*jQuery("#attachments-count").text()+1)}}function uploadComplete(fileObj){if(swfu.getStats().files_queued==0){jQuery("#cancel-upload").attr("disabled","disabled");jQuery("#insert-gallery").attr("disabled","")}}function wpQueueError(message){jQuery("#media-upload-error").show().text(message)}function wpFileError(fileObj,message){var item=jQuery("#media-item-"+fileObj.id);var filename=jQuery(".filename",item).text();item.html('<div class="error-div"><a class="dismiss" href="#">'+swfuploadL10n.dismiss+"</a><strong>"+swfuploadL10n.error_uploading.replace("%s",filename)+"</strong><br />"+message+"</div>");item.find("a.dismiss").click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function fileQueueError(fileObj,error_code,message){if(error_code==SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){wpQueueError(swfuploadL10n.queue_limit_exceeded)}else{if(error_code==SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT){fileQueued(fileObj);wpFileError(fileObj,swfuploadL10n.file_exceeds_size_limit)}else{if(error_code==SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE){fileQueued(fileObj);wpFileError(fileObj,swfuploadL10n.zero_byte_file)}else{if(error_code==SWFUpload.QUEUE_ERROR.INVALID_FILETYPE){fileQueued(fileObj);wpFileError(fileObj,swfuploadL10n.invalid_filetype)}else{wpQueueError(swfuploadL10n.default_error)}}}}}function fileDialogComplete(num_files_queued){try{if(num_files_queued>0){this.startUpload()}}catch(ex){this.debug(ex)}}function switchUploader(s){var f=document.getElementById(swfu.customSettings.swfupload_element_id),h=document.getElementById(swfu.customSettings.degraded_element_id);if(s){f.style.display="block";h.style.display="none"}else{f.style.display="none";h.style.display="block"}}function swfuploadPreLoad(){if(!uploaderMode){switchUploader(1)}else{switchUploader(0)}}function swfuploadLoadFailed(){switchUploader(0);jQuery(".upload-html-bypass").hide()}function uploadError(fileObj,errorCode,message){switch(errorCode){case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:wpFileError(fileObj,swfuploadL10n.missing_upload_url);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:wpFileError(fileObj,swfuploadL10n.upload_limit_exceeded);break;case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:wpQueueError(swfuploadL10n.http_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:wpQueueError(swfuploadL10n.upload_failed);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:wpQueueError(swfuploadL10n.io_error);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:wpQueueError(swfuploadL10n.security_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:jQuery("#media-item-"+fileObj.id).remove();break;default:wpFileError(fileObj,swfuploadL10n.default_error)}}function cancelUpload(){swfu.cancelQueue()}jQuery(document).ready(function($){$('input[type="radio"]',"#media-items").live("click",function(){var tr=$(this).closest("tr");if($(tr).hasClass("align")){setUserSetting("align",$(this).val())}else{if($(tr).hasClass("image-size")){setUserSetting("imgsize",$(this).val())}}});$("button.button","#media-items").live("click",function(){var c=this.className||"";c=c.match(/url([^ '"]+)/);if(c&&c[1]){setUserSetting("urlbutton",c[1]);$(this).siblings(".urlfield").val($(this).attr("title"))}})}); | var topWin=window.dialogArguments||opener||parent||top;function fileDialogStart(){jQuery("#media-upload-error").empty()}function fileQueued(a){jQuery(".media-blank").remove();if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".describe-toggle-on").show();jQuery(".describe-toggle-off").hide();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery("#media-items").append('<div id="media-item-'+a.id+'" class="media-item child-of-'+post_id+'"><div class="progress"><div class="bar"></div></div><div class="filename original"><span class="percent"></span> '+a.name+"</div></div>");jQuery(".progress","#media-item-"+a.id).show();jQuery("#insert-gallery").attr("disabled","disabled");jQuery("#cancel-upload").attr("disabled","")}function uploadStart(a){try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}}catch(b){}return true}function uploadProgress(e,b,d){var a=jQuery("#media-items").width()-2,c=jQuery("#media-item-"+e.id);jQuery(".bar",c).width(a*b/d);jQuery(".percent",c).html(Math.ceil(b/d*100)+"%");if(b==d){jQuery(".bar",c).html('<strong class="crunching">'+swfuploadL10n.crunching+"</strong>")}}function prepareMediaItem(c,a){var d=(typeof shortform=="undefined")?1:2,b=jQuery("#media-item-"+c.id);jQuery(".bar",b).remove();jQuery(".progress",b).hide();try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}}catch(g){}if(isNaN(a)||!a){b.append(a);prepareMediaItemInit(c)}else{b.load("async-upload.php",{attachment_id:a,fetch:d},function(){prepareMediaItemInit(c);updateMediaForm()})}}function prepareMediaItemInit(b){var a=jQuery("#media-item-"+b.id);jQuery(".thumbnail",a).clone().attr("className","pinkynail toggle").prependTo(a);jQuery(".filename.original",a).replaceWith(jQuery(".filename.new",a));jQuery("a.toggle",a).click(function(){jQuery(this).siblings(".slidetoggle").slideToggle(350,function(){var d=jQuery(window).height(),e=jQuery(this).offset().top,f=jQuery(this).height(),c;if(d&&e&&f){c=e+f;if(c>d&&(f+48)<d){window.scrollBy(0,c-d+13)}else{if(c>d){window.scrollTo(0,e-36)}}}});jQuery(this).siblings(".toggle").andSelf().toggle();jQuery(this).siblings("a.toggle").focus();return false});jQuery("a.delete",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",success:deleteSuccess,error:deleteError,id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}});return false});jQuery("a.undo",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(d,e){var c=jQuery("#media-item-"+b.id);if(type=jQuery("#type-of-"+b.id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-0+1)}if(c.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-0+1)}jQuery(".filename .trashnotice",c).remove();jQuery(".filename .title",c).css("font-weight","normal");jQuery("a.undo",c).addClass("hidden");jQuery("a.describe-toggle-on, .menu_order_input",c).show();c.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:false,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}});return false});jQuery("#media-item-"+b.id+".startopen").removeClass("startopen").slideToggle(500).siblings(".toggle").toggle()}function itemAjaxError(c,b){var a=jQuery("#media-item-error"+c);a.html('<div class="file-error"><button type="button" id="dismiss-'+c+'" class="button dismiss">'+swfuploadL10n.dismiss+"</button>"+b+"</div>");jQuery("#dismiss-"+c).click(function(){jQuery(this).parents(".file-error").slideUp(200,function(){jQuery(this).empty()})})}function deleteSuccess(b,d){if(b=="-1"){return itemAjaxError(this.id,"You do not have permission. Has your session expired?")}if(b=="0"){return itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?")}var c=this.id,a=jQuery("#media-item-"+c);if(type=jQuery("#type-of-"+c).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-1)}if(a.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1)}if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".toggle").toggle();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery(".toggle",a).toggle();jQuery(".slidetoggle",a).slideUp(200).siblings().removeClass("hidden");a.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:false,duration:500}).addClass("undo");jQuery(".filename:empty",a).remove();jQuery(".filename .title",a).css("font-weight","bold");jQuery(".filename",a).append('<span class="trashnotice"> '+swfuploadL10n.deleted+" </span>").siblings("a.toggle").hide();jQuery(".filename",a).append(jQuery("a.undo",a).removeClass("hidden"));jQuery(".menu_order_input",a).hide();return}function deleteError(c,b,a){}function updateMediaForm(){var b=jQuery("form.type-form #media-items").children(),a=jQuery("#media-items").children();if(b.length==1){jQuery(".slidetoggle",b).slideDown(500).siblings().addClass("hidden").filter(".toggle").toggle()}if(a.not(".media-blank").length>0){jQuery(".savebutton").show()}else{jQuery(".savebutton").hide()}if(a.length>1){jQuery(".insert-gallery").show()}else{jQuery(".insert-gallery").hide()}}function uploadSuccess(b,a){if(a.match("media-upload-error")){jQuery("#media-item-"+b.id).html(a);return}prepareMediaItem(b,a);updateMediaForm();if(jQuery("#media-item-"+b.id).hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(1*jQuery("#attachments-count").text()+1)}}function uploadComplete(a){if(swfu.getStats().files_queued==0){jQuery("#cancel-upload").attr("disabled","disabled");jQuery("#insert-gallery").attr("disabled","")}}function wpQueueError(a){jQuery("#media-upload-error").show().text(a)}function wpFileError(b,a){jQuery("#media-item-"+b.id+" .filename").after('<div class="file-error"><button type="button" id="dismiss-'+b.id+'" class="button dismiss">'+swfuploadL10n.dismiss+"</button>"+a+"</div>").siblings(".toggle").remove();jQuery("#dismiss-"+b.id).click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function fileQueueError(c,a,b){if(a==SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){wpQueueError(swfuploadL10n.queue_limit_exceeded)}else{if(a==SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT){fileQueued(c);wpFileError(c,swfuploadL10n.file_exceeds_size_limit)}else{if(a==SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE){fileQueued(c);wpFileError(c,swfuploadL10n.zero_byte_file)}else{if(a==SWFUpload.QUEUE_ERROR.INVALID_FILETYPE){fileQueued(c);wpFileError(c,swfuploadL10n.invalid_filetype)}else{wpQueueError(swfuploadL10n.default_error)}}}}}function fileDialogComplete(b){try{if(b>0){this.startUpload()}}catch(a){this.debug(a)}}function switchUploader(b){var c=document.getElementById(swfu.customSettings.swfupload_element_id),a=document.getElementById(swfu.customSettings.degraded_element_id);if(b){c.style.display="block";a.style.display="none"}else{c.style.display="none";a.style.display="block"}}function swfuploadPreLoad(){if(!uploaderMode){switchUploader(1)}else{switchUploader(0)}}function swfuploadLoadFailed(){switchUploader(0);jQuery(".upload-html-bypass").hide()}function uploadError(b,c,a){switch(c){case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:wpFileError(b,swfuploadL10n.missing_upload_url);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:wpFileError(b,swfuploadL10n.upload_limit_exceeded);break;case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:wpQueueError(swfuploadL10n.http_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:wpQueueError(swfuploadL10n.upload_failed);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:wpQueueError(swfuploadL10n.io_error);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:wpQueueError(swfuploadL10n.security_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:jQuery("#media-item-"+b.id).remove();break;default:wpFileError(b,swfuploadL10n.default_error)}}function cancelUpload(){swfu.cancelQueue()}jQuery(document).ready(function(a){a('input[type="radio"]',"#media-items").live("click",function(){var b=a(this).closest("tr");if(a(b).hasClass("align")){setUserSetting("align",a(this).val())}else{if(a(b).hasClass("image-size")){setUserSetting("imgsize",a(this).val())}}});a("button.button","#media-items").live("click",function(){var b=this.className||"";b=b.match(/url([^ '"]+)/);if(b&&b[1]){setUserSetting("urlbutton",b[1]);a(this).siblings(".urlfield").val(a(this).attr("title"))}})}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/89eab4f3b7e096f5a350344e2ef3bbeca9e3b161/handlers.js/buggy/wp-includes/js/swfupload/handlers.js |
var topWin=window.dialogArguments||opener||parent||top;function fileDialogStart(){jQuery("#media-upload-error").empty()}function fileQueued(a){jQuery(".media-blank").remove();if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".describe-toggle-on").show();jQuery(".describe-toggle-off").hide();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery("#media-items").append('<div id="media-item-'+a.id+'" class="media-item child-of-'+post_id+'"><div class="progress"><div class="bar"></div></div><div class="filename original"><span class="percent"></span> '+a.name+"</div></div>");jQuery(".progress","#media-item-"+a.id).show();jQuery("#insert-gallery").attr("disabled","disabled");jQuery("#cancel-upload").attr("disabled","")}function uploadStart(a){try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}}catch(b){}return true}function uploadProgress(e,b,d){var a=jQuery("#media-items").width()-2,c=jQuery("#media-item-"+e.id);jQuery(".bar",c).width(a*b/d);jQuery(".percent",c).html(Math.ceil(b/d*100)+"%");if(b==d){jQuery(".bar",c).html('<strong class="crunching">'+swfuploadL10n.crunching+"</strong>")}}function prepareMediaItem(c,a){var d=(typeof shortform=="undefined")?1:2,b=jQuery("#media-item-"+c.id);jQuery(".bar",b).remove();jQuery(".progress",b).hide();try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}}catch(g){}if(isNaN(a)||!a){b.append(a);prepareMediaItemInit(c)}else{b.load("async-upload.php",{attachment_id:a,fetch:d},function(){prepareMediaItemInit(c);updateMediaForm()})}}function prepareMediaItemInit(b){var a=jQuery("#media-item-"+b.id);jQuery(".thumbnail",a).clone().attr("className","pinkynail toggle").prependTo(a);jQuery(".filename.original",a).replaceWith(jQuery(".filename.new",a));jQuery("a.toggle",a).click(function(){jQuery(this).siblings(".slidetoggle").slideToggle(350,function(){var d=jQuery(window).height(),e=jQuery(this).offset().top,f=jQuery(this).height(),c;if(d&&e&&f){c=e+f;if(c>d&&(f+48)<d){window.scrollBy(0,c-d+13)}else{if(c>d){window.scrollTo(0,e-36)}}}});jQuery(this).siblings(".toggle").andSelf().toggle();jQuery(this).siblings("a.toggle").focus();return false});jQuery("a.delete",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",success:deleteSuccess,error:deleteError,id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}});return false});jQuery("a.undo",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(d,e){var c=jQuery("#media-item-"+b.id);if(type=jQuery("#type-of-"+b.id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-0+1)}if(c.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-0+1)}jQuery(".filename .trashnotice",c).remove();jQuery(".filename .title",c).css("font-weight","normal");jQuery("a.undo",c).addClass("hidden");jQuery("a.describe-toggle-on, .menu_order_input",c).show();c.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:false,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}});return false});jQuery("#media-item-"+b.id+".startopen").removeClass("startopen").slideToggle(500).siblings(".toggle").toggle()}function itemAjaxError(c,b){var a=jQuery("#media-item-error"+c);a.html('<div class="file-error"><button type="button" id="dismiss-'+c+'" class="button dismiss">'+swfuploadL10n.dismiss+"</button>"+b+"</div>");jQuery("#dismiss-"+c).click(function(){jQuery(this).parents(".file-error").slideUp(200,function(){jQuery(this).empty()})})}function deleteSuccess(b,d){if(b=="-1"){return itemAjaxError(this.id,"You do not have permission. Has your session expired?")}if(b=="0"){return itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?")}var c=this.id,a=jQuery("#media-item-"+c);if(type=jQuery("#type-of-"+c).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-1)}if(a.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1)}if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".toggle").toggle();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery(".toggle",a).toggle();jQuery(".slidetoggle",a).slideUp(200).siblings().removeClass("hidden");a.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:false,duration:500}).addClass("undo");jQuery(".filename:empty",a).remove();jQuery(".filename .title",a).css("font-weight","bold");jQuery(".filename",a).append('<span class="trashnotice"> '+swfuploadL10n.deleted+" </span>").siblings("a.toggle").hide();jQuery(".filename",a).append(jQuery("a.undo",a).removeClass("hidden"));jQuery(".menu_order_input",a).hide();return}function deleteError(c,b,a){}function updateMediaForm(){var b=jQuery("form.type-form #media-items").children(),a=jQuery("#media-items").children();if(b.length==1){jQuery(".slidetoggle",b).slideDown(500).siblings().addClass("hidden").filter(".toggle").toggle()}if(a.not(".media-blank").length>0){jQuery(".savebutton").show()}else{jQuery(".savebutton").hide()}if(a.length>1){jQuery(".insert-gallery").show()}else{jQuery(".insert-gallery").hide()}}function uploadSuccess(b,a){if(a.match("media-upload-error")){jQuery("#media-item-"+b.id).html(a);return}prepareMediaItem(b,a);updateMediaForm();if(jQuery("#media-item-"+b.id).hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(1*jQuery("#attachments-count").text()+1)}}function uploadComplete(a){if(swfu.getStats().files_queued==0){jQuery("#cancel-upload").attr("disabled","disabled");jQuery("#insert-gallery").attr("disabled","")}}function wpQueueError(a){jQuery("#media-upload-error").show().text(a)}function wpFileError(b,a){jQuery("#media-item-"+b.id+" .filename").after('<div class="file-error"><button type="button" id="dismiss-'+b.id+'" class="button dismiss">'+swfuploadL10n.dismiss+"</button>"+a+"</div>").siblings(".toggle").remove();jQuery("#dismiss-"+b.id).click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function fileQueueError(c,a,b){if(a==SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){wpQueueError(swfuploadL10n.queue_limit_exceeded)}else{if(a==SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT){fileQueued(c);wpFileError(c,swfuploadL10n.file_exceeds_size_limit)}else{if(a==SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE){fileQueued(c);wpFileError(c,swfuploadL10n.zero_byte_file)}else{if(a==SWFUpload.QUEUE_ERROR.INVALID_FILETYPE){fileQueued(c);wpFileError(c,swfuploadL10n.invalid_filetype)}else{wpQueueError(swfuploadL10n.default_error)}}}}}function fileDialogComplete(b){try{if(b>0){this.startUpload()}}catch(a){this.debug(a)}}function switchUploader(b){var c=document.getElementById(swfu.customSettings.swfupload_element_id),a=document.getElementById(swfu.customSettings.degraded_element_id);if(b){c.style.display="block";a.style.display="none"}else{c.style.display="none";a.style.display="block"}}function swfuploadPreLoad(){if(!uploaderMode){switchUploader(1)}else{switchUploader(0)}}function swfuploadLoadFailed(){switchUploader(0);jQuery(".upload-html-bypass").hide()}function uploadError(b,c,a){switch(c){case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:wpFileError(b,swfuploadL10n.missing_upload_url);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:wpFileError(b,swfuploadL10n.upload_limit_exceeded);break;case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:wpQueueError(swfuploadL10n.http_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:wpQueueError(swfuploadL10n.upload_failed);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:wpQueueError(swfuploadL10n.io_error);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:wpQueueError(swfuploadL10n.security_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:jQuery("#media-item-"+b.id).remove();break;default:wpFileError(b,swfuploadL10n.default_error)}}function cancelUpload(){swfu.cancelQueue()}jQuery(document).ready(function(a){a('input[type="radio"]',"#media-items").live("click",function(){var b=a(this).closest("tr");if(a(b).hasClass("align")){setUserSetting("align",a(this).val())}else{if(a(b).hasClass("image-size")){setUserSetting("imgsize",a(this).val())}}});a("button.button","#media-items").live("click",function(){var b=this.className||"";b=b.match(/url([^ '"]+)/);if(b&&b[1]){setUserSetting("urlbutton",b[1]);a(this).siblings(".urlfield").val(a(this).attr("title"))}})}); | var topWin=window.dialogArguments||opener||parent||top;function fileDialogStart(){jQuery("#media-upload-error").empty()}function fileQueued(fileObj){jQuery(".media-blank").remove();if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".describe-toggle-on").show();jQuery(".describe-toggle-off").hide();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery("#media-items").append('<div id="media-item-'+fileObj.id+'" class="media-item child-of-'+post_id+'"><div class="progress"><div class="bar"></div></div><div class="filename original"><span class="percent"></span> '+fileObj.name+"</div></div>");jQuery(".progress","#media-item-"+fileObj.id).show();jQuery("#insert-gallery").attr("disabled","disabled");jQuery("#cancel-upload").attr("disabled","")}function uploadStart(fileObj){try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}}catch(e){}return true}function uploadProgress(fileObj,bytesDone,bytesTotal){var w=jQuery("#media-items").width()-2,item=jQuery("#media-item-"+fileObj.id);jQuery(".bar",item).width(w*bytesDone/bytesTotal);jQuery(".percent",item).html(Math.ceil(bytesDone/bytesTotal*100)+"%");if(bytesDone==bytesTotal){jQuery(".bar",item).html('<strong class="crunching">'+swfuploadL10n.crunching+"</strong>")}}function prepareMediaItem(fileObj,serverData){var f=(typeof shortform=="undefined")?1:2,item=jQuery("#media-item-"+fileObj.id);jQuery(".bar",item).remove();jQuery(".progress",item).hide();try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}}catch(e){}if(isNaN(serverData)||!serverData){item.append(serverData);prepareMediaItemInit(fileObj)}else{item.load("async-upload.php",{attachment_id:serverData,fetch:f},function(){prepareMediaItemInit(fileObj);updateMediaForm()})}}function prepareMediaItemInit(fileObj){var item=jQuery("#media-item-"+fileObj.id);jQuery(".thumbnail",item).clone().attr("className","pinkynail toggle").prependTo(item);jQuery(".filename.original",item).replaceWith(jQuery(".filename.new",item));jQuery("a.toggle",item).click(function(){jQuery(this).siblings(".slidetoggle").slideToggle(350,function(){var w=jQuery(window).height(),t=jQuery(this).offset().top,h=jQuery(this).height(),b;if(w&&t&&h){b=t+h;if(b>w&&(h+48)<w){window.scrollBy(0,b-w+13)}else{if(b>w){window.scrollTo(0,t-36)}}}});jQuery(this).siblings(".toggle").andSelf().toggle();jQuery(this).siblings("a.toggle").focus();return false});jQuery("a.delete",item).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",success:deleteSuccess,error:deleteError,id:fileObj.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}});return false});jQuery("a.undo",item).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",id:fileObj.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(data,textStatus){var item=jQuery("#media-item-"+fileObj.id);if(type=jQuery("#type-of-"+fileObj.id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-0+1)}if(item.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-0+1)}jQuery(".filename .trashnotice",item).remove();jQuery(".filename .title",item).css("font-weight","normal");jQuery("a.undo",item).addClass("hidden");jQuery("a.describe-toggle-on, .menu_order_input",item).show();item.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:false,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}});return false});jQuery("#media-item-"+fileObj.id+".startopen").removeClass("startopen").slideToggle(500).siblings(".toggle").toggle()}function itemAjaxError(id,html){var item=jQuery("#media-item-"+id);var filename=jQuery(".filename",item).text();item.html('<div class="error-div"><a class="dismiss" href="#">'+swfuploadL10n.dismiss+"</a><strong>"+swfuploadL10n.error_uploading.replace("%s",filename)+"</strong><br />"+html+"</div>");item.find("a.dismiss").click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function deleteSuccess(data,textStatus){if(data=="-1"){return itemAjaxError(this.id,"You do not have permission. Has your session expired?")}if(data=="0"){return itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?")}var id=this.id,item=jQuery("#media-item-"+id);if(type=jQuery("#type-of-"+id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-1)}if(item.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1)}if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".toggle").toggle();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery(".toggle",item).toggle();jQuery(".slidetoggle",item).slideUp(200).siblings().removeClass("hidden");item.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:false,duration:500}).addClass("undo");jQuery(".filename:empty",item).remove();jQuery(".filename .title",item).css("font-weight","bold");jQuery(".filename",item).append('<span class="trashnotice"> '+swfuploadL10n.deleted+" </span>").siblings("a.toggle").hide();jQuery(".filename",item).append(jQuery("a.undo",item).removeClass("hidden"));jQuery(".menu_order_input",item).hide();return}function deleteError(X,textStatus,errorThrown){}function updateMediaForm(){var one=jQuery("form.type-form #media-items").children(),items=jQuery("#media-items").children();if(one.length==1){jQuery(".slidetoggle",one).slideDown(500).siblings().addClass("hidden").filter(".toggle").toggle()}if(items.not(".media-blank").length>0){jQuery(".savebutton").show()}else{jQuery(".savebutton").hide()}if(items.length>1){jQuery(".insert-gallery").show()}else{jQuery(".insert-gallery").hide()}}function uploadSuccess(fileObj,serverData){if(serverData.match("media-upload-error")){jQuery("#media-item-"+fileObj.id).html(serverData);return}prepareMediaItem(fileObj,serverData);updateMediaForm();if(jQuery("#media-item-"+fileObj.id).hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(1*jQuery("#attachments-count").text()+1)}}function uploadComplete(fileObj){if(swfu.getStats().files_queued==0){jQuery("#cancel-upload").attr("disabled","disabled");jQuery("#insert-gallery").attr("disabled","")}}function wpQueueError(message){jQuery("#media-upload-error").show().text(message)}function wpFileError(fileObj,message){var item=jQuery("#media-item-"+fileObj.id);var filename=jQuery(".filename",item).text();item.html('<div class="error-div"><a class="dismiss" href="#">'+swfuploadL10n.dismiss+"</a><strong>"+swfuploadL10n.error_uploading.replace("%s",filename)+"</strong><br />"+message+"</div>");item.find("a.dismiss").click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function fileQueueError(fileObj,error_code,message){if(error_code==SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){wpQueueError(swfuploadL10n.queue_limit_exceeded)}else{if(error_code==SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT){fileQueued(fileObj);wpFileError(fileObj,swfuploadL10n.file_exceeds_size_limit)}else{if(error_code==SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE){fileQueued(fileObj);wpFileError(fileObj,swfuploadL10n.zero_byte_file)}else{if(error_code==SWFUpload.QUEUE_ERROR.INVALID_FILETYPE){fileQueued(fileObj);wpFileError(fileObj,swfuploadL10n.invalid_filetype)}else{wpQueueError(swfuploadL10n.default_error)}}}}}function fileDialogComplete(num_files_queued){try{if(num_files_queued>0){this.startUpload()}}catch(ex){this.debug(ex)}}function switchUploader(s){var f=document.getElementById(swfu.customSettings.swfupload_element_id),h=document.getElementById(swfu.customSettings.degraded_element_id);if(s){f.style.display="block";h.style.display="none"}else{f.style.display="none";h.style.display="block"}}function swfuploadPreLoad(){if(!uploaderMode){switchUploader(1)}else{switchUploader(0)}}function swfuploadLoadFailed(){switchUploader(0);jQuery(".upload-html-bypass").hide()}function uploadError(fileObj,errorCode,message){switch(errorCode){case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:wpFileError(fileObj,swfuploadL10n.missing_upload_url);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:wpFileError(fileObj,swfuploadL10n.upload_limit_exceeded);break;case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:wpQueueError(swfuploadL10n.http_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:wpQueueError(swfuploadL10n.upload_failed);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:wpQueueError(swfuploadL10n.io_error);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:wpQueueError(swfuploadL10n.security_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:jQuery("#media-item-"+fileObj.id).remove();break;default:wpFileError(fileObj,swfuploadL10n.default_error)}}function cancelUpload(){swfu.cancelQueue()}jQuery(document).ready(function($){$('input[type="radio"]',"#media-items").live("click",function(){var tr=$(this).closest("tr");if($(tr).hasClass("align")){setUserSetting("align",$(this).val())}else{if($(tr).hasClass("image-size")){setUserSetting("imgsize",$(this).val())}}});$("button.button","#media-items").live("click",function(){var c=this.className||"";c=c.match(/url([^ '"]+)/);if(c&&c[1]){setUserSetting("urlbutton",c[1]);$(this).siblings(".urlfield").val($(this).attr("title"))}})}); | var topWin=window.dialogArguments||opener||parent||top;function fileDialogStart(){jQuery("#media-upload-error").empty()}function fileQueued(a){jQuery(".media-blank").remove();if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".describe-toggle-on").show();jQuery(".describe-toggle-off").hide();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery("#media-items").append('<div id="media-item-'+a.id+'" class="media-item child-of-'+post_id+'"><div class="progress"><div class="bar"></div></div><div class="filename original"><span class="percent"></span> '+a.name+"</div></div>");jQuery(".progress","#media-item-"+a.id).show();jQuery("#insert-gallery").attr("disabled","disabled");jQuery("#cancel-upload").attr("disabled","")}function uploadStart(a){try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}}catch(b){}return true}function uploadProgress(e,b,d){var a=jQuery("#media-items").width()-2,c=jQuery("#media-item-"+e.id);jQuery(".bar",c).width(a*b/d);jQuery(".percent",c).html(Math.ceil(b/d*100)+"%");if(b==d){jQuery(".bar",c).html('<strong class="crunching">'+swfuploadL10n.crunching+"</strong>")}}function prepareMediaItem(c,a){var d=(typeof shortform=="undefined")?1:2,b=jQuery("#media-item-"+c.id);jQuery(".bar",b).remove();jQuery(".progress",b).hide();try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}}catch(g){}if(isNaN(a)||!a){b.append(a);prepareMediaItemInit(c)}else{b.load("async-upload.php",{attachment_id:a,fetch:d},function(){prepareMediaItemInit(c);updateMediaForm()})}}function prepareMediaItemInit(b){var a=jQuery("#media-item-"+b.id);jQuery(".thumbnail",a).clone().attr("className","pinkynail toggle").prependTo(a);jQuery(".filename.original",a).replaceWith(jQuery(".filename.new",a));jQuery("a.toggle",a).click(function(){jQuery(this).siblings(".slidetoggle").slideToggle(350,function(){var d=jQuery(window).height(),e=jQuery(this).offset().top,f=jQuery(this).height(),c;if(d&&e&&f){c=e+f;if(c>d&&(f+48)<d){window.scrollBy(0,c-d+13)}else{if(c>d){window.scrollTo(0,e-36)}}}});jQuery(this).siblings(".toggle").andSelf().toggle();jQuery(this).siblings("a.toggle").focus();return false});jQuery("a.delete",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",success:deleteSuccess,error:deleteError,id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}});return false});jQuery("a.undo",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(d,e){var c=jQuery("#media-item-"+b.id);if(type=jQuery("#type-of-"+b.id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-0+1)}if(c.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-0+1)}jQuery(".filename .trashnotice",c).remove();jQuery(".filename .title",c).css("font-weight","normal");jQuery("a.undo",c).addClass("hidden");jQuery("a.describe-toggle-on, .menu_order_input",c).show();c.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:false,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}});return false});jQuery("#media-item-"+b.id+".startopen").removeClass("startopen").slideToggle(500).siblings(".toggle").toggle()}function itemAjaxError(c,b){var a=jQuery("#media-item-error"+c);a.html('<div class="file-error"><button type="button" id="dismiss-'+c+'" class="button dismiss">'+swfuploadL10n.dismiss+"</button>"+b+"</div>");jQuery("#dismiss-"+c).click(function(){jQuery(this).parents(".file-error").slideUp(200,function(){jQuery(this).empty()})})}function deleteSuccess(b,d){if(b=="-1"){return itemAjaxError(this.id,"You do not have permission. Has your session expired?")}if(b=="0"){return itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?")}var c=this.id,a=jQuery("#media-item-"+c);if(type=jQuery("#type-of-"+c).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-1)}if(a.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1)}if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".toggle").toggle();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery(".toggle",a).toggle();jQuery(".slidetoggle",a).slideUp(200).siblings().removeClass("hidden");a.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:false,duration:500}).addClass("undo");jQuery(".filename:empty",a).remove();jQuery(".filename .title",a).css("font-weight","bold");jQuery(".filename",a).append('<span class="trashnotice"> '+swfuploadL10n.deleted+" </span>").siblings("a.toggle").hide();jQuery(".filename",a).append(jQuery("a.undo",a).removeClass("hidden"));jQuery(".menu_order_input",a).hide();return}function deleteError(c,b,a){}function updateMediaForm(){var b=jQuery("form.type-form #media-items").children(),a=jQuery("#media-items").children();if(b.length==1){jQuery(".slidetoggle",b).slideDown(500).siblings().addClass("hidden").filter(".toggle").toggle()}if(a.not(".media-blank").length>0){jQuery(".savebutton").show()}else{jQuery(".savebutton").hide()}if(a.length>1){jQuery(".insert-gallery").show()}else{jQuery(".insert-gallery").hide()}}function uploadSuccess(b,a){if(a.match("media-upload-error")){jQuery("#media-item-"+b.id).html(a);return}prepareMediaItem(b,a);updateMediaForm();if(jQuery("#media-item-"+b.id).hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(1*jQuery("#attachments-count").text()+1)}}function uploadComplete(a){if(swfu.getStats().files_queued==0){jQuery("#cancel-upload").attr("disabled","disabled");jQuery("#insert-gallery").attr("disabled","")}}function wpQueueError(a){jQuery("#media-upload-error").show().text(a)}function wpFileError(b,a){jQuery("#media-item-"+b.id+" .filename").after('<div class="file-error"><button type="button" id="dismiss-'+b.id+'" class="button dismiss">'+swfuploadL10n.dismiss+"</button>"+a+"</div>").siblings(".toggle").remove();jQuery("#dismiss-"+b.id).click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function fileQueueError(c,a,b){if(a==SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){wpQueueError(swfuploadL10n.queue_limit_exceeded)}else{if(a==SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT){fileQueued(c);wpFileError(c,swfuploadL10n.file_exceeds_size_limit)}else{if(a==SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE){fileQueued(c);wpFileError(c,swfuploadL10n.zero_byte_file)}else{if(a==SWFUpload.QUEUE_ERROR.INVALID_FILETYPE){fileQueued(c);wpFileError(c,swfuploadL10n.invalid_filetype)}else{wpQueueError(swfuploadL10n.default_error)}}}}}function fileDialogComplete(b){try{if(b>0){this.startUpload()}}catch(a){this.debug(a)}}function switchUploader(b){var c=document.getElementById(swfu.customSettings.swfupload_element_id),a=document.getElementById(swfu.customSettings.degraded_element_id);if(b){c.style.display="block";a.style.display="none"}else{c.style.display="none";a.style.display="block"}}function swfuploadPreLoad(){if(!uploaderMode){switchUploader(1)}else{switchUploader(0)}}function swfuploadLoadFailed(){switchUploader(0);jQuery(".upload-html-bypass").hide()}function uploadError(b,c,a){switch(c){case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:wpFileError(b,swfuploadL10n.missing_upload_url);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:wpFileError(b,swfuploadL10n.upload_limit_exceeded);break;case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:wpQueueError(swfuploadL10n.http_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:wpQueueError(swfuploadL10n.upload_failed);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:wpQueueError(swfuploadL10n.io_error);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:wpQueueError(swfuploadL10n.security_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:jQuery("#media-item-"+b.id).remove();break;default:wpFileError(b,swfuploadL10n.default_error)}}function cancelUpload(){swfu.cancelQueue()}jQuery(document).ready(function(a){a('input[type="radio"]',"#media-items").live("click",function(){var b=a(this).closest("tr");if(a(b).hasClass("align")){setUserSetting("align",a(this).val())}else{if(a(b).hasClass("image-size")){setUserSetting("imgsize",a(this).val())}}});a("button.button","#media-items").live("click",function(){var b=this.className||"";b=b.match(/url([^ '"]+)/);if(b&&b[1]){setUserSetting("urlbutton",b[1]);a(this).siblings(".urlfield").val(a(this).attr("title"))}})}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/89eab4f3b7e096f5a350344e2ef3bbeca9e3b161/handlers.js/buggy/wp-includes/js/swfupload/handlers.js |
var topWin=window.dialogArguments||opener||parent||top;function fileDialogStart(){jQuery("#media-upload-error").empty()}function fileQueued(a){jQuery(".media-blank").remove();if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".describe-toggle-on").show();jQuery(".describe-toggle-off").hide();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery("#media-items").append('<div id="media-item-'+a.id+'" class="media-item child-of-'+post_id+'"><div class="progress"><div class="bar"></div></div><div class="filename original"><span class="percent"></span> '+a.name+"</div></div>");jQuery(".progress","#media-item-"+a.id).show();jQuery("#insert-gallery").attr("disabled","disabled");jQuery("#cancel-upload").attr("disabled","")}function uploadStart(a){try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}}catch(b){}return true}function uploadProgress(e,b,d){var a=jQuery("#media-items").width()-2,c=jQuery("#media-item-"+e.id);jQuery(".bar",c).width(a*b/d);jQuery(".percent",c).html(Math.ceil(b/d*100)+"%");if(b==d){jQuery(".bar",c).html('<strong class="crunching">'+swfuploadL10n.crunching+"</strong>")}}function prepareMediaItem(c,a){var d=(typeof shortform=="undefined")?1:2,b=jQuery("#media-item-"+c.id);jQuery(".bar",b).remove();jQuery(".progress",b).hide();try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}}catch(g){}if(isNaN(a)||!a){b.append(a);prepareMediaItemInit(c)}else{b.load("async-upload.php",{attachment_id:a,fetch:d},function(){prepareMediaItemInit(c);updateMediaForm()})}}function prepareMediaItemInit(b){var a=jQuery("#media-item-"+b.id);jQuery(".thumbnail",a).clone().attr("className","pinkynail toggle").prependTo(a);jQuery(".filename.original",a).replaceWith(jQuery(".filename.new",a));jQuery("a.toggle",a).click(function(){jQuery(this).siblings(".slidetoggle").slideToggle(350,function(){var d=jQuery(window).height(),e=jQuery(this).offset().top,f=jQuery(this).height(),c;if(d&&e&&f){c=e+f;if(c>d&&(f+48)<d){window.scrollBy(0,c-d+13)}else{if(c>d){window.scrollTo(0,e-36)}}}});jQuery(this).siblings(".toggle").andSelf().toggle();jQuery(this).siblings("a.toggle").focus();return false});jQuery("a.delete",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",success:deleteSuccess,error:deleteError,id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}});return false});jQuery("a.undo",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(d,e){var c=jQuery("#media-item-"+b.id);if(type=jQuery("#type-of-"+b.id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-0+1)}if(c.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-0+1)}jQuery(".filename .trashnotice",c).remove();jQuery(".filename .title",c).css("font-weight","normal");jQuery("a.undo",c).addClass("hidden");jQuery("a.describe-toggle-on, .menu_order_input",c).show();c.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:false,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}});return false});jQuery("#media-item-"+b.id+".startopen").removeClass("startopen").slideToggle(500).siblings(".toggle").toggle()}function itemAjaxError(c,b){var a=jQuery("#media-item-error"+c);a.html('<div class="file-error"><button type="button" id="dismiss-'+c+'" class="button dismiss">'+swfuploadL10n.dismiss+"</button>"+b+"</div>");jQuery("#dismiss-"+c).click(function(){jQuery(this).parents(".file-error").slideUp(200,function(){jQuery(this).empty()})})}function deleteSuccess(b,d){if(b=="-1"){return itemAjaxError(this.id,"You do not have permission. Has your session expired?")}if(b=="0"){return itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?")}var c=this.id,a=jQuery("#media-item-"+c);if(type=jQuery("#type-of-"+c).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-1)}if(a.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1)}if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".toggle").toggle();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery(".toggle",a).toggle();jQuery(".slidetoggle",a).slideUp(200).siblings().removeClass("hidden");a.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:false,duration:500}).addClass("undo");jQuery(".filename:empty",a).remove();jQuery(".filename .title",a).css("font-weight","bold");jQuery(".filename",a).append('<span class="trashnotice"> '+swfuploadL10n.deleted+" </span>").siblings("a.toggle").hide();jQuery(".filename",a).append(jQuery("a.undo",a).removeClass("hidden"));jQuery(".menu_order_input",a).hide();return}function deleteError(c,b,a){}function updateMediaForm(){var b=jQuery("form.type-form #media-items").children(),a=jQuery("#media-items").children();if(b.length==1){jQuery(".slidetoggle",b).slideDown(500).siblings().addClass("hidden").filter(".toggle").toggle()}if(a.not(".media-blank").length>0){jQuery(".savebutton").show()}else{jQuery(".savebutton").hide()}if(a.length>1){jQuery(".insert-gallery").show()}else{jQuery(".insert-gallery").hide()}}function uploadSuccess(b,a){if(a.match("media-upload-error")){jQuery("#media-item-"+b.id).html(a);return}prepareMediaItem(b,a);updateMediaForm();if(jQuery("#media-item-"+b.id).hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(1*jQuery("#attachments-count").text()+1)}}function uploadComplete(a){if(swfu.getStats().files_queued==0){jQuery("#cancel-upload").attr("disabled","disabled");jQuery("#insert-gallery").attr("disabled","")}}function wpQueueError(a){jQuery("#media-upload-error").show().text(a)}function wpFileError(b,a){jQuery("#media-item-"+b.id+" .filename").after('<div class="file-error"><button type="button" id="dismiss-'+b.id+'" class="button dismiss">'+swfuploadL10n.dismiss+"</button>"+a+"</div>").siblings(".toggle").remove();jQuery("#dismiss-"+b.id).click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function fileQueueError(c,a,b){if(a==SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){wpQueueError(swfuploadL10n.queue_limit_exceeded)}else{if(a==SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT){fileQueued(c);wpFileError(c,swfuploadL10n.file_exceeds_size_limit)}else{if(a==SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE){fileQueued(c);wpFileError(c,swfuploadL10n.zero_byte_file)}else{if(a==SWFUpload.QUEUE_ERROR.INVALID_FILETYPE){fileQueued(c);wpFileError(c,swfuploadL10n.invalid_filetype)}else{wpQueueError(swfuploadL10n.default_error)}}}}}function fileDialogComplete(b){try{if(b>0){this.startUpload()}}catch(a){this.debug(a)}}function switchUploader(b){var c=document.getElementById(swfu.customSettings.swfupload_element_id),a=document.getElementById(swfu.customSettings.degraded_element_id);if(b){c.style.display="block";a.style.display="none"}else{c.style.display="none";a.style.display="block"}}function swfuploadPreLoad(){if(!uploaderMode){switchUploader(1)}else{switchUploader(0)}}function swfuploadLoadFailed(){switchUploader(0);jQuery(".upload-html-bypass").hide()}function uploadError(b,c,a){switch(c){case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:wpFileError(b,swfuploadL10n.missing_upload_url);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:wpFileError(b,swfuploadL10n.upload_limit_exceeded);break;case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:wpQueueError(swfuploadL10n.http_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:wpQueueError(swfuploadL10n.upload_failed);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:wpQueueError(swfuploadL10n.io_error);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:wpQueueError(swfuploadL10n.security_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:jQuery("#media-item-"+b.id).remove();break;default:wpFileError(b,swfuploadL10n.default_error)}}function cancelUpload(){swfu.cancelQueue()}jQuery(document).ready(function(a){a('input[type="radio"]',"#media-items").live("click",function(){var b=a(this).closest("tr");if(a(b).hasClass("align")){setUserSetting("align",a(this).val())}else{if(a(b).hasClass("image-size")){setUserSetting("imgsize",a(this).val())}}});a("button.button","#media-items").live("click",function(){var b=this.className||"";b=b.match(/url([^ '"]+)/);if(b&&b[1]){setUserSetting("urlbutton",b[1]);a(this).siblings(".urlfield").val(a(this).attr("title"))}})}); | var topWin=window.dialogArguments||opener||parent||top;function fileDialogStart(){jQuery("#media-upload-error").empty()}function fileQueued(fileObj){jQuery(".media-blank").remove();if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".describe-toggle-on").show();jQuery(".describe-toggle-off").hide();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery("#media-items").append('<div id="media-item-'+fileObj.id+'" class="media-item child-of-'+post_id+'"><div class="progress"><div class="bar"></div></div><div class="filename original"><span class="percent"></span> '+fileObj.name+"</div></div>");jQuery(".progress","#media-item-"+fileObj.id).show();jQuery("#insert-gallery").attr("disabled","disabled");jQuery("#cancel-upload").attr("disabled","")}function uploadStart(fileObj){try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}}catch(e){}return true}function uploadProgress(fileObj,bytesDone,bytesTotal){var w=jQuery("#media-items").width()-2,item=jQuery("#media-item-"+fileObj.id);jQuery(".bar",item).width(w*bytesDone/bytesTotal);jQuery(".percent",item).html(Math.ceil(bytesDone/bytesTotal*100)+"%");if(bytesDone==bytesTotal){jQuery(".bar",item).html('<strong class="crunching">'+swfuploadL10n.crunching+"</strong>")}}function prepareMediaItem(fileObj,serverData){var f=(typeof shortform=="undefined")?1:2,item=jQuery("#media-item-"+fileObj.id);jQuery(".bar",item).remove();jQuery(".progress",item).hide();try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}}catch(e){}if(isNaN(serverData)||!serverData){item.append(serverData);prepareMediaItemInit(fileObj)}else{item.load("async-upload.php",{attachment_id:serverData,fetch:f},function(){prepareMediaItemInit(fileObj);updateMediaForm()})}}function prepareMediaItemInit(fileObj){var item=jQuery("#media-item-"+fileObj.id);jQuery(".thumbnail",item).clone().attr("className","pinkynail toggle").prependTo(item);jQuery(".filename.original",item).replaceWith(jQuery(".filename.new",item));jQuery("a.toggle",item).click(function(){jQuery(this).siblings(".slidetoggle").slideToggle(350,function(){var w=jQuery(window).height(),t=jQuery(this).offset().top,h=jQuery(this).height(),b;if(w&&t&&h){b=t+h;if(b>w&&(h+48)<w){window.scrollBy(0,b-w+13)}else{if(b>w){window.scrollTo(0,t-36)}}}});jQuery(this).siblings(".toggle").andSelf().toggle();jQuery(this).siblings("a.toggle").focus();return false});jQuery("a.delete",item).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",success:deleteSuccess,error:deleteError,id:fileObj.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}});return false});jQuery("a.undo",item).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",id:fileObj.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(data,textStatus){var item=jQuery("#media-item-"+fileObj.id);if(type=jQuery("#type-of-"+fileObj.id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-0+1)}if(item.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-0+1)}jQuery(".filename .trashnotice",item).remove();jQuery(".filename .title",item).css("font-weight","normal");jQuery("a.undo",item).addClass("hidden");jQuery("a.describe-toggle-on, .menu_order_input",item).show();item.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:false,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}});return false});jQuery("#media-item-"+fileObj.id+".startopen").removeClass("startopen").slideToggle(500).siblings(".toggle").toggle()}function itemAjaxError(id,html){var item=jQuery("#media-item-"+id);var filename=jQuery(".filename",item).text();item.html('<div class="error-div"><a class="dismiss" href="#">'+swfuploadL10n.dismiss+"</a><strong>"+swfuploadL10n.error_uploading.replace("%s",filename)+"</strong><br />"+html+"</div>");item.find("a.dismiss").click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function deleteSuccess(data,textStatus){if(data=="-1"){return itemAjaxError(this.id,"You do not have permission. Has your session expired?")}if(data=="0"){return itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?")}var id=this.id,item=jQuery("#media-item-"+id);if(type=jQuery("#type-of-"+id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-1)}if(item.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1)}if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".toggle").toggle();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery(".toggle",item).toggle();jQuery(".slidetoggle",item).slideUp(200).siblings().removeClass("hidden");item.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:false,duration:500}).addClass("undo");jQuery(".filename:empty",item).remove();jQuery(".filename .title",item).css("font-weight","bold");jQuery(".filename",item).append('<span class="trashnotice"> '+swfuploadL10n.deleted+" </span>").siblings("a.toggle").hide();jQuery(".filename",item).append(jQuery("a.undo",item).removeClass("hidden"));jQuery(".menu_order_input",item).hide();return}function deleteError(X,textStatus,errorThrown){}function updateMediaForm(){var one=jQuery("form.type-form #media-items").children(),items=jQuery("#media-items").children();if(one.length==1){jQuery(".slidetoggle",one).slideDown(500).siblings().addClass("hidden").filter(".toggle").toggle()}if(items.not(".media-blank").length>0){jQuery(".savebutton").show()}else{jQuery(".savebutton").hide()}if(items.length>1){jQuery(".insert-gallery").show()}else{jQuery(".insert-gallery").hide()}}function uploadSuccess(fileObj,serverData){if(serverData.match("media-upload-error")){jQuery("#media-item-"+fileObj.id).html(serverData);return}prepareMediaItem(fileObj,serverData);updateMediaForm();if(jQuery("#media-item-"+fileObj.id).hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(1*jQuery("#attachments-count").text()+1)}}function uploadComplete(fileObj){if(swfu.getStats().files_queued==0){jQuery("#cancel-upload").attr("disabled","disabled");jQuery("#insert-gallery").attr("disabled","")}}function wpQueueError(message){jQuery("#media-upload-error").show().text(message)}function wpFileError(fileObj,message){var item=jQuery("#media-item-"+fileObj.id);var filename=jQuery(".filename",item).text();item.html('<div class="error-div"><a class="dismiss" href="#">'+swfuploadL10n.dismiss+"</a><strong>"+swfuploadL10n.error_uploading.replace("%s",filename)+"</strong><br />"+message+"</div>");item.find("a.dismiss").click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function fileQueueError(fileObj,error_code,message){if(error_code==SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){wpQueueError(swfuploadL10n.queue_limit_exceeded)}else{if(error_code==SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT){fileQueued(fileObj);wpFileError(fileObj,swfuploadL10n.file_exceeds_size_limit)}else{if(error_code==SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE){fileQueued(fileObj);wpFileError(fileObj,swfuploadL10n.zero_byte_file)}else{if(error_code==SWFUpload.QUEUE_ERROR.INVALID_FILETYPE){fileQueued(fileObj);wpFileError(fileObj,swfuploadL10n.invalid_filetype)}else{wpQueueError(swfuploadL10n.default_error)}}}}}function fileDialogComplete(num_files_queued){try{if(num_files_queued>0){this.startUpload()}}catch(ex){this.debug(ex)}}function switchUploader(s){var f=document.getElementById(swfu.customSettings.swfupload_element_id),h=document.getElementById(swfu.customSettings.degraded_element_id);if(s){f.style.display="block";h.style.display="none"}else{f.style.display="none";h.style.display="block"}}function swfuploadPreLoad(){if(!uploaderMode){switchUploader(1)}else{switchUploader(0)}}function swfuploadLoadFailed(){switchUploader(0);jQuery(".upload-html-bypass").hide()}function uploadError(fileObj,errorCode,message){switch(errorCode){case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:wpFileError(fileObj,swfuploadL10n.missing_upload_url);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:wpFileError(fileObj,swfuploadL10n.upload_limit_exceeded);break;case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:wpQueueError(swfuploadL10n.http_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:wpQueueError(swfuploadL10n.upload_failed);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:wpQueueError(swfuploadL10n.io_error);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:wpQueueError(swfuploadL10n.security_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:jQuery("#media-item-"+fileObj.id).remove();break;default:wpFileError(fileObj,swfuploadL10n.default_error)}}function cancelUpload(){swfu.cancelQueue()}jQuery(document).ready(function($){$('input[type="radio"]',"#media-items").live("click",function(){var tr=$(this).closest("tr");if($(tr).hasClass("align")){setUserSetting("align",$(this).val())}else{if($(tr).hasClass("image-size")){setUserSetting("imgsize",$(this).val())}}});$("button.button","#media-items").live("click",function(){var c=this.className||"";c=c.match(/url([^ '"]+)/);if(c&&c[1]){setUserSetting("urlbutton",c[1]);$(this).siblings(".urlfield").val($(this).attr("title"))}})}); | var topWin=window.dialogArguments||opener||parent||top;function fileDialogStart(){jQuery("#media-upload-error").empty()}function fileQueued(a){jQuery(".media-blank").remove();if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".describe-toggle-on").show();jQuery(".describe-toggle-off").hide();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery("#media-items").append('<div id="media-item-'+a.id+'" class="media-item child-of-'+post_id+'"><div class="progress"><div class="bar"></div></div><div class="filename original"><span class="percent"></span> '+a.name+"</div></div>");jQuery(".progress","#media-item-"+a.id).show();jQuery("#insert-gallery").attr("disabled","disabled");jQuery("#cancel-upload").attr("disabled","")}function uploadStart(a){try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}}catch(b){}return true}function uploadProgress(e,b,d){var a=jQuery("#media-items").width()-2,c=jQuery("#media-item-"+e.id);jQuery(".bar",c).width(a*b/d);jQuery(".percent",c).html(Math.ceil(b/d*100)+"%");if(b==d){jQuery(".bar",c).html('<strong class="crunching">'+swfuploadL10n.crunching+"</strong>")}}function prepareMediaItem(c,a){var d=(typeof shortform=="undefined")?1:2,b=jQuery("#media-item-"+c.id);jQuery(".bar",b).remove();jQuery(".progress",b).hide();try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}}catch(g){}if(isNaN(a)||!a){b.append(a);prepareMediaItemInit(c)}else{b.load("async-upload.php",{attachment_id:a,fetch:d},function(){prepareMediaItemInit(c);updateMediaForm()})}}function prepareMediaItemInit(b){var a=jQuery("#media-item-"+b.id);jQuery(".thumbnail",a).clone().attr("className","pinkynail toggle").prependTo(a);jQuery(".filename.original",a).replaceWith(jQuery(".filename.new",a));jQuery("a.toggle",a).click(function(){jQuery(this).siblings(".slidetoggle").slideToggle(350,function(){var d=jQuery(window).height(),e=jQuery(this).offset().top,f=jQuery(this).height(),c;if(d&&e&&f){c=e+f;if(c>d&&(f+48)<d){window.scrollBy(0,c-d+13)}else{if(c>d){window.scrollTo(0,e-36)}}}});jQuery(this).siblings(".toggle").andSelf().toggle();jQuery(this).siblings("a.toggle").focus();return false});jQuery("a.delete",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",success:deleteSuccess,error:deleteError,id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}});return false});jQuery("a.undo",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(d,e){var c=jQuery("#media-item-"+b.id);if(type=jQuery("#type-of-"+b.id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-0+1)}if(c.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-0+1)}jQuery(".filename .trashnotice",c).remove();jQuery(".filename .title",c).css("font-weight","normal");jQuery("a.undo",c).addClass("hidden");jQuery("a.describe-toggle-on, .menu_order_input",c).show();c.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:false,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}});return false});jQuery("#media-item-"+b.id+".startopen").removeClass("startopen").slideToggle(500).siblings(".toggle").toggle()}function itemAjaxError(c,b){var a=jQuery("#media-item-error"+c);a.html('<div class="file-error"><button type="button" id="dismiss-'+c+'" class="button dismiss">'+swfuploadL10n.dismiss+"</button>"+b+"</div>");jQuery("#dismiss-"+c).click(function(){jQuery(this).parents(".file-error").slideUp(200,function(){jQuery(this).empty()})})}function deleteSuccess(b,d){if(b=="-1"){return itemAjaxError(this.id,"You do not have permission. Has your session expired?")}if(b=="0"){return itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?")}var c=this.id,a=jQuery("#media-item-"+c);if(type=jQuery("#type-of-"+c).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-1)}if(a.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1)}if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".toggle").toggle();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery(".toggle",a).toggle();jQuery(".slidetoggle",a).slideUp(200).siblings().removeClass("hidden");a.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:false,duration:500}).addClass("undo");jQuery(".filename:empty",a).remove();jQuery(".filename .title",a).css("font-weight","bold");jQuery(".filename",a).append('<span class="trashnotice"> '+swfuploadL10n.deleted+" </span>").siblings("a.toggle").hide();jQuery(".filename",a).append(jQuery("a.undo",a).removeClass("hidden"));jQuery(".menu_order_input",a).hide();return}function deleteError(c,b,a){}function updateMediaForm(){var b=jQuery("form.type-form #media-items").children(),a=jQuery("#media-items").children();if(b.length==1){jQuery(".slidetoggle",b).slideDown(500).siblings().addClass("hidden").filter(".toggle").toggle()}if(a.not(".media-blank").length>0){jQuery(".savebutton").show()}else{jQuery(".savebutton").hide()}if(a.length>1){jQuery(".insert-gallery").show()}else{jQuery(".insert-gallery").hide()}}function uploadSuccess(b,a){if(a.match("media-upload-error")){jQuery("#media-item-"+b.id).html(a);return}prepareMediaItem(b,a);updateMediaForm();if(jQuery("#media-item-"+b.id).hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(1*jQuery("#attachments-count").text()+1)}}function uploadComplete(a){if(swfu.getStats().files_queued==0){jQuery("#cancel-upload").attr("disabled","disabled");jQuery("#insert-gallery").attr("disabled","")}}function wpQueueError(a){jQuery("#media-upload-error").show().text(a)}function wpFileError(b,a){jQuery("#media-item-"+b.id+" .filename").after('<div class="file-error"><button type="button" id="dismiss-'+b.id+'" class="button dismiss">'+swfuploadL10n.dismiss+"</button>"+a+"</div>").siblings(".toggle").remove();jQuery("#dismiss-"+b.id).click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function fileQueueError(c,a,b){if(a==SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){wpQueueError(swfuploadL10n.queue_limit_exceeded)}else{if(a==SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT){fileQueued(c);wpFileError(c,swfuploadL10n.file_exceeds_size_limit)}else{if(a==SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE){fileQueued(c);wpFileError(c,swfuploadL10n.zero_byte_file)}else{if(a==SWFUpload.QUEUE_ERROR.INVALID_FILETYPE){fileQueued(c);wpFileError(c,swfuploadL10n.invalid_filetype)}else{wpQueueError(swfuploadL10n.default_error)}}}}}function fileDialogComplete(b){try{if(b>0){this.startUpload()}}catch(a){this.debug(a)}}function switchUploader(b){var c=document.getElementById(swfu.customSettings.swfupload_element_id),a=document.getElementById(swfu.customSettings.degraded_element_id);if(b){c.style.display="block";a.style.display="none"}else{c.style.display="none";a.style.display="block"}}function swfuploadPreLoad(){if(!uploaderMode){switchUploader(1)}else{switchUploader(0)}}function swfuploadLoadFailed(){switchUploader(0);jQuery(".upload-html-bypass").hide()}function uploadError(b,c,a){switch(c){case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:wpFileError(b,swfuploadL10n.missing_upload_url);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:wpFileError(b,swfuploadL10n.upload_limit_exceeded);break;case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:wpQueueError(swfuploadL10n.http_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:wpQueueError(swfuploadL10n.upload_failed);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:wpQueueError(swfuploadL10n.io_error);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:wpQueueError(swfuploadL10n.security_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:jQuery("#media-item-"+b.id).remove();break;default:wpFileError(b,swfuploadL10n.default_error)}}function cancelUpload(){swfu.cancelQueue()}jQuery(document).ready(function(a){a('input[type="radio"]',"#media-items").live("click",function(){var b=a(this).closest("tr");if(a(b).hasClass("align")){setUserSetting("align",a(this).val())}else{if(a(b).hasClass("image-size")){setUserSetting("imgsize",a(this).val())}}});a("button.button","#media-items").live("click",function(){var b=this.className||"";b=b.match(/url([^ '"]+)/);if(b&&b[1]){setUserSetting("urlbutton",b[1]);a(this).siblings(".urlfield").val(a(this).attr("title"))}})}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/89eab4f3b7e096f5a350344e2ef3bbeca9e3b161/handlers.js/buggy/wp-includes/js/swfupload/handlers.js |
var topWin=window.dialogArguments||opener||parent||top;function fileDialogStart(){jQuery("#media-upload-error").empty()}function fileQueued(a){jQuery(".media-blank").remove();if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".describe-toggle-on").show();jQuery(".describe-toggle-off").hide();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery("#media-items").append('<div id="media-item-'+a.id+'" class="media-item child-of-'+post_id+'"><div class="progress"><div class="bar"></div></div><div class="filename original"><span class="percent"></span> '+a.name+"</div></div>");jQuery(".progress","#media-item-"+a.id).show();jQuery("#insert-gallery").attr("disabled","disabled");jQuery("#cancel-upload").attr("disabled","")}function uploadStart(a){try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}}catch(b){}return true}function uploadProgress(e,b,d){var a=jQuery("#media-items").width()-2,c=jQuery("#media-item-"+e.id);jQuery(".bar",c).width(a*b/d);jQuery(".percent",c).html(Math.ceil(b/d*100)+"%");if(b==d){jQuery(".bar",c).html('<strong class="crunching">'+swfuploadL10n.crunching+"</strong>")}}function prepareMediaItem(c,a){var d=(typeof shortform=="undefined")?1:2,b=jQuery("#media-item-"+c.id);jQuery(".bar",b).remove();jQuery(".progress",b).hide();try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}}catch(g){}if(isNaN(a)||!a){b.append(a);prepareMediaItemInit(c)}else{b.load("async-upload.php",{attachment_id:a,fetch:d},function(){prepareMediaItemInit(c);updateMediaForm()})}}function prepareMediaItemInit(b){var a=jQuery("#media-item-"+b.id);jQuery(".thumbnail",a).clone().attr("className","pinkynail toggle").prependTo(a);jQuery(".filename.original",a).replaceWith(jQuery(".filename.new",a));jQuery("a.toggle",a).click(function(){jQuery(this).siblings(".slidetoggle").slideToggle(350,function(){var d=jQuery(window).height(),e=jQuery(this).offset().top,f=jQuery(this).height(),c;if(d&&e&&f){c=e+f;if(c>d&&(f+48)<d){window.scrollBy(0,c-d+13)}else{if(c>d){window.scrollTo(0,e-36)}}}});jQuery(this).siblings(".toggle").andSelf().toggle();jQuery(this).siblings("a.toggle").focus();return false});jQuery("a.delete",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",success:deleteSuccess,error:deleteError,id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}});return false});jQuery("a.undo",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(d,e){var c=jQuery("#media-item-"+b.id);if(type=jQuery("#type-of-"+b.id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-0+1)}if(c.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-0+1)}jQuery(".filename .trashnotice",c).remove();jQuery(".filename .title",c).css("font-weight","normal");jQuery("a.undo",c).addClass("hidden");jQuery("a.describe-toggle-on, .menu_order_input",c).show();c.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:false,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}});return false});jQuery("#media-item-"+b.id+".startopen").removeClass("startopen").slideToggle(500).siblings(".toggle").toggle()}function itemAjaxError(c,b){var a=jQuery("#media-item-error"+c);a.html('<div class="file-error"><button type="button" id="dismiss-'+c+'" class="button dismiss">'+swfuploadL10n.dismiss+"</button>"+b+"</div>");jQuery("#dismiss-"+c).click(function(){jQuery(this).parents(".file-error").slideUp(200,function(){jQuery(this).empty()})})}function deleteSuccess(b,d){if(b=="-1"){return itemAjaxError(this.id,"You do not have permission. Has your session expired?")}if(b=="0"){return itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?")}var c=this.id,a=jQuery("#media-item-"+c);if(type=jQuery("#type-of-"+c).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-1)}if(a.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1)}if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".toggle").toggle();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery(".toggle",a).toggle();jQuery(".slidetoggle",a).slideUp(200).siblings().removeClass("hidden");a.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:false,duration:500}).addClass("undo");jQuery(".filename:empty",a).remove();jQuery(".filename .title",a).css("font-weight","bold");jQuery(".filename",a).append('<span class="trashnotice"> '+swfuploadL10n.deleted+" </span>").siblings("a.toggle").hide();jQuery(".filename",a).append(jQuery("a.undo",a).removeClass("hidden"));jQuery(".menu_order_input",a).hide();return}function deleteError(c,b,a){}function updateMediaForm(){var b=jQuery("form.type-form #media-items").children(),a=jQuery("#media-items").children();if(b.length==1){jQuery(".slidetoggle",b).slideDown(500).siblings().addClass("hidden").filter(".toggle").toggle()}if(a.not(".media-blank").length>0){jQuery(".savebutton").show()}else{jQuery(".savebutton").hide()}if(a.length>1){jQuery(".insert-gallery").show()}else{jQuery(".insert-gallery").hide()}}function uploadSuccess(b,a){if(a.match("media-upload-error")){jQuery("#media-item-"+b.id).html(a);return}prepareMediaItem(b,a);updateMediaForm();if(jQuery("#media-item-"+b.id).hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(1*jQuery("#attachments-count").text()+1)}}function uploadComplete(a){if(swfu.getStats().files_queued==0){jQuery("#cancel-upload").attr("disabled","disabled");jQuery("#insert-gallery").attr("disabled","")}}function wpQueueError(a){jQuery("#media-upload-error").show().text(a)}function wpFileError(b,a){jQuery("#media-item-"+b.id+" .filename").after('<div class="file-error"><button type="button" id="dismiss-'+b.id+'" class="button dismiss">'+swfuploadL10n.dismiss+"</button>"+a+"</div>").siblings(".toggle").remove();jQuery("#dismiss-"+b.id).click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function fileQueueError(c,a,b){if(a==SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){wpQueueError(swfuploadL10n.queue_limit_exceeded)}else{if(a==SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT){fileQueued(c);wpFileError(c,swfuploadL10n.file_exceeds_size_limit)}else{if(a==SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE){fileQueued(c);wpFileError(c,swfuploadL10n.zero_byte_file)}else{if(a==SWFUpload.QUEUE_ERROR.INVALID_FILETYPE){fileQueued(c);wpFileError(c,swfuploadL10n.invalid_filetype)}else{wpQueueError(swfuploadL10n.default_error)}}}}}function fileDialogComplete(b){try{if(b>0){this.startUpload()}}catch(a){this.debug(a)}}function switchUploader(b){var c=document.getElementById(swfu.customSettings.swfupload_element_id),a=document.getElementById(swfu.customSettings.degraded_element_id);if(b){c.style.display="block";a.style.display="none"}else{c.style.display="none";a.style.display="block"}}function swfuploadPreLoad(){if(!uploaderMode){switchUploader(1)}else{switchUploader(0)}}function swfuploadLoadFailed(){switchUploader(0);jQuery(".upload-html-bypass").hide()}function uploadError(b,c,a){switch(c){case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:wpFileError(b,swfuploadL10n.missing_upload_url);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:wpFileError(b,swfuploadL10n.upload_limit_exceeded);break;case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:wpQueueError(swfuploadL10n.http_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:wpQueueError(swfuploadL10n.upload_failed);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:wpQueueError(swfuploadL10n.io_error);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:wpQueueError(swfuploadL10n.security_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:jQuery("#media-item-"+b.id).remove();break;default:wpFileError(b,swfuploadL10n.default_error)}}function cancelUpload(){swfu.cancelQueue()}jQuery(document).ready(function(a){a('input[type="radio"]',"#media-items").live("click",function(){var b=a(this).closest("tr");if(a(b).hasClass("align")){setUserSetting("align",a(this).val())}else{if(a(b).hasClass("image-size")){setUserSetting("imgsize",a(this).val())}}});a("button.button","#media-items").live("click",function(){var b=this.className||"";b=b.match(/url([^ '"]+)/);if(b&&b[1]){setUserSetting("urlbutton",b[1]);a(this).siblings(".urlfield").val(a(this).attr("title"))}})}); | var topWin=window.dialogArguments||opener||parent||top;function fileDialogStart(){jQuery("#media-upload-error").empty()}function fileQueued(fileObj){jQuery(".media-blank").remove();if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".describe-toggle-on").show();jQuery(".describe-toggle-off").hide();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery("#media-items").append('<div id="media-item-'+fileObj.id+'" class="media-item child-of-'+post_id+'"><div class="progress"><div class="bar"></div></div><div class="filename original"><span class="percent"></span> '+fileObj.name+"</div></div>");jQuery(".progress","#media-item-"+fileObj.id).show();jQuery("#insert-gallery").attr("disabled","disabled");jQuery("#cancel-upload").attr("disabled","")}function uploadStart(fileObj){try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}}catch(e){}return true}function uploadProgress(fileObj,bytesDone,bytesTotal){var w=jQuery("#media-items").width()-2,item=jQuery("#media-item-"+fileObj.id);jQuery(".bar",item).width(w*bytesDone/bytesTotal);jQuery(".percent",item).html(Math.ceil(bytesDone/bytesTotal*100)+"%");if(bytesDone==bytesTotal){jQuery(".bar",item).html('<strong class="crunching">'+swfuploadL10n.crunching+"</strong>")}}function prepareMediaItem(fileObj,serverData){var f=(typeof shortform=="undefined")?1:2,item=jQuery("#media-item-"+fileObj.id);jQuery(".bar",item).remove();jQuery(".progress",item).hide();try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}}catch(e){}if(isNaN(serverData)||!serverData){item.append(serverData);prepareMediaItemInit(fileObj)}else{item.load("async-upload.php",{attachment_id:serverData,fetch:f},function(){prepareMediaItemInit(fileObj);updateMediaForm()})}}function prepareMediaItemInit(fileObj){var item=jQuery("#media-item-"+fileObj.id);jQuery(".thumbnail",item).clone().attr("className","pinkynail toggle").prependTo(item);jQuery(".filename.original",item).replaceWith(jQuery(".filename.new",item));jQuery("a.toggle",item).click(function(){jQuery(this).siblings(".slidetoggle").slideToggle(350,function(){var w=jQuery(window).height(),t=jQuery(this).offset().top,h=jQuery(this).height(),b;if(w&&t&&h){b=t+h;if(b>w&&(h+48)<w){window.scrollBy(0,b-w+13)}else{if(b>w){window.scrollTo(0,t-36)}}}});jQuery(this).siblings(".toggle").andSelf().toggle();jQuery(this).siblings("a.toggle").focus();return false});jQuery("a.delete",item).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",success:deleteSuccess,error:deleteError,id:fileObj.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}});return false});jQuery("a.undo",item).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",id:fileObj.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(data,textStatus){var item=jQuery("#media-item-"+fileObj.id);if(type=jQuery("#type-of-"+fileObj.id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-0+1)}if(item.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-0+1)}jQuery(".filename .trashnotice",item).remove();jQuery(".filename .title",item).css("font-weight","normal");jQuery("a.undo",item).addClass("hidden");jQuery("a.describe-toggle-on, .menu_order_input",item).show();item.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:false,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}});return false});jQuery("#media-item-"+fileObj.id+".startopen").removeClass("startopen").slideToggle(500).siblings(".toggle").toggle()}function itemAjaxError(id,html){var item=jQuery("#media-item-"+id);var filename=jQuery(".filename",item).text();item.html('<div class="error-div"><a class="dismiss" href="#">'+swfuploadL10n.dismiss+"</a><strong>"+swfuploadL10n.error_uploading.replace("%s",filename)+"</strong><br />"+html+"</div>");item.find("a.dismiss").click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function deleteSuccess(data,textStatus){if(data=="-1"){return itemAjaxError(this.id,"You do not have permission. Has your session expired?")}if(data=="0"){return itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?")}var id=this.id,item=jQuery("#media-item-"+id);if(type=jQuery("#type-of-"+id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-1)}if(item.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1)}if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".toggle").toggle();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery(".toggle",item).toggle();jQuery(".slidetoggle",item).slideUp(200).siblings().removeClass("hidden");item.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:false,duration:500}).addClass("undo");jQuery(".filename:empty",item).remove();jQuery(".filename .title",item).css("font-weight","bold");jQuery(".filename",item).append('<span class="trashnotice"> '+swfuploadL10n.deleted+" </span>").siblings("a.toggle").hide();jQuery(".filename",item).append(jQuery("a.undo",item).removeClass("hidden"));jQuery(".menu_order_input",item).hide();return}function deleteError(X,textStatus,errorThrown){}function updateMediaForm(){var one=jQuery("form.type-form #media-items").children(),items=jQuery("#media-items").children();if(one.length==1){jQuery(".slidetoggle",one).slideDown(500).siblings().addClass("hidden").filter(".toggle").toggle()}if(items.not(".media-blank").length>0){jQuery(".savebutton").show()}else{jQuery(".savebutton").hide()}if(items.length>1){jQuery(".insert-gallery").show()}else{jQuery(".insert-gallery").hide()}}function uploadSuccess(fileObj,serverData){if(serverData.match("media-upload-error")){jQuery("#media-item-"+fileObj.id).html(serverData);return}prepareMediaItem(fileObj,serverData);updateMediaForm();if(jQuery("#media-item-"+fileObj.id).hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(1*jQuery("#attachments-count").text()+1)}}function uploadComplete(fileObj){if(swfu.getStats().files_queued==0){jQuery("#cancel-upload").attr("disabled","disabled");jQuery("#insert-gallery").attr("disabled","")}}function wpQueueError(message){jQuery("#media-upload-error").show().text(message)}function wpFileError(fileObj,message){var item=jQuery("#media-item-"+fileObj.id);var filename=jQuery(".filename",item).text();item.html('<div class="error-div"><a class="dismiss" href="#">'+swfuploadL10n.dismiss+"</a><strong>"+swfuploadL10n.error_uploading.replace("%s",filename)+"</strong><br />"+message+"</div>");item.find("a.dismiss").click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function fileQueueError(fileObj,error_code,message){if(error_code==SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){wpQueueError(swfuploadL10n.queue_limit_exceeded)}else{if(error_code==SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT){fileQueued(fileObj);wpFileError(fileObj,swfuploadL10n.file_exceeds_size_limit)}else{if(error_code==SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE){fileQueued(fileObj);wpFileError(fileObj,swfuploadL10n.zero_byte_file)}else{if(error_code==SWFUpload.QUEUE_ERROR.INVALID_FILETYPE){fileQueued(fileObj);wpFileError(fileObj,swfuploadL10n.invalid_filetype)}else{wpQueueError(swfuploadL10n.default_error)}}}}}function fileDialogComplete(num_files_queued){try{if(num_files_queued>0){this.startUpload()}}catch(ex){this.debug(ex)}}function switchUploader(s){var f=document.getElementById(swfu.customSettings.swfupload_element_id),h=document.getElementById(swfu.customSettings.degraded_element_id);if(s){f.style.display="block";h.style.display="none"}else{f.style.display="none";h.style.display="block"}}function swfuploadPreLoad(){if(!uploaderMode){switchUploader(1)}else{switchUploader(0)}}function swfuploadLoadFailed(){switchUploader(0);jQuery(".upload-html-bypass").hide()}function uploadError(fileObj,errorCode,message){switch(errorCode){case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:wpFileError(fileObj,swfuploadL10n.missing_upload_url);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:wpFileError(fileObj,swfuploadL10n.upload_limit_exceeded);break;case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:wpQueueError(swfuploadL10n.http_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:wpQueueError(swfuploadL10n.upload_failed);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:wpQueueError(swfuploadL10n.io_error);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:wpQueueError(swfuploadL10n.security_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:jQuery("#media-item-"+fileObj.id).remove();break;default:wpFileError(fileObj,swfuploadL10n.default_error)}}function cancelUpload(){swfu.cancelQueue()}jQuery(document).ready(function($){$('input[type="radio"]',"#media-items").live("click",function(){var tr=$(this).closest("tr");if($(tr).hasClass("align")){setUserSetting("align",$(this).val())}else{if($(tr).hasClass("image-size")){setUserSetting("imgsize",$(this).val())}}});$("button.button","#media-items").live("click",function(){var c=this.className||"";c=c.match(/url([^ '"]+)/);if(c&&c[1]){setUserSetting("urlbutton",c[1]);$(this).siblings(".urlfield").val($(this).attr("title"))}})}); | var topWin=window.dialogArguments||opener||parent||top;function fileDialogStart(){jQuery("#media-upload-error").empty()}function fileQueued(a){jQuery(".media-blank").remove();if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".describe-toggle-on").show();jQuery(".describe-toggle-off").hide();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery("#media-items").append('<div id="media-item-'+a.id+'" class="media-item child-of-'+post_id+'"><div class="progress"><div class="bar"></div></div><div class="filename original"><span class="percent"></span> '+a.name+"</div></div>");jQuery(".progress","#media-item-"+a.id).show();jQuery("#insert-gallery").attr("disabled","disabled");jQuery("#cancel-upload").attr("disabled","")}function uploadStart(a){try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}}catch(b){}return true}function uploadProgress(e,b,d){var a=jQuery("#media-items").width()-2,c=jQuery("#media-item-"+e.id);jQuery(".bar",c).width(a*b/d);jQuery(".percent",c).html(Math.ceil(b/d*100)+"%");if(b==d){jQuery(".bar",c).html('<strong class="crunching">'+swfuploadL10n.crunching+"</strong>")}}function prepareMediaItem(c,a){var d=(typeof shortform=="undefined")?1:2,b=jQuery("#media-item-"+c.id);jQuery(".bar",b).remove();jQuery(".progress",b).hide();try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}}catch(g){}if(isNaN(a)||!a){b.append(a);prepareMediaItemInit(c)}else{b.load("async-upload.php",{attachment_id:a,fetch:d},function(){prepareMediaItemInit(c);updateMediaForm()})}}function prepareMediaItemInit(b){var a=jQuery("#media-item-"+b.id);jQuery(".thumbnail",a).clone().attr("className","pinkynail toggle").prependTo(a);jQuery(".filename.original",a).replaceWith(jQuery(".filename.new",a));jQuery("a.toggle",a).click(function(){jQuery(this).siblings(".slidetoggle").slideToggle(350,function(){var d=jQuery(window).height(),e=jQuery(this).offset().top,f=jQuery(this).height(),c;if(d&&e&&f){c=e+f;if(c>d&&(f+48)<d){window.scrollBy(0,c-d+13)}else{if(c>d){window.scrollTo(0,e-36)}}}});jQuery(this).siblings(".toggle").andSelf().toggle();jQuery(this).siblings("a.toggle").focus();return false});jQuery("a.delete",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",success:deleteSuccess,error:deleteError,id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}});return false});jQuery("a.undo",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(d,e){var c=jQuery("#media-item-"+b.id);if(type=jQuery("#type-of-"+b.id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-0+1)}if(c.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-0+1)}jQuery(".filename .trashnotice",c).remove();jQuery(".filename .title",c).css("font-weight","normal");jQuery("a.undo",c).addClass("hidden");jQuery("a.describe-toggle-on, .menu_order_input",c).show();c.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:false,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}});return false});jQuery("#media-item-"+b.id+".startopen").removeClass("startopen").slideToggle(500).siblings(".toggle").toggle()}function itemAjaxError(c,b){var a=jQuery("#media-item-error"+c);a.html('<div class="file-error"><button type="button" id="dismiss-'+c+'" class="button dismiss">'+swfuploadL10n.dismiss+"</button>"+b+"</div>");jQuery("#dismiss-"+c).click(function(){jQuery(this).parents(".file-error").slideUp(200,function(){jQuery(this).empty()})})}function deleteSuccess(b,d){if(b=="-1"){return itemAjaxError(this.id,"You do not have permission. Has your session expired?")}if(b=="0"){return itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?")}var c=this.id,a=jQuery("#media-item-"+c);if(type=jQuery("#type-of-"+c).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-1)}if(a.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1)}if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".toggle").toggle();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery(".toggle",a).toggle();jQuery(".slidetoggle",a).slideUp(200).siblings().removeClass("hidden");a.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:false,duration:500}).addClass("undo");jQuery(".filename:empty",a).remove();jQuery(".filename .title",a).css("font-weight","bold");jQuery(".filename",a).append('<span class="trashnotice"> '+swfuploadL10n.deleted+" </span>").siblings("a.toggle").hide();jQuery(".filename",a).append(jQuery("a.undo",a).removeClass("hidden"));jQuery(".menu_order_input",a).hide();return}function deleteError(c,b,a){}function updateMediaForm(){var b=jQuery("form.type-form #media-items").children(),a=jQuery("#media-items").children();if(b.length==1){jQuery(".slidetoggle",b).slideDown(500).siblings().addClass("hidden").filter(".toggle").toggle()}if(a.not(".media-blank").length>0){jQuery(".savebutton").show()}else{jQuery(".savebutton").hide()}if(a.length>1){jQuery(".insert-gallery").show()}else{jQuery(".insert-gallery").hide()}}function uploadSuccess(b,a){if(a.match("media-upload-error")){jQuery("#media-item-"+b.id).html(a);return}prepareMediaItem(b,a);updateMediaForm();if(jQuery("#media-item-"+b.id).hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(1*jQuery("#attachments-count").text()+1)}}function uploadComplete(a){if(swfu.getStats().files_queued==0){jQuery("#cancel-upload").attr("disabled","disabled");jQuery("#insert-gallery").attr("disabled","")}}function wpQueueError(a){jQuery("#media-upload-error").show().text(a)}function wpFileError(b,a){jQuery("#media-item-"+b.id+" .filename").after('<div class="file-error"><button type="button" id="dismiss-'+b.id+'" class="button dismiss">'+swfuploadL10n.dismiss+"</button>"+a+"</div>").siblings(".toggle").remove();jQuery("#dismiss-"+b.id).click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function fileQueueError(c,a,b){if(a==SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){wpQueueError(swfuploadL10n.queue_limit_exceeded)}else{if(a==SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT){fileQueued(c);wpFileError(c,swfuploadL10n.file_exceeds_size_limit)}else{if(a==SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE){fileQueued(c);wpFileError(c,swfuploadL10n.zero_byte_file)}else{if(a==SWFUpload.QUEUE_ERROR.INVALID_FILETYPE){fileQueued(c);wpFileError(c,swfuploadL10n.invalid_filetype)}else{wpQueueError(swfuploadL10n.default_error)}}}}}function fileDialogComplete(b){try{if(b>0){this.startUpload()}}catch(a){this.debug(a)}}function switchUploader(b){var c=document.getElementById(swfu.customSettings.swfupload_element_id),a=document.getElementById(swfu.customSettings.degraded_element_id);if(b){c.style.display="block";a.style.display="none"}else{c.style.display="none";a.style.display="block"}}function swfuploadPreLoad(){if(!uploaderMode){switchUploader(1)}else{switchUploader(0)}}function swfuploadLoadFailed(){switchUploader(0);jQuery(".upload-html-bypass").hide()}function uploadError(b,c,a){switch(c){case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:wpFileError(b,swfuploadL10n.missing_upload_url);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:wpFileError(b,swfuploadL10n.upload_limit_exceeded);break;case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:wpQueueError(swfuploadL10n.http_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:wpQueueError(swfuploadL10n.upload_failed);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:wpQueueError(swfuploadL10n.io_error);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:wpQueueError(swfuploadL10n.security_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:jQuery("#media-item-"+b.id).remove();break;default:wpFileError(b,swfuploadL10n.default_error)}}function cancelUpload(){swfu.cancelQueue()}jQuery(document).ready(function(a){a('input[type="radio"]',"#media-items").live("click",function(){var b=a(this).closest("tr");if(a(b).hasClass("align")){setUserSetting("align",a(this).val())}else{if(a(b).hasClass("image-size")){setUserSetting("imgsize",a(this).val())}}});a("button.button","#media-items").live("click",function(){var b=this.className||"";b=b.match(/url([^ '"]+)/);if(b&&b[1]){setUserSetting("urlbutton",b[1]);a(this).siblings(".urlfield").val(a(this).attr("title"))}})}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/89eab4f3b7e096f5a350344e2ef3bbeca9e3b161/handlers.js/buggy/wp-includes/js/swfupload/handlers.js |
var topWin=window.dialogArguments||opener||parent||top;function fileDialogStart(){jQuery("#media-upload-error").empty()}function fileQueued(a){jQuery(".media-blank").remove();if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".describe-toggle-on").show();jQuery(".describe-toggle-off").hide();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery("#media-items").append('<div id="media-item-'+a.id+'" class="media-item child-of-'+post_id+'"><div class="progress"><div class="bar"></div></div><div class="filename original"><span class="percent"></span> '+a.name+"</div></div>");jQuery(".progress","#media-item-"+a.id).show();jQuery("#insert-gallery").attr("disabled","disabled");jQuery("#cancel-upload").attr("disabled","")}function uploadStart(a){try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}}catch(b){}return true}function uploadProgress(e,b,d){var a=jQuery("#media-items").width()-2,c=jQuery("#media-item-"+e.id);jQuery(".bar",c).width(a*b/d);jQuery(".percent",c).html(Math.ceil(b/d*100)+"%");if(b==d){jQuery(".bar",c).html('<strong class="crunching">'+swfuploadL10n.crunching+"</strong>")}}function prepareMediaItem(c,a){var d=(typeof shortform=="undefined")?1:2,b=jQuery("#media-item-"+c.id);jQuery(".bar",b).remove();jQuery(".progress",b).hide();try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}}catch(g){}if(isNaN(a)||!a){b.append(a);prepareMediaItemInit(c)}else{b.load("async-upload.php",{attachment_id:a,fetch:d},function(){prepareMediaItemInit(c);updateMediaForm()})}}function prepareMediaItemInit(b){var a=jQuery("#media-item-"+b.id);jQuery(".thumbnail",a).clone().attr("className","pinkynail toggle").prependTo(a);jQuery(".filename.original",a).replaceWith(jQuery(".filename.new",a));jQuery("a.toggle",a).click(function(){jQuery(this).siblings(".slidetoggle").slideToggle(350,function(){var d=jQuery(window).height(),e=jQuery(this).offset().top,f=jQuery(this).height(),c;if(d&&e&&f){c=e+f;if(c>d&&(f+48)<d){window.scrollBy(0,c-d+13)}else{if(c>d){window.scrollTo(0,e-36)}}}});jQuery(this).siblings(".toggle").andSelf().toggle();jQuery(this).siblings("a.toggle").focus();return false});jQuery("a.delete",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",success:deleteSuccess,error:deleteError,id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}});return false});jQuery("a.undo",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(d,e){var c=jQuery("#media-item-"+b.id);if(type=jQuery("#type-of-"+b.id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-0+1)}if(c.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-0+1)}jQuery(".filename .trashnotice",c).remove();jQuery(".filename .title",c).css("font-weight","normal");jQuery("a.undo",c).addClass("hidden");jQuery("a.describe-toggle-on, .menu_order_input",c).show();c.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:false,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}});return false});jQuery("#media-item-"+b.id+".startopen").removeClass("startopen").slideToggle(500).siblings(".toggle").toggle()}function itemAjaxError(c,b){var a=jQuery("#media-item-error"+c);a.html('<div class="file-error"><button type="button" id="dismiss-'+c+'" class="button dismiss">'+swfuploadL10n.dismiss+"</button>"+b+"</div>");jQuery("#dismiss-"+c).click(function(){jQuery(this).parents(".file-error").slideUp(200,function(){jQuery(this).empty()})})}function deleteSuccess(b,d){if(b=="-1"){return itemAjaxError(this.id,"You do not have permission. Has your session expired?")}if(b=="0"){return itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?")}var c=this.id,a=jQuery("#media-item-"+c);if(type=jQuery("#type-of-"+c).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-1)}if(a.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1)}if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".toggle").toggle();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery(".toggle",a).toggle();jQuery(".slidetoggle",a).slideUp(200).siblings().removeClass("hidden");a.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:false,duration:500}).addClass("undo");jQuery(".filename:empty",a).remove();jQuery(".filename .title",a).css("font-weight","bold");jQuery(".filename",a).append('<span class="trashnotice"> '+swfuploadL10n.deleted+" </span>").siblings("a.toggle").hide();jQuery(".filename",a).append(jQuery("a.undo",a).removeClass("hidden"));jQuery(".menu_order_input",a).hide();return}function deleteError(c,b,a){}function updateMediaForm(){var b=jQuery("form.type-form #media-items").children(),a=jQuery("#media-items").children();if(b.length==1){jQuery(".slidetoggle",b).slideDown(500).siblings().addClass("hidden").filter(".toggle").toggle()}if(a.not(".media-blank").length>0){jQuery(".savebutton").show()}else{jQuery(".savebutton").hide()}if(a.length>1){jQuery(".insert-gallery").show()}else{jQuery(".insert-gallery").hide()}}function uploadSuccess(b,a){if(a.match("media-upload-error")){jQuery("#media-item-"+b.id).html(a);return}prepareMediaItem(b,a);updateMediaForm();if(jQuery("#media-item-"+b.id).hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(1*jQuery("#attachments-count").text()+1)}}function uploadComplete(a){if(swfu.getStats().files_queued==0){jQuery("#cancel-upload").attr("disabled","disabled");jQuery("#insert-gallery").attr("disabled","")}}function wpQueueError(a){jQuery("#media-upload-error").show().text(a)}function wpFileError(b,a){jQuery("#media-item-"+b.id+" .filename").after('<div class="file-error"><button type="button" id="dismiss-'+b.id+'" class="button dismiss">'+swfuploadL10n.dismiss+"</button>"+a+"</div>").siblings(".toggle").remove();jQuery("#dismiss-"+b.id).click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function fileQueueError(c,a,b){if(a==SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){wpQueueError(swfuploadL10n.queue_limit_exceeded)}else{if(a==SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT){fileQueued(c);wpFileError(c,swfuploadL10n.file_exceeds_size_limit)}else{if(a==SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE){fileQueued(c);wpFileError(c,swfuploadL10n.zero_byte_file)}else{if(a==SWFUpload.QUEUE_ERROR.INVALID_FILETYPE){fileQueued(c);wpFileError(c,swfuploadL10n.invalid_filetype)}else{wpQueueError(swfuploadL10n.default_error)}}}}}function fileDialogComplete(b){try{if(b>0){this.startUpload()}}catch(a){this.debug(a)}}function switchUploader(b){var c=document.getElementById(swfu.customSettings.swfupload_element_id),a=document.getElementById(swfu.customSettings.degraded_element_id);if(b){c.style.display="block";a.style.display="none"}else{c.style.display="none";a.style.display="block"}}function swfuploadPreLoad(){if(!uploaderMode){switchUploader(1)}else{switchUploader(0)}}function swfuploadLoadFailed(){switchUploader(0);jQuery(".upload-html-bypass").hide()}function uploadError(b,c,a){switch(c){case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:wpFileError(b,swfuploadL10n.missing_upload_url);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:wpFileError(b,swfuploadL10n.upload_limit_exceeded);break;case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:wpQueueError(swfuploadL10n.http_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:wpQueueError(swfuploadL10n.upload_failed);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:wpQueueError(swfuploadL10n.io_error);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:wpQueueError(swfuploadL10n.security_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:jQuery("#media-item-"+b.id).remove();break;default:wpFileError(b,swfuploadL10n.default_error)}}function cancelUpload(){swfu.cancelQueue()}jQuery(document).ready(function(a){a('input[type="radio"]',"#media-items").live("click",function(){var b=a(this).closest("tr");if(a(b).hasClass("align")){setUserSetting("align",a(this).val())}else{if(a(b).hasClass("image-size")){setUserSetting("imgsize",a(this).val())}}});a("button.button","#media-items").live("click",function(){var b=this.className||"";b=b.match(/url([^ '"]+)/);if(b&&b[1]){setUserSetting("urlbutton",b[1]);a(this).siblings(".urlfield").val(a(this).attr("title"))}})}); | var topWin=window.dialogArguments||opener||parent||top;function fileDialogStart(){jQuery("#media-upload-error").empty()}function fileQueued(fileObj){jQuery(".media-blank").remove();if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".describe-toggle-on").show();jQuery(".describe-toggle-off").hide();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery("#media-items").append('<div id="media-item-'+fileObj.id+'" class="media-item child-of-'+post_id+'"><div class="progress"><div class="bar"></div></div><div class="filename original"><span class="percent"></span> '+fileObj.name+"</div></div>");jQuery(".progress","#media-item-"+fileObj.id).show();jQuery("#insert-gallery").attr("disabled","disabled");jQuery("#cancel-upload").attr("disabled","")}function uploadStart(fileObj){try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}}catch(e){}return true}function uploadProgress(fileObj,bytesDone,bytesTotal){var w=jQuery("#media-items").width()-2,item=jQuery("#media-item-"+fileObj.id);jQuery(".bar",item).width(w*bytesDone/bytesTotal);jQuery(".percent",item).html(Math.ceil(bytesDone/bytesTotal*100)+"%");if(bytesDone==bytesTotal){jQuery(".bar",item).html('<strong class="crunching">'+swfuploadL10n.crunching+"</strong>")}}function prepareMediaItem(fileObj,serverData){var f=(typeof shortform=="undefined")?1:2,item=jQuery("#media-item-"+fileObj.id);jQuery(".bar",item).remove();jQuery(".progress",item).hide();try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}}catch(e){}if(isNaN(serverData)||!serverData){item.append(serverData);prepareMediaItemInit(fileObj)}else{item.load("async-upload.php",{attachment_id:serverData,fetch:f},function(){prepareMediaItemInit(fileObj);updateMediaForm()})}}function prepareMediaItemInit(fileObj){var item=jQuery("#media-item-"+fileObj.id);jQuery(".thumbnail",item).clone().attr("className","pinkynail toggle").prependTo(item);jQuery(".filename.original",item).replaceWith(jQuery(".filename.new",item));jQuery("a.toggle",item).click(function(){jQuery(this).siblings(".slidetoggle").slideToggle(350,function(){var w=jQuery(window).height(),t=jQuery(this).offset().top,h=jQuery(this).height(),b;if(w&&t&&h){b=t+h;if(b>w&&(h+48)<w){window.scrollBy(0,b-w+13)}else{if(b>w){window.scrollTo(0,t-36)}}}});jQuery(this).siblings(".toggle").andSelf().toggle();jQuery(this).siblings("a.toggle").focus();return false});jQuery("a.delete",item).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",success:deleteSuccess,error:deleteError,id:fileObj.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}});return false});jQuery("a.undo",item).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",id:fileObj.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(data,textStatus){var item=jQuery("#media-item-"+fileObj.id);if(type=jQuery("#type-of-"+fileObj.id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-0+1)}if(item.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-0+1)}jQuery(".filename .trashnotice",item).remove();jQuery(".filename .title",item).css("font-weight","normal");jQuery("a.undo",item).addClass("hidden");jQuery("a.describe-toggle-on, .menu_order_input",item).show();item.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:false,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}});return false});jQuery("#media-item-"+fileObj.id+".startopen").removeClass("startopen").slideToggle(500).siblings(".toggle").toggle()}function itemAjaxError(id,html){var item=jQuery("#media-item-"+id);var filename=jQuery(".filename",item).text();item.html('<div class="error-div"><a class="dismiss" href="#">'+swfuploadL10n.dismiss+"</a><strong>"+swfuploadL10n.error_uploading.replace("%s",filename)+"</strong><br />"+html+"</div>");item.find("a.dismiss").click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function deleteSuccess(data,textStatus){if(data=="-1"){return itemAjaxError(this.id,"You do not have permission. Has your session expired?")}if(data=="0"){return itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?")}var id=this.id,item=jQuery("#media-item-"+id);if(type=jQuery("#type-of-"+id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-1)}if(item.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1)}if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".toggle").toggle();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery(".toggle",item).toggle();jQuery(".slidetoggle",item).slideUp(200).siblings().removeClass("hidden");item.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:false,duration:500}).addClass("undo");jQuery(".filename:empty",item).remove();jQuery(".filename .title",item).css("font-weight","bold");jQuery(".filename",item).append('<span class="trashnotice"> '+swfuploadL10n.deleted+" </span>").siblings("a.toggle").hide();jQuery(".filename",item).append(jQuery("a.undo",item).removeClass("hidden"));jQuery(".menu_order_input",item).hide();return}function deleteError(X,textStatus,errorThrown){}function updateMediaForm(){var one=jQuery("form.type-form #media-items").children(),items=jQuery("#media-items").children();if(one.length==1){jQuery(".slidetoggle",one).slideDown(500).siblings().addClass("hidden").filter(".toggle").toggle()}if(items.not(".media-blank").length>0){jQuery(".savebutton").show()}else{jQuery(".savebutton").hide()}if(items.length>1){jQuery(".insert-gallery").show()}else{jQuery(".insert-gallery").hide()}}function uploadSuccess(fileObj,serverData){if(serverData.match("media-upload-error")){jQuery("#media-item-"+fileObj.id).html(serverData);return}prepareMediaItem(fileObj,serverData);updateMediaForm();if(jQuery("#media-item-"+fileObj.id).hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(1*jQuery("#attachments-count").text()+1)}}function uploadComplete(fileObj){if(swfu.getStats().files_queued==0){jQuery("#cancel-upload").attr("disabled","disabled");jQuery("#insert-gallery").attr("disabled","")}}function wpQueueError(message){jQuery("#media-upload-error").show().text(message)}function wpFileError(fileObj,message){var item=jQuery("#media-item-"+fileObj.id);var filename=jQuery(".filename",item).text();item.html('<div class="error-div"><a class="dismiss" href="#">'+swfuploadL10n.dismiss+"</a><strong>"+swfuploadL10n.error_uploading.replace("%s",filename)+"</strong><br />"+message+"</div>");item.find("a.dismiss").click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function fileQueueError(fileObj,error_code,message){if(error_code==SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){wpQueueError(swfuploadL10n.queue_limit_exceeded)}else{if(error_code==SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT){fileQueued(fileObj);wpFileError(fileObj,swfuploadL10n.file_exceeds_size_limit)}else{if(error_code==SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE){fileQueued(fileObj);wpFileError(fileObj,swfuploadL10n.zero_byte_file)}else{if(error_code==SWFUpload.QUEUE_ERROR.INVALID_FILETYPE){fileQueued(fileObj);wpFileError(fileObj,swfuploadL10n.invalid_filetype)}else{wpQueueError(swfuploadL10n.default_error)}}}}}function fileDialogComplete(num_files_queued){try{if(num_files_queued>0){this.startUpload()}}catch(ex){this.debug(ex)}}function switchUploader(s){var f=document.getElementById(swfu.customSettings.swfupload_element_id),h=document.getElementById(swfu.customSettings.degraded_element_id);if(s){f.style.display="block";h.style.display="none"}else{f.style.display="none";h.style.display="block"}}function swfuploadPreLoad(){if(!uploaderMode){switchUploader(1)}else{switchUploader(0)}}function swfuploadLoadFailed(){switchUploader(0);jQuery(".upload-html-bypass").hide()}function uploadError(fileObj,errorCode,message){switch(errorCode){case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:wpFileError(fileObj,swfuploadL10n.missing_upload_url);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:wpFileError(fileObj,swfuploadL10n.upload_limit_exceeded);break;case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:wpQueueError(swfuploadL10n.http_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:wpQueueError(swfuploadL10n.upload_failed);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:wpQueueError(swfuploadL10n.io_error);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:wpQueueError(swfuploadL10n.security_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:jQuery("#media-item-"+fileObj.id).remove();break;default:wpFileError(fileObj,swfuploadL10n.default_error)}}function cancelUpload(){swfu.cancelQueue()}jQuery(document).ready(function($){$('input[type="radio"]',"#media-items").live("click",function(){var tr=$(this).closest("tr");if($(tr).hasClass("align")){setUserSetting("align",$(this).val())}else{if($(tr).hasClass("image-size")){setUserSetting("imgsize",$(this).val())}}});$("button.button","#media-items").live("click",function(){var c=this.className||"";c=c.match(/url([^ '"]+)/);if(c&&c[1]){setUserSetting("urlbutton",c[1]);$(this).siblings(".urlfield").val($(this).attr("title"))}})}); | var topWin=window.dialogArguments||opener||parent||top;function fileDialogStart(){jQuery("#media-upload-error").empty()}function fileQueued(a){jQuery(".media-blank").remove();if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".describe-toggle-on").show();jQuery(".describe-toggle-off").hide();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery("#media-items").append('<div id="media-item-'+a.id+'" class="media-item child-of-'+post_id+'"><div class="progress"><div class="bar"></div></div><div class="filename original"><span class="percent"></span> '+a.name+"</div></div>");jQuery(".progress","#media-item-"+a.id).show();jQuery("#insert-gallery").attr("disabled","disabled");jQuery("#cancel-upload").attr("disabled","")}function uploadStart(a){try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").unbind("click",topWin.tb_remove)}}catch(b){}return true}function uploadProgress(e,b,d){var a=jQuery("#media-items").width()-2,c=jQuery("#media-item-"+e.id);jQuery(".bar",c).width(a*b/d);jQuery(".percent",c).html(Math.ceil(b/d*100)+"%");if(b==d){jQuery(".bar",c).html('<strong class="crunching">'+swfuploadL10n.crunching+"</strong>")}}function prepareMediaItem(c,a){var d=(typeof shortform=="undefined")?1:2,b=jQuery("#media-item-"+c.id);jQuery(".bar",b).remove();jQuery(".progress",b).hide();try{if(typeof topWin.tb_remove!="undefined"){topWin.jQuery("#TB_overlay").click(topWin.tb_remove)}}catch(g){}if(isNaN(a)||!a){b.append(a);prepareMediaItemInit(c)}else{b.load("async-upload.php",{attachment_id:a,fetch:d},function(){prepareMediaItemInit(c);updateMediaForm()})}}function prepareMediaItemInit(b){var a=jQuery("#media-item-"+b.id);jQuery(".thumbnail",a).clone().attr("className","pinkynail toggle").prependTo(a);jQuery(".filename.original",a).replaceWith(jQuery(".filename.new",a));jQuery("a.toggle",a).click(function(){jQuery(this).siblings(".slidetoggle").slideToggle(350,function(){var d=jQuery(window).height(),e=jQuery(this).offset().top,f=jQuery(this).height(),c;if(d&&e&&f){c=e+f;if(c>d&&(f+48)<d){window.scrollBy(0,c-d+13)}else{if(c>d){window.scrollTo(0,e-36)}}}});jQuery(this).siblings(".toggle").andSelf().toggle();jQuery(this).siblings("a.toggle").focus();return false});jQuery("a.delete",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",success:deleteSuccess,error:deleteError,id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"trash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")}});return false});jQuery("a.undo",a).click(function(){jQuery.ajax({url:"admin-ajax.php",type:"post",id:b.id,data:{id:this.id.replace(/[^0-9]/g,""),action:"untrash-post",_ajax_nonce:this.href.replace(/^.*wpnonce=/,"")},success:function(d,e){var c=jQuery("#media-item-"+b.id);if(type=jQuery("#type-of-"+b.id).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-0+1)}if(c.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-0+1)}jQuery(".filename .trashnotice",c).remove();jQuery(".filename .title",c).css("font-weight","normal");jQuery("a.undo",c).addClass("hidden");jQuery("a.describe-toggle-on, .menu_order_input",c).show();c.css({backgroundColor:"#ceb"}).animate({backgroundColor:"#fff"},{queue:false,duration:500,complete:function(){jQuery(this).css({backgroundColor:""})}}).removeClass("undo")}});return false});jQuery("#media-item-"+b.id+".startopen").removeClass("startopen").slideToggle(500).siblings(".toggle").toggle()}function itemAjaxError(c,b){var a=jQuery("#media-item-error"+c);a.html('<div class="file-error"><button type="button" id="dismiss-'+c+'" class="button dismiss">'+swfuploadL10n.dismiss+"</button>"+b+"</div>");jQuery("#dismiss-"+c).click(function(){jQuery(this).parents(".file-error").slideUp(200,function(){jQuery(this).empty()})})}function deleteSuccess(b,d){if(b=="-1"){return itemAjaxError(this.id,"You do not have permission. Has your session expired?")}if(b=="0"){return itemAjaxError(this.id,"Could not be deleted. Has it been deleted already?")}var c=this.id,a=jQuery("#media-item-"+c);if(type=jQuery("#type-of-"+c).val()){jQuery("#"+type+"-counter").text(jQuery("#"+type+"-counter").text()-1)}if(a.hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(jQuery("#attachments-count").text()-1)}if(jQuery("form.type-form #media-items").children().length==1&&jQuery(".hidden","#media-items").length>0){jQuery(".toggle").toggle();jQuery(".slidetoggle").slideUp(200).siblings().removeClass("hidden")}jQuery(".toggle",a).toggle();jQuery(".slidetoggle",a).slideUp(200).siblings().removeClass("hidden");a.css({backgroundColor:"#faa"}).animate({backgroundColor:"#f4f4f4"},{queue:false,duration:500}).addClass("undo");jQuery(".filename:empty",a).remove();jQuery(".filename .title",a).css("font-weight","bold");jQuery(".filename",a).append('<span class="trashnotice"> '+swfuploadL10n.deleted+" </span>").siblings("a.toggle").hide();jQuery(".filename",a).append(jQuery("a.undo",a).removeClass("hidden"));jQuery(".menu_order_input",a).hide();return}function deleteError(c,b,a){}function updateMediaForm(){var b=jQuery("form.type-form #media-items").children(),a=jQuery("#media-items").children();if(b.length==1){jQuery(".slidetoggle",b).slideDown(500).siblings().addClass("hidden").filter(".toggle").toggle()}if(a.not(".media-blank").length>0){jQuery(".savebutton").show()}else{jQuery(".savebutton").hide()}if(a.length>1){jQuery(".insert-gallery").show()}else{jQuery(".insert-gallery").hide()}}function uploadSuccess(b,a){if(a.match("media-upload-error")){jQuery("#media-item-"+b.id).html(a);return}prepareMediaItem(b,a);updateMediaForm();if(jQuery("#media-item-"+b.id).hasClass("child-of-"+post_id)){jQuery("#attachments-count").text(1*jQuery("#attachments-count").text()+1)}}function uploadComplete(a){if(swfu.getStats().files_queued==0){jQuery("#cancel-upload").attr("disabled","disabled");jQuery("#insert-gallery").attr("disabled","")}}function wpQueueError(a){jQuery("#media-upload-error").show().text(a)}function wpFileError(b,a){jQuery("#media-item-"+b.id+" .filename").after('<div class="file-error"><button type="button" id="dismiss-'+b.id+'" class="button dismiss">'+swfuploadL10n.dismiss+"</button>"+a+"</div>").siblings(".toggle").remove();jQuery("#dismiss-"+b.id).click(function(){jQuery(this).parents(".media-item").slideUp(200,function(){jQuery(this).remove()})})}function fileQueueError(c,a,b){if(a==SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED){wpQueueError(swfuploadL10n.queue_limit_exceeded)}else{if(a==SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT){fileQueued(c);wpFileError(c,swfuploadL10n.file_exceeds_size_limit)}else{if(a==SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE){fileQueued(c);wpFileError(c,swfuploadL10n.zero_byte_file)}else{if(a==SWFUpload.QUEUE_ERROR.INVALID_FILETYPE){fileQueued(c);wpFileError(c,swfuploadL10n.invalid_filetype)}else{wpQueueError(swfuploadL10n.default_error)}}}}}function fileDialogComplete(b){try{if(b>0){this.startUpload()}}catch(a){this.debug(a)}}function switchUploader(b){var c=document.getElementById(swfu.customSettings.swfupload_element_id),a=document.getElementById(swfu.customSettings.degraded_element_id);if(b){c.style.display="block";a.style.display="none"}else{c.style.display="none";a.style.display="block"}}function swfuploadPreLoad(){if(!uploaderMode){switchUploader(1)}else{switchUploader(0)}}function swfuploadLoadFailed(){switchUploader(0);jQuery(".upload-html-bypass").hide()}function uploadError(b,c,a){switch(c){case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:wpFileError(b,swfuploadL10n.missing_upload_url);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:wpFileError(b,swfuploadL10n.upload_limit_exceeded);break;case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:wpQueueError(swfuploadL10n.http_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:wpQueueError(swfuploadL10n.upload_failed);break;case SWFUpload.UPLOAD_ERROR.IO_ERROR:wpQueueError(swfuploadL10n.io_error);break;case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:wpQueueError(swfuploadL10n.security_error);break;case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:jQuery("#media-item-"+b.id).remove();break;default:wpFileError(b,swfuploadL10n.default_error)}}function cancelUpload(){swfu.cancelQueue()}jQuery(document).ready(function(a){a('input[type="radio"]',"#media-items").live("click",function(){var b=a(this).closest("tr");if(a(b).hasClass("align")){setUserSetting("align",a(this).val())}else{if(a(b).hasClass("image-size")){setUserSetting("imgsize",a(this).val())}}});a("button.button","#media-items").live("click",function(){var b=this.className||"";b=b.match(/url([^ '"]+)/);if(b&&b[1]){setUserSetting("urlbutton",b[1]);a(this).siblings(".urlfield").val(a(this).attr("title"))}})}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/89eab4f3b7e096f5a350344e2ef3bbeca9e3b161/handlers.js/buggy/wp-includes/js/swfupload/handlers.js |
$('input#torrent_auto_start').attr('checked', this[Prefs._AutoStart]); | $('input#torrent_auto_start').attr('checked', $('#prefs_form #auto_start')[0].checked); | uploadTorrentFile: function(confirmed) { // Display the upload dialog if (! confirmed) { $('input#torrent_upload_file').attr('value', ''); $('input#torrent_upload_url').attr('value', ''); $('input#torrent_auto_start').attr('checked', this[Prefs._AutoStart]); $('#upload_container').show(); if (!iPhone && Safari3) { setTimeout("$('div#upload_container div.dialog_window').css('top', '0px');",10); } // Submit the upload form } else { var tr = this; var args = { }; var paused = !$('#torrent_auto_start').is(':checked'); if ('' != $('#torrent_upload_url').val()) { tr.remote.addTorrentByUrl($('#torrent_upload_url').val(), { paused: paused }); } else { args.url = '/transmission/upload?paused=' + paused; args.type = 'POST'; args.data = { 'X-Transmission-Session-Id' : tr.remote._token }; args.dataType = 'xml'; args.iframe = true; args.success = function( data ) { tr.refreshTorrents(); tr.togglePeriodicRefresh( true ); }; tr.togglePeriodicRefresh( false ); $('#torrent_upload_form').ajaxSubmit( args ); } } }, | 8560 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8560/e1607c8354f1a53af52e28a4df050487d03222cd/transmission.js/buggy/web/javascript/transmission.js |
uploadTorrentFile: function(confirmed) { // Display the upload dialog if (! confirmed) { $('input#torrent_upload_file').attr('value', ''); $('input#torrent_upload_url').attr('value', ''); $('input#torrent_auto_start').attr('checked', $('#prefs_form #auto_start')[0].checked); $('#upload_container').show(); if (!iPhone && Safari3) { setTimeout("$('div#upload_container div.dialog_window').css('top', '0px');",10); } // Submit the upload form } else { var tr = this; var args = { }; var paused = !$('#torrent_auto_start').is(':checked'); if ('' != $('#torrent_upload_url').val()) { tr.remote.addTorrentByUrl($('#torrent_upload_url').val(), { paused: paused }); } else { args.url = '/transmission/upload?paused=' + paused; args.type = 'POST'; args.data = { 'X-Transmission-Session-Id' : tr.remote._token }; args.dataType = 'xml'; args.iframe = true; args.success = function( data ) { tr.refreshTorrents(); tr.togglePeriodicRefresh( true ); }; tr.togglePeriodicRefresh( false ); $('#torrent_upload_form').ajaxSubmit( args ); } } }, | 8560 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8560/ad9814612d62f8069f4c5993934c66dfc5b804f9/transmission.js/clean/web/javascript/transmission.js |
||
args.url = '/transmission/upload?paused=' + paused; | args.url = '../upload?paused=' + paused; | uploadTorrentFile: function(confirmed) { // Display the upload dialog if (! confirmed) { $('input#torrent_upload_file').attr('value', ''); $('input#torrent_upload_url').attr('value', ''); $('input#torrent_auto_start').attr('checked', $('#prefs_form #auto_start')[0].checked); $('#upload_container').show(); $('#torrent_upload_url').focus(); if (!iPhone && Safari3) { setTimeout("$('div#upload_container div.dialog_window').css('top', '0px');",10); } // Submit the upload form } else { var tr = this; var args = { }; var paused = !$('#torrent_auto_start').is(':checked'); if ('' != $('#torrent_upload_url').val()) { tr.remote.addTorrentByUrl($('#torrent_upload_url').val(), { paused: paused }); } else { args.url = '/transmission/upload?paused=' + paused; args.type = 'POST'; args.data = { 'X-Transmission-Session-Id' : tr.remote._token }; args.dataType = 'xml'; args.iframe = true; args.success = function( data ) { tr.refreshTorrents(); tr.togglePeriodicRefresh( true ); }; tr.togglePeriodicRefresh( false ); $('#torrent_upload_form').ajaxSubmit( args ); } } }, | 8560 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8560/3a5d17cfdee6087a4b3eaf100fcab1d11099253b/transmission.js/clean/web/javascript/transmission.js |
var count, server, item; this.directory = null; this.children[3].hide(); this.server_uuid = null; count = UPnP.MediaServersCount; this.list.length = 0; for (i=0; i<count; i++) { server = UPnP.GetMediaServer(i); item = new Object(); item.name = server.Name; item.directory = true; item.is_server = true; item.path = server.UUID; this.list[i] = item; } }; | var count, server, item; this.directory = null; this.children[3].hide(); this.server_uuid = null; count = UPnP.MediaServersCount; this.list.length = 0; for (i=0; i<count; i++) { server = UPnP.GetMediaServer(i); item = new Object(); item.name = server.Name; item.directory = true; item.is_server = true; item.path = server.UUID; this.list[i] = item; } }; | filebrowse.upnp_get_server_list = function() { var count, server, item; this.directory = null; this.children[3].hide(); this.server_uuid = null; count = UPnP.MediaServersCount; this.list.length = 0; for (i=0; i<count; i++) { server = UPnP.GetMediaServer(i); item = new Object(); item.name = server.Name; item.directory = true; item.is_server = true; item.path = server.UUID; this.list[i] = item; } }; | 5629 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5629/065749275af591a8e9dae438d9ec67122549b57c/gui.js/clean/gui/gui.js |
(function(a){a.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(b,c){if(b=="selected"){if(this.options.collapsible&&c==this.options.selected){return}this.select(c)}else{this.options[b]=c;if(b=="deselectable"){this.options.collapsible=c}this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+a.data(b)},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a.data(this.list[0]));return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(c,b){return{tab:c,panel:b,index:this.anchors.index(c)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(n){this.list=this.element.children("ul:first");this.lis=a("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);var p=this,d=this.options;var c=/^#.+/;this.anchors.each(function(r,o){var q=a(o).attr("href");var s=q.split("#")[0],u;if(s&&(s===location.toString().split("#")[0]||(u=a("base")[0])&&s===u.href)){q=o.hash;o.href=q}if(c.test(q)){p.panels=p.panels.add(p._sanitizeSelector(q))}else{if(q!="#"){a.data(o,"href.tabs",q);a.data(o,"load.tabs",q.replace(/#.*$/,""));var w=p._tabId(o);o.href="#"+w;var v=a("#"+w);if(!v.length){v=a(d.panelTemplate).attr("id",w).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(p.panels[r-1]||p.list);v.data("destroy.tabs",true)}p.panels=p.panels.add(v)}else{d.disabled.push(r)}}});if(n){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(d.selected===undefined){if(location.hash){this.anchors.each(function(q,o){if(o.hash==location.hash){d.selected=q;return false}})}if(typeof d.selected!="number"&&d.cookie){d.selected=parseInt(p._cookie(),10)}if(typeof d.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}d.selected=d.selected||0}else{if(d.selected===null){d.selected=-1}}d.selected=((d.selected>=0&&this.anchors[d.selected])||d.selected<0)?d.selected:0;d.disabled=a.unique(d.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(q,o){return p.lis.index(q)}))).sort();if(a.inArray(d.selected,d.disabled)!=-1){d.disabled.splice(a.inArray(d.selected,d.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(d.selected>=0&&this.anchors.length){this.panels.eq(d.selected).removeClass("ui-tabs-hide");this.lis.eq(d.selected).addClass("ui-tabs-selected ui-state-active");p.element.queue("tabs",function(){p._trigger("show",null,p._ui(p.anchors[d.selected],p.panels[d.selected]))});this.load(d.selected)}a(window).bind("unload",function(){p.lis.add(p.anchors).unbind(".tabs");p.lis=p.anchors=p.panels=null})}else{d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[d.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(d.cookie){this._cookie(d.selected,d.cookie)}for(var g=0,m;(m=this.lis[g]);g++){a(m)[a.inArray(g,d.disabled)!=-1&&!a(m).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(d.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(d.event!="mouseover"){var f=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)}};var j=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){f("hover",a(this))});this.lis.bind("mouseout.tabs",function(){j("hover",a(this))});this.anchors.bind("focus.tabs",function(){f("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var b,h;if(d.fx){if(a.isArray(d.fx)){b=d.fx[0];h=d.fx[1]}else{b=h=d.fx}}function e(i,o){i.css({display:""});if(a.browser.msie&&o.opacity){i[0].style.removeAttribute("filter")}}var k=h?function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.hide().removeClass("ui-tabs-hide").animate(h,h.duration||"normal",function(){e(o,h);p._trigger("show",null,p._ui(i,o[0]))})}:function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");p._trigger("show",null,p._ui(i,o[0]))};var l=b?function(o,i){i.animate(b,b.duration||"normal",function(){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");e(i,b);p.element.dequeue("tabs")})}:function(o,i,q){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");p.element.dequeue("tabs")};this.anchors.bind(d.event+".tabs",function(){var o=this,r=a(this).closest("li"),i=p.panels.filter(":not(.ui-tabs-hide)"),q=a(p._sanitizeSelector(this.hash));if((r.hasClass("ui-tabs-selected")&&!d.collapsible)||r.hasClass("ui-state-disabled")||r.hasClass("ui-state-processing")||p._trigger("select",null,p._ui(this,q[0]))===false){this.blur();return false}d.selected=p.anchors.index(this);p.abort();if(d.collapsible){if(r.hasClass("ui-tabs-selected")){d.selected=-1;if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){l(o,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this));this.blur();return false}}}if(d.cookie){p._cookie(d.selected,d.cookie)}if(q.length){if(i.length){p.element.queue("tabs",function(){l(o,i)})}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(a.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var c=a.data(this,"href.tabs");if(c){this.href=c}var d=a(this).unbind(".tabs");a.each(["href","load","cache"],function(e,f){d.removeData(f+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove()}else{a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(b.cookie){this._cookie(null,b.cookie)}},add:function(e,d,c){if(c===undefined){c=this.anchors.length}var b=this,g=this.options,i=a(g.tabTemplate.replace(/#\{href\}/g,e).replace(/#\{label\}/g,d)),h=!e.indexOf("#")?e.replace("#",""):this._tabId(a("a",i)[0]);i.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var f=a("#"+h);if(!f.length){f=a(g.panelTemplate).attr("id",h).data("destroy.tabs",true)}f.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(c>=this.lis.length){i.appendTo(this.list);f.appendTo(this.list[0].parentNode)}else{i.insertBefore(this.lis[c]);f.insertBefore(this.panels[c])}g.disabled=a.map(g.disabled,function(k,j){return k>=c?++k:k});this._tabify();if(this.anchors.length==1){i.addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[c],this.panels[c]))},remove:function(b){var d=this.options,e=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();if(e.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(b+(b+1<this.anchors.length?1:-1))}d.disabled=a.map(a.grep(d.disabled,function(g,f){return g!=b}),function(g,f){return g>=b?--g:g});this._tabify();this._trigger("remove",null,this._ui(e.find("a")[0],c[0]))},enable:function(b){var c=this.options;if(a.inArray(b,c.disabled)==-1){return}this.lis.eq(b).removeClass("ui-state-disabled");c.disabled=a.grep(c.disabled,function(e,d){return e!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]))},disable:function(c){var b=this,d=this.options;if(c!=d.selected){this.lis.eq(c).addClass("ui-state-disabled");d.disabled.push(c);d.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]))}},select:function(b){if(typeof b=="string"){b=this.anchors.index(this.anchors.filter("[href$="+b+"]"))}else{if(b===null){b=-1}}if(b==-1&&this.options.collapsible){b=this.options.selected}this.anchors.eq(b).trigger(this.options.event+".tabs")},load:function(e){var c=this,g=this.options,b=this.anchors.eq(e)[0],d=a.data(b,"load.tabs");this.abort();if(!d||this.element.queue("tabs").length!==0&&a.data(b,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(e).addClass("ui-state-processing");if(g.spinner){var f=a("span",b);f.data("label.tabs",f.html()).html(g.spinner)}this.xhr=a.ajax(a.extend({},g.ajaxOptions,{url:d,success:function(i,h){a(c._sanitizeSelector(b.hash)).html(i);c._cleanup();if(g.cache){a.data(b,"cache.tabs",true)}c._trigger("load",null,c._ui(c.anchors[e],c.panels[e]));try{g.ajaxOptions.success(i,h)}catch(j){}c.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(c,b){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",b)},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.7.1",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading…</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(d,f){var b=this,g=this.options;var c=b._rotate||(b._rotate=function(h){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var i=g.selected;b.select(++i<b.anchors.length?i:0)},d);if(h){h.stopPropagation()}});var e=b._unrotate||(b._unrotate=!f?function(h){if(h.clientX){b.rotate(null)}}:function(h){t=g.selected;c()});if(d){this.element.bind("tabsshow",c);this.anchors.bind(g.event+".tabs",e);c()}else{clearTimeout(b.rotation);this.element.unbind("tabsshow",c);this.anchors.unbind(g.event+".tabs",e);delete this._rotate;delete this._unrotate}}})})(jQuery); | (function(a){a.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(b,c){if(b=="selected"){if(this.options.collapsible&&c==this.options.selected){return}this.select(c)}else{this.options[b]=c;if(b=="deselectable"){this.options.collapsible=c}this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+a.data(b)},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a.data(this.list[0]));return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(c,b){return{tab:c,panel:b,index:this.anchors.index(c)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(n){this.list=this.element.children("ul:first");this.lis=a("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);var p=this,d=this.options;var c=/^#.+/;this.anchors.each(function(r,o){var q=a(o).attr("href");var s=q.split("#")[0],u;if(s&&(s===location.toString().split("#")[0]||(u=a("base")[0])&&s===u.href)){q=o.hash;o.href=q}if(c.test(q)){p.panels=p.panels.add(p._sanitizeSelector(q))}else{if(q!="#"){a.data(o,"href.tabs",q);a.data(o,"load.tabs",q.replace(/#.*$/,""));var w=p._tabId(o);o.href="#"+w;var v=a("#"+w);if(!v.length){v=a(d.panelTemplate).attr("id",w).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(p.panels[r-1]||p.list);v.data("destroy.tabs",true)}p.panels=p.panels.add(v)}else{d.disabled.push(r)}}});if(n){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(d.selected===undefined){if(location.hash){this.anchors.each(function(q,o){if(o.hash==location.hash){d.selected=q;return false}})}if(typeof d.selected!="number"&&d.cookie){d.selected=parseInt(p._cookie(),10)}if(typeof d.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}d.selected=d.selected||0}else{if(d.selected===null){d.selected=-1}}d.selected=((d.selected>=0&&this.anchors[d.selected])||d.selected<0)?d.selected:0;d.disabled=a.unique(d.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(q,o){return p.lis.index(q)}))).sort();if(a.inArray(d.selected,d.disabled)!=-1){d.disabled.splice(a.inArray(d.selected,d.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(d.selected>=0&&this.anchors.length){this.panels.eq(d.selected).removeClass("ui-tabs-hide");this.lis.eq(d.selected).addClass("ui-tabs-selected ui-state-active");p.element.queue("tabs",function(){p._trigger("show",null,p._ui(p.anchors[d.selected],p.panels[d.selected]))});this.load(d.selected)}a(window).bind("unload",function(){p.lis.add(p.anchors).unbind(".tabs");p.lis=p.anchors=p.panels=null})}else{d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[d.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(d.cookie){this._cookie(d.selected,d.cookie)}for(var g=0,m;(m=this.lis[g]);g++){a(m)[a.inArray(g,d.disabled)!=-1&&!a(m).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(d.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(d.event!="mouseover"){var f=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)}};var j=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){f("hover",a(this))});this.lis.bind("mouseout.tabs",function(){j("hover",a(this))});this.anchors.bind("focus.tabs",function(){f("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var b,h;if(d.fx){if(a.isArray(d.fx)){b=d.fx[0];h=d.fx[1]}else{b=h=d.fx}}function e(i,o){i.css({display:""});if(a.browser.msie&&o.opacity){i[0].style.removeAttribute("filter")}}var k=h?function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.hide().removeClass("ui-tabs-hide").animate(h,h.duration||"normal",function(){e(o,h);p._trigger("show",null,p._ui(i,o[0]))})}:function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");p._trigger("show",null,p._ui(i,o[0]))};var l=b?function(o,i){i.animate(b,b.duration||"normal",function(){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");e(i,b);p.element.dequeue("tabs")})}:function(o,i,q){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");p.element.dequeue("tabs")};this.anchors.bind(d.event+".tabs",function(){var o=this,r=a(this).closest("li"),i=p.panels.filter(":not(.ui-tabs-hide)"),q=a(p._sanitizeSelector(this.hash));if((r.hasClass("ui-tabs-selected")&&!d.collapsible)||r.hasClass("ui-state-disabled")||r.hasClass("ui-state-processing")||p._trigger("select",null,p._ui(this,q[0]))===false){this.blur();return false}d.selected=p.anchors.index(this);p.abort();if(d.collapsible){if(r.hasClass("ui-tabs-selected")){d.selected=-1;if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){l(o,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this));this.blur();return false}}}if(d.cookie){p._cookie(d.selected,d.cookie)}if(q.length){if(i.length){p.element.queue("tabs",function(){l(o,i)})}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(a.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var c=a.data(this,"href.tabs");if(c){this.href=c}var d=a(this).unbind(".tabs");a.each(["href","load","cache"],function(e,f){d.removeData(f+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove()}else{a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(b.cookie){this._cookie(null,b.cookie)}},add:function(e,d,c){if(c===undefined){c=this.anchors.length}var b=this,g=this.options,i=a(g.tabTemplate.replace(/#\{href\}/g,e).replace(/#\{label\}/g,d)),h=!e.indexOf("#")?e.replace("#",""):this._tabId(a("a",i)[0]);i.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var f=a("#"+h);if(!f.length){f=a(g.panelTemplate).attr("id",h).data("destroy.tabs",true)}f.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(c>=this.lis.length){i.appendTo(this.list);f.appendTo(this.list[0].parentNode)}else{i.insertBefore(this.lis[c]);f.insertBefore(this.panels[c])}g.disabled=a.map(g.disabled,function(k,j){return k>=c?++k:k});this._tabify();if(this.anchors.length==1){i.addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[c],this.panels[c]))},remove:function(b){var d=this.options,e=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();if(e.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(b+(b+1<this.anchors.length?1:-1))}d.disabled=a.map(a.grep(d.disabled,function(g,f){return g!=b}),function(g,f){return g>=b?--g:g});this._tabify();this._trigger("remove",null,this._ui(e.find("a")[0],c[0]))},enable:function(b){var c=this.options;if(a.inArray(b,c.disabled)==-1){return}this.lis.eq(b).removeClass("ui-state-disabled");c.disabled=a.grep(c.disabled,function(e,d){return e!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]))},disable:function(c){var b=this,d=this.options;if(c!=d.selected){this.lis.eq(c).addClass("ui-state-disabled");d.disabled.push(c);d.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]))}},select:function(b){if(typeof b=="string"){b=this.anchors.index(this.anchors.filter("[href$="+b+"]"))}else{if(b===null){b=-1}}if(b==-1&&this.options.collapsible){b=this.options.selected}this.anchors.eq(b).trigger(this.options.event+".tabs")},load:function(e){var c=this,g=this.options,b=this.anchors.eq(e)[0],d=a.data(b,"load.tabs");this.abort();if(!d||this.element.queue("tabs").length!==0&&a.data(b,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(e).addClass("ui-state-processing");if(g.spinner){var f=a("span",b);f.data("label.tabs",f.html()).html(g.spinner)}this.xhr=a.ajax(a.extend({},g.ajaxOptions,{url:d,success:function(i,h){a(c._sanitizeSelector(b.hash)).html(i);c._cleanup();if(g.cache){a.data(b,"cache.tabs",true)}c._trigger("load",null,c._ui(c.anchors[e],c.panels[e]));try{g.ajaxOptions.success(i,h)}catch(j){}c.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(c,b){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",b)},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.7.2",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading…</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(d,f){var b=this,g=this.options;var c=b._rotate||(b._rotate=function(h){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var i=g.selected;b.select(++i<b.anchors.length?i:0)},d);if(h){h.stopPropagation()}});var e=b._unrotate||(b._unrotate=!f?function(h){if(h.clientX){b.rotate(null)}}:function(h){t=g.selected;c()});if(d){this.element.bind("tabsshow",c);this.anchors.bind(g.event+".tabs",e);c()}else{clearTimeout(b.rotation);this.element.unbind("tabsshow",c);this.anchors.unbind(g.event+".tabs",e);delete this._rotate;delete this._unrotate}}})})(jQuery); | (function(a){a.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(b,c){if(b=="selected"){if(this.options.collapsible&&c==this.options.selected){return}this.select(c)}else{this.options[b]=c;if(b=="deselectable"){this.options.collapsible=c}this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+a.data(b)},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a.data(this.list[0]));return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(c,b){return{tab:c,panel:b,index:this.anchors.index(c)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(n){this.list=this.element.children("ul:first");this.lis=a("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);var p=this,d=this.options;var c=/^#.+/;this.anchors.each(function(r,o){var q=a(o).attr("href");var s=q.split("#")[0],u;if(s&&(s===location.toString().split("#")[0]||(u=a("base")[0])&&s===u.href)){q=o.hash;o.href=q}if(c.test(q)){p.panels=p.panels.add(p._sanitizeSelector(q))}else{if(q!="#"){a.data(o,"href.tabs",q);a.data(o,"load.tabs",q.replace(/#.*$/,""));var w=p._tabId(o);o.href="#"+w;var v=a("#"+w);if(!v.length){v=a(d.panelTemplate).attr("id",w).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(p.panels[r-1]||p.list);v.data("destroy.tabs",true)}p.panels=p.panels.add(v)}else{d.disabled.push(r)}}});if(n){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(d.selected===undefined){if(location.hash){this.anchors.each(function(q,o){if(o.hash==location.hash){d.selected=q;return false}})}if(typeof d.selected!="number"&&d.cookie){d.selected=parseInt(p._cookie(),10)}if(typeof d.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}d.selected=d.selected||0}else{if(d.selected===null){d.selected=-1}}d.selected=((d.selected>=0&&this.anchors[d.selected])||d.selected<0)?d.selected:0;d.disabled=a.unique(d.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(q,o){return p.lis.index(q)}))).sort();if(a.inArray(d.selected,d.disabled)!=-1){d.disabled.splice(a.inArray(d.selected,d.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(d.selected>=0&&this.anchors.length){this.panels.eq(d.selected).removeClass("ui-tabs-hide");this.lis.eq(d.selected).addClass("ui-tabs-selected ui-state-active");p.element.queue("tabs",function(){p._trigger("show",null,p._ui(p.anchors[d.selected],p.panels[d.selected]))});this.load(d.selected)}a(window).bind("unload",function(){p.lis.add(p.anchors).unbind(".tabs");p.lis=p.anchors=p.panels=null})}else{d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[d.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(d.cookie){this._cookie(d.selected,d.cookie)}for(var g=0,m;(m=this.lis[g]);g++){a(m)[a.inArray(g,d.disabled)!=-1&&!a(m).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(d.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(d.event!="mouseover"){var f=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)}};var j=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){f("hover",a(this))});this.lis.bind("mouseout.tabs",function(){j("hover",a(this))});this.anchors.bind("focus.tabs",function(){f("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var b,h;if(d.fx){if(a.isArray(d.fx)){b=d.fx[0];h=d.fx[1]}else{b=h=d.fx}}function e(i,o){i.css({display:""});if(a.browser.msie&&o.opacity){i[0].style.removeAttribute("filter")}}var k=h?function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.hide().removeClass("ui-tabs-hide").animate(h,h.duration||"normal",function(){e(o,h);p._trigger("show",null,p._ui(i,o[0]))})}:function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");p._trigger("show",null,p._ui(i,o[0]))};var l=b?function(o,i){i.animate(b,b.duration||"normal",function(){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");e(i,b);p.element.dequeue("tabs")})}:function(o,i,q){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");p.element.dequeue("tabs")};this.anchors.bind(d.event+".tabs",function(){var o=this,r=a(this).closest("li"),i=p.panels.filter(":not(.ui-tabs-hide)"),q=a(p._sanitizeSelector(this.hash));if((r.hasClass("ui-tabs-selected")&&!d.collapsible)||r.hasClass("ui-state-disabled")||r.hasClass("ui-state-processing")||p._trigger("select",null,p._ui(this,q[0]))===false){this.blur();return false}d.selected=p.anchors.index(this);p.abort();if(d.collapsible){if(r.hasClass("ui-tabs-selected")){d.selected=-1;if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){l(o,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this));this.blur();return false}}}if(d.cookie){p._cookie(d.selected,d.cookie)}if(q.length){if(i.length){p.element.queue("tabs",function(){l(o,i)})}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(a.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var c=a.data(this,"href.tabs");if(c){this.href=c}var d=a(this).unbind(".tabs");a.each(["href","load","cache"],function(e,f){d.removeData(f+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove()}else{a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(b.cookie){this._cookie(null,b.cookie)}},add:function(e,d,c){if(c===undefined){c=this.anchors.length}var b=this,g=this.options,i=a(g.tabTemplate.replace(/#\{href\}/g,e).replace(/#\{label\}/g,d)),h=!e.indexOf("#")?e.replace("#",""):this._tabId(a("a",i)[0]);i.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var f=a("#"+h);if(!f.length){f=a(g.panelTemplate).attr("id",h).data("destroy.tabs",true)}f.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(c>=this.lis.length){i.appendTo(this.list);f.appendTo(this.list[0].parentNode)}else{i.insertBefore(this.lis[c]);f.insertBefore(this.panels[c])}g.disabled=a.map(g.disabled,function(k,j){return k>=c?++k:k});this._tabify();if(this.anchors.length==1){i.addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[c],this.panels[c]))},remove:function(b){var d=this.options,e=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();if(e.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(b+(b+1<this.anchors.length?1:-1))}d.disabled=a.map(a.grep(d.disabled,function(g,f){return g!=b}),function(g,f){return g>=b?--g:g});this._tabify();this._trigger("remove",null,this._ui(e.find("a")[0],c[0]))},enable:function(b){var c=this.options;if(a.inArray(b,c.disabled)==-1){return}this.lis.eq(b).removeClass("ui-state-disabled");c.disabled=a.grep(c.disabled,function(e,d){return e!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]))},disable:function(c){var b=this,d=this.options;if(c!=d.selected){this.lis.eq(c).addClass("ui-state-disabled");d.disabled.push(c);d.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]))}},select:function(b){if(typeof b=="string"){b=this.anchors.index(this.anchors.filter("[href$="+b+"]"))}else{if(b===null){b=-1}}if(b==-1&&this.options.collapsible){b=this.options.selected}this.anchors.eq(b).trigger(this.options.event+".tabs")},load:function(e){var c=this,g=this.options,b=this.anchors.eq(e)[0],d=a.data(b,"load.tabs");this.abort();if(!d||this.element.queue("tabs").length!==0&&a.data(b,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(e).addClass("ui-state-processing");if(g.spinner){var f=a("span",b);f.data("label.tabs",f.html()).html(g.spinner)}this.xhr=a.ajax(a.extend({},g.ajaxOptions,{url:d,success:function(i,h){a(c._sanitizeSelector(b.hash)).html(i);c._cleanup();if(g.cache){a.data(b,"cache.tabs",true)}c._trigger("load",null,c._ui(c.anchors[e],c.panels[e]));try{g.ajaxOptions.success(i,h)}catch(j){}c.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(c,b){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",b)},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.7.1",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading…</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(d,f){var b=this,g=this.options;var c=b._rotate||(b._rotate=function(h){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var i=g.selected;b.select(++i<b.anchors.length?i:0)},d);if(h){h.stopPropagation()}});var e=b._unrotate||(b._unrotate=!f?function(h){if(h.clientX){b.rotate(null)}}:function(h){t=g.selected;c()});if(d){this.element.bind("tabsshow",c);this.anchors.bind(g.event+".tabs",e);c()}else{clearTimeout(b.rotation);this.element.unbind("tabsshow",c);this.anchors.unbind(g.event+".tabs",e);delete this._rotate;delete this._unrotate}}})})(jQuery); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/63267d3702deb1bac9b7c410438f5a1d8eb66209/ui.tabs.js/clean/wp-includes/js/jquery/ui.tabs.js |
(function(c){var b=0,a=0;c.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(d,e){if(d=="selected"){if(this.options.collapsible&&e==this.options.selected){return}this.select(e)}else{this.options[d]=e;if(d=="deselectable"){this.options.collapsible=e}this._tabify()}},_tabId:function(d){return d.title&&d.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+(++b)},_sanitizeSelector:function(d){return d.replace(/:/g,"\\:")},_cookie:function(){var d=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+(++a));return c.cookie.apply(null,[d].concat(c.makeArray(arguments)))},_ui:function(e,d){return{tab:e,panel:d,index:this.anchors.index(e)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var d=c(this);d.html(d.data("label.tabs")).removeData("label.tabs")})},_tabify:function(q){this.list=this.element.children("ul:first");this.lis=c("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return c("a",this)[0]});this.panels=c([]);var r=this,f=this.options;var e=/^#.+/;this.anchors.each(function(u,o){var s=c(o).attr("href");var v=s.split("#")[0],w;if(v&&(v===location.toString().split("#")[0]||(w=c("base")[0])&&v===w.href)){s=o.hash;o.href=s}if(e.test(s)){r.panels=r.panels.add(r._sanitizeSelector(s))}else{if(s!="#"){c.data(o,"href.tabs",s);c.data(o,"load.tabs",s.replace(/#.*$/,""));var y=r._tabId(o);o.href="#"+y;var x=c("#"+y);if(!x.length){x=c(f.panelTemplate).attr("id",y).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(r.panels[u-1]||r.list);x.data("destroy.tabs",true)}r.panels=r.panels.add(x)}else{f.disabled.push(u)}}});if(q){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(f.selected===undefined){if(location.hash){this.anchors.each(function(s,o){if(o.hash==location.hash){f.selected=s;return false}})}if(typeof f.selected!="number"&&f.cookie){f.selected=parseInt(r._cookie(),10)}if(typeof f.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){f.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}f.selected=f.selected||0}else{if(f.selected===null){f.selected=-1}}f.selected=((f.selected>=0&&this.anchors[f.selected])||f.selected<0)?f.selected:0;f.disabled=c.unique(f.disabled.concat(c.map(this.lis.filter(".ui-state-disabled"),function(s,o){return r.lis.index(s)}))).sort();if(c.inArray(f.selected,f.disabled)!=-1){f.disabled.splice(c.inArray(f.selected,f.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(f.selected>=0&&this.anchors.length){this.panels.eq(f.selected).removeClass("ui-tabs-hide");this.lis.eq(f.selected).addClass("ui-tabs-selected ui-state-active");r.element.queue("tabs",function(){r._trigger("show",null,r._ui(r.anchors[f.selected],r.panels[f.selected]))});this.load(f.selected)}c(window).bind("unload",function(){r.lis.add(r.anchors).unbind(".tabs");r.lis=r.anchors=r.panels=null})}else{f.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[f.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(f.cookie){this._cookie(f.selected,f.cookie)}for(var j=0,p;(p=this.lis[j]);j++){c(p)[c.inArray(j,f.disabled)!=-1&&!c(p).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(f.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(f.event!="mouseover"){var h=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)}};var l=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){h("hover",c(this))});this.lis.bind("mouseout.tabs",function(){l("hover",c(this))});this.anchors.bind("focus.tabs",function(){h("focus",c(this).closest("li"))});this.anchors.bind("blur.tabs",function(){l("focus",c(this).closest("li"))})}var d,k;if(f.fx){if(c.isArray(f.fx)){d=f.fx[0];k=f.fx[1]}else{d=k=f.fx}}function g(i,o){i.css({display:""});if(c.browser.msie&&o.opacity){i[0].style.removeAttribute("filter")}}var m=k?function(i,o){c(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.hide().removeClass("ui-tabs-hide").animate(k,k.duration||"normal",function(){g(o,k);r._trigger("show",null,r._ui(i,o[0]))})}:function(i,o){c(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");r._trigger("show",null,r._ui(i,o[0]))};var n=d?function(o,i){i.animate(d,d.duration||"normal",function(){r.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");g(i,d);r.element.dequeue("tabs")})}:function(o,i,s){r.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");r.element.dequeue("tabs")};this.anchors.bind(f.event+".tabs",function(){var o=this,u=c(this).closest("li"),i=r.panels.filter(":not(.ui-tabs-hide)"),s=c(r._sanitizeSelector(this.hash));if((u.hasClass("ui-tabs-selected")&&!f.collapsible)||u.hasClass("ui-state-disabled")||u.hasClass("ui-state-processing")||r._trigger("select",null,r._ui(this,s[0]))===false){this.blur();return false}f.selected=r.anchors.index(this);r.abort();if(f.collapsible){if(u.hasClass("ui-tabs-selected")){f.selected=-1;if(f.cookie){r._cookie(f.selected,f.cookie)}r.element.queue("tabs",function(){n(o,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){if(f.cookie){r._cookie(f.selected,f.cookie)}r.element.queue("tabs",function(){m(o,s)});r.load(r.anchors.index(this));this.blur();return false}}}if(f.cookie){r._cookie(f.selected,f.cookie)}if(s.length){if(i.length){r.element.queue("tabs",function(){n(o,i)})}r.element.queue("tabs",function(){m(o,s)});r.load(r.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(c.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var d=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e=c.data(this,"href.tabs");if(e){this.href=e}var f=c(this).unbind(".tabs");c.each(["href","load","cache"],function(g,h){f.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(c.data(this,"destroy.tabs")){c(this).remove()}else{c(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(d.cookie){this._cookie(null,d.cookie)}},add:function(g,f,e){if(e===undefined){e=this.anchors.length}var d=this,i=this.options,k=c(i.tabTemplate.replace(/#\{href\}/g,g).replace(/#\{label\}/g,f)),j=!g.indexOf("#")?g.replace("#",""):this._tabId(c("a",k)[0]);k.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var h=c("#"+j);if(!h.length){h=c(i.panelTemplate).attr("id",j).data("destroy.tabs",true)}h.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(e>=this.lis.length){k.appendTo(this.list);h.appendTo(this.list[0].parentNode)}else{k.insertBefore(this.lis[e]);h.insertBefore(this.panels[e])}i.disabled=c.map(i.disabled,function(m,l){return m>=e?++m:m});this._tabify();if(this.anchors.length==1){k.addClass("ui-tabs-selected ui-state-active");h.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){d._trigger("show",null,d._ui(d.anchors[0],d.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[e],this.panels[e]))},remove:function(d){var f=this.options,g=this.lis.eq(d).remove(),e=this.panels.eq(d).remove();if(g.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(d+(d+1<this.anchors.length?1:-1))}f.disabled=c.map(c.grep(f.disabled,function(j,h){return j!=d}),function(j,h){return j>=d?--j:j});this._tabify();this._trigger("remove",null,this._ui(g.find("a")[0],e[0]))},enable:function(d){var e=this.options;if(c.inArray(d,e.disabled)==-1){return}this.lis.eq(d).removeClass("ui-state-disabled");e.disabled=c.grep(e.disabled,function(g,f){return g!=d});this._trigger("enable",null,this._ui(this.anchors[d],this.panels[d]))},disable:function(e){var d=this,f=this.options;if(e!=f.selected){this.lis.eq(e).addClass("ui-state-disabled");f.disabled.push(e);f.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[e],this.panels[e]))}},select:function(d){if(typeof d=="string"){d=this.anchors.index(this.anchors.filter("[href$="+d+"]"))}else{if(d===null){d=-1}}if(d==-1&&this.options.collapsible){d=this.options.selected}this.anchors.eq(d).trigger(this.options.event+".tabs")},load:function(g){var e=this,i=this.options,d=this.anchors.eq(g)[0],f=c.data(d,"load.tabs");this.abort();if(!f||this.element.queue("tabs").length!==0&&c.data(d,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(g).addClass("ui-state-processing");if(i.spinner){var h=c("span",d);h.data("label.tabs",h.html()).html(i.spinner)}this.xhr=c.ajax(c.extend({},i.ajaxOptions,{url:f,success:function(k,j){c(e._sanitizeSelector(d.hash)).html(k);e._cleanup();if(i.cache){c.data(d,"cache.tabs",true)}e._trigger("load",null,e._ui(e.anchors[g],e.panels[g]));try{i.ajaxOptions.success(k,j)}catch(l){}e.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(e,d){this.anchors.eq(e).removeData("cache.tabs").data("load.tabs",d)},length:function(){return this.anchors.length}});c.extend(c.ui.tabs,{version:"1.7.3",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading…</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});c.extend(c.ui.tabs.prototype,{rotation:null,rotate:function(f,h){var d=this,i=this.options;var e=d._rotate||(d._rotate=function(j){clearTimeout(d.rotation);d.rotation=setTimeout(function(){var k=i.selected;d.select(++k<d.anchors.length?k:0)},f);if(j){j.stopPropagation()}});var g=d._unrotate||(d._unrotate=!h?function(j){if(j.clientX){d.rotate(null)}}:function(j){t=i.selected;e()});if(f){this.element.bind("tabsshow",e);this.anchors.bind(i.event+".tabs",g);e()}else{clearTimeout(d.rotation);this.element.unbind("tabsshow",e);this.anchors.unbind(i.event+".tabs",g);delete this._rotate;delete this._unrotate}}})})(jQuery); | true);e._trigger("load",null,e._ui(e.anchors[a],e.panels[a]));try{b.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[a],e.panels[a]));try{b.ajaxOptions.error(k,n,a,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(a, e){this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.5"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(a,e){var b=this,c=this.options,h=b._rotate||(b._rotate=function(j){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var k=c.selected;b.select(++k<b.anchors.length?k:0)},a);j&&j.stopPropagation()});e=b._unrotate||(b._unrotate=!e?function(j){j.clientX&&b.rotate(null)}: | (function(c){var b=0,a=0;c.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(d,e){if(d=="selected"){if(this.options.collapsible&&e==this.options.selected){return}this.select(e)}else{this.options[d]=e;if(d=="deselectable"){this.options.collapsible=e}this._tabify()}},_tabId:function(d){return d.title&&d.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+(++b)},_sanitizeSelector:function(d){return d.replace(/:/g,"\\:")},_cookie:function(){var d=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+(++a));return c.cookie.apply(null,[d].concat(c.makeArray(arguments)))},_ui:function(e,d){return{tab:e,panel:d,index:this.anchors.index(e)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var d=c(this);d.html(d.data("label.tabs")).removeData("label.tabs")})},_tabify:function(q){this.list=this.element.children("ul:first");this.lis=c("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return c("a",this)[0]});this.panels=c([]);var r=this,f=this.options;var e=/^#.+/;this.anchors.each(function(u,o){var s=c(o).attr("href");var v=s.split("#")[0],w;if(v&&(v===location.toString().split("#")[0]||(w=c("base")[0])&&v===w.href)){s=o.hash;o.href=s}if(e.test(s)){r.panels=r.panels.add(r._sanitizeSelector(s))}else{if(s!="#"){c.data(o,"href.tabs",s);c.data(o,"load.tabs",s.replace(/#.*$/,""));var y=r._tabId(o);o.href="#"+y;var x=c("#"+y);if(!x.length){x=c(f.panelTemplate).attr("id",y).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(r.panels[u-1]||r.list);x.data("destroy.tabs",true)}r.panels=r.panels.add(x)}else{f.disabled.push(u)}}});if(q){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(f.selected===undefined){if(location.hash){this.anchors.each(function(s,o){if(o.hash==location.hash){f.selected=s;return false}})}if(typeof f.selected!="number"&&f.cookie){f.selected=parseInt(r._cookie(),10)}if(typeof f.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){f.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}f.selected=f.selected||0}else{if(f.selected===null){f.selected=-1}}f.selected=((f.selected>=0&&this.anchors[f.selected])||f.selected<0)?f.selected:0;f.disabled=c.unique(f.disabled.concat(c.map(this.lis.filter(".ui-state-disabled"),function(s,o){return r.lis.index(s)}))).sort();if(c.inArray(f.selected,f.disabled)!=-1){f.disabled.splice(c.inArray(f.selected,f.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(f.selected>=0&&this.anchors.length){this.panels.eq(f.selected).removeClass("ui-tabs-hide");this.lis.eq(f.selected).addClass("ui-tabs-selected ui-state-active");r.element.queue("tabs",function(){r._trigger("show",null,r._ui(r.anchors[f.selected],r.panels[f.selected]))});this.load(f.selected)}c(window).bind("unload",function(){r.lis.add(r.anchors).unbind(".tabs");r.lis=r.anchors=r.panels=null})}else{f.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[f.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(f.cookie){this._cookie(f.selected,f.cookie)}for(var j=0,p;(p=this.lis[j]);j++){c(p)[c.inArray(j,f.disabled)!=-1&&!c(p).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(f.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(f.event!="mouseover"){var h=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)}};var l=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){h("hover",c(this))});this.lis.bind("mouseout.tabs",function(){l("hover",c(this))});this.anchors.bind("focus.tabs",function(){h("focus",c(this).closest("li"))});this.anchors.bind("blur.tabs",function(){l("focus",c(this).closest("li"))})}var d,k;if(f.fx){if(c.isArray(f.fx)){d=f.fx[0];k=f.fx[1]}else{d=k=f.fx}}function g(i,o){i.css({display:""});if(c.browser.msie&&o.opacity){i[0].style.removeAttribute("filter")}}var m=k?function(i,o){c(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.hide().removeClass("ui-tabs-hide").animate(k,k.duration||"normal",function(){g(o,k);r._trigger("show",null,r._ui(i,o[0]))})}:function(i,o){c(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");r._trigger("show",null,r._ui(i,o[0]))};var n=d?function(o,i){i.animate(d,d.duration||"normal",function(){r.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");g(i,d);r.element.dequeue("tabs")})}:function(o,i,s){r.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");r.element.dequeue("tabs")};this.anchors.bind(f.event+".tabs",function(){var o=this,u=c(this).closest("li"),i=r.panels.filter(":not(.ui-tabs-hide)"),s=c(r._sanitizeSelector(this.hash));if((u.hasClass("ui-tabs-selected")&&!f.collapsible)||u.hasClass("ui-state-disabled")||u.hasClass("ui-state-processing")||r._trigger("select",null,r._ui(this,s[0]))===false){this.blur();return false}f.selected=r.anchors.index(this);r.abort();if(f.collapsible){if(u.hasClass("ui-tabs-selected")){f.selected=-1;if(f.cookie){r._cookie(f.selected,f.cookie)}r.element.queue("tabs",function(){n(o,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){if(f.cookie){r._cookie(f.selected,f.cookie)}r.element.queue("tabs",function(){m(o,s)});r.load(r.anchors.index(this));this.blur();return false}}}if(f.cookie){r._cookie(f.selected,f.cookie)}if(s.length){if(i.length){r.element.queue("tabs",function(){n(o,i)})}r.element.queue("tabs",function(){m(o,s)});r.load(r.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(c.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var d=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e=c.data(this,"href.tabs");if(e){this.href=e}var f=c(this).unbind(".tabs");c.each(["href","load","cache"],function(g,h){f.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(c.data(this,"destroy.tabs")){c(this).remove()}else{c(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(d.cookie){this._cookie(null,d.cookie)}},add:function(g,f,e){if(e===undefined){e=this.anchors.length}var d=this,i=this.options,k=c(i.tabTemplate.replace(/#\{href\}/g,g).replace(/#\{label\}/g,f)),j=!g.indexOf("#")?g.replace("#",""):this._tabId(c("a",k)[0]);k.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var h=c("#"+j);if(!h.length){h=c(i.panelTemplate).attr("id",j).data("destroy.tabs",true)}h.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(e>=this.lis.length){k.appendTo(this.list);h.appendTo(this.list[0].parentNode)}else{k.insertBefore(this.lis[e]);h.insertBefore(this.panels[e])}i.disabled=c.map(i.disabled,function(m,l){return m>=e?++m:m});this._tabify();if(this.anchors.length==1){k.addClass("ui-tabs-selected ui-state-active");h.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){d._trigger("show",null,d._ui(d.anchors[0],d.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[e],this.panels[e]))},remove:function(d){var f=this.options,g=this.lis.eq(d).remove(),e=this.panels.eq(d).remove();if(g.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(d+(d+1<this.anchors.length?1:-1))}f.disabled=c.map(c.grep(f.disabled,function(j,h){return j!=d}),function(j,h){return j>=d?--j:j});this._tabify();this._trigger("remove",null,this._ui(g.find("a")[0],e[0]))},enable:function(d){var e=this.options;if(c.inArray(d,e.disabled)==-1){return}this.lis.eq(d).removeClass("ui-state-disabled");e.disabled=c.grep(e.disabled,function(g,f){return g!=d});this._trigger("enable",null,this._ui(this.anchors[d],this.panels[d]))},disable:function(e){var d=this,f=this.options;if(e!=f.selected){this.lis.eq(e).addClass("ui-state-disabled");f.disabled.push(e);f.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[e],this.panels[e]))}},select:function(d){if(typeof d=="string"){d=this.anchors.index(this.anchors.filter("[href$="+d+"]"))}else{if(d===null){d=-1}}if(d==-1&&this.options.collapsible){d=this.options.selected}this.anchors.eq(d).trigger(this.options.event+".tabs")},load:function(g){var e=this,i=this.options,d=this.anchors.eq(g)[0],f=c.data(d,"load.tabs");this.abort();if(!f||this.element.queue("tabs").length!==0&&c.data(d,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(g).addClass("ui-state-processing");if(i.spinner){var h=c("span",d);h.data("label.tabs",h.html()).html(i.spinner)}this.xhr=c.ajax(c.extend({},i.ajaxOptions,{url:f,success:function(k,j){c(e._sanitizeSelector(d.hash)).html(k);e._cleanup();if(i.cache){c.data(d,"cache.tabs",true)}e._trigger("load",null,e._ui(e.anchors[g],e.panels[g]));try{i.ajaxOptions.success(k,j)}catch(l){}e.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(e,d){this.anchors.eq(e).removeData("cache.tabs").data("load.tabs",d)},length:function(){return this.anchors.length}});c.extend(c.ui.tabs,{version:"1.7.3",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading…</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});c.extend(c.ui.tabs.prototype,{rotation:null,rotate:function(f,h){var d=this,i=this.options;var e=d._rotate||(d._rotate=function(j){clearTimeout(d.rotation);d.rotation=setTimeout(function(){var k=i.selected;d.select(++k<d.anchors.length?k:0)},f);if(j){j.stopPropagation()}});var g=d._unrotate||(d._unrotate=!h?function(j){if(j.clientX){d.rotate(null)}}:function(j){t=i.selected;e()});if(f){this.element.bind("tabsshow",e);this.anchors.bind(i.event+".tabs",g);e()}else{clearTimeout(d.rotation);this.element.unbind("tabsshow",e);this.anchors.unbind(i.event+".tabs",g);delete this._rotate;delete this._unrotate}}})})(jQuery); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/acf7df638f135d97c0f97b727e0898760c53bb85/ui.tabs.js/buggy/wp-includes/js/jquery/ui.tabs.js |
true);e._trigger("load",null,e._ui(e.anchors[a],e.panels[a]));try{b.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[a],e.panels[a]));try{b.ajaxOptions.error(k,n,a,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(a, e){this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.4"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(a,e){var b=this,c=this.options,h=b._rotate||(b._rotate=function(i){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var k=c.selected;b.select(++k<b.anchors.length?k:0)},a);i&&i.stopPropagation()});e=b._unrotate||(b._unrotate=!e?function(i){i.clientX&&b.rotate(null)}: | true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(b, e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.6"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k<a.anchors.length?k:0)},b);j&&j.stopPropagation()});e=a._unrotate||(a._unrotate=!e?function(j){j.clientX&&a.rotate(null)}: | true);e._trigger("load",null,e._ui(e.anchors[a],e.panels[a]));try{b.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[a],e.panels[a]));try{b.ajaxOptions.error(k,n,a,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(a,e){this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.4"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(a,e){var b=this,c=this.options,h=b._rotate||(b._rotate=function(i){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var k=c.selected;b.select(++k<b.anchors.length?k:0)},a);i&&i.stopPropagation()});e=b._unrotate||(b._unrotate=!e?function(i){i.clientX&&b.rotate(null)}: | 3959 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/3959/6ffc2de1d5816f49b1cdf002161144b28f2dc6e5/jquery-ui.js/buggy/javascript/jquery-ui.js |
true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(b, e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.6"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k<a.anchors.length?k:0)},b);j&&j.stopPropagation()});e=a._unrotate||(a._unrotate=!e?function(j){j.clientX&&a.rotate(null)}: | url:function(b,e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.7"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k<a.anchors.length?k:0)},b);j&&j.stopPropagation()});e=a._unrotate||(a._unrotate=!e?function(j){j.clientX&& | true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(b,e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.6"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k<a.anchors.length?k:0)},b);j&&j.stopPropagation()});e=a._unrotate||(a._unrotate=!e?function(j){j.clientX&&a.rotate(null)}: | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/7609ca4c650bb6058ed52810c6481f27444078f5/ui.tabs.js/clean/wp-includes/js/jquery/ui.tabs.js |
(function(a){a.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(b,c){if(b=="selected"){if(this.options.collapsible&&c==this.options.selected){return}this.select(c)}else{this.options[b]=c;if(b=="deselectable"){this.options.collapsible=c}this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+a.data(b)},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a.data(this.list[0]));return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(c,b){return{tab:c,panel:b,index:this.anchors.index(c)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(n){this.list=this.element.children("ul:first");this.lis=a("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);var p=this,d=this.options;var c=/^#.+/;this.anchors.each(function(r,o){var q=a(o).attr("href");var s=q.split("#")[0],u;if(s&&(s===location.toString().split("#")[0]||(u=a("base")[0])&&s===u.href)){q=o.hash;o.href=q}if(c.test(q)){p.panels=p.panels.add(p._sanitizeSelector(q))}else{if(q!="#"){a.data(o,"href.tabs",q);a.data(o,"load.tabs",q.replace(/#.*$/,""));var w=p._tabId(o);o.href="#"+w;var v=a("#"+w);if(!v.length){v=a(d.panelTemplate).attr("id",w).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(p.panels[r-1]||p.list);v.data("destroy.tabs",true)}p.panels=p.panels.add(v)}else{d.disabled.push(r)}}});if(n){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(d.selected===undefined){if(location.hash){this.anchors.each(function(q,o){if(o.hash==location.hash){d.selected=q;return false}})}if(typeof d.selected!="number"&&d.cookie){d.selected=parseInt(p._cookie(),10)}if(typeof d.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}d.selected=d.selected||0}else{if(d.selected===null){d.selected=-1}}d.selected=((d.selected>=0&&this.anchors[d.selected])||d.selected<0)?d.selected:0;d.disabled=a.unique(d.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(q,o){return p.lis.index(q)}))).sort();if(a.inArray(d.selected,d.disabled)!=-1){d.disabled.splice(a.inArray(d.selected,d.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(d.selected>=0&&this.anchors.length){this.panels.eq(d.selected).removeClass("ui-tabs-hide");this.lis.eq(d.selected).addClass("ui-tabs-selected ui-state-active");p.element.queue("tabs",function(){p._trigger("show",null,p._ui(p.anchors[d.selected],p.panels[d.selected]))});this.load(d.selected)}a(window).bind("unload",function(){p.lis.add(p.anchors).unbind(".tabs");p.lis=p.anchors=p.panels=null})}else{d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[d.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(d.cookie){this._cookie(d.selected,d.cookie)}for(var g=0,m;(m=this.lis[g]);g++){a(m)[a.inArray(g,d.disabled)!=-1&&!a(m).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(d.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(d.event!="mouseover"){var f=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)}};var j=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){f("hover",a(this))});this.lis.bind("mouseout.tabs",function(){j("hover",a(this))});this.anchors.bind("focus.tabs",function(){f("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var b,h;if(d.fx){if(a.isArray(d.fx)){b=d.fx[0];h=d.fx[1]}else{b=h=d.fx}}function e(i,o){i.css({display:""});if(a.browser.msie&&o.opacity){i[0].style.removeAttribute("filter")}}var k=h?function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.hide().removeClass("ui-tabs-hide").animate(h,h.duration||"normal",function(){e(o,h);p._trigger("show",null,p._ui(i,o[0]))})}:function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");p._trigger("show",null,p._ui(i,o[0]))};var l=b?function(o,i){i.animate(b,b.duration||"normal",function(){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");e(i,b);p.element.dequeue("tabs")})}:function(o,i,q){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");p.element.dequeue("tabs")};this.anchors.bind(d.event+".tabs",function(){var o=this,r=a(this).closest("li"),i=p.panels.filter(":not(.ui-tabs-hide)"),q=a(p._sanitizeSelector(this.hash));if((r.hasClass("ui-tabs-selected")&&!d.collapsible)||r.hasClass("ui-state-disabled")||r.hasClass("ui-state-processing")||p._trigger("select",null,p._ui(this,q[0]))===false){this.blur();return false}d.selected=p.anchors.index(this);p.abort();if(d.collapsible){if(r.hasClass("ui-tabs-selected")){d.selected=-1;if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){l(o,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this));this.blur();return false}}}if(d.cookie){p._cookie(d.selected,d.cookie)}if(q.length){if(i.length){p.element.queue("tabs",function(){l(o,i)})}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(a.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var c=a.data(this,"href.tabs");if(c){this.href=c}var d=a(this).unbind(".tabs");a.each(["href","load","cache"],function(e,f){d.removeData(f+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove()}else{a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(b.cookie){this._cookie(null,b.cookie)}},add:function(e,d,c){if(c===undefined){c=this.anchors.length}var b=this,g=this.options,i=a(g.tabTemplate.replace(/#\{href\}/g,e).replace(/#\{label\}/g,d)),h=!e.indexOf("#")?e.replace("#",""):this._tabId(a("a",i)[0]);i.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var f=a("#"+h);if(!f.length){f=a(g.panelTemplate).attr("id",h).data("destroy.tabs",true)}f.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(c>=this.lis.length){i.appendTo(this.list);f.appendTo(this.list[0].parentNode)}else{i.insertBefore(this.lis[c]);f.insertBefore(this.panels[c])}g.disabled=a.map(g.disabled,function(k,j){return k>=c?++k:k});this._tabify();if(this.anchors.length==1){i.addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[c],this.panels[c]))},remove:function(b){var d=this.options,e=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();if(e.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(b+(b+1<this.anchors.length?1:-1))}d.disabled=a.map(a.grep(d.disabled,function(g,f){return g!=b}),function(g,f){return g>=b?--g:g});this._tabify();this._trigger("remove",null,this._ui(e.find("a")[0],c[0]))},enable:function(b){var c=this.options;if(a.inArray(b,c.disabled)==-1){return}this.lis.eq(b).removeClass("ui-state-disabled");c.disabled=a.grep(c.disabled,function(e,d){return e!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]))},disable:function(c){var b=this,d=this.options;if(c!=d.selected){this.lis.eq(c).addClass("ui-state-disabled");d.disabled.push(c);d.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]))}},select:function(b){if(typeof b=="string"){b=this.anchors.index(this.anchors.filter("[href$="+b+"]"))}else{if(b===null){b=-1}}if(b==-1&&this.options.collapsible){b=this.options.selected}this.anchors.eq(b).trigger(this.options.event+".tabs")},load:function(e){var c=this,g=this.options,b=this.anchors.eq(e)[0],d=a.data(b,"load.tabs");this.abort();if(!d||this.element.queue("tabs").length!==0&&a.data(b,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(e).addClass("ui-state-processing");if(g.spinner){var f=a("span",b);f.data("label.tabs",f.html()).html(g.spinner)}this.xhr=a.ajax(a.extend({},g.ajaxOptions,{url:d,success:function(i,h){a(c._sanitizeSelector(b.hash)).html(i);c._cleanup();if(g.cache){a.data(b,"cache.tabs",true)}c._trigger("load",null,c._ui(c.anchors[e],c.panels[e]));try{g.ajaxOptions.success(i,h)}catch(j){}c.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(c,b){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",b)},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.7.2",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading…</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(d,f){var b=this,g=this.options;var c=b._rotate||(b._rotate=function(h){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var i=g.selected;b.select(++i<b.anchors.length?i:0)},d);if(h){h.stopPropagation()}});var e=b._unrotate||(b._unrotate=!f?function(h){if(h.clientX){b.rotate(null)}}:function(h){t=g.selected;c()});if(d){this.element.bind("tabsshow",c);this.anchors.bind(g.event+".tabs",e);c()}else{clearTimeout(b.rotation);this.element.unbind("tabsshow",c);this.anchors.unbind(g.event+".tabs",e);delete this._rotate;delete this._unrotate}}})})(jQuery); | (function(c){var b=0,a=0;c.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(d,e){if(d=="selected"){if(this.options.collapsible&&e==this.options.selected){return}this.select(e)}else{this.options[d]=e;if(d=="deselectable"){this.options.collapsible=e}this._tabify()}},_tabId:function(d){return d.title&&d.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+(++b)},_sanitizeSelector:function(d){return d.replace(/:/g,"\\:")},_cookie:function(){var d=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+(++a));return c.cookie.apply(null,[d].concat(c.makeArray(arguments)))},_ui:function(e,d){return{tab:e,panel:d,index:this.anchors.index(e)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var d=c(this);d.html(d.data("label.tabs")).removeData("label.tabs")})},_tabify:function(q){this.list=this.element.children("ul:first");this.lis=c("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return c("a",this)[0]});this.panels=c([]);var r=this,f=this.options;var e=/^#.+/;this.anchors.each(function(u,o){var s=c(o).attr("href");var v=s.split("#")[0],w;if(v&&(v===location.toString().split("#")[0]||(w=c("base")[0])&&v===w.href)){s=o.hash;o.href=s}if(e.test(s)){r.panels=r.panels.add(r._sanitizeSelector(s))}else{if(s!="#"){c.data(o,"href.tabs",s);c.data(o,"load.tabs",s.replace(/#.*$/,""));var y=r._tabId(o);o.href="#"+y;var x=c("#"+y);if(!x.length){x=c(f.panelTemplate).attr("id",y).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(r.panels[u-1]||r.list);x.data("destroy.tabs",true)}r.panels=r.panels.add(x)}else{f.disabled.push(u)}}});if(q){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(f.selected===undefined){if(location.hash){this.anchors.each(function(s,o){if(o.hash==location.hash){f.selected=s;return false}})}if(typeof f.selected!="number"&&f.cookie){f.selected=parseInt(r._cookie(),10)}if(typeof f.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){f.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}f.selected=f.selected||0}else{if(f.selected===null){f.selected=-1}}f.selected=((f.selected>=0&&this.anchors[f.selected])||f.selected<0)?f.selected:0;f.disabled=c.unique(f.disabled.concat(c.map(this.lis.filter(".ui-state-disabled"),function(s,o){return r.lis.index(s)}))).sort();if(c.inArray(f.selected,f.disabled)!=-1){f.disabled.splice(c.inArray(f.selected,f.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(f.selected>=0&&this.anchors.length){this.panels.eq(f.selected).removeClass("ui-tabs-hide");this.lis.eq(f.selected).addClass("ui-tabs-selected ui-state-active");r.element.queue("tabs",function(){r._trigger("show",null,r._ui(r.anchors[f.selected],r.panels[f.selected]))});this.load(f.selected)}c(window).bind("unload",function(){r.lis.add(r.anchors).unbind(".tabs");r.lis=r.anchors=r.panels=null})}else{f.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[f.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(f.cookie){this._cookie(f.selected,f.cookie)}for(var j=0,p;(p=this.lis[j]);j++){c(p)[c.inArray(j,f.disabled)!=-1&&!c(p).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(f.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(f.event!="mouseover"){var h=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)}};var l=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){h("hover",c(this))});this.lis.bind("mouseout.tabs",function(){l("hover",c(this))});this.anchors.bind("focus.tabs",function(){h("focus",c(this).closest("li"))});this.anchors.bind("blur.tabs",function(){l("focus",c(this).closest("li"))})}var d,k;if(f.fx){if(c.isArray(f.fx)){d=f.fx[0];k=f.fx[1]}else{d=k=f.fx}}function g(i,o){i.css({display:""});if(c.browser.msie&&o.opacity){i[0].style.removeAttribute("filter")}}var m=k?function(i,o){c(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.hide().removeClass("ui-tabs-hide").animate(k,k.duration||"normal",function(){g(o,k);r._trigger("show",null,r._ui(i,o[0]))})}:function(i,o){c(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");r._trigger("show",null,r._ui(i,o[0]))};var n=d?function(o,i){i.animate(d,d.duration||"normal",function(){r.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");g(i,d);r.element.dequeue("tabs")})}:function(o,i,s){r.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");r.element.dequeue("tabs")};this.anchors.bind(f.event+".tabs",function(){var o=this,u=c(this).closest("li"),i=r.panels.filter(":not(.ui-tabs-hide)"),s=c(r._sanitizeSelector(this.hash));if((u.hasClass("ui-tabs-selected")&&!f.collapsible)||u.hasClass("ui-state-disabled")||u.hasClass("ui-state-processing")||r._trigger("select",null,r._ui(this,s[0]))===false){this.blur();return false}f.selected=r.anchors.index(this);r.abort();if(f.collapsible){if(u.hasClass("ui-tabs-selected")){f.selected=-1;if(f.cookie){r._cookie(f.selected,f.cookie)}r.element.queue("tabs",function(){n(o,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){if(f.cookie){r._cookie(f.selected,f.cookie)}r.element.queue("tabs",function(){m(o,s)});r.load(r.anchors.index(this));this.blur();return false}}}if(f.cookie){r._cookie(f.selected,f.cookie)}if(s.length){if(i.length){r.element.queue("tabs",function(){n(o,i)})}r.element.queue("tabs",function(){m(o,s)});r.load(r.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(c.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var d=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e=c.data(this,"href.tabs");if(e){this.href=e}var f=c(this).unbind(".tabs");c.each(["href","load","cache"],function(g,h){f.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(c.data(this,"destroy.tabs")){c(this).remove()}else{c(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(d.cookie){this._cookie(null,d.cookie)}},add:function(g,f,e){if(e===undefined){e=this.anchors.length}var d=this,i=this.options,k=c(i.tabTemplate.replace(/#\{href\}/g,g).replace(/#\{label\}/g,f)),j=!g.indexOf("#")?g.replace("#",""):this._tabId(c("a",k)[0]);k.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var h=c("#"+j);if(!h.length){h=c(i.panelTemplate).attr("id",j).data("destroy.tabs",true)}h.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(e>=this.lis.length){k.appendTo(this.list);h.appendTo(this.list[0].parentNode)}else{k.insertBefore(this.lis[e]);h.insertBefore(this.panels[e])}i.disabled=c.map(i.disabled,function(m,l){return m>=e?++m:m});this._tabify();if(this.anchors.length==1){k.addClass("ui-tabs-selected ui-state-active");h.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){d._trigger("show",null,d._ui(d.anchors[0],d.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[e],this.panels[e]))},remove:function(d){var f=this.options,g=this.lis.eq(d).remove(),e=this.panels.eq(d).remove();if(g.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(d+(d+1<this.anchors.length?1:-1))}f.disabled=c.map(c.grep(f.disabled,function(j,h){return j!=d}),function(j,h){return j>=d?--j:j});this._tabify();this._trigger("remove",null,this._ui(g.find("a")[0],e[0]))},enable:function(d){var e=this.options;if(c.inArray(d,e.disabled)==-1){return}this.lis.eq(d).removeClass("ui-state-disabled");e.disabled=c.grep(e.disabled,function(g,f){return g!=d});this._trigger("enable",null,this._ui(this.anchors[d],this.panels[d]))},disable:function(e){var d=this,f=this.options;if(e!=f.selected){this.lis.eq(e).addClass("ui-state-disabled");f.disabled.push(e);f.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[e],this.panels[e]))}},select:function(d){if(typeof d=="string"){d=this.anchors.index(this.anchors.filter("[href$="+d+"]"))}else{if(d===null){d=-1}}if(d==-1&&this.options.collapsible){d=this.options.selected}this.anchors.eq(d).trigger(this.options.event+".tabs")},load:function(g){var e=this,i=this.options,d=this.anchors.eq(g)[0],f=c.data(d,"load.tabs");this.abort();if(!f||this.element.queue("tabs").length!==0&&c.data(d,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(g).addClass("ui-state-processing");if(i.spinner){var h=c("span",d);h.data("label.tabs",h.html()).html(i.spinner)}this.xhr=c.ajax(c.extend({},i.ajaxOptions,{url:f,success:function(k,j){c(e._sanitizeSelector(d.hash)).html(k);e._cleanup();if(i.cache){c.data(d,"cache.tabs",true)}e._trigger("load",null,e._ui(e.anchors[g],e.panels[g]));try{i.ajaxOptions.success(k,j)}catch(l){}e.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(e,d){this.anchors.eq(e).removeData("cache.tabs").data("load.tabs",d)},length:function(){return this.anchors.length}});c.extend(c.ui.tabs,{version:"1.7.3",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading…</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});c.extend(c.ui.tabs.prototype,{rotation:null,rotate:function(f,h){var d=this,i=this.options;var e=d._rotate||(d._rotate=function(j){clearTimeout(d.rotation);d.rotation=setTimeout(function(){var k=i.selected;d.select(++k<d.anchors.length?k:0)},f);if(j){j.stopPropagation()}});var g=d._unrotate||(d._unrotate=!h?function(j){if(j.clientX){d.rotate(null)}}:function(j){t=i.selected;e()});if(f){this.element.bind("tabsshow",e);this.anchors.bind(i.event+".tabs",g);e()}else{clearTimeout(d.rotation);this.element.unbind("tabsshow",e);this.anchors.unbind(i.event+".tabs",g);delete this._rotate;delete this._unrotate}}})})(jQuery); | (function(a){a.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(b,c){if(b=="selected"){if(this.options.collapsible&&c==this.options.selected){return}this.select(c)}else{this.options[b]=c;if(b=="deselectable"){this.options.collapsible=c}this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+a.data(b)},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a.data(this.list[0]));return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(c,b){return{tab:c,panel:b,index:this.anchors.index(c)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(n){this.list=this.element.children("ul:first");this.lis=a("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);var p=this,d=this.options;var c=/^#.+/;this.anchors.each(function(r,o){var q=a(o).attr("href");var s=q.split("#")[0],u;if(s&&(s===location.toString().split("#")[0]||(u=a("base")[0])&&s===u.href)){q=o.hash;o.href=q}if(c.test(q)){p.panels=p.panels.add(p._sanitizeSelector(q))}else{if(q!="#"){a.data(o,"href.tabs",q);a.data(o,"load.tabs",q.replace(/#.*$/,""));var w=p._tabId(o);o.href="#"+w;var v=a("#"+w);if(!v.length){v=a(d.panelTemplate).attr("id",w).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(p.panels[r-1]||p.list);v.data("destroy.tabs",true)}p.panels=p.panels.add(v)}else{d.disabled.push(r)}}});if(n){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(d.selected===undefined){if(location.hash){this.anchors.each(function(q,o){if(o.hash==location.hash){d.selected=q;return false}})}if(typeof d.selected!="number"&&d.cookie){d.selected=parseInt(p._cookie(),10)}if(typeof d.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}d.selected=d.selected||0}else{if(d.selected===null){d.selected=-1}}d.selected=((d.selected>=0&&this.anchors[d.selected])||d.selected<0)?d.selected:0;d.disabled=a.unique(d.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(q,o){return p.lis.index(q)}))).sort();if(a.inArray(d.selected,d.disabled)!=-1){d.disabled.splice(a.inArray(d.selected,d.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(d.selected>=0&&this.anchors.length){this.panels.eq(d.selected).removeClass("ui-tabs-hide");this.lis.eq(d.selected).addClass("ui-tabs-selected ui-state-active");p.element.queue("tabs",function(){p._trigger("show",null,p._ui(p.anchors[d.selected],p.panels[d.selected]))});this.load(d.selected)}a(window).bind("unload",function(){p.lis.add(p.anchors).unbind(".tabs");p.lis=p.anchors=p.panels=null})}else{d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[d.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(d.cookie){this._cookie(d.selected,d.cookie)}for(var g=0,m;(m=this.lis[g]);g++){a(m)[a.inArray(g,d.disabled)!=-1&&!a(m).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(d.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(d.event!="mouseover"){var f=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)}};var j=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){f("hover",a(this))});this.lis.bind("mouseout.tabs",function(){j("hover",a(this))});this.anchors.bind("focus.tabs",function(){f("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var b,h;if(d.fx){if(a.isArray(d.fx)){b=d.fx[0];h=d.fx[1]}else{b=h=d.fx}}function e(i,o){i.css({display:""});if(a.browser.msie&&o.opacity){i[0].style.removeAttribute("filter")}}var k=h?function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.hide().removeClass("ui-tabs-hide").animate(h,h.duration||"normal",function(){e(o,h);p._trigger("show",null,p._ui(i,o[0]))})}:function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");p._trigger("show",null,p._ui(i,o[0]))};var l=b?function(o,i){i.animate(b,b.duration||"normal",function(){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");e(i,b);p.element.dequeue("tabs")})}:function(o,i,q){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");p.element.dequeue("tabs")};this.anchors.bind(d.event+".tabs",function(){var o=this,r=a(this).closest("li"),i=p.panels.filter(":not(.ui-tabs-hide)"),q=a(p._sanitizeSelector(this.hash));if((r.hasClass("ui-tabs-selected")&&!d.collapsible)||r.hasClass("ui-state-disabled")||r.hasClass("ui-state-processing")||p._trigger("select",null,p._ui(this,q[0]))===false){this.blur();return false}d.selected=p.anchors.index(this);p.abort();if(d.collapsible){if(r.hasClass("ui-tabs-selected")){d.selected=-1;if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){l(o,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this));this.blur();return false}}}if(d.cookie){p._cookie(d.selected,d.cookie)}if(q.length){if(i.length){p.element.queue("tabs",function(){l(o,i)})}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(a.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var c=a.data(this,"href.tabs");if(c){this.href=c}var d=a(this).unbind(".tabs");a.each(["href","load","cache"],function(e,f){d.removeData(f+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove()}else{a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(b.cookie){this._cookie(null,b.cookie)}},add:function(e,d,c){if(c===undefined){c=this.anchors.length}var b=this,g=this.options,i=a(g.tabTemplate.replace(/#\{href\}/g,e).replace(/#\{label\}/g,d)),h=!e.indexOf("#")?e.replace("#",""):this._tabId(a("a",i)[0]);i.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var f=a("#"+h);if(!f.length){f=a(g.panelTemplate).attr("id",h).data("destroy.tabs",true)}f.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(c>=this.lis.length){i.appendTo(this.list);f.appendTo(this.list[0].parentNode)}else{i.insertBefore(this.lis[c]);f.insertBefore(this.panels[c])}g.disabled=a.map(g.disabled,function(k,j){return k>=c?++k:k});this._tabify();if(this.anchors.length==1){i.addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[c],this.panels[c]))},remove:function(b){var d=this.options,e=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();if(e.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(b+(b+1<this.anchors.length?1:-1))}d.disabled=a.map(a.grep(d.disabled,function(g,f){return g!=b}),function(g,f){return g>=b?--g:g});this._tabify();this._trigger("remove",null,this._ui(e.find("a")[0],c[0]))},enable:function(b){var c=this.options;if(a.inArray(b,c.disabled)==-1){return}this.lis.eq(b).removeClass("ui-state-disabled");c.disabled=a.grep(c.disabled,function(e,d){return e!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]))},disable:function(c){var b=this,d=this.options;if(c!=d.selected){this.lis.eq(c).addClass("ui-state-disabled");d.disabled.push(c);d.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]))}},select:function(b){if(typeof b=="string"){b=this.anchors.index(this.anchors.filter("[href$="+b+"]"))}else{if(b===null){b=-1}}if(b==-1&&this.options.collapsible){b=this.options.selected}this.anchors.eq(b).trigger(this.options.event+".tabs")},load:function(e){var c=this,g=this.options,b=this.anchors.eq(e)[0],d=a.data(b,"load.tabs");this.abort();if(!d||this.element.queue("tabs").length!==0&&a.data(b,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(e).addClass("ui-state-processing");if(g.spinner){var f=a("span",b);f.data("label.tabs",f.html()).html(g.spinner)}this.xhr=a.ajax(a.extend({},g.ajaxOptions,{url:d,success:function(i,h){a(c._sanitizeSelector(b.hash)).html(i);c._cleanup();if(g.cache){a.data(b,"cache.tabs",true)}c._trigger("load",null,c._ui(c.anchors[e],c.panels[e]));try{g.ajaxOptions.success(i,h)}catch(j){}c.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(c,b){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",b)},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.7.2",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading…</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(d,f){var b=this,g=this.options;var c=b._rotate||(b._rotate=function(h){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var i=g.selected;b.select(++i<b.anchors.length?i:0)},d);if(h){h.stopPropagation()}});var e=b._unrotate||(b._unrotate=!f?function(h){if(h.clientX){b.rotate(null)}}:function(h){t=g.selected;c()});if(d){this.element.bind("tabsshow",c);this.anchors.bind(g.event+".tabs",e);c()}else{clearTimeout(b.rotation);this.element.unbind("tabsshow",c);this.anchors.unbind(g.event+".tabs",e);delete this._rotate;delete this._unrotate}}})})(jQuery); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/3c7432fd5a0a8227be1e8040719456dff0a08ca9/ui.tabs.js/clean/wp-includes/js/jquery/ui.tabs.js |
true);e._trigger("load",null,e._ui(e.anchors[a],e.panels[a]));try{b.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[a],e.panels[a]));try{b.ajaxOptions.error(k,n,a,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(a, e){this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.5"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(a,e){var b=this,c=this.options,h=b._rotate||(b._rotate=function(j){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var k=c.selected;b.select(++k<b.anchors.length?k:0)},a);j&&j.stopPropagation()});e=b._unrotate||(b._unrotate=!e?function(j){j.clientX&&b.rotate(null)}: | true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(b, e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.6"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k<a.anchors.length?k:0)},b);j&&j.stopPropagation()});e=a._unrotate||(a._unrotate=!e?function(j){j.clientX&&a.rotate(null)}: | true);e._trigger("load",null,e._ui(e.anchors[a],e.panels[a]));try{b.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[a],e.panels[a]));try{b.ajaxOptions.error(k,n,a,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(a,e){this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.5"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(a,e){var b=this,c=this.options,h=b._rotate||(b._rotate=function(j){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var k=c.selected;b.select(++k<b.anchors.length?k:0)},a);j&&j.stopPropagation()});e=b._unrotate||(b._unrotate=!e?function(j){j.clientX&&b.rotate(null)}: | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/2fdac1ebbdba127489a58801f9e124cb3526654d/ui.tabs.js/clean/wp-includes/js/jquery/ui.tabs.js |
if (parseQueryString) out.query = (querystring || querystring = require("querystring")).parse(out.query); | if (parseQueryString) { if (!querystring) { querystring = require("querystring"); } out.query = querystring.parse(out.query); } | function url_parse (url, parseQueryString) { if (url && typeof(url) === "object" && url.href) return url; var out = { href : url }, rest = url; var proto = protocolPattern.exec(rest); if (proto) { proto = proto[0]; out.protocol = proto; rest = rest.substr(proto.length); } // figure out if it's got a host var slashes = rest.substr(0, 2) === "//"; if (slashes && !(proto && hostlessProtocol[proto])) { rest = rest.substr(2); out.slashes = true; } if (!hostlessProtocol[proto] && (slashes || (proto && !slashedProtocol[proto]))) { // there's a hostname. // the first instance of /, ?, ;, or # ends the host. // don't enforce full RFC correctness, just be unstupid about it. var firstNonHost = -1; for (var i = 0, l = nonHostChars.length; i < l; i ++) { var index = rest.indexOf(nonHostChars[i]); if (index !== -1 && (firstNonHost < 0 || index < firstNonHost)) firstNonHost = index; } if (firstNonHost !== -1) { out.host = rest.substr(0, firstNonHost); rest = rest.substr(firstNonHost); } else { out.host = rest; rest = ""; } // pull out the auth and port. var p = parseHost(out.host); for (var i in p) out[i] = p[i]; // we've indicated that there is a hostname, so even if it's empty, it has to be present. out.hostname = out.hostname || ""; } // now rest is set to the post-host stuff. // chop off from the tail first. var hash = rest.indexOf("#"); if (hash !== -1) { // got a fragment string. out.hash = rest.substr(hash); rest = rest.slice(0, hash); } var qm = rest.indexOf("?"); if (qm !== -1) { out.search = rest.substr(qm); out.query = rest.substr(qm+1); if (parseQueryString) out.query = (querystring || querystring = require("querystring")).parse(out.query); rest = rest.slice(0, qm); } if (rest) out.pathname = rest; return out;}; | 1413 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/1413/947c577c0d247ea6b42b4ec16ac96bc7f0840cae/url.js/buggy/lib/url.js |
return utils.string.replaceAll(value, ' ', '-'); | var allowedChars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '_', ' ']; value = value.toLowerCase(); value = value.replace(/[\u00E0\u00E1\u00E2\u00E3\u00E4\u00E5]/g, 'a'); value = value.replace(/[\u00E7]/g, 'c'); value = value.replace(/[\u00E8\u00E9\u00EA\u00EB]/g, 'e'); value = value.replace(/[\u00EC\u00ED\u00EE\u00EF]/g, 'i'); value = value.replace(/[\u00F2\u00F3\u00F4\u00F5\u00F6\u00F8]/g, 'o'); value = value.replace(/[\u00F9\u00FA\u00FB\u00FC]/g, 'u'); value = value.replace(/[\u00FD\u00FF]/g, 'y'); value = value.replace(/[\u00F1]/g, 'n'); value = value.replace(/[\u0153]/g, 'oe'); value = value.replace(/[\u00E6]/g, 'ae'); value = value.replace(/[\u00DF]/g, 'ss'); var url = ''; for(i in value) { if(value.charAt(i) == '@') url += 'at'; else if(value.charAt(i) == '©') url += 'copyright'; else if(value.charAt(i) == '€') url += 'euro'; else if(value.charAt(i) == '™') url += 'tm'; else if(value.charAt(i) == '-') url += ' '; else if(allowedChars.indexOf(value.charAt(i)) != -1) url += value.charAt(i); } url = utils.string.trim(url); url = url.replace(/\s+/g, ' '); url = utils.string.replaceAll(url, ' ', '-'); return url; | urlise: function(value) { return utils.string.replaceAll(value, ' ', '-'); }, | 2459 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2459/df5219808f55914c109559cb4060572a1aa02339/utils.js/buggy/default_www/frontend/core/js/utils.js |
return utils.string.replaceAll(value, ' ', '-'); | var allowedChars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '_', ' ']; value = value.toLowerCase(); value = value.replace(/[\u00E0\u00E1\u00E2\u00E3\u00E4\u00E5]/g, 'a'); value = value.replace(/[\u00E7]/g, 'c'); value = value.replace(/[\u00E8\u00E9\u00EA\u00EB]/g, 'e'); value = value.replace(/[\u00EC\u00ED\u00EE\u00EF]/g, 'i'); value = value.replace(/[\u00F2\u00F3\u00F4\u00F5\u00F6\u00F8]/g, 'o'); value = value.replace(/[\u00F9\u00FA\u00FB\u00FC]/g, 'u'); value = value.replace(/[\u00FD\u00FF]/g, 'y'); value = value.replace(/[\u00F1]/g, 'n'); value = value.replace(/[\u0153]/g, 'oe'); value = value.replace(/[\u00E6]/g, 'ae'); value = value.replace(/[\u00DF]/g, 'ss'); var url = ''; for(i in value) { if(value.charAt(i) == '@') url += 'at'; else if(value.charAt(i) == '©') url += 'copyright'; else if(value.charAt(i) == '€') url += 'euro'; else if(value.charAt(i) == '™') url += 'tm'; else if(value.charAt(i) == '-') url += ' '; else if(allowedChars.indexOf(value.charAt(i)) != -1) url += value.charAt(i); } url = utils.string.trim(url); url = url.replace(/\s+/g, ' '); url = utils.string.replaceAll(url, ' ', '-'); return url; | urlise: function(value) { return utils.string.replaceAll(value, ' ', '-'); }, | 2459 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2459/df5219808f55914c109559cb4060572a1aa02339/utils.js/buggy/default_www/backend/core/js/utils.js |
context.fork("additional", 0, this, function (context) { context.title[0] += " (additional)"; context.filter = context.parent.filter; context.completions = context.parent.completions; let match = context.filters[0]; context.filters[0] = function (item) !match.call(this, item); let tokens = context.filter.split(/\s+/); context.filters.push(function (item) tokens.every( function (tok) contains(item.url, tok) || contains(item.title, tok))); let re = RegExp(tokens.filter(util.identity).map(util.escapeRegex).join("|"), "g"); function highlight(item, text, i) process[i].call(this, item, template.highlightRegexp(text, re)); let process = [template.icon, function (item, k) k]; context.process = [ function (item, text) highlight.call(this, item, item.text, 0), function (item, text) highlight.call(this, item, text, 1) ]; }); | urls: function (context, tags) { let compare = String.localeCompare; let contains = String.indexOf; if (context.ignoreCase) { compare = util.compareIgnoreCase; contains = function (a, b) a && a.toLowerCase().indexOf(b.toLowerCase()) > -1; } if (tags) context.filters.push(function (item) tags. every(function (tag) (item.tags || []). some(function (t) !compare(tag, t)))); context.anchored = false; if (!context.title) context.title = ["URL", "Title"]; context.fork("additional", 0, this, function (context) { context.title[0] += " (additional)"; context.filter = context.parent.filter; // FIXME context.completions = context.parent.completions; // For items whose URL doesn't exactly match the filter, // accept them if all tokens match either the URL or the title. // Filter out all directly matching strings. let match = context.filters[0]; context.filters[0] = function (item) !match.call(this, item); // and all that don't match the tokens. let tokens = context.filter.split(/\s+/); context.filters.push(function (item) tokens.every( function (tok) contains(item.url, tok) || contains(item.title, tok))); let re = RegExp(tokens.filter(util.identity).map(util.escapeRegex).join("|"), "g"); function highlight(item, text, i) process[i].call(this, item, template.highlightRegexp(text, re)); let process = [template.icon, function (item, k) k]; context.process = [ function (item, text) highlight.call(this, item, item.text, 0), function (item, text) highlight.call(this, item, text, 1) ]; }); } | 8883 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8883/703a96baef2f50def7f840e48d9d52f667aa09f4/completion.js/clean/common/content/completion.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 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 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 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 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 |
}, | } | useCheckboxesForHidden : function() { this.hidden = function(){ return $('.hide-column-tog').not(':checked').map(function() { var id = this.id; return id.substring( id, id.length - 5 ); }).get().join(','); }; }, | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/73fcd8d2aadd65b57fb25eba9b42cbf6e3eec6db/common.dev.js/buggy/wp-admin/js/common.dev.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 |
} | }, | useCheckboxesForHidden : function() { this.hidden = function(){ return $('.hide-column-tog').not(':checked').map(function() { var id = this.id; return id.substring( id, id.length - 5 ); }).get().join(','); }; } | 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 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 |
if (IS_UNDEFINED(local_time_offset)) { local_time_offset = %DateLocalTimeOffset(); } | function UTC(time) { if (NUMBER_IS_NAN(time)) return time; var tmp = time - local_time_offset; return tmp - DaylightSavingsOffset(tmp);} | 262 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/262/22025291daf61f8dded3f7b76a21e7525593d21f/date.js/clean/src/date.js |
|
DygraphLayout=function(b,a){this.dygraph_=b;this.options={};Dygraph.update(this.options,a?a:{});this.datasets=new Array()};DygraphLayout.prototype.attr_=function(a){return this.dygraph_.attr_(a)};DygraphLayout.prototype.addDataset=function(a,b){this.datasets[a]=b};DygraphLayout.prototype.evaluate=function(){this._evaluateLimits();this._evaluateLineCharts();this._evaluateLineTicks()};DygraphLayout.prototype._evaluateLimits=function(){this.minxval=this.maxxval=null;if(this.options.dateWindow){this.minxval=this.options.dateWindow[0];this.maxxval=this.options.dateWindow[1]}else{for(var c in this.datasets){if(!this.datasets.hasOwnProperty(c)){continue}var d=this.datasets[c];var b=d[0][0];if(!this.minxval||b<this.minxval){this.minxval=b}var a=d[d.length-1][0];if(!this.maxxval||a>this.maxxval){this.maxxval=a}}}this.xrange=this.maxxval-this.minxval;this.xscale=(this.xrange!=0?1/this.xrange:1);this.minyval=this.options.yAxis[0];this.maxyval=this.options.yAxis[1];this.yrange=this.maxyval-this.minyval;this.yscale=(this.yrange!=0?1/this.yrange:1)};DygraphLayout.prototype._evaluateLineCharts=function(){this.points=new Array();for(var e in this.datasets){if(!this.datasets.hasOwnProperty(e)){continue}var d=this.datasets[e];for(var b=0;b<d.length;b++){var c=d[b];var a={x:((parseFloat(c[0])-this.minxval)*this.xscale),y:1-((parseFloat(c[1])-this.minyval)*this.yscale),xval:parseFloat(c[0]),yval:parseFloat(c[1]),name:e};if(a.y<=0){a.y=0}if(a.y>=1){a.y=1}if((a.x>=0)&&(a.x<=1)){this.points.push(a)}}}};DygraphLayout.prototype._evaluateLineTicks=function(){this.xticks=new Array();for(var c=0;c<this.options.xTicks.length;c++){var b=this.options.xTicks[c];var a=b.label;var d=this.xscale*(b.v-this.minxval);if((d>=0)&&(d<=1)){this.xticks.push([d,a])}}this.yticks=new Array();for(var c=0;c<this.options.yTicks.length;c++){var b=this.options.yTicks[c];var a=b.label;var d=1-(this.yscale*(b.v-this.minyval));if((d>=0)&&(d<=1)){this.yticks.push([d,a])}}};DygraphLayout.prototype.evaluateWithError=function(){this.evaluate();if(!this.options.errorBars){return}var d=0;for(var g in this.datasets){if(!this.datasets.hasOwnProperty(g)){continue}var c=0;var f=this.datasets[g];for(var c=0;c<f.length;c++,d++){var e=f[c];var a=parseFloat(e[0]);var b=parseFloat(e[1]);if(a==this.points[d].xval&&b==this.points[d].yval){this.points[d].errorMinus=parseFloat(e[2]);this.points[d].errorPlus=parseFloat(e[3])}}}};DygraphLayout.prototype.removeAllDatasets=function(){delete this.datasets;this.datasets=new Array()};DygraphLayout.prototype.updateOptions=function(a){Dygraph.update(this.options,a?a:{})};DygraphCanvasRenderer=function(c,b,d,a){this.dygraph_=c;this.options={strokeWidth:0.5,drawXAxis:true,drawYAxis:true,axisLineColor:"black",axisLineWidth:0.5,axisTickSize:3,axisLabelColor:"black",axisLabelFont:"Arial",axisLabelFontSize:9,axisLabelWidth:50,drawYGrid:true,drawXGrid:true,gridLineColor:"rgb(128,128,128)",fillAlpha:0.15,};Dygraph.update(this.options,a);this.layout=d;this.element=b;this.container=this.element.parentNode;this.height=this.element.height;this.width=this.element.width;if(!this.isIE&&!(DygraphCanvasRenderer.isSupported(this.element))){throw"Canvas is not supported."}this.xlabels=new Array();this.ylabels=new Array();this.area={x:this.options.yAxisLabelWidth+2*this.options.axisTickSize,y:0};this.area.w=this.width-this.area.x-this.options.rightGap;this.area.h=this.height-this.options.axisLabelFontSize-2*this.options.axisTickSize;this.container.style.position="relative";this.container.style.width=this.width+"px"};DygraphCanvasRenderer.prototype.clear=function(){if(this.isIE){try{if(this.clearDelay){this.clearDelay.cancel();this.clearDelay=null}var b=this.element.getContext("2d")}catch(d){this.clearDelay=MochiKit.Async.wait(this.IEDelay);this.clearDelay.addCallback(bind(this.clear,this));return}}var b=this.element.getContext("2d");b.clearRect(0,0,this.width,this.height);for(var a=0;a<this.xlabels.length;a++){var c=this.xlabels[a];c.parentNode.removeChild(c)}for(var a=0;a<this.ylabels.length;a++){var c=this.ylabels[a];c.parentNode.removeChild(c)}this.xlabels=new Array();this.ylabels=new Array()};DygraphCanvasRenderer.isSupported=function(g){var b=null;try{if(typeof(g)=="undefined"||g==null){b=document.createElement("canvas")}else{b=g}var c=b.getContext("2d")}catch(d){var f=navigator.appVersion.match(/MSIE (\d\.\d)/);var a=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);if((!f)||(f[1]<6)||(a)){return false}return true}return true};DygraphCanvasRenderer.prototype.render=function(){var b=this.element.getContext("2d");if(this.options.drawYGrid){var d=this.layout.yticks;b.save();b.strokeStyle=this.options.gridLineColor;b.lineWidth=this.options.axisLineWidth;for(var c=0;c<d.length;c++){var a=this.area.x;var e=this.area.y+d[c][0]*this.area.h;b.beginPath();b.moveTo(a,e);b.lineTo(a+this.area.w,e);b.closePath();b.stroke()}}if(this.options.drawXGrid){var d=this.layout.xticks;b.save();b.strokeStyle=this.options.gridLineColor;b.lineWidth=this.options.axisLineWidth;for(var c=0;c<d.length;c++){var a=this.area.x+d[c][0]*this.area.w;var e=this.area.y+this.area.h;b.beginPath();b.moveTo(a,e);b.lineTo(a,this.area.y);b.closePath();b.stroke()}}this._renderLineChart();this._renderAxis()};DygraphCanvasRenderer.prototype._renderAxis=function(){if(!this.options.drawXAxis&&!this.options.drawYAxis){return}var b=this.element.getContext("2d");var g={position:"absolute",fontSize:this.options.axisLabelFontSize+"px",zIndex:10,color:this.options.axisLabelColor,width:this.options.axisLabelWidth+"px",overflow:"hidden"};var d=function(i){var p=document.createElement("div");for(var o in g){if(g.hasOwnProperty(o)){p.style[o]=g[o]}}p.appendChild(document.createTextNode(i));return p};b.save();b.strokeStyle=this.options.axisLineColor;b.lineWidth=this.options.axisLineWidth;if(this.options.drawYAxis){if(this.layout.yticks&&this.layout.yticks.length>0){for(var e=0;e<this.layout.yticks.length;e++){var f=this.layout.yticks[e];if(typeof(f)=="function"){return}var l=this.area.x;var j=this.area.y+f[0]*this.area.h;b.beginPath();b.moveTo(l,j);b.lineTo(l-this.options.axisTickSize,j);b.closePath();b.stroke();var k=d(f[1]);var h=(j-this.options.axisLabelFontSize/2);if(h<0){h=0}if(h+this.options.axisLabelFontSize+3>this.height){k.style.bottom="0px"}else{k.style.top=h+"px"}k.style.left="0px";k.style.textAlign="right";k.style.width=this.options.yAxisLabelWidth+"px";this.container.appendChild(k);this.ylabels.push(k)}var m=this.ylabels[0];var n=this.options.axisLabelFontSize;var a=parseInt(m.style.top)+n;if(a>this.height-n){m.style.top=(parseInt(m.style.top)-n/2)+"px"}}b.beginPath();b.moveTo(this.area.x,this.area.y);b.lineTo(this.area.x,this.area.y+this.area.h);b.closePath();b.stroke()}if(this.options.drawXAxis){if(this.layout.xticks){for(var e=0;e<this.layout.xticks.length;e++){var f=this.layout.xticks[e];if(typeof(dataset)=="function"){return}var l=this.area.x+f[0]*this.area.w;var j=this.area.y+this.area.h;b.beginPath();b.moveTo(l,j);b.lineTo(l,j+this.options.axisTickSize);b.closePath();b.stroke();var k=d(f[1]);k.style.textAlign="center";k.style.bottom="0px";var c=(l-this.options.axisLabelWidth/2);if(c+this.options.axisLabelWidth>this.width){c=this.width-this.options.xAxisLabelWidth;k.style.textAlign="right"}if(c<0){c=0;k.style.textAlign="left"}k.style.left=c+"px";k.style.width=this.options.xAxisLabelWidth+"px";this.container.appendChild(k);this.xlabels.push(k)}}b.beginPath();b.moveTo(this.area.x,this.area.y+this.area.h);b.lineTo(this.area.x+this.area.w,this.area.y+this.area.h);b.closePath();b.stroke()}b.restore()};DygraphCanvasRenderer.prototype._renderLineChart=function(){var b=this.element.getContext("2d");var d=this.options.colorScheme.length;var n=this.options.colorScheme;var x=this.options.fillAlpha;var C=this.layout.options.errorBars;var q=this.layout.options.fillGraph;var E=[];for(var F in this.layout.datasets){if(this.layout.datasets.hasOwnProperty(F)){E.push(F)}}var y=E.length;for(var A=0;A<this.layout.points.length;A++){var t=this.layout.points[A];t.canvasx=this.area.w*t.x+this.area.x;t.canvasy=this.area.h*t.y+this.area.y}var o=function(i){return i&&!isNaN(i)};var s=b;if(C){if(q){this.dygraph_.warn("Can't use fillGraph option with error bars")}for(var A=0;A<y;A++){var g=E[A];var v=n[A%d];s.save();s.strokeStyle=v;s.lineWidth=this.options.strokeWidth;var h=-1;var f=[-1,-1];var k=0;var B=this.layout.yscale;var a=new RGBColor(v);var D="rgba("+a.r+","+a.g+","+a.b+","+x+")";s.fillStyle=D;s.beginPath();for(var w=0;w<this.layout.points.length;w++){var t=this.layout.points[w];k++;if(t.name==g){if(!o(t.y)){h=-1;continue}var p=[t.y-t.errorPlus*B,t.y+t.errorMinus*B];p[0]=this.area.h*p[0]+this.area.y;p[1]=this.area.h*p[1]+this.area.y;if(h>=0){s.moveTo(h,f[0]);s.lineTo(t.canvasx,p[0]);s.lineTo(t.canvasx,p[1]);s.lineTo(h,f[1]);s.closePath()}f[0]=p[0];f[1]=p[1];h=t.canvasx}}s.fill()}}else{if(q){for(var A=0;A<y;A++){var g=E[A];var r;if(A>0){r=E[A-1]}var v=n[A%d];s.save();s.strokeStyle=v;s.lineWidth=this.options.strokeWidth;var h=-1;var f=[-1,-1];var k=0;var B=this.layout.yscale;var a=new RGBColor(v);var D="rgba("+a.r+","+a.g+","+a.b+","+x+")";s.fillStyle=D;s.beginPath();for(var w=0;w<this.layout.points.length;w++){var t=this.layout.points[w];k++;if(t.name==g){if(!o(t.y)){h=-1;continue}var e=1+this.layout.minyval*this.layout.yscale;if(e<0){e=0}else{if(e>1){e=1}}var p=[t.y,e];p[0]=this.area.h*p[0]+this.area.y;p[1]=this.area.h*p[1]+this.area.y;if(h>=0){s.moveTo(h,f[0]);s.lineTo(t.canvasx,p[0]);s.lineTo(t.canvasx,p[1]);s.lineTo(h,f[1]);s.closePath()}f[0]=p[0];f[1]=p[1];h=t.canvasx}}s.fill()}}}for(var A=0;A<y;A++){var g=E[A];var v=n[A%d];b.save();var t=this.layout.points[0];var l=this.dygraph_.attr_("pointSize");var h=null,c=null;var u=this.dygraph_.attr_("drawPoints");var z=this.layout.points;for(var w=0;w<z.length;w++){var t=z[w];if(t.name==g){if(!o(t.canvasy)){h=c=null}else{var m=(!h&&(w==z.length-1||!o(z[w+1].canvasy)));if(!h){h=t.canvasx;c=t.canvasy}else{s.beginPath();s.strokeStyle=v;s.lineWidth=this.options.strokeWidth;s.moveTo(h,c);h=t.canvasx;c=t.canvasy;s.lineTo(h,c);s.stroke()}if(u||m){s.beginPath();s.fillStyle=v;s.arc(t.canvasx,t.canvasy,l,0,2*Math.PI,false);s.fill()}}}}}b.restore()};Dygraph=function(c,b,a){if(arguments.length>0){if(arguments.length==4){this.warn("Using deprecated four-argument dygraph constructor");this.__old_init__(c,b,arguments[2],arguments[3])}else{this.__init__(c,b,a)}}};Dygraph.NAME="Dygraph";Dygraph.VERSION="1.2";Dygraph.__repr__=function(){return"["+this.NAME+" "+this.VERSION+"]"};Dygraph.toString=function(){return this.__repr__()};Dygraph.DEFAULT_ROLL_PERIOD=1;Dygraph.DEFAULT_WIDTH=480;Dygraph.DEFAULT_HEIGHT=320;Dygraph.AXIS_LINE_WIDTH=0.3;Dygraph.DEFAULT_ATTRS={highlightCircleSize:3,pixelsPerXLabel:60,pixelsPerYLabel:30,labelsDivWidth:250,labelsDivStyles:{},labelsSeparateLines:false,labelsKMB:false,labelsKMG2:false,strokeWidth:1,axisTickSize:3,axisLabelFontSize:14,xAxisLabelWidth:50,yAxisLabelWidth:50,rightGap:5,showRoller:false,xValueFormatter:Dygraph.dateString_,xValueParser:Dygraph.dateParser,xTicker:Dygraph.dateTicker,delimiter:",",logScale:false,sigma:2,errorBars:false,fractions:false,wilsonInterval:true,customBars:false,fillGraph:false,fillAlpha:0.15,stackedGraph:false,hideOverlayOnMouseOut:true};Dygraph.DEBUG=1;Dygraph.INFO=2;Dygraph.WARNING=3;Dygraph.ERROR=3;Dygraph.prototype.__old_init__=function(f,d,e,b){if(e!=null){var a=["Date"];for(var c=0;c<e.length;c++){a.push(e[c])}Dygraph.update(b,{labels:a})}this.__init__(f,d,b)};Dygraph.prototype.__init__=function(c,b,a){if(a==null){a={}}this.maindiv_=c;this.file_=b;this.rollPeriod_=a.rollPeriod||Dygraph.DEFAULT_ROLL_PERIOD;this.previousVerticalX_=-1;this.fractions_=a.fractions||false;this.dateWindow_=a.dateWindow||null;this.valueRange_=a.valueRange||null;this.wilsonInterval_=a.wilsonInterval||true;c.innerHTML="";if(c.style.width==""){c.style.width=a.width||Dygraph.DEFAULT_WIDTH+"px"}if(c.style.height==""){c.style.height=a.height||Dygraph.DEFAULT_HEIGHT+"px"}this.width_=parseInt(c.style.width,10);this.height_=parseInt(c.style.height,10);if(c.style.width.indexOf("%")==c.style.width.length-1){this.width_=(this.width_*self.innerWidth/100)-10}if(c.style.height.indexOf("%")==c.style.height.length-1){this.height_=(this.height_*self.innerHeight/100)-10}if(a.stackedGraph){a.fillGraph=true}this.user_attrs_={};Dygraph.update(this.user_attrs_,a);this.attrs_={};Dygraph.update(this.attrs_,Dygraph.DEFAULT_ATTRS);this.labelsFromCSV_=(this.attr_("labels")==null);this.createInterface_();this.start_()};Dygraph.prototype.attr_=function(a){if(typeof(this.user_attrs_[a])!="undefined"){return this.user_attrs_[a]}else{if(typeof(this.attrs_[a])!="undefined"){return this.attrs_[a]}else{return null}}};Dygraph.prototype.log=function(a,b){if(typeof(console)!="undefined"){switch(a){case Dygraph.DEBUG:console.debug("dygraphs: "+b);break;case Dygraph.INFO:console.info("dygraphs: "+b);break;case Dygraph.WARNING:console.warn("dygraphs: "+b);break;case Dygraph.ERROR:console.error("dygraphs: "+b);break}}};Dygraph.prototype.info=function(a){this.log(Dygraph.INFO,a)};Dygraph.prototype.warn=function(a){this.log(Dygraph.WARNING,a)};Dygraph.prototype.error=function(a){this.log(Dygraph.ERROR,a)};Dygraph.prototype.rollPeriod=function(){return this.rollPeriod_};Dygraph.prototype.xAxisRange=function(){if(this.dateWindow_){return this.dateWindow_}var b=this.rawData_[0][0];var a=this.rawData_[this.rawData_.length-1][0];return[b,a]};Dygraph.addEvent=function(c,a,b){var d=function(f){if(!f){var f=window.event}b(f)};if(window.addEventListener){c.addEventListener(a,d,false)}else{c.attachEvent("on"+a,d)}};Dygraph.prototype.createInterface_=function(){var a=this.maindiv_;this.graphDiv=document.createElement("div");this.graphDiv.style.width=this.width_+"px";this.graphDiv.style.height=this.height_+"px";a.appendChild(this.graphDiv);this.canvas_=Dygraph.createCanvas();this.canvas_.style.position="absolute";this.canvas_.width=this.width_;this.canvas_.height=this.height_;this.canvas_.style.width=this.width_+"px";this.canvas_.style.height=this.height_+"px";this.graphDiv.appendChild(this.canvas_);this.hidden_=this.createPlotKitCanvas_(this.canvas_);var b=this;Dygraph.addEvent(this.hidden_,"mousemove",function(c){b.mouseMove_(c)});Dygraph.addEvent(this.hidden_,"mouseout",function(c){b.mouseOut_(c)});this.layoutOptions_={xOriginIsZero:false};Dygraph.update(this.layoutOptions_,this.attrs_);Dygraph.update(this.layoutOptions_,this.user_attrs_);Dygraph.update(this.layoutOptions_,{errorBars:(this.attr_("errorBars")||this.attr_("customBars"))});this.layout_=new DygraphLayout(this,this.layoutOptions_);this.renderOptions_={colorScheme:this.colors_,strokeColor:null,axisLineWidth:Dygraph.AXIS_LINE_WIDTH};Dygraph.update(this.renderOptions_,this.attrs_);Dygraph.update(this.renderOptions_,this.user_attrs_);this.plotter_=new DygraphCanvasRenderer(this,this.hidden_,this.layout_,this.renderOptions_);this.createStatusMessage_();this.createRollInterface_();this.createDragInterface_()};Dygraph.prototype.createPlotKitCanvas_=function(a){var b=Dygraph.createCanvas();b.style.position="absolute";b.style.top=a.style.top;b.style.left=a.style.left;b.width=this.width_;b.height=this.height_;b.style.width=this.width_+"px";b.style.height=this.height_+"px";this.graphDiv.appendChild(b);return b};Dygraph.hsvToRGB=function(h,g,k){var c;var d;var l;if(g===0){c=k;d=k;l=k}else{var e=Math.floor(h*6);var j=(h*6)-e;var b=k*(1-g);var a=k*(1-(g*j));var m=k*(1-(g*(1-j)));switch(e){case 1:c=a;d=k;l=b;break;case 2:c=b;d=k;l=m;break;case 3:c=b;d=a;l=k;break;case 4:c=m;d=b;l=k;break;case 5:c=k;d=b;l=a;break;case 6:case 0:c=k;d=m;l=b;break}}c=Math.floor(255*c+0.5);d=Math.floor(255*d+0.5);l=Math.floor(255*l+0.5);return"rgb("+c+","+d+","+l+")"};Dygraph.prototype.setColors_=function(){var e=this.attr_("labels").length-1;this.colors_=[];var b=this.attr_("colors");if(!b){var d=this.attr_("colorSaturation")||1;var h=this.attr_("colorValue")||0.5;for(var g=1;g<=e;g++){if(!this.visibility()[g-1]){continue}var a=g-parseInt(g%2?g/2:(g-e)/2,10);var c=(1*a/(1+e));this.colors_.push(Dygraph.hsvToRGB(c,d,h))}}else{for(var g=0;g<e;g++){if(!this.visibility()[g]){continue}var f=b[g%b.length];this.colors_.push(f)}}this.renderOptions_.colorScheme=this.colors_;Dygraph.update(this.plotter_.options,this.renderOptions_);Dygraph.update(this.layoutOptions_,this.user_attrs_);Dygraph.update(this.layoutOptions_,this.attrs_)};Dygraph.prototype.getColors=function(){return this.colors_};Dygraph.findPosX=function(a){var b=0;if(a.offsetParent){while(1){b+=a.offsetLeft;if(!a.offsetParent){break}a=a.offsetParent}}else{if(a.x){b+=a.x}}return b};Dygraph.findPosY=function(b){var a=0;if(b.offsetParent){while(1){a+=b.offsetTop;if(!b.offsetParent){break}b=b.offsetParent}}else{if(b.y){a+=b.y}}return a};Dygraph.prototype.createStatusMessage_=function(){if(!this.attr_("labelsDiv")){var a=this.attr_("labelsDivWidth");var c={position:"absolute",fontSize:"14px",zIndex:10,width:a+"px",top:"0px",left:(this.width_-a-2)+"px",background:"white",textAlign:"left",overflow:"hidden"};Dygraph.update(c,this.attr_("labelsDivStyles"));var d=document.createElement("div");for(var b in c){if(c.hasOwnProperty(b)){d.style[b]=c[b]}}this.graphDiv.appendChild(d);this.attrs_.labelsDiv=d}};Dygraph.prototype.createRollInterface_=function(){var f=this.attr_("showRoller")?"block":"none";var b={position:"absolute",zIndex:10,top:(this.plotter_.area.h-25)+"px",left:(this.plotter_.area.x+1)+"px",display:f};var e=document.createElement("input");e.type="text";e.size="2";e.value=this.rollPeriod_;for(var a in b){if(b.hasOwnProperty(a)){e.style[a]=b[a]}}var d=this.graphDiv;d.appendChild(e);var c=this;e.onchange=function(){c.adjustRoll(e.value)};return e};Dygraph.pageX=function(c){if(c.pageX){return(!c.pageX||c.pageX<0)?0:c.pageX}else{var d=document;var a=document.body;return c.clientX+(d.scrollLeft||a.scrollLeft)-(d.clientLeft||0)}};Dygraph.pageY=function(c){if(c.pageY){return(!c.pageY||c.pageY<0)?0:c.pageY}else{var d=document;var a=document.body;return c.clientY+(d.scrollTop||a.scrollTop)-(d.clientTop||0)}};Dygraph.prototype.createDragInterface_=function(){var n=this;var c=false;var e=false;var b=null;var a=null;var m=null;var k=null;var f=null;var l=null;var j=null;var g=0;var d=0;var i=function(o){return Dygraph.pageX(o)-g};var h=function(o){return Dygraph.pageX(o)-d};Dygraph.addEvent(this.hidden_,"mousemove",function(o){if(c){m=i(o);k=h(o);n.drawZoomRect_(b,m,f);f=m}else{if(e){m=i(o);k=h(o);n.dateWindow_[0]=l-(m/n.width_)*j;n.dateWindow_[1]=n.dateWindow_[0]+j;n.drawGraph_(n.rawData_)}}});Dygraph.addEvent(this.hidden_,"mousedown",function(o){g=Dygraph.findPosX(n.canvas_);d=Dygraph.findPosY(n.canvas_);b=i(o);a=h(o);if(o.altKey||o.shiftKey){if(!n.dateWindow_){return}e=true;j=n.dateWindow_[1]-n.dateWindow_[0];l=(b/n.width_)*j+n.dateWindow_[0]}else{c=true}});Dygraph.addEvent(document,"mouseup",function(o){if(c||e){c=false;b=null;a=null}if(e){e=false;l=null;j=null}});Dygraph.addEvent(this.hidden_,"mouseout",function(o){if(c){m=null;k=null}});Dygraph.addEvent(this.hidden_,"mouseup",function(o){if(c){c=false;m=i(o);k=h(o);var q=Math.abs(m-b);var p=Math.abs(k-a);if(q<2&&p<2&&n.attr_("clickCallback")!=null&&n.lastx_!=undefined){n.attr_("clickCallback")(o,n.lastx_,n.selPoints_)}if(q>=10){n.doZoom_(Math.min(b,m),Math.max(b,m))}else{n.canvas_.getContext("2d").clearRect(0,0,n.canvas_.width,n.canvas_.height)}b=null;a=null}if(e){e=false;l=null;j=null}});Dygraph.addEvent(this.hidden_,"dblclick",function(o){if(n.dateWindow_==null){return}n.dateWindow_=null;n.drawGraph_(n.rawData_);var p=n.rawData_[0][0];var q=n.rawData_[n.rawData_.length-1][0];if(n.attr_("zoomCallback")){n.attr_("zoomCallback")(p,q)}})};Dygraph.prototype.drawZoomRect_=function(c,d,b){var a=this.canvas_.getContext("2d");if(b){a.clearRect(Math.min(c,b),0,Math.abs(c-b),this.height_)}if(d&&c){a.fillStyle="rgba(128,128,128,0.33)";a.fillRect(Math.min(c,d),0,Math.abs(d-c),this.height_)}};Dygraph.prototype.doZoom_=function(g,e){var d=this.layout_.points;var f=null;var h=null;for(var c=0;c<d.length;c++){var b=d[c].canvasx;var a=d[c].xval;if(b<g&&(f==null||a>f)){f=a}if(b>e&&(h==null||a<h)){h=a}}if(f==null){f=d[0].xval}if(h==null){h=d[d.length-1].xval}this.dateWindow_=[f,h];this.drawGraph_(this.rawData_);if(this.attr_("zoomCallback")){this.attr_("zoomCallback")(f,h)}};Dygraph.prototype.mouseMove_=function(s){var m=Dygraph.pageX(s)-Dygraph.findPosX(this.hidden_);var t=this.layout_.points;var l=-1;var k=-1;var a=1e+100;var g=-1;for(var u=0;u<t.length;u++){var n=Math.abs(t[u].canvasx-m);if(n>a){break}a=n;g=u}if(g>=0){l=t[g].xval}if(m>t[t.length-1].canvasx){l=t[t.length-1].xval}this.selPoints_=[];for(var u=0;u<t.length;u++){if(t[u].xval==l){this.selPoints_.push(t[u])}}if(this.attr_("highlightCallback")){var h=this.lastHighlightCallbackX;if(h!==null&&l!=h){this.lastHighlightCallbackX=l;if(!this.attr_("stackedGraph")){this.attr_("highlightCallback")(s,l,this.selPoints_)}else{var b=this.selPoints_.map(function(c){return{xval:c.xval,yval:c.yval,name:c.name}});var o=0;for(var r=b.length-1;r>=0;r--){b[r].yval-=o;o+=b[r].yval}this.attr_("highlightCallback")(s,l,b)}}}var d=this.attr_("highlightCircleSize");var q=this.canvas_.getContext("2d");if(this.previousVerticalX_>=0){var h=this.previousVerticalX_;q.clearRect(h-d-1,0,2*d+2,this.height_)}var f=function(c){return c&&!isNaN(c)};if(this.selPoints_.length>0){var m=this.selPoints_[0].canvasx;var w=this.attr_("xValueFormatter")(l,this)+":";var e=this.colors_.length;for(var u=0;u<this.selPoints_.length;u++){if(!f(this.selPoints_[u].canvasy)){continue}if(this.attr_("labelsSeparateLines")){w+="<br/>"}var p=this.selPoints_[u];var v=new RGBColor(this.colors_[u%e]);w+=" <b><font color='"+v.toHex()+"'>"+p.name+"</font></b>:"+this.round_(p.yval,2)}this.attr_("labelsDiv").innerHTML=w;this.lastx_=l;q.save();for(var u=0;u<this.selPoints_.length;u++){if(!f(this.selPoints_[u%e].canvasy)){continue}q.beginPath();q.fillStyle=this.colors_[u%e];q.arc(m,this.selPoints_[u%e].canvasy,d,0,2*Math.PI,false);q.fill()}q.restore();this.previousVerticalX_=m}};Dygraph.prototype.mouseOut_=function(b){if(this.attr_("hideOverlayOnMouseOut")){var a=this.canvas_.getContext("2d");a.clearRect(0,0,this.width_,this.height_);this.attr_("labelsDiv").innerHTML=""}};Dygraph.zeropad=function(a){if(a<10){return"0"+a}else{return""+a}};Dygraph.prototype.hmsString_=function(a){var c=Dygraph.zeropad;var b=new Date(a);if(b.getSeconds()){return c(b.getHours())+":"+c(b.getMinutes())+":"+c(b.getSeconds())}else{return c(b.getHours())+":"+c(b.getMinutes())}};Dygraph.dateString_=function(b,j){var c=Dygraph.zeropad;var g=new Date(b);var h=""+g.getFullYear();var e=c(g.getMonth()+1);var i=c(g.getDate());var f="";var a=g.getHours()*3600+g.getMinutes()*60+g.getSeconds();if(a){f=" "+j.hmsString_(b)}return h+"/"+e+"/"+i+f};Dygraph.prototype.round_=function(c,b){var a=Math.pow(10,b);return Math.round(c*a)/a};Dygraph.prototype.loadedEvent_=function(a){this.rawData_=this.parseCSV_(a);this.drawGraph_(this.rawData_)};Dygraph.prototype.months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Dygraph.prototype.quarters=["Jan","Apr","Jul","Oct"];Dygraph.prototype.addXTicks_=function(){var a,c;if(this.dateWindow_){a=this.dateWindow_[0];c=this.dateWindow_[1]}else{a=this.rawData_[0][0];c=this.rawData_[this.rawData_.length-1][0]}var b=this.attr_("xTicker")(a,c,this);this.layout_.updateOptions({xTicks:b})};Dygraph.SECONDLY=0;Dygraph.TWO_SECONDLY=1;Dygraph.FIVE_SECONDLY=2;Dygraph.TEN_SECONDLY=3;Dygraph.THIRTY_SECONDLY=4;Dygraph.MINUTELY=5;Dygraph.TWO_MINUTELY=6;Dygraph.FIVE_MINUTELY=7;Dygraph.TEN_MINUTELY=8;Dygraph.THIRTY_MINUTELY=9;Dygraph.HOURLY=10;Dygraph.TWO_HOURLY=11;Dygraph.SIX_HOURLY=12;Dygraph.DAILY=13;Dygraph.WEEKLY=14;Dygraph.MONTHLY=15;Dygraph.QUARTERLY=16;Dygraph.BIANNUAL=17;Dygraph.ANNUAL=18;Dygraph.DECADAL=19;Dygraph.NUM_GRANULARITIES=20;Dygraph.SHORT_SPACINGS=[];Dygraph.SHORT_SPACINGS[Dygraph.SECONDLY]=1000*1;Dygraph.SHORT_SPACINGS[Dygraph.TWO_SECONDLY]=1000*2;Dygraph.SHORT_SPACINGS[Dygraph.FIVE_SECONDLY]=1000*5;Dygraph.SHORT_SPACINGS[Dygraph.TEN_SECONDLY]=1000*10;Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_SECONDLY]=1000*30;Dygraph.SHORT_SPACINGS[Dygraph.MINUTELY]=1000*60;Dygraph.SHORT_SPACINGS[Dygraph.TWO_MINUTELY]=1000*60*2;Dygraph.SHORT_SPACINGS[Dygraph.FIVE_MINUTELY]=1000*60*5;Dygraph.SHORT_SPACINGS[Dygraph.TEN_MINUTELY]=1000*60*10;Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_MINUTELY]=1000*60*30;Dygraph.SHORT_SPACINGS[Dygraph.HOURLY]=1000*3600;Dygraph.SHORT_SPACINGS[Dygraph.TWO_HOURLY]=1000*3600*2;Dygraph.SHORT_SPACINGS[Dygraph.SIX_HOURLY]=1000*3600*6;Dygraph.SHORT_SPACINGS[Dygraph.DAILY]=1000*86400;Dygraph.SHORT_SPACINGS[Dygraph.WEEKLY]=1000*604800;Dygraph.prototype.NumXTicks=function(e,b,g){if(g<Dygraph.MONTHLY){var h=Dygraph.SHORT_SPACINGS[g];return Math.floor(0.5+1*(b-e)/h)}else{var f=1;var d=12;if(g==Dygraph.QUARTERLY){d=3}if(g==Dygraph.BIANNUAL){d=2}if(g==Dygraph.ANNUAL){d=1}if(g==Dygraph.DECADAL){d=1;f=10}var c=365.2524*24*3600*1000;var a=1*(b-e)/c;return Math.floor(0.5+1*a*d/f)}};Dygraph.prototype.GetXAxis=function(n,k,a){var y=[];if(a<Dygraph.MONTHLY){var e=Dygraph.SHORT_SPACINGS[a];var u="%d%b";var v=e/1000;var w=new Date(n);if(v<=60){var h=w.getSeconds();w.setSeconds(h-h%v)}else{w.setSeconds(0);v/=60;if(v<=60){var h=w.getMinutes();w.setMinutes(h-h%v)}else{w.setMinutes(0);v/=60;if(v<=24){var h=w.getHours();w.setHours(h-h%v)}else{w.setHours(0);v/=24;if(v==7){w.setDate(w.getDate()-w.getDay())}}}}n=w.getTime();for(var l=n;l<=k;l+=e){var w=new Date(l);var b=w.getHours()*3600+w.getMinutes()*60+w.getSeconds();if(b==0||a>=Dygraph.DAILY){y.push({v:l,label:new Date(l+3600*1000).strftime(u)})}else{y.push({v:l,label:this.hmsString_(l)})}}}else{var f;var o=1;if(a==Dygraph.MONTHLY){f=[0,1,2,3,4,5,6,7,8,9,10,11,12]}else{if(a==Dygraph.QUARTERLY){f=[0,3,6,9]}else{if(a==Dygraph.BIANNUAL){f=[0,6]}else{if(a==Dygraph.ANNUAL){f=[0]}else{if(a==Dygraph.DECADAL){f=[0];o=10}}}}}var r=new Date(n).getFullYear();var p=new Date(k).getFullYear();var c=Dygraph.zeropad;for(var s=r;s<=p;s++){if(s%o!=0){continue}for(var q=0;q<f.length;q++){var m=s+"/"+c(1+f[q])+"/01";var l=Date.parse(m);if(l<n||l>k){continue}y.push({v:l,label:new Date(l).strftime("%b %y")})}}}return y};Dygraph.dateTicker=function(a,f,d){var b=-1;for(var e=0;e<Dygraph.NUM_GRANULARITIES;e++){var c=d.NumXTicks(a,f,e);if(d.width_/c>=d.attr_("pixelsPerXLabel")){b=e;break}}if(b>=0){return d.GetXAxis(a,f,b)}else{}};Dygraph.numericTicks=function(v,u,l){if(l.attr_("labelsKMG2")){var f=[1,2,4,8]}else{var f=[1,2,5]}var x,p,a,q;var h=l.attr_("pixelsPerYLabel");for(var t=-10;t<50;t++){if(l.attr_("labelsKMG2")){var c=Math.pow(16,t)}else{var c=Math.pow(10,t)}for(var s=0;s<f.length;s++){x=c*f[s];p=Math.floor(v/x)*x;a=Math.ceil(u/x)*x;q=(a-p)/x;var d=l.height_/q;if(d>h){break}}if(d>h){break}}var w=[];var r;var o=[];if(l.attr_("labelsKMB")){r=1000;o=["K","M","B","T"]}if(l.attr_("labelsKMG2")){if(r){l.warn("Setting both labelsKMB and labelsKMG2. Pick one!")}r=1024;o=["k","M","G","T"]}for(var t=0;t<q;t++){var g=p+t*x;var b=Math.abs(g);var e=l.round_(g,2);if(o.length){var m=r*r*r*r;for(var s=3;s>=0;s--,m/=r){if(b>=m){e=l.round_(g/m,1)+o[s];break}}}w.push({label:e,v:g})}return w};Dygraph.prototype.addYTicks_=function(c,b){var a=Dygraph.numericTicks(c,b,this);this.layout_.updateOptions({yAxis:[c,b],yTicks:a})};Dygraph.prototype.extremeValues_=function(d){var h=null,f=null;var b=this.attr_("errorBars")||this.attr_("customBars");if(b){for(var c=0;c<d.length;c++){var g=d[c][1][0];if(!g){continue}var a=g-d[c][1][1];var e=g+d[c][1][2];if(a>g){a=g}if(e<g){e=g}if(f==null||e>f){f=e}if(h==null||a<h){h=a}}}else{for(var c=0;c<d.length;c++){var g=d[c][1];if(g===null||isNaN(g)){continue}if(f==null||g>f){f=g}if(h==null||g<h){h=g}}}return[h,f]};Dygraph.prototype.drawGraph_=function(z){var v=null,u=null;this.layout_.removeAllDatasets();this.setColors_();this.attrs_.pointSize=0.5*this.attr_("highlightCircleSize");var c=[];var f=[];for(var t=1;t<z[0].length;t++){if(!this.visibility()[t-1]){continue}var e=[];for(var r=0;r<z.length;r++){var w=z[r][0];e[r]=[w,z[r][t]]}e=this.rollingAverage(e,this.rollPeriod_);var h=this.attr_("errorBars")||this.attr_("customBars");if(this.dateWindow_){var A=this.dateWindow_[0];var d=this.dateWindow_[1];var m=[];for(var q=0;q<e.length;q++){if(e[q][0]>=A&&e[q][0]<=d){m.push(e[q])}}e=m}var a=this.extremeValues_(e);var o=a[0];var n=a[1];if(!v||o<v){v=o}if(!u||n>u){u=n}if(h){var g=[];for(var r=0;r<e.length;r++){g[r]=[e[r][0],e[r][1][0],e[r][1][1],e[r][1][2]]}this.layout_.addDataset(this.attr_("labels")[t],g)}else{if(this.attr_("stackedGraph")){var g=[];var p=e.length;var x;for(var r=0;r<p;r++){if(c[e[r][0]]===undefined){c[e[r][0]]=0}x=e[r][1];c[e[r][0]]+=x;g[r]=[e[r][0],c[e[r][0]]];if(!u||c[e[r][0]]>u){u=c[e[r][0]]}}f.push([this.attr_("labels")[t],g])}else{this.layout_.addDataset(this.attr_("labels")[t],e)}}}if(f.length>0){for(var t=(f.length-1);t>=0;t--){this.layout_.addDataset(f[t][0],f[t][1])}}if(this.valueRange_!=null){this.addYTicks_(this.valueRange_[0],this.valueRange_[1])}else{if(this.attr_("includeZero")&&v>0){v=0}var s=u-v;if(s==0){s=u}var b=u+0.1*s;var y=v-0.1*s;if(y<0&&v>=0){y=0}if(b>0&&u<=0){b=0}if(this.attr_("includeZero")){if(u<0){b=0}if(v>0){y=0}}this.addYTicks_(y,b)}this.addXTicks_();this.layout_.updateOptions({dateWindow:this.dateWindow_});this.layout_.evaluateWithError();this.plotter_.clear();this.plotter_.render();this.canvas_.getContext("2d").clearRect(0,0,this.canvas_.width,this.canvas_.height);if(this.attr_("drawCallback")!==null){this.attr_("drawCallback")(this)}};Dygraph.prototype.rollingAverage=function(m,d){if(m.length<2){return m}var d=Math.min(d,m.length-1);var b=[];var s=this.attr_("sigma");if(this.fractions_){var k=0;var h=0;var e=100;for(var x=0;x<m.length;x++){k+=m[x][1][0];h+=m[x][1][1];if(x-d>=0){k-=m[x-d][1][0];h-=m[x-d][1][1]}var B=m[x][0];var v=h?k/h:0;if(this.attr_("errorBars")){if(this.wilsonInterval_){if(h){var t=v<0?0:v,u=h;var A=s*Math.sqrt(t*(1-t)/u+s*s/(4*u*u));var a=1+s*s/h;var F=(t+s*s/(2*h)-A)/a;var o=(t+s*s/(2*h)+A)/a;b[x]=[B,[t*e,(t-F)*e,(o-t)*e]]}else{b[x]=[B,[0,0,0]]}}else{var z=h?s*Math.sqrt(v*(1-v)/h):1;b[x]=[B,[e*v,e*z,e*z]]}}else{b[x]=[B,e*v]}}}else{if(this.attr_("customBars")){var F=0;var C=0;var o=0;var g=0;for(var x=0;x<m.length;x++){var E=m[x][1];var l=E[1];b[x]=[m[x][0],[l,l-E[0],E[2]-l]];if(l!=null&&!isNaN(l)){F+=E[0];C+=l;o+=E[2];g+=1}if(x-d>=0){var r=m[x-d];if(r[1][1]!=null&&!isNaN(r[1][1])){F-=r[1][0];C-=r[1][1];o-=r[1][2];g-=1}}b[x]=[m[x][0],[1*C/g,1*(C-F)/g,1*(o-C)/g]]}}else{var q=Math.min(d-1,m.length-2);if(!this.attr_("errorBars")){if(d==1){return m}for(var x=0;x<m.length;x++){var c=0;var D=0;for(var w=Math.max(0,x-d+1);w<x+1;w++){var l=m[w][1];if(l==null||isNaN(l)){continue}D++;c+=m[w][1]}if(D){b[x]=[m[x][0],c/D]}else{b[x]=[m[x][0],null]}}}else{for(var x=0;x<m.length;x++){var c=0;var f=0;var D=0;for(var w=Math.max(0,x-d+1);w<x+1;w++){var l=m[w][1][0];if(l==null||isNaN(l)){continue}D++;c+=m[w][1][0];f+=Math.pow(m[w][1][1],2)}if(D){var z=Math.sqrt(f)/D;b[x]=[m[x][0],[c/D,s*z,s*z]]}else{b[x]=[m[x][0],[null,null,null]]}}}}}return b};Dygraph.dateParser=function(b,a){var c;var e;if(b.search("-")!=-1){c=b.replace("-","/","g");while(c.search("-")!=-1){c=c.replace("-","/")}e=Date.parse(c)}else{if(b.length==8){c=b.substr(0,4)+"/"+b.substr(4,2)+"/"+b.substr(6,2);e=Date.parse(c)}else{e=Date.parse(b)}}if(!e||isNaN(e)){a.error("Couldn't parse "+b+" as a date")}return e};Dygraph.prototype.detectTypeFromString_=function(b){var a=false;if(b.indexOf("-")>=0||b.indexOf("/")>=0||isNaN(parseFloat(b))){a=true}else{if(b.length==8&&b>"19700101"&&b<"20371231"){a=true}}if(a){this.attrs_.xValueFormatter=Dygraph.dateString_;this.attrs_.xValueParser=Dygraph.dateParser;this.attrs_.xTicker=Dygraph.dateTicker}else{this.attrs_.xValueFormatter=function(c){return c};this.attrs_.xValueParser=function(c){return parseFloat(c)};this.attrs_.xTicker=Dygraph.numericTicks}};Dygraph.prototype.parseCSV_=function(h){var m=[];var q=h.split("\n");var b=this.attr_("delimiter");if(q[0].indexOf(b)==-1&&q[0].indexOf("\t")>=0){b="\t"}var a=0;if(this.labelsFromCSV_){a=1;this.attrs_.labels=q[0].split(b)}var c;var o=false;var d=this.attr_("labels").length;var l=false;for(var g=a;g<q.length;g++){var p=q[g];if(p.length==0){continue}if(p[0]=="#"){continue}var f=p.split(b);if(f.length<2){continue}var k=[];if(!o){this.detectTypeFromString_(f[0]);c=this.attr_("xValueParser");o=true}k[0]=c(f[0],this);if(this.fractions_){for(var e=1;e<f.length;e++){var n=f[e].split("/");k[e]=[parseFloat(n[0]),parseFloat(n[1])]}}else{if(this.attr_("errorBars")){for(var e=1;e<f.length;e+=2){k[(e+1)/2]=[parseFloat(f[e]),parseFloat(f[e+1])]}}else{if(this.attr_("customBars")){for(var e=1;e<f.length;e++){var n=f[e].split(";");k[e]=[parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2])]}}else{for(var e=1;e<f.length;e++){k[e]=parseFloat(f[e])}}}}if(m.length>0&&k[0]<m[m.length-1][0]){l=true}m.push(k);if(k.length!=d){this.error("Number of columns in line "+g+" ("+k.length+") does not agree with number of labels ("+d+") "+p)}}if(l){this.warn("CSV is out of order; order it correctly to speed loading.");m.sort(function(j,i){return j[0]-i[0]})}return m};Dygraph.prototype.parseArray_=function(b){if(b.length==0){this.error("Can't plot empty data set");return null}if(b[0].length==0){this.error("Data set cannot contain an empty row");return null}if(this.attr_("labels")==null){this.warn("Using default labels. Set labels explicitly via 'labels' in the options parameter");this.attrs_.labels=["X"];for(var a=1;a<b[0].length;a++){this.attrs_.labels.push("Y"+a)}}if(Dygraph.isDateLike(b[0][0])){this.attrs_.xValueFormatter=Dygraph.dateString_;this.attrs_.xTicker=Dygraph.dateTicker;var c=Dygraph.clone(b);for(var a=0;a<b.length;a++){if(c[a].length==0){this.error("Row "<<(1+a)<<" of data is empty");return null}if(c[a][0]==null||typeof(c[a][0].getTime)!="function"){this.error("x value in row "<<(1+a)<<" is not a Date");return null}c[a][0]=c[a][0].getTime()}return c}else{this.attrs_.xValueFormatter=function(d){return d};this.attrs_.xTicker=Dygraph.numericTicks;return b}};Dygraph.prototype.parseDataTable_=function(c){var h=c.getNumberOfColumns();var l=c.getNumberOfRows();var e=[];for(var d=0;d<h;d++){e.push(c.getColumnLabel(d));if(d!=0&&this.attr_("errorBars")){d+=1}}this.attrs_.labels=e;h=e.length;var a=c.getColumnType(0);if(a=="date"||a=="datetime"){this.attrs_.xValueFormatter=Dygraph.dateString_;this.attrs_.xValueParser=Dygraph.dateParser;this.attrs_.xTicker=Dygraph.dateTicker}else{if(a=="number"){this.attrs_.xValueFormatter=function(i){return i};this.attrs_.xValueParser=function(i){return parseFloat(i)};this.attrs_.xTicker=Dygraph.numericTicks}else{this.error("only 'date', 'datetime' and 'number' types are supported for column 1 of DataTable input (Got '"+a+"')");return null}}var g=[];var f=false;for(var d=0;d<l;d++){var k=[];if(typeof(c.getValue(d,0))==="undefined"||c.getValue(d,0)===null){this.warning("Ignoring row "+d+" of DataTable because of undefined or null first column.");continue}if(a=="date"||a=="datetime"){k.push(c.getValue(d,0).getTime())}else{k.push(c.getValue(d,0))}if(!this.attr_("errorBars")){for(var b=1;b<h;b++){k.push(c.getValue(d,b))}}else{for(var b=0;b<h-1;b++){k.push([c.getValue(d,1+2*b),c.getValue(d,2+2*b)])}}if(g.length>0&&k[0]<g[g.length-1][0]){f=true}g.push(k)}if(f){this.warn("DataTable is out of order; order it correctly to speed loading.");g.sort(function(j,i){return j[0]-i[0]})}return g};Dygraph.update=function(b,c){if(typeof(c)!="undefined"&&c!==null){for(var a in c){if(c.hasOwnProperty(a)){b[a]=c[a]}}}return b};Dygraph.isArrayLike=function(b){var a=typeof(b);if((a!="object"&&!(a=="function"&&typeof(b.item)=="function"))||b===null||typeof(b.length)!="number"||b.nodeType===3){return false}return true};Dygraph.isDateLike=function(a){if(typeof(a)!="object"||a===null||typeof(a.getTime)!="function"){return false}return true};Dygraph.clone=function(c){var b=[];for(var a=0;a<c.length;a++){if(Dygraph.isArrayLike(c[a])){b.push(Dygraph.clone(c[a]))}else{b.push(c[a])}}return b};Dygraph.prototype.start_=function(){if(typeof this.file_=="function"){this.loadedEvent_(this.file_())}else{if(Dygraph.isArrayLike(this.file_)){this.rawData_=this.parseArray_(this.file_);this.drawGraph_(this.rawData_)}else{if(typeof this.file_=="object"&&typeof this.file_.getColumnRange=="function"){this.rawData_=this.parseDataTable_(this.file_);this.drawGraph_(this.rawData_)}else{if(typeof this.file_=="string"){if(this.file_.indexOf("\n")>=0){this.loadedEvent_(this.file_)}else{var b=new XMLHttpRequest();var a=this;b.onreadystatechange=function(){if(b.readyState==4){if(b.status==200){a.loadedEvent_(b.responseText)}}};b.open("GET",this.file_,true);b.send(null)}}else{this.error("Unknown data format: "+(typeof this.file_))}}}}};Dygraph.prototype.updateOptions=function(a){if(a.rollPeriod){this.rollPeriod_=a.rollPeriod}if(a.dateWindow){this.dateWindow_=a.dateWindow}if(a.valueRange){this.valueRange_=a.valueRange}Dygraph.update(this.user_attrs_,a);this.labelsFromCSV_=(this.attr_("labels")==null);this.layout_.updateOptions({errorBars:this.attr_("errorBars")});if(a.file&&a.file!=this.file_){this.file_=a.file;this.start_()}else{this.drawGraph_(this.rawData_)}};Dygraph.prototype.resize=function(b,a){if((b===null)!=(a===null)){this.warn("Dygraph.resize() should be called with zero parameters or two non-NULL parameters. Pretending it was zero.");b=a=null}this.maindiv_.innerHTML="";this.attrs_.labelsDiv=null;if(b){this.maindiv_.style.width=b+"px";this.maindiv_.style.height=a+"px";this.width_=b;this.height_=a}else{this.width_=this.maindiv_.offsetWidth;this.height_=this.maindiv_.offsetHeight}this.createInterface_();this.drawGraph_(this.rawData_)};Dygraph.prototype.adjustRoll=function(a){this.rollPeriod_=a;this.drawGraph_(this.rawData_)};Dygraph.prototype.visibility=function(){if(!this.attr_("visibility")){this.attrs_.visibility=[]}while(this.attr_("visibility").length<this.rawData_[0].length-1){this.attr_("visibility").push(true)}return this.attr_("visibility")};Dygraph.prototype.setVisibility=function(b,c){var a=this.visibility();if(b<0&&b>=a.length){this.warn("invalid series number in setVisibility: "+b)}else{a[b]=c;this.drawGraph_(this.rawData_)}};Dygraph.createCanvas=function(){var a=document.createElement("canvas");isIE=(/MSIE/.test(navigator.userAgent)&&!window.opera);if(isIE){a=G_vmlCanvasManager.initElement(a)}return a};Dygraph.GVizChart=function(a){this.container=a};Dygraph.GVizChart.prototype.draw=function(b,a){this.container.innerHTML="";this.date_graph=new Dygraph(this.container,b,a)};DateGraph=Dygraph;function RGBColor(g){this.ok=false;if(g.charAt(0)=="#"){g=g.substr(1,6)}g=g.replace(/ /g,"");g=g.toLowerCase();var a={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var c in a){if(g==c){g=a[c]}}var h=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(i){return[parseInt(i[1]),parseInt(i[2]),parseInt(i[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(i){return[parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(i){return[parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16),parseInt(i[3]+i[3],16)]}}];for(var b=0;b<h.length;b++){var e=h[b].re;var d=h[b].process;var f=e.exec(g);if(f){channels=d(f);this.r=channels[0];this.g=channels[1];this.b=channels[2];this.ok=true}}this.r=(this.r<0||isNaN(this.r))?0:((this.r>255)?255:this.r);this.g=(this.g<0||isNaN(this.g))?0:((this.g>255)?255:this.g);this.b=(this.b<0||isNaN(this.b))?0:((this.b>255)?255:this.b);this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"};this.toHex=function(){var k=this.r.toString(16);var j=this.g.toString(16);var i=this.b.toString(16);if(k.length==1){k="0"+k}if(j.length==1){j="0"+j}if(i.length==1){i="0"+i}return"#"+k+j+i}}Date.ext={};Date.ext.util={};Date.ext.util.xPad=function(a,c,b){if(typeof(b)=="undefined"){b=10}for(;parseInt(a,10)<b&&b>1;b/=10){a=c.toString()+a}return a.toString()};Date.prototype.locale="en-GB";if(document.getElementsByTagName("html")&&document.getElementsByTagName("html")[0].lang){Date.prototype.locale=document.getElementsByTagName("html")[0].lang}Date.ext.locales={};Date.ext.locales.en={a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a %d %b %Y %T %Z",p:["AM","PM"],P:["am","pm"],x:"%d/%m/%y",X:"%T"};Date.ext.locales["en-US"]=Date.ext.locales.en;Date.ext.locales["en-US"].c="%a %d %b %Y %r %Z";Date.ext.locales["en-US"].x="%D";Date.ext.locales["en-US"].X="%r";Date.ext.locales["en-GB"]=Date.ext.locales.en;Date.ext.locales["en-AU"]=Date.ext.locales["en-GB"];Date.ext.formats={a:function(a){return Date.ext.locales[a.locale].a[a.getDay()]},A:function(a){return Date.ext.locales[a.locale].A[a.getDay()]},b:function(a){return Date.ext.locales[a.locale].b[a.getMonth()]},B:function(a){return Date.ext.locales[a.locale].B[a.getMonth()]},c:"toLocaleString",C:function(a){return Date.ext.util.xPad(parseInt(a.getFullYear()/100,10),0)},d:["getDate","0"],e:["getDate"," "],g:function(a){return Date.ext.util.xPad(parseInt(Date.ext.util.G(a)/100,10),0)},G:function(c){var e=c.getFullYear();var b=parseInt(Date.ext.formats.V(c),10);var a=parseInt(Date.ext.formats.W(c),10);if(a>b){e++}else{if(a===0&&b>=52){e--}}return e},H:["getHours","0"],I:function(b){var a=b.getHours()%12;return Date.ext.util.xPad(a===0?12:a,0)},j:function(c){var a=c-new Date(""+c.getFullYear()+"/1/1 GMT");a+=c.getTimezoneOffset()*60000;var b=parseInt(a/60000/60/24,10)+1;return Date.ext.util.xPad(b,0,100)},m:function(a){return Date.ext.util.xPad(a.getMonth()+1,0)},M:["getMinutes","0"],p:function(a){return Date.ext.locales[a.locale].p[a.getHours()>=12?1:0]},P:function(a){return Date.ext.locales[a.locale].P[a.getHours()>=12?1:0]},S:["getSeconds","0"],u:function(a){var b=a.getDay();return b===0?7:b},U:function(e){var a=parseInt(Date.ext.formats.j(e),10);var c=6-e.getDay();var b=parseInt((a+c)/7,10);return Date.ext.util.xPad(b,0)},V:function(e){var c=parseInt(Date.ext.formats.W(e),10);var a=(new Date(""+e.getFullYear()+"/1/1")).getDay();var b=c+(a>4||a<=1?0:1);if(b==53&&(new Date(""+e.getFullYear()+"/12/31")).getDay()<4){b=1}else{if(b===0){b=Date.ext.formats.V(new Date(""+(e.getFullYear()-1)+"/12/31"))}}return Date.ext.util.xPad(b,0)},w:"getDay",W:function(e){var a=parseInt(Date.ext.formats.j(e),10);var c=7-Date.ext.formats.u(e);var b=parseInt((a+c)/7,10);return Date.ext.util.xPad(b,0,10)},y:function(a){return Date.ext.util.xPad(a.getFullYear()%100,0)},Y:"getFullYear",z:function(c){var b=c.getTimezoneOffset();var a=Date.ext.util.xPad(parseInt(Math.abs(b/60),10),0);var e=Date.ext.util.xPad(b%60,0);return(b>0?"-":"+")+a+e},Z:function(a){return a.toString().replace(/^.*\(([^)]+)\)$/,"$1")},"%":function(a){return"%"}};Date.ext.aggregates={c:"locale",D:"%m/%d/%y",h:"%b",n:"\n",r:"%I:%M:%S %p",R:"%H:%M",t:"\t",T:"%H:%M:%S",x:"locale",X:"locale"};Date.ext.aggregates.z=Date.ext.formats.z(new Date());Date.ext.aggregates.Z=Date.ext.formats.Z(new Date());Date.ext.unsupported={};Date.prototype.strftime=function(a){if(!(this.locale in Date.ext.locales)){if(this.locale.replace(/-[a-zA-Z]+$/,"") in Date.ext.locales){this.locale=this.locale.replace(/-[a-zA-Z]+$/,"")}else{this.locale="en-GB"}}var c=this;while(a.match(/%[cDhnrRtTxXzZ]/)){a=a.replace(/%([cDhnrRtTxXzZ])/g,function(e,d){var g=Date.ext.aggregates[d];return(g=="locale"?Date.ext.locales[c.locale][d]:g)})}var b=a.replace(/%([aAbBCdegGHIjmMpPSuUVwWyY%])/g,function(e,d){var g=Date.ext.formats[d];if(typeof(g)=="string"){return c[g]()}else{if(typeof(g)=="function"){return g.call(c,c)}else{if(typeof(g)=="object"&&typeof(g[0])=="string"){return Date.ext.util.xPad(c[g[0]](),g[1])}else{return d}}}});c=null;return b}; | DygraphLayout=function(b,a){this.dygraph_=b;this.options={};Dygraph.update(this.options,a?a:{});this.datasets=new Array()};DygraphLayout.prototype.attr_=function(a){return this.dygraph_.attr_(a)};DygraphLayout.prototype.addDataset=function(a,b){this.datasets[a]=b};DygraphLayout.prototype.evaluate=function(){this._evaluateLimits();this._evaluateLineCharts();this._evaluateLineTicks()};DygraphLayout.prototype._evaluateLimits=function(){this.minxval=this.maxxval=null;if(this.options.dateWindow){this.minxval=this.options.dateWindow[0];this.maxxval=this.options.dateWindow[1]}else{for(var c in this.datasets){if(!this.datasets.hasOwnProperty(c)){continue}var d=this.datasets[c];var b=d[0][0];if(!this.minxval||b<this.minxval){this.minxval=b}var a=d[d.length-1][0];if(!this.maxxval||a>this.maxxval){this.maxxval=a}}}this.xrange=this.maxxval-this.minxval;this.xscale=(this.xrange!=0?1/this.xrange:1);this.minyval=this.options.yAxis[0];this.maxyval=this.options.yAxis[1];this.yrange=this.maxyval-this.minyval;this.yscale=(this.yrange!=0?1/this.yrange:1)};DygraphLayout.prototype._evaluateLineCharts=function(){this.points=new Array();for(var e in this.datasets){if(!this.datasets.hasOwnProperty(e)){continue}var d=this.datasets[e];for(var b=0;b<d.length;b++){var c=d[b];var a={x:((parseFloat(c[0])-this.minxval)*this.xscale),y:1-((parseFloat(c[1])-this.minyval)*this.yscale),xval:parseFloat(c[0]),yval:parseFloat(c[1]),name:e};if(a.y<=0){a.y=0}if(a.y>=1){a.y=1}if((a.x>=0)&&(a.x<=1)){this.points.push(a)}}}};DygraphLayout.prototype._evaluateLineTicks=function(){this.xticks=new Array();for(var c=0;c<this.options.xTicks.length;c++){var b=this.options.xTicks[c];var a=b.label;var d=this.xscale*(b.v-this.minxval);if((d>=0)&&(d<=1)){this.xticks.push([d,a])}}this.yticks=new Array();for(var c=0;c<this.options.yTicks.length;c++){var b=this.options.yTicks[c];var a=b.label;var d=1-(this.yscale*(b.v-this.minyval));if((d>=0)&&(d<=1)){this.yticks.push([d,a])}}};DygraphLayout.prototype.evaluateWithError=function(){this.evaluate();if(!this.options.errorBars){return}var d=0;for(var g in this.datasets){if(!this.datasets.hasOwnProperty(g)){continue}var c=0;var f=this.datasets[g];for(var c=0;c<f.length;c++,d++){var e=f[c];var a=parseFloat(e[0]);var b=parseFloat(e[1]);if(a==this.points[d].xval&&b==this.points[d].yval){this.points[d].errorMinus=parseFloat(e[2]);this.points[d].errorPlus=parseFloat(e[3])}}}};DygraphLayout.prototype.removeAllDatasets=function(){delete this.datasets;this.datasets=new Array()};DygraphLayout.prototype.updateOptions=function(a){Dygraph.update(this.options,a?a:{})};DygraphCanvasRenderer=function(c,b,d,a){this.dygraph_=c;this.options={strokeWidth:0.5,drawXAxis:true,drawYAxis:true,axisLineColor:"black",axisLineWidth:0.5,axisTickSize:3,axisLabelColor:"black",axisLabelFont:"Arial",axisLabelFontSize:9,axisLabelWidth:50,drawYGrid:true,drawXGrid:true,gridLineColor:"rgb(128,128,128)",fillAlpha:0.15};Dygraph.update(this.options,a);this.layout=d;this.element=b;this.container=this.element.parentNode;this.height=this.element.height;this.width=this.element.width;if(!this.isIE&&!(DygraphCanvasRenderer.isSupported(this.element))){throw"Canvas is not supported."}this.xlabels=new Array();this.ylabels=new Array();this.area={x:this.options.yAxisLabelWidth+2*this.options.axisTickSize,y:0};this.area.w=this.width-this.area.x-this.options.rightGap;this.area.h=this.height-this.options.axisLabelFontSize-2*this.options.axisTickSize;this.container.style.position="relative";this.container.style.width=this.width+"px"};DygraphCanvasRenderer.prototype.clear=function(){if(this.isIE){try{if(this.clearDelay){this.clearDelay.cancel();this.clearDelay=null}var b=this.element.getContext("2d")}catch(d){this.clearDelay=MochiKit.Async.wait(this.IEDelay);this.clearDelay.addCallback(bind(this.clear,this));return}}var b=this.element.getContext("2d");b.clearRect(0,0,this.width,this.height);for(var a=0;a<this.xlabels.length;a++){var c=this.xlabels[a];c.parentNode.removeChild(c)}for(var a=0;a<this.ylabels.length;a++){var c=this.ylabels[a];c.parentNode.removeChild(c)}this.xlabels=new Array();this.ylabels=new Array()};DygraphCanvasRenderer.isSupported=function(g){var b=null;try{if(typeof(g)=="undefined"||g==null){b=document.createElement("canvas")}else{b=g}var c=b.getContext("2d")}catch(d){var f=navigator.appVersion.match(/MSIE (\d\.\d)/);var a=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);if((!f)||(f[1]<6)||(a)){return false}return true}return true};DygraphCanvasRenderer.prototype.render=function(){var b=this.element.getContext("2d");if(this.options.drawYGrid){var d=this.layout.yticks;b.save();b.strokeStyle=this.options.gridLineColor;b.lineWidth=this.options.axisLineWidth;for(var c=0;c<d.length;c++){var a=this.area.x;var e=this.area.y+d[c][0]*this.area.h;b.beginPath();b.moveTo(a,e);b.lineTo(a+this.area.w,e);b.closePath();b.stroke()}}if(this.options.drawXGrid){var d=this.layout.xticks;b.save();b.strokeStyle=this.options.gridLineColor;b.lineWidth=this.options.axisLineWidth;for(var c=0;c<d.length;c++){var a=this.area.x+d[c][0]*this.area.w;var e=this.area.y+this.area.h;b.beginPath();b.moveTo(a,e);b.lineTo(a,this.area.y);b.closePath();b.stroke()}}this._renderLineChart();this._renderAxis()};DygraphCanvasRenderer.prototype._renderAxis=function(){if(!this.options.drawXAxis&&!this.options.drawYAxis){return}var b=this.element.getContext("2d");var g={position:"absolute",fontSize:this.options.axisLabelFontSize+"px",zIndex:10,color:this.options.axisLabelColor,width:this.options.axisLabelWidth+"px",overflow:"hidden"};var d=function(i){var p=document.createElement("div");for(var o in g){if(g.hasOwnProperty(o)){p.style[o]=g[o]}}p.appendChild(document.createTextNode(i));return p};b.save();b.strokeStyle=this.options.axisLineColor;b.lineWidth=this.options.axisLineWidth;if(this.options.drawYAxis){if(this.layout.yticks&&this.layout.yticks.length>0){for(var e=0;e<this.layout.yticks.length;e++){var f=this.layout.yticks[e];if(typeof(f)=="function"){return}var l=this.area.x;var j=this.area.y+f[0]*this.area.h;b.beginPath();b.moveTo(l,j);b.lineTo(l-this.options.axisTickSize,j);b.closePath();b.stroke();var k=d(f[1]);var h=(j-this.options.axisLabelFontSize/2);if(h<0){h=0}if(h+this.options.axisLabelFontSize+3>this.height){k.style.bottom="0px"}else{k.style.top=h+"px"}k.style.left="0px";k.style.textAlign="right";k.style.width=this.options.yAxisLabelWidth+"px";this.container.appendChild(k);this.ylabels.push(k)}var m=this.ylabels[0];var n=this.options.axisLabelFontSize;var a=parseInt(m.style.top)+n;if(a>this.height-n){m.style.top=(parseInt(m.style.top)-n/2)+"px"}}b.beginPath();b.moveTo(this.area.x,this.area.y);b.lineTo(this.area.x,this.area.y+this.area.h);b.closePath();b.stroke()}if(this.options.drawXAxis){if(this.layout.xticks){for(var e=0;e<this.layout.xticks.length;e++){var f=this.layout.xticks[e];if(typeof(dataset)=="function"){return}var l=this.area.x+f[0]*this.area.w;var j=this.area.y+this.area.h;b.beginPath();b.moveTo(l,j);b.lineTo(l,j+this.options.axisTickSize);b.closePath();b.stroke();var k=d(f[1]);k.style.textAlign="center";k.style.bottom="0px";var c=(l-this.options.axisLabelWidth/2);if(c+this.options.axisLabelWidth>this.width){c=this.width-this.options.xAxisLabelWidth;k.style.textAlign="right"}if(c<0){c=0;k.style.textAlign="left"}k.style.left=c+"px";k.style.width=this.options.xAxisLabelWidth+"px";this.container.appendChild(k);this.xlabels.push(k)}}b.beginPath();b.moveTo(this.area.x,this.area.y+this.area.h);b.lineTo(this.area.x+this.area.w,this.area.y+this.area.h);b.closePath();b.stroke()}b.restore()};DygraphCanvasRenderer.prototype._renderLineChart=function(){var b=this.element.getContext("2d");var d=this.options.colorScheme.length;var n=this.options.colorScheme;var x=this.options.fillAlpha;var C=this.layout.options.errorBars;var q=this.layout.options.fillGraph;var E=[];for(var F in this.layout.datasets){if(this.layout.datasets.hasOwnProperty(F)){E.push(F)}}var y=E.length;for(var A=0;A<this.layout.points.length;A++){var t=this.layout.points[A];t.canvasx=this.area.w*t.x+this.area.x;t.canvasy=this.area.h*t.y+this.area.y}var o=function(i){return i&&!isNaN(i)};var s=b;if(C){if(q){this.dygraph_.warn("Can't use fillGraph option with error bars")}for(var A=0;A<y;A++){var g=E[A];var v=n[A%d];s.save();s.strokeStyle=v;s.lineWidth=this.options.strokeWidth;var h=-1;var f=[-1,-1];var k=0;var B=this.layout.yscale;var a=new RGBColor(v);var D="rgba("+a.r+","+a.g+","+a.b+","+x+")";s.fillStyle=D;s.beginPath();for(var w=0;w<this.layout.points.length;w++){var t=this.layout.points[w];k++;if(t.name==g){if(!o(t.y)){h=-1;continue}var p=[t.y-t.errorPlus*B,t.y+t.errorMinus*B];p[0]=this.area.h*p[0]+this.area.y;p[1]=this.area.h*p[1]+this.area.y;if(h>=0){s.moveTo(h,f[0]);s.lineTo(t.canvasx,p[0]);s.lineTo(t.canvasx,p[1]);s.lineTo(h,f[1]);s.closePath()}f[0]=p[0];f[1]=p[1];h=t.canvasx}}s.fill()}}else{if(q){for(var A=0;A<y;A++){var g=E[A];var r;if(A>0){r=E[A-1]}var v=n[A%d];s.save();s.strokeStyle=v;s.lineWidth=this.options.strokeWidth;var h=-1;var f=[-1,-1];var k=0;var B=this.layout.yscale;var a=new RGBColor(v);var D="rgba("+a.r+","+a.g+","+a.b+","+x+")";s.fillStyle=D;s.beginPath();for(var w=0;w<this.layout.points.length;w++){var t=this.layout.points[w];k++;if(t.name==g){if(!o(t.y)){h=-1;continue}var e=1+this.layout.minyval*this.layout.yscale;if(e<0){e=0}else{if(e>1){e=1}}var p=[t.y,e];p[0]=this.area.h*p[0]+this.area.y;p[1]=this.area.h*p[1]+this.area.y;if(h>=0){s.moveTo(h,f[0]);s.lineTo(t.canvasx,p[0]);s.lineTo(t.canvasx,p[1]);s.lineTo(h,f[1]);s.closePath()}f[0]=p[0];f[1]=p[1];h=t.canvasx}}s.fill()}}}for(var A=0;A<y;A++){var g=E[A];var v=n[A%d];b.save();var t=this.layout.points[0];var l=this.dygraph_.attr_("pointSize");var h=null,c=null;var u=this.dygraph_.attr_("drawPoints");var z=this.layout.points;for(var w=0;w<z.length;w++){var t=z[w];if(t.name==g){if(!o(t.canvasy)){h=c=null}else{var m=(!h&&(w==z.length-1||!o(z[w+1].canvasy)));if(!h){h=t.canvasx;c=t.canvasy}else{s.beginPath();s.strokeStyle=v;s.lineWidth=this.options.strokeWidth;s.moveTo(h,c);h=t.canvasx;c=t.canvasy;s.lineTo(h,c);s.stroke()}if(u||m){s.beginPath();s.fillStyle=v;s.arc(t.canvasx,t.canvasy,l,0,2*Math.PI,false);s.fill()}}}}}b.restore()};Dygraph=function(c,b,a){if(arguments.length>0){if(arguments.length==4){this.warn("Using deprecated four-argument dygraph constructor");this.__old_init__(c,b,arguments[2],arguments[3])}else{this.__init__(c,b,a)}}};Dygraph.NAME="Dygraph";Dygraph.VERSION="1.2";Dygraph.__repr__=function(){return"["+this.NAME+" "+this.VERSION+"]"};Dygraph.toString=function(){return this.__repr__()};Dygraph.DEFAULT_ROLL_PERIOD=1;Dygraph.DEFAULT_WIDTH=480;Dygraph.DEFAULT_HEIGHT=320;Dygraph.AXIS_LINE_WIDTH=0.3;Dygraph.DEFAULT_ATTRS={highlightCircleSize:3,pixelsPerXLabel:60,pixelsPerYLabel:30,labelsDivWidth:250,labelsDivStyles:{},labelsSeparateLines:false,labelsKMB:false,labelsKMG2:false,strokeWidth:1,axisTickSize:3,axisLabelFontSize:14,xAxisLabelWidth:50,yAxisLabelWidth:50,rightGap:5,showRoller:false,xValueFormatter:Dygraph.dateString_,xValueParser:Dygraph.dateParser,xTicker:Dygraph.dateTicker,delimiter:",",logScale:false,sigma:2,errorBars:false,fractions:false,wilsonInterval:true,customBars:false,fillGraph:false,fillAlpha:0.15,stackedGraph:false,hideOverlayOnMouseOut:true};Dygraph.DEBUG=1;Dygraph.INFO=2;Dygraph.WARNING=3;Dygraph.ERROR=3;Dygraph.prototype.__old_init__=function(f,d,e,b){if(e!=null){var a=["Date"];for(var c=0;c<e.length;c++){a.push(e[c])}Dygraph.update(b,{labels:a})}this.__init__(f,d,b)};Dygraph.prototype.__init__=function(c,b,a){if(a==null){a={}}this.maindiv_=c;this.file_=b;this.rollPeriod_=a.rollPeriod||Dygraph.DEFAULT_ROLL_PERIOD;this.previousVerticalX_=-1;this.fractions_=a.fractions||false;this.dateWindow_=a.dateWindow||null;this.valueRange_=a.valueRange||null;this.wilsonInterval_=a.wilsonInterval||true;c.innerHTML="";if(c.style.width==""){c.style.width=a.width||Dygraph.DEFAULT_WIDTH+"px"}if(c.style.height==""){c.style.height=a.height||Dygraph.DEFAULT_HEIGHT+"px"}this.width_=parseInt(c.style.width,10);this.height_=parseInt(c.style.height,10);if(c.style.width.indexOf("%")==c.style.width.length-1){this.width_=(this.width_*self.innerWidth/100)-10}if(c.style.height.indexOf("%")==c.style.height.length-1){this.height_=(this.height_*self.innerHeight/100)-10}if(a.stackedGraph){a.fillGraph=true}this.user_attrs_={};Dygraph.update(this.user_attrs_,a);this.attrs_={};Dygraph.update(this.attrs_,Dygraph.DEFAULT_ATTRS);this.labelsFromCSV_=(this.attr_("labels")==null);this.createInterface_();this.start_()};Dygraph.prototype.attr_=function(a){if(typeof(this.user_attrs_[a])!="undefined"){return this.user_attrs_[a]}else{if(typeof(this.attrs_[a])!="undefined"){return this.attrs_[a]}else{return null}}};Dygraph.prototype.log=function(a,b){if(typeof(console)!="undefined"){switch(a){case Dygraph.DEBUG:console.debug("dygraphs: "+b);break;case Dygraph.INFO:console.info("dygraphs: "+b);break;case Dygraph.WARNING:console.warn("dygraphs: "+b);break;case Dygraph.ERROR:console.error("dygraphs: "+b);break}}};Dygraph.prototype.info=function(a){this.log(Dygraph.INFO,a)};Dygraph.prototype.warn=function(a){this.log(Dygraph.WARNING,a)};Dygraph.prototype.error=function(a){this.log(Dygraph.ERROR,a)};Dygraph.prototype.rollPeriod=function(){return this.rollPeriod_};Dygraph.prototype.xAxisRange=function(){if(this.dateWindow_){return this.dateWindow_}var b=this.rawData_[0][0];var a=this.rawData_[this.rawData_.length-1][0];return[b,a]};Dygraph.addEvent=function(c,a,b){var d=function(f){if(!f){var f=window.event}b(f)};if(window.addEventListener){c.addEventListener(a,d,false)}else{c.attachEvent("on"+a,d)}};Dygraph.prototype.createInterface_=function(){var a=this.maindiv_;this.graphDiv=document.createElement("div");this.graphDiv.style.width=this.width_+"px";this.graphDiv.style.height=this.height_+"px";a.appendChild(this.graphDiv);this.canvas_=Dygraph.createCanvas();this.canvas_.style.position="absolute";this.canvas_.width=this.width_;this.canvas_.height=this.height_;this.canvas_.style.width=this.width_+"px";this.canvas_.style.height=this.height_+"px";this.graphDiv.appendChild(this.canvas_);this.hidden_=this.createPlotKitCanvas_(this.canvas_);var b=this;Dygraph.addEvent(this.hidden_,"mousemove",function(c){b.mouseMove_(c)});Dygraph.addEvent(this.hidden_,"mouseout",function(c){b.mouseOut_(c)});this.layoutOptions_={xOriginIsZero:false};Dygraph.update(this.layoutOptions_,this.attrs_);Dygraph.update(this.layoutOptions_,this.user_attrs_);Dygraph.update(this.layoutOptions_,{errorBars:(this.attr_("errorBars")||this.attr_("customBars"))});this.layout_=new DygraphLayout(this,this.layoutOptions_);this.renderOptions_={colorScheme:this.colors_,strokeColor:null,axisLineWidth:Dygraph.AXIS_LINE_WIDTH};Dygraph.update(this.renderOptions_,this.attrs_);Dygraph.update(this.renderOptions_,this.user_attrs_);this.plotter_=new DygraphCanvasRenderer(this,this.hidden_,this.layout_,this.renderOptions_);this.createStatusMessage_();this.createRollInterface_();this.createDragInterface_()};Dygraph.prototype.createPlotKitCanvas_=function(a){var b=Dygraph.createCanvas();b.style.position="absolute";b.style.top=a.style.top;b.style.left=a.style.left;b.width=this.width_;b.height=this.height_;b.style.width=this.width_+"px";b.style.height=this.height_+"px";this.graphDiv.appendChild(b);return b};Dygraph.hsvToRGB=function(h,g,k){var c;var d;var l;if(g===0){c=k;d=k;l=k}else{var e=Math.floor(h*6);var j=(h*6)-e;var b=k*(1-g);var a=k*(1-(g*j));var m=k*(1-(g*(1-j)));switch(e){case 1:c=a;d=k;l=b;break;case 2:c=b;d=k;l=m;break;case 3:c=b;d=a;l=k;break;case 4:c=m;d=b;l=k;break;case 5:c=k;d=b;l=a;break;case 6:case 0:c=k;d=m;l=b;break}}c=Math.floor(255*c+0.5);d=Math.floor(255*d+0.5);l=Math.floor(255*l+0.5);return"rgb("+c+","+d+","+l+")"};Dygraph.prototype.setColors_=function(){var e=this.attr_("labels").length-1;this.colors_=[];var b=this.attr_("colors");if(!b){var d=this.attr_("colorSaturation")||1;var h=this.attr_("colorValue")||0.5;for(var g=1;g<=e;g++){if(!this.visibility()[g-1]){continue}var a=g-parseInt(g%2?g/2:(g-e)/2,10);var c=(1*a/(1+e));this.colors_.push(Dygraph.hsvToRGB(c,d,h))}}else{for(var g=0;g<e;g++){if(!this.visibility()[g]){continue}var f=b[g%b.length];this.colors_.push(f)}}this.renderOptions_.colorScheme=this.colors_;Dygraph.update(this.plotter_.options,this.renderOptions_);Dygraph.update(this.layoutOptions_,this.user_attrs_);Dygraph.update(this.layoutOptions_,this.attrs_)};Dygraph.prototype.getColors=function(){return this.colors_};Dygraph.findPosX=function(a){var b=0;if(a.offsetParent){while(1){b+=a.offsetLeft;if(!a.offsetParent){break}a=a.offsetParent}}else{if(a.x){b+=a.x}}return b};Dygraph.findPosY=function(b){var a=0;if(b.offsetParent){while(1){a+=b.offsetTop;if(!b.offsetParent){break}b=b.offsetParent}}else{if(b.y){a+=b.y}}return a};Dygraph.prototype.createStatusMessage_=function(){if(!this.attr_("labelsDiv")){var a=this.attr_("labelsDivWidth");var c={position:"absolute",fontSize:"14px",zIndex:10,width:a+"px",top:"0px",left:(this.width_-a-2)+"px",background:"white",textAlign:"left",overflow:"hidden"};Dygraph.update(c,this.attr_("labelsDivStyles"));var d=document.createElement("div");for(var b in c){if(c.hasOwnProperty(b)){d.style[b]=c[b]}}this.graphDiv.appendChild(d);this.attrs_.labelsDiv=d}};Dygraph.prototype.createRollInterface_=function(){var f=this.attr_("showRoller")?"block":"none";var b={position:"absolute",zIndex:10,top:(this.plotter_.area.h-25)+"px",left:(this.plotter_.area.x+1)+"px",display:f};var e=document.createElement("input");e.type="text";e.size="2";e.value=this.rollPeriod_;for(var a in b){if(b.hasOwnProperty(a)){e.style[a]=b[a]}}var d=this.graphDiv;d.appendChild(e);var c=this;e.onchange=function(){c.adjustRoll(e.value)};return e};Dygraph.pageX=function(c){if(c.pageX){return(!c.pageX||c.pageX<0)?0:c.pageX}else{var d=document;var a=document.body;return c.clientX+(d.scrollLeft||a.scrollLeft)-(d.clientLeft||0)}};Dygraph.pageY=function(c){if(c.pageY){return(!c.pageY||c.pageY<0)?0:c.pageY}else{var d=document;var a=document.body;return c.clientY+(d.scrollTop||a.scrollTop)-(d.clientTop||0)}};Dygraph.prototype.createDragInterface_=function(){var n=this;var c=false;var e=false;var b=null;var a=null;var m=null;var k=null;var f=null;var l=null;var j=null;var g=0;var d=0;var i=function(o){return Dygraph.pageX(o)-g};var h=function(o){return Dygraph.pageX(o)-d};Dygraph.addEvent(this.hidden_,"mousemove",function(o){if(c){m=i(o);k=h(o);n.drawZoomRect_(b,m,f);f=m}else{if(e){m=i(o);k=h(o);n.dateWindow_[0]=l-(m/n.width_)*j;n.dateWindow_[1]=n.dateWindow_[0]+j;n.drawGraph_(n.rawData_)}}});Dygraph.addEvent(this.hidden_,"mousedown",function(o){g=Dygraph.findPosX(n.canvas_);d=Dygraph.findPosY(n.canvas_);b=i(o);a=h(o);if(o.altKey||o.shiftKey){if(!n.dateWindow_){return}e=true;j=n.dateWindow_[1]-n.dateWindow_[0];l=(b/n.width_)*j+n.dateWindow_[0]}else{c=true}});Dygraph.addEvent(document,"mouseup",function(o){if(c||e){c=false;b=null;a=null}if(e){e=false;l=null;j=null}});Dygraph.addEvent(this.hidden_,"mouseout",function(o){if(c){m=null;k=null}});Dygraph.addEvent(this.hidden_,"mouseup",function(o){if(c){c=false;m=i(o);k=h(o);var q=Math.abs(m-b);var p=Math.abs(k-a);if(q<2&&p<2&&n.attr_("clickCallback")!=null&&n.lastx_!=undefined){n.attr_("clickCallback")(o,n.lastx_,n.selPoints_)}if(q>=10){n.doZoom_(Math.min(b,m),Math.max(b,m))}else{n.canvas_.getContext("2d").clearRect(0,0,n.canvas_.width,n.canvas_.height)}b=null;a=null}if(e){e=false;l=null;j=null}});Dygraph.addEvent(this.hidden_,"dblclick",function(o){if(n.dateWindow_==null){return}n.dateWindow_=null;n.drawGraph_(n.rawData_);var p=n.rawData_[0][0];var q=n.rawData_[n.rawData_.length-1][0];if(n.attr_("zoomCallback")){n.attr_("zoomCallback")(p,q)}})};Dygraph.prototype.drawZoomRect_=function(c,d,b){var a=this.canvas_.getContext("2d");if(b){a.clearRect(Math.min(c,b),0,Math.abs(c-b),this.height_)}if(d&&c){a.fillStyle="rgba(128,128,128,0.33)";a.fillRect(Math.min(c,d),0,Math.abs(d-c),this.height_)}};Dygraph.prototype.doZoom_=function(g,e){var d=this.layout_.points;var f=null;var h=null;for(var c=0;c<d.length;c++){var b=d[c].canvasx;var a=d[c].xval;if(b<g&&(f==null||a>f)){f=a}if(b>e&&(h==null||a<h)){h=a}}if(f==null){f=d[0].xval}if(h==null){h=d[d.length-1].xval}this.dateWindow_=[f,h];this.drawGraph_(this.rawData_);if(this.attr_("zoomCallback")){this.attr_("zoomCallback")(f,h)}};Dygraph.prototype.mouseMove_=function(s){var m=Dygraph.pageX(s)-Dygraph.findPosX(this.hidden_);var t=this.layout_.points;var l=-1;var k=-1;var a=1e+100;var g=-1;for(var u=0;u<t.length;u++){var n=Math.abs(t[u].canvasx-m);if(n>a){break}a=n;g=u}if(g>=0){l=t[g].xval}if(m>t[t.length-1].canvasx){l=t[t.length-1].xval}this.selPoints_=[];for(var u=0;u<t.length;u++){if(t[u].xval==l){this.selPoints_.push(t[u])}}if(this.attr_("highlightCallback")){var h=this.lastHighlightCallbackX;if(h!==null&&l!=h){this.lastHighlightCallbackX=l;if(!this.attr_("stackedGraph")){this.attr_("highlightCallback")(s,l,this.selPoints_)}else{var b=this.selPoints_.map(function(c){return{xval:c.xval,yval:c.yval,name:c.name}});var o=0;for(var r=b.length-1;r>=0;r--){b[r].yval-=o;o+=b[r].yval}this.attr_("highlightCallback")(s,l,b)}}}var d=this.attr_("highlightCircleSize");var q=this.canvas_.getContext("2d");if(this.previousVerticalX_>=0){var h=this.previousVerticalX_;q.clearRect(h-d-1,0,2*d+2,this.height_)}var f=function(c){return c&&!isNaN(c)};if(this.selPoints_.length>0){var m=this.selPoints_[0].canvasx;var w=this.attr_("xValueFormatter")(l,this)+":";var e=this.colors_.length;for(var u=0;u<this.selPoints_.length;u++){if(!f(this.selPoints_[u].canvasy)){continue}if(this.attr_("labelsSeparateLines")){w+="<br/>"}var p=this.selPoints_[u];var v=new RGBColor(this.colors_[u%e]);w+=" <b><font color='"+v.toHex()+"'>"+p.name+"</font></b>:"+this.round_(p.yval,2)}this.attr_("labelsDiv").innerHTML=w;this.lastx_=l;q.save();for(var u=0;u<this.selPoints_.length;u++){if(!f(this.selPoints_[u%e].canvasy)){continue}q.beginPath();q.fillStyle=this.colors_[u%e];q.arc(m,this.selPoints_[u%e].canvasy,d,0,2*Math.PI,false);q.fill()}q.restore();this.previousVerticalX_=m}};Dygraph.prototype.mouseOut_=function(b){if(this.attr_("hideOverlayOnMouseOut")){var a=this.canvas_.getContext("2d");a.clearRect(0,0,this.width_,this.height_);this.attr_("labelsDiv").innerHTML=""}};Dygraph.zeropad=function(a){if(a<10){return"0"+a}else{return""+a}};Dygraph.prototype.hmsString_=function(a){var c=Dygraph.zeropad;var b=new Date(a);if(b.getSeconds()){return c(b.getHours())+":"+c(b.getMinutes())+":"+c(b.getSeconds())}else{return c(b.getHours())+":"+c(b.getMinutes())}};Dygraph.dateString_=function(b,j){var c=Dygraph.zeropad;var g=new Date(b);var h=""+g.getFullYear();var e=c(g.getMonth()+1);var i=c(g.getDate());var f="";var a=g.getHours()*3600+g.getMinutes()*60+g.getSeconds();if(a){f=" "+j.hmsString_(b)}return h+"/"+e+"/"+i+f};Dygraph.prototype.round_=function(c,b){var a=Math.pow(10,b);return Math.round(c*a)/a};Dygraph.prototype.loadedEvent_=function(a){this.rawData_=this.parseCSV_(a);this.drawGraph_(this.rawData_)};Dygraph.prototype.months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Dygraph.prototype.quarters=["Jan","Apr","Jul","Oct"];Dygraph.prototype.addXTicks_=function(){var a,c;if(this.dateWindow_){a=this.dateWindow_[0];c=this.dateWindow_[1]}else{a=this.rawData_[0][0];c=this.rawData_[this.rawData_.length-1][0]}var b=this.attr_("xTicker")(a,c,this);this.layout_.updateOptions({xTicks:b})};Dygraph.SECONDLY=0;Dygraph.TWO_SECONDLY=1;Dygraph.FIVE_SECONDLY=2;Dygraph.TEN_SECONDLY=3;Dygraph.THIRTY_SECONDLY=4;Dygraph.MINUTELY=5;Dygraph.TWO_MINUTELY=6;Dygraph.FIVE_MINUTELY=7;Dygraph.TEN_MINUTELY=8;Dygraph.THIRTY_MINUTELY=9;Dygraph.HOURLY=10;Dygraph.TWO_HOURLY=11;Dygraph.SIX_HOURLY=12;Dygraph.DAILY=13;Dygraph.WEEKLY=14;Dygraph.MONTHLY=15;Dygraph.QUARTERLY=16;Dygraph.BIANNUAL=17;Dygraph.ANNUAL=18;Dygraph.DECADAL=19;Dygraph.NUM_GRANULARITIES=20;Dygraph.SHORT_SPACINGS=[];Dygraph.SHORT_SPACINGS[Dygraph.SECONDLY]=1000*1;Dygraph.SHORT_SPACINGS[Dygraph.TWO_SECONDLY]=1000*2;Dygraph.SHORT_SPACINGS[Dygraph.FIVE_SECONDLY]=1000*5;Dygraph.SHORT_SPACINGS[Dygraph.TEN_SECONDLY]=1000*10;Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_SECONDLY]=1000*30;Dygraph.SHORT_SPACINGS[Dygraph.MINUTELY]=1000*60;Dygraph.SHORT_SPACINGS[Dygraph.TWO_MINUTELY]=1000*60*2;Dygraph.SHORT_SPACINGS[Dygraph.FIVE_MINUTELY]=1000*60*5;Dygraph.SHORT_SPACINGS[Dygraph.TEN_MINUTELY]=1000*60*10;Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_MINUTELY]=1000*60*30;Dygraph.SHORT_SPACINGS[Dygraph.HOURLY]=1000*3600;Dygraph.SHORT_SPACINGS[Dygraph.TWO_HOURLY]=1000*3600*2;Dygraph.SHORT_SPACINGS[Dygraph.SIX_HOURLY]=1000*3600*6;Dygraph.SHORT_SPACINGS[Dygraph.DAILY]=1000*86400;Dygraph.SHORT_SPACINGS[Dygraph.WEEKLY]=1000*604800;Dygraph.prototype.NumXTicks=function(e,b,g){if(g<Dygraph.MONTHLY){var h=Dygraph.SHORT_SPACINGS[g];return Math.floor(0.5+1*(b-e)/h)}else{var f=1;var d=12;if(g==Dygraph.QUARTERLY){d=3}if(g==Dygraph.BIANNUAL){d=2}if(g==Dygraph.ANNUAL){d=1}if(g==Dygraph.DECADAL){d=1;f=10}var c=365.2524*24*3600*1000;var a=1*(b-e)/c;return Math.floor(0.5+1*a*d/f)}};Dygraph.prototype.GetXAxis=function(n,k,a){var y=[];if(a<Dygraph.MONTHLY){var e=Dygraph.SHORT_SPACINGS[a];var u="%d%b";var v=e/1000;var w=new Date(n);if(v<=60){var h=w.getSeconds();w.setSeconds(h-h%v)}else{w.setSeconds(0);v/=60;if(v<=60){var h=w.getMinutes();w.setMinutes(h-h%v)}else{w.setMinutes(0);v/=60;if(v<=24){var h=w.getHours();w.setHours(h-h%v)}else{w.setHours(0);v/=24;if(v==7){w.setDate(w.getDate()-w.getDay())}}}}n=w.getTime();for(var l=n;l<=k;l+=e){var w=new Date(l);var b=w.getHours()*3600+w.getMinutes()*60+w.getSeconds();if(b==0||a>=Dygraph.DAILY){y.push({v:l,label:new Date(l+3600*1000).strftime(u)})}else{y.push({v:l,label:this.hmsString_(l)})}}}else{var f;var o=1;if(a==Dygraph.MONTHLY){f=[0,1,2,3,4,5,6,7,8,9,10,11,12]}else{if(a==Dygraph.QUARTERLY){f=[0,3,6,9]}else{if(a==Dygraph.BIANNUAL){f=[0,6]}else{if(a==Dygraph.ANNUAL){f=[0]}else{if(a==Dygraph.DECADAL){f=[0];o=10}}}}}var r=new Date(n).getFullYear();var p=new Date(k).getFullYear();var c=Dygraph.zeropad;for(var s=r;s<=p;s++){if(s%o!=0){continue}for(var q=0;q<f.length;q++){var m=s+"/"+c(1+f[q])+"/01";var l=Date.parse(m);if(l<n||l>k){continue}y.push({v:l,label:new Date(l).strftime("%b %y")})}}}return y};Dygraph.dateTicker=function(a,f,d){var b=-1;for(var e=0;e<Dygraph.NUM_GRANULARITIES;e++){var c=d.NumXTicks(a,f,e);if(d.width_/c>=d.attr_("pixelsPerXLabel")){b=e;break}}if(b>=0){return d.GetXAxis(a,f,b)}else{}};Dygraph.numericTicks=function(v,u,l){if(l.attr_("labelsKMG2")){var f=[1,2,4,8]}else{var f=[1,2,5]}var x,p,a,q;var h=l.attr_("pixelsPerYLabel");for(var t=-10;t<50;t++){if(l.attr_("labelsKMG2")){var c=Math.pow(16,t)}else{var c=Math.pow(10,t)}for(var s=0;s<f.length;s++){x=c*f[s];p=Math.floor(v/x)*x;a=Math.ceil(u/x)*x;q=(a-p)/x;var d=l.height_/q;if(d>h){break}}if(d>h){break}}var w=[];var r;var o=[];if(l.attr_("labelsKMB")){r=1000;o=["K","M","B","T"]}if(l.attr_("labelsKMG2")){if(r){l.warn("Setting both labelsKMB and labelsKMG2. Pick one!")}r=1024;o=["k","M","G","T"]}for(var t=0;t<q;t++){var g=p+t*x;var b=Math.abs(g);var e=l.round_(g,2);if(o.length){var m=r*r*r*r;for(var s=3;s>=0;s--,m/=r){if(b>=m){e=l.round_(g/m,1)+o[s];break}}}w.push({label:e,v:g})}return w};Dygraph.prototype.addYTicks_=function(c,b){var a=Dygraph.numericTicks(c,b,this);this.layout_.updateOptions({yAxis:[c,b],yTicks:a})};Dygraph.prototype.extremeValues_=function(d){var h=null,f=null;var b=this.attr_("errorBars")||this.attr_("customBars");if(b){for(var c=0;c<d.length;c++){var g=d[c][1][0];if(!g){continue}var a=g-d[c][1][1];var e=g+d[c][1][2];if(a>g){a=g}if(e<g){e=g}if(f==null||e>f){f=e}if(h==null||a<h){h=a}}}else{for(var c=0;c<d.length;c++){var g=d[c][1];if(g===null||isNaN(g)){continue}if(f==null||g>f){f=g}if(h==null||g<h){h=g}}}return[h,f]};Dygraph.prototype.drawGraph_=function(z){var v=null,u=null;this.layout_.removeAllDatasets();this.setColors_();this.attrs_.pointSize=0.5*this.attr_("highlightCircleSize");var c=[];var f=[];for(var t=1;t<z[0].length;t++){if(!this.visibility()[t-1]){continue}var e=[];for(var r=0;r<z.length;r++){var w=z[r][0];e[r]=[w,z[r][t]]}e=this.rollingAverage(e,this.rollPeriod_);var h=this.attr_("errorBars")||this.attr_("customBars");if(this.dateWindow_){var A=this.dateWindow_[0];var d=this.dateWindow_[1];var m=[];for(var q=0;q<e.length;q++){if(e[q][0]>=A&&e[q][0]<=d){m.push(e[q])}}e=m}var a=this.extremeValues_(e);var o=a[0];var n=a[1];if(!v||o<v){v=o}if(!u||n>u){u=n}if(h){var g=[];for(var r=0;r<e.length;r++){g[r]=[e[r][0],e[r][1][0],e[r][1][1],e[r][1][2]]}this.layout_.addDataset(this.attr_("labels")[t],g)}else{if(this.attr_("stackedGraph")){var g=[];var p=e.length;var x;for(var r=0;r<p;r++){if(c[e[r][0]]===undefined){c[e[r][0]]=0}x=e[r][1];c[e[r][0]]+=x;g[r]=[e[r][0],c[e[r][0]]];if(!u||c[e[r][0]]>u){u=c[e[r][0]]}}f.push([this.attr_("labels")[t],g])}else{this.layout_.addDataset(this.attr_("labels")[t],e)}}}if(f.length>0){for(var t=(f.length-1);t>=0;t--){this.layout_.addDataset(f[t][0],f[t][1])}}if(this.valueRange_!=null){this.addYTicks_(this.valueRange_[0],this.valueRange_[1])}else{if(this.attr_("includeZero")&&v>0){v=0}var s=u-v;if(s==0){s=u}var b=u+0.1*s;var y=v-0.1*s;if(y<0&&v>=0){y=0}if(b>0&&u<=0){b=0}if(this.attr_("includeZero")){if(u<0){b=0}if(v>0){y=0}}this.addYTicks_(y,b)}this.addXTicks_();this.layout_.updateOptions({dateWindow:this.dateWindow_});this.layout_.evaluateWithError();this.plotter_.clear();this.plotter_.render();this.canvas_.getContext("2d").clearRect(0,0,this.canvas_.width,this.canvas_.height);if(this.attr_("drawCallback")!==null){this.attr_("drawCallback")(this)}};Dygraph.prototype.rollingAverage=function(m,d){if(m.length<2){return m}var d=Math.min(d,m.length-1);var b=[];var s=this.attr_("sigma");if(this.fractions_){var k=0;var h=0;var e=100;for(var x=0;x<m.length;x++){k+=m[x][1][0];h+=m[x][1][1];if(x-d>=0){k-=m[x-d][1][0];h-=m[x-d][1][1]}var B=m[x][0];var v=h?k/h:0;if(this.attr_("errorBars")){if(this.wilsonInterval_){if(h){var t=v<0?0:v,u=h;var A=s*Math.sqrt(t*(1-t)/u+s*s/(4*u*u));var a=1+s*s/h;var F=(t+s*s/(2*h)-A)/a;var o=(t+s*s/(2*h)+A)/a;b[x]=[B,[t*e,(t-F)*e,(o-t)*e]]}else{b[x]=[B,[0,0,0]]}}else{var z=h?s*Math.sqrt(v*(1-v)/h):1;b[x]=[B,[e*v,e*z,e*z]]}}else{b[x]=[B,e*v]}}}else{if(this.attr_("customBars")){var F=0;var C=0;var o=0;var g=0;for(var x=0;x<m.length;x++){var E=m[x][1];var l=E[1];b[x]=[m[x][0],[l,l-E[0],E[2]-l]];if(l!=null&&!isNaN(l)){F+=E[0];C+=l;o+=E[2];g+=1}if(x-d>=0){var r=m[x-d];if(r[1][1]!=null&&!isNaN(r[1][1])){F-=r[1][0];C-=r[1][1];o-=r[1][2];g-=1}}b[x]=[m[x][0],[1*C/g,1*(C-F)/g,1*(o-C)/g]]}}else{var q=Math.min(d-1,m.length-2);if(!this.attr_("errorBars")){if(d==1){return m}for(var x=0;x<m.length;x++){var c=0;var D=0;for(var w=Math.max(0,x-d+1);w<x+1;w++){var l=m[w][1];if(l==null||isNaN(l)){continue}D++;c+=m[w][1]}if(D){b[x]=[m[x][0],c/D]}else{b[x]=[m[x][0],null]}}}else{for(var x=0;x<m.length;x++){var c=0;var f=0;var D=0;for(var w=Math.max(0,x-d+1);w<x+1;w++){var l=m[w][1][0];if(l==null||isNaN(l)){continue}D++;c+=m[w][1][0];f+=Math.pow(m[w][1][1],2)}if(D){var z=Math.sqrt(f)/D;b[x]=[m[x][0],[c/D,s*z,s*z]]}else{b[x]=[m[x][0],[null,null,null]]}}}}}return b};Dygraph.dateParser=function(b,a){var c;var e;if(b.search("-")!=-1){c=b.replace("-","/","g");while(c.search("-")!=-1){c=c.replace("-","/")}e=Date.parse(c)}else{if(b.length==8){c=b.substr(0,4)+"/"+b.substr(4,2)+"/"+b.substr(6,2);e=Date.parse(c)}else{e=Date.parse(b)}}if(!e||isNaN(e)){a.error("Couldn't parse "+b+" as a date")}return e};Dygraph.prototype.detectTypeFromString_=function(b){var a=false;if(b.indexOf("-")>=0||b.indexOf("/")>=0||isNaN(parseFloat(b))){a=true}else{if(b.length==8&&b>"19700101"&&b<"20371231"){a=true}}if(a){this.attrs_.xValueFormatter=Dygraph.dateString_;this.attrs_.xValueParser=Dygraph.dateParser;this.attrs_.xTicker=Dygraph.dateTicker}else{this.attrs_.xValueFormatter=function(c){return c};this.attrs_.xValueParser=function(c){return parseFloat(c)};this.attrs_.xTicker=Dygraph.numericTicks}};Dygraph.prototype.parseCSV_=function(h){var m=[];var q=h.split("\n");var b=this.attr_("delimiter");if(q[0].indexOf(b)==-1&&q[0].indexOf("\t")>=0){b="\t"}var a=0;if(this.labelsFromCSV_){a=1;this.attrs_.labels=q[0].split(b)}var c;var o=false;var d=this.attr_("labels").length;var l=false;for(var g=a;g<q.length;g++){var p=q[g];if(p.length==0){continue}if(p[0]=="#"){continue}var f=p.split(b);if(f.length<2){continue}var k=[];if(!o){this.detectTypeFromString_(f[0]);c=this.attr_("xValueParser");o=true}k[0]=c(f[0],this);if(this.fractions_){for(var e=1;e<f.length;e++){var n=f[e].split("/");k[e]=[parseFloat(n[0]),parseFloat(n[1])]}}else{if(this.attr_("errorBars")){for(var e=1;e<f.length;e+=2){k[(e+1)/2]=[parseFloat(f[e]),parseFloat(f[e+1])]}}else{if(this.attr_("customBars")){for(var e=1;e<f.length;e++){var n=f[e].split(";");k[e]=[parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2])]}}else{for(var e=1;e<f.length;e++){k[e]=parseFloat(f[e])}}}}if(m.length>0&&k[0]<m[m.length-1][0]){l=true}m.push(k);if(k.length!=d){this.error("Number of columns in line "+g+" ("+k.length+") does not agree with number of labels ("+d+") "+p)}}if(l){this.warn("CSV is out of order; order it correctly to speed loading.");m.sort(function(j,i){return j[0]-i[0]})}return m};Dygraph.prototype.parseArray_=function(b){if(b.length==0){this.error("Can't plot empty data set");return null}if(b[0].length==0){this.error("Data set cannot contain an empty row");return null}if(this.attr_("labels")==null){this.warn("Using default labels. Set labels explicitly via 'labels' in the options parameter");this.attrs_.labels=["X"];for(var a=1;a<b[0].length;a++){this.attrs_.labels.push("Y"+a)}}if(Dygraph.isDateLike(b[0][0])){this.attrs_.xValueFormatter=Dygraph.dateString_;this.attrs_.xTicker=Dygraph.dateTicker;var c=Dygraph.clone(b);for(var a=0;a<b.length;a++){if(c[a].length==0){this.error("Row "<<(1+a)<<" of data is empty");return null}if(c[a][0]==null||typeof(c[a][0].getTime)!="function"){this.error("x value in row "<<(1+a)<<" is not a Date");return null}c[a][0]=c[a][0].getTime()}return c}else{this.attrs_.xValueFormatter=function(d){return d};this.attrs_.xTicker=Dygraph.numericTicks;return b}};Dygraph.prototype.parseDataTable_=function(c){var h=c.getNumberOfColumns();var l=c.getNumberOfRows();var e=[];for(var d=0;d<h;d++){e.push(c.getColumnLabel(d));if(d!=0&&this.attr_("errorBars")){d+=1}}this.attrs_.labels=e;h=e.length;var a=c.getColumnType(0);if(a=="date"||a=="datetime"){this.attrs_.xValueFormatter=Dygraph.dateString_;this.attrs_.xValueParser=Dygraph.dateParser;this.attrs_.xTicker=Dygraph.dateTicker}else{if(a=="number"){this.attrs_.xValueFormatter=function(i){return i};this.attrs_.xValueParser=function(i){return parseFloat(i)};this.attrs_.xTicker=Dygraph.numericTicks}else{this.error("only 'date', 'datetime' and 'number' types are supported for column 1 of DataTable input (Got '"+a+"')");return null}}var g=[];var f=false;for(var d=0;d<l;d++){var k=[];if(typeof(c.getValue(d,0))==="undefined"||c.getValue(d,0)===null){this.warning("Ignoring row "+d+" of DataTable because of undefined or null first column.");continue}if(a=="date"||a=="datetime"){k.push(c.getValue(d,0).getTime())}else{k.push(c.getValue(d,0))}if(!this.attr_("errorBars")){for(var b=1;b<h;b++){k.push(c.getValue(d,b))}}else{for(var b=0;b<h-1;b++){k.push([c.getValue(d,1+2*b),c.getValue(d,2+2*b)])}}if(g.length>0&&k[0]<g[g.length-1][0]){f=true}g.push(k)}if(f){this.warn("DataTable is out of order; order it correctly to speed loading.");g.sort(function(j,i){return j[0]-i[0]})}return g};Dygraph.update=function(b,c){if(typeof(c)!="undefined"&&c!==null){for(var a in c){if(c.hasOwnProperty(a)){b[a]=c[a]}}}return b};Dygraph.isArrayLike=function(b){var a=typeof(b);if((a!="object"&&!(a=="function"&&typeof(b.item)=="function"))||b===null||typeof(b.length)!="number"||b.nodeType===3){return false}return true};Dygraph.isDateLike=function(a){if(typeof(a)!="object"||a===null||typeof(a.getTime)!="function"){return false}return true};Dygraph.clone=function(c){var b=[];for(var a=0;a<c.length;a++){if(Dygraph.isArrayLike(c[a])){b.push(Dygraph.clone(c[a]))}else{b.push(c[a])}}return b};Dygraph.prototype.start_=function(){if(typeof this.file_=="function"){this.loadedEvent_(this.file_())}else{if(Dygraph.isArrayLike(this.file_)){this.rawData_=this.parseArray_(this.file_);this.drawGraph_(this.rawData_)}else{if(typeof this.file_=="object"&&typeof this.file_.getColumnRange=="function"){this.rawData_=this.parseDataTable_(this.file_);this.drawGraph_(this.rawData_)}else{if(typeof this.file_=="string"){if(this.file_.indexOf("\n")>=0){this.loadedEvent_(this.file_)}else{var b=new XMLHttpRequest();var a=this;b.onreadystatechange=function(){if(b.readyState==4){if(b.status==200){a.loadedEvent_(b.responseText)}}};b.open("GET",this.file_,true);b.send(null)}}else{this.error("Unknown data format: "+(typeof this.file_))}}}}};Dygraph.prototype.updateOptions=function(a){if(a.rollPeriod){this.rollPeriod_=a.rollPeriod}if(a.dateWindow){this.dateWindow_=a.dateWindow}if(a.valueRange){this.valueRange_=a.valueRange}Dygraph.update(this.user_attrs_,a);this.labelsFromCSV_=(this.attr_("labels")==null);this.layout_.updateOptions({errorBars:this.attr_("errorBars")});if(a.file&&a.file!=this.file_){this.file_=a.file;this.start_()}else{this.drawGraph_(this.rawData_)}};Dygraph.prototype.resize=function(b,a){if((b===null)!=(a===null)){this.warn("Dygraph.resize() should be called with zero parameters or two non-NULL parameters. Pretending it was zero.");b=a=null}this.maindiv_.innerHTML="";this.attrs_.labelsDiv=null;if(b){this.maindiv_.style.width=b+"px";this.maindiv_.style.height=a+"px";this.width_=b;this.height_=a}else{this.width_=this.maindiv_.offsetWidth;this.height_=this.maindiv_.offsetHeight}this.createInterface_();this.drawGraph_(this.rawData_)};Dygraph.prototype.adjustRoll=function(a){this.rollPeriod_=a;this.drawGraph_(this.rawData_)};Dygraph.prototype.visibility=function(){if(!this.attr_("visibility")){this.attrs_.visibility=[]}while(this.attr_("visibility").length<this.rawData_[0].length-1){this.attr_("visibility").push(true)}return this.attr_("visibility")};Dygraph.prototype.setVisibility=function(b,c){var a=this.visibility();if(b<0&&b>=a.length){this.warn("invalid series number in setVisibility: "+b)}else{a[b]=c;this.drawGraph_(this.rawData_)}};Dygraph.createCanvas=function(){var a=document.createElement("canvas");isIE=(/MSIE/.test(navigator.userAgent)&&!window.opera);if(isIE){a=G_vmlCanvasManager.initElement(a)}return a};Dygraph.GVizChart=function(a){this.container=a};Dygraph.GVizChart.prototype.draw=function(b,a){this.container.innerHTML="";this.date_graph=new Dygraph(this.container,b,a)};DateGraph=Dygraph;function RGBColor(g){this.ok=false;if(g.charAt(0)=="#"){g=g.substr(1,6)}g=g.replace(/ /g,"");g=g.toLowerCase();var a={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var c in a){if(g==c){g=a[c]}}var h=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(i){return[parseInt(i[1]),parseInt(i[2]),parseInt(i[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(i){return[parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(i){return[parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16),parseInt(i[3]+i[3],16)]}}];for(var b=0;b<h.length;b++){var e=h[b].re;var d=h[b].process;var f=e.exec(g);if(f){channels=d(f);this.r=channels[0];this.g=channels[1];this.b=channels[2];this.ok=true}}this.r=(this.r<0||isNaN(this.r))?0:((this.r>255)?255:this.r);this.g=(this.g<0||isNaN(this.g))?0:((this.g>255)?255:this.g);this.b=(this.b<0||isNaN(this.b))?0:((this.b>255)?255:this.b);this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"};this.toHex=function(){var k=this.r.toString(16);var j=this.g.toString(16);var i=this.b.toString(16);if(k.length==1){k="0"+k}if(j.length==1){j="0"+j}if(i.length==1){i="0"+i}return"#"+k+j+i}}Date.ext={};Date.ext.util={};Date.ext.util.xPad=function(a,c,b){if(typeof(b)=="undefined"){b=10}for(;parseInt(a,10)<b&&b>1;b/=10){a=c.toString()+a}return a.toString()};Date.prototype.locale="en-GB";if(document.getElementsByTagName("html")&&document.getElementsByTagName("html")[0].lang){Date.prototype.locale=document.getElementsByTagName("html")[0].lang}Date.ext.locales={};Date.ext.locales.en={a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a %d %b %Y %T %Z",p:["AM","PM"],P:["am","pm"],x:"%d/%m/%y",X:"%T"};Date.ext.locales["en-US"]=Date.ext.locales.en;Date.ext.locales["en-US"].c="%a %d %b %Y %r %Z";Date.ext.locales["en-US"].x="%D";Date.ext.locales["en-US"].X="%r";Date.ext.locales["en-GB"]=Date.ext.locales.en;Date.ext.locales["en-AU"]=Date.ext.locales["en-GB"];Date.ext.formats={a:function(a){return Date.ext.locales[a.locale].a[a.getDay()]},A:function(a){return Date.ext.locales[a.locale].A[a.getDay()]},b:function(a){return Date.ext.locales[a.locale].b[a.getMonth()]},B:function(a){return Date.ext.locales[a.locale].B[a.getMonth()]},c:"toLocaleString",C:function(a){return Date.ext.util.xPad(parseInt(a.getFullYear()/100,10),0)},d:["getDate","0"],e:["getDate"," "],g:function(a){return Date.ext.util.xPad(parseInt(Date.ext.util.G(a)/100,10),0)},G:function(c){var e=c.getFullYear();var b=parseInt(Date.ext.formats.V(c),10);var a=parseInt(Date.ext.formats.W(c),10);if(a>b){e++}else{if(a===0&&b>=52){e--}}return e},H:["getHours","0"],I:function(b){var a=b.getHours()%12;return Date.ext.util.xPad(a===0?12:a,0)},j:function(c){var a=c-new Date(""+c.getFullYear()+"/1/1 GMT");a+=c.getTimezoneOffset()*60000;var b=parseInt(a/60000/60/24,10)+1;return Date.ext.util.xPad(b,0,100)},m:function(a){return Date.ext.util.xPad(a.getMonth()+1,0)},M:["getMinutes","0"],p:function(a){return Date.ext.locales[a.locale].p[a.getHours()>=12?1:0]},P:function(a){return Date.ext.locales[a.locale].P[a.getHours()>=12?1:0]},S:["getSeconds","0"],u:function(a){var b=a.getDay();return b===0?7:b},U:function(e){var a=parseInt(Date.ext.formats.j(e),10);var c=6-e.getDay();var b=parseInt((a+c)/7,10);return Date.ext.util.xPad(b,0)},V:function(e){var c=parseInt(Date.ext.formats.W(e),10);var a=(new Date(""+e.getFullYear()+"/1/1")).getDay();var b=c+(a>4||a<=1?0:1);if(b==53&&(new Date(""+e.getFullYear()+"/12/31")).getDay()<4){b=1}else{if(b===0){b=Date.ext.formats.V(new Date(""+(e.getFullYear()-1)+"/12/31"))}}return Date.ext.util.xPad(b,0)},w:"getDay",W:function(e){var a=parseInt(Date.ext.formats.j(e),10);var c=7-Date.ext.formats.u(e);var b=parseInt((a+c)/7,10);return Date.ext.util.xPad(b,0,10)},y:function(a){return Date.ext.util.xPad(a.getFullYear()%100,0)},Y:"getFullYear",z:function(c){var b=c.getTimezoneOffset();var a=Date.ext.util.xPad(parseInt(Math.abs(b/60),10),0);var e=Date.ext.util.xPad(b%60,0);return(b>0?"-":"+")+a+e},Z:function(a){return a.toString().replace(/^.*\(([^)]+)\)$/,"$1")},"%":function(a){return"%"}};Date.ext.aggregates={c:"locale",D:"%m/%d/%y",h:"%b",n:"\n",r:"%I:%M:%S %p",R:"%H:%M",t:"\t",T:"%H:%M:%S",x:"locale",X:"locale"};Date.ext.aggregates.z=Date.ext.formats.z(new Date());Date.ext.aggregates.Z=Date.ext.formats.Z(new Date());Date.ext.unsupported={};Date.prototype.strftime=function(a){if(!(this.locale in Date.ext.locales)){if(this.locale.replace(/-[a-zA-Z]+$/,"") in Date.ext.locales){this.locale=this.locale.replace(/-[a-zA-Z]+$/,"")}else{this.locale="en-GB"}}var c=this;while(a.match(/%[cDhnrRtTxXzZ]/)){a=a.replace(/%([cDhnrRtTxXzZ])/g,function(e,d){var g=Date.ext.aggregates[d];return(g=="locale"?Date.ext.locales[c.locale][d]:g)})}var b=a.replace(/%([aAbBCdegGHIjmMpPSuUVwWyY%])/g,function(e,d){var g=Date.ext.formats[d];if(typeof(g)=="string"){return c[g]()}else{if(typeof(g)=="function"){return g.call(c,c)}else{if(typeof(g)=="object"&&typeof(g[0])=="string"){return Date.ext.util.xPad(c[g[0]](),g[1])}else{return d}}}});c=null;return b}; | DygraphLayout=function(b,a){this.dygraph_=b;this.options={};Dygraph.update(this.options,a?a:{});this.datasets=new Array()};DygraphLayout.prototype.attr_=function(a){return this.dygraph_.attr_(a)};DygraphLayout.prototype.addDataset=function(a,b){this.datasets[a]=b};DygraphLayout.prototype.evaluate=function(){this._evaluateLimits();this._evaluateLineCharts();this._evaluateLineTicks()};DygraphLayout.prototype._evaluateLimits=function(){this.minxval=this.maxxval=null;if(this.options.dateWindow){this.minxval=this.options.dateWindow[0];this.maxxval=this.options.dateWindow[1]}else{for(var c in this.datasets){if(!this.datasets.hasOwnProperty(c)){continue}var d=this.datasets[c];var b=d[0][0];if(!this.minxval||b<this.minxval){this.minxval=b}var a=d[d.length-1][0];if(!this.maxxval||a>this.maxxval){this.maxxval=a}}}this.xrange=this.maxxval-this.minxval;this.xscale=(this.xrange!=0?1/this.xrange:1);this.minyval=this.options.yAxis[0];this.maxyval=this.options.yAxis[1];this.yrange=this.maxyval-this.minyval;this.yscale=(this.yrange!=0?1/this.yrange:1)};DygraphLayout.prototype._evaluateLineCharts=function(){this.points=new Array();for(var e in this.datasets){if(!this.datasets.hasOwnProperty(e)){continue}var d=this.datasets[e];for(var b=0;b<d.length;b++){var c=d[b];var a={x:((parseFloat(c[0])-this.minxval)*this.xscale),y:1-((parseFloat(c[1])-this.minyval)*this.yscale),xval:parseFloat(c[0]),yval:parseFloat(c[1]),name:e};if(a.y<=0){a.y=0}if(a.y>=1){a.y=1}if((a.x>=0)&&(a.x<=1)){this.points.push(a)}}}};DygraphLayout.prototype._evaluateLineTicks=function(){this.xticks=new Array();for(var c=0;c<this.options.xTicks.length;c++){var b=this.options.xTicks[c];var a=b.label;var d=this.xscale*(b.v-this.minxval);if((d>=0)&&(d<=1)){this.xticks.push([d,a])}}this.yticks=new Array();for(var c=0;c<this.options.yTicks.length;c++){var b=this.options.yTicks[c];var a=b.label;var d=1-(this.yscale*(b.v-this.minyval));if((d>=0)&&(d<=1)){this.yticks.push([d,a])}}};DygraphLayout.prototype.evaluateWithError=function(){this.evaluate();if(!this.options.errorBars){return}var d=0;for(var g in this.datasets){if(!this.datasets.hasOwnProperty(g)){continue}var c=0;var f=this.datasets[g];for(var c=0;c<f.length;c++,d++){var e=f[c];var a=parseFloat(e[0]);var b=parseFloat(e[1]);if(a==this.points[d].xval&&b==this.points[d].yval){this.points[d].errorMinus=parseFloat(e[2]);this.points[d].errorPlus=parseFloat(e[3])}}}};DygraphLayout.prototype.removeAllDatasets=function(){delete this.datasets;this.datasets=new Array()};DygraphLayout.prototype.updateOptions=function(a){Dygraph.update(this.options,a?a:{})};DygraphCanvasRenderer=function(c,b,d,a){this.dygraph_=c;this.options={strokeWidth:0.5,drawXAxis:true,drawYAxis:true,axisLineColor:"black",axisLineWidth:0.5,axisTickSize:3,axisLabelColor:"black",axisLabelFont:"Arial",axisLabelFontSize:9,axisLabelWidth:50,drawYGrid:true,drawXGrid:true,gridLineColor:"rgb(128,128,128)",fillAlpha:0.15,};Dygraph.update(this.options,a);this.layout=d;this.element=b;this.container=this.element.parentNode;this.height=this.element.height;this.width=this.element.width;if(!this.isIE&&!(DygraphCanvasRenderer.isSupported(this.element))){throw"Canvas is not supported."}this.xlabels=new Array();this.ylabels=new Array();this.area={x:this.options.yAxisLabelWidth+2*this.options.axisTickSize,y:0};this.area.w=this.width-this.area.x-this.options.rightGap;this.area.h=this.height-this.options.axisLabelFontSize-2*this.options.axisTickSize;this.container.style.position="relative";this.container.style.width=this.width+"px"};DygraphCanvasRenderer.prototype.clear=function(){if(this.isIE){try{if(this.clearDelay){this.clearDelay.cancel();this.clearDelay=null}var b=this.element.getContext("2d")}catch(d){this.clearDelay=MochiKit.Async.wait(this.IEDelay);this.clearDelay.addCallback(bind(this.clear,this));return}}var b=this.element.getContext("2d");b.clearRect(0,0,this.width,this.height);for(var a=0;a<this.xlabels.length;a++){var c=this.xlabels[a];c.parentNode.removeChild(c)}for(var a=0;a<this.ylabels.length;a++){var c=this.ylabels[a];c.parentNode.removeChild(c)}this.xlabels=new Array();this.ylabels=new Array()};DygraphCanvasRenderer.isSupported=function(g){var b=null;try{if(typeof(g)=="undefined"||g==null){b=document.createElement("canvas")}else{b=g}var c=b.getContext("2d")}catch(d){var f=navigator.appVersion.match(/MSIE (\d\.\d)/);var a=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);if((!f)||(f[1]<6)||(a)){return false}return true}return true};DygraphCanvasRenderer.prototype.render=function(){var b=this.element.getContext("2d");if(this.options.drawYGrid){var d=this.layout.yticks;b.save();b.strokeStyle=this.options.gridLineColor;b.lineWidth=this.options.axisLineWidth;for(var c=0;c<d.length;c++){var a=this.area.x;var e=this.area.y+d[c][0]*this.area.h;b.beginPath();b.moveTo(a,e);b.lineTo(a+this.area.w,e);b.closePath();b.stroke()}}if(this.options.drawXGrid){var d=this.layout.xticks;b.save();b.strokeStyle=this.options.gridLineColor;b.lineWidth=this.options.axisLineWidth;for(var c=0;c<d.length;c++){var a=this.area.x+d[c][0]*this.area.w;var e=this.area.y+this.area.h;b.beginPath();b.moveTo(a,e);b.lineTo(a,this.area.y);b.closePath();b.stroke()}}this._renderLineChart();this._renderAxis()};DygraphCanvasRenderer.prototype._renderAxis=function(){if(!this.options.drawXAxis&&!this.options.drawYAxis){return}var b=this.element.getContext("2d");var g={position:"absolute",fontSize:this.options.axisLabelFontSize+"px",zIndex:10,color:this.options.axisLabelColor,width:this.options.axisLabelWidth+"px",overflow:"hidden"};var d=function(i){var p=document.createElement("div");for(var o in g){if(g.hasOwnProperty(o)){p.style[o]=g[o]}}p.appendChild(document.createTextNode(i));return p};b.save();b.strokeStyle=this.options.axisLineColor;b.lineWidth=this.options.axisLineWidth;if(this.options.drawYAxis){if(this.layout.yticks&&this.layout.yticks.length>0){for(var e=0;e<this.layout.yticks.length;e++){var f=this.layout.yticks[e];if(typeof(f)=="function"){return}var l=this.area.x;var j=this.area.y+f[0]*this.area.h;b.beginPath();b.moveTo(l,j);b.lineTo(l-this.options.axisTickSize,j);b.closePath();b.stroke();var k=d(f[1]);var h=(j-this.options.axisLabelFontSize/2);if(h<0){h=0}if(h+this.options.axisLabelFontSize+3>this.height){k.style.bottom="0px"}else{k.style.top=h+"px"}k.style.left="0px";k.style.textAlign="right";k.style.width=this.options.yAxisLabelWidth+"px";this.container.appendChild(k);this.ylabels.push(k)}var m=this.ylabels[0];var n=this.options.axisLabelFontSize;var a=parseInt(m.style.top)+n;if(a>this.height-n){m.style.top=(parseInt(m.style.top)-n/2)+"px"}}b.beginPath();b.moveTo(this.area.x,this.area.y);b.lineTo(this.area.x,this.area.y+this.area.h);b.closePath();b.stroke()}if(this.options.drawXAxis){if(this.layout.xticks){for(var e=0;e<this.layout.xticks.length;e++){var f=this.layout.xticks[e];if(typeof(dataset)=="function"){return}var l=this.area.x+f[0]*this.area.w;var j=this.area.y+this.area.h;b.beginPath();b.moveTo(l,j);b.lineTo(l,j+this.options.axisTickSize);b.closePath();b.stroke();var k=d(f[1]);k.style.textAlign="center";k.style.bottom="0px";var c=(l-this.options.axisLabelWidth/2);if(c+this.options.axisLabelWidth>this.width){c=this.width-this.options.xAxisLabelWidth;k.style.textAlign="right"}if(c<0){c=0;k.style.textAlign="left"}k.style.left=c+"px";k.style.width=this.options.xAxisLabelWidth+"px";this.container.appendChild(k);this.xlabels.push(k)}}b.beginPath();b.moveTo(this.area.x,this.area.y+this.area.h);b.lineTo(this.area.x+this.area.w,this.area.y+this.area.h);b.closePath();b.stroke()}b.restore()};DygraphCanvasRenderer.prototype._renderLineChart=function(){var b=this.element.getContext("2d");var d=this.options.colorScheme.length;var n=this.options.colorScheme;var x=this.options.fillAlpha;var C=this.layout.options.errorBars;var q=this.layout.options.fillGraph;var E=[];for(var F in this.layout.datasets){if(this.layout.datasets.hasOwnProperty(F)){E.push(F)}}var y=E.length;for(var A=0;A<this.layout.points.length;A++){var t=this.layout.points[A];t.canvasx=this.area.w*t.x+this.area.x;t.canvasy=this.area.h*t.y+this.area.y}var o=function(i){return i&&!isNaN(i)};var s=b;if(C){if(q){this.dygraph_.warn("Can't use fillGraph option with error bars")}for(var A=0;A<y;A++){var g=E[A];var v=n[A%d];s.save();s.strokeStyle=v;s.lineWidth=this.options.strokeWidth;var h=-1;var f=[-1,-1];var k=0;var B=this.layout.yscale;var a=new RGBColor(v);var D="rgba("+a.r+","+a.g+","+a.b+","+x+")";s.fillStyle=D;s.beginPath();for(var w=0;w<this.layout.points.length;w++){var t=this.layout.points[w];k++;if(t.name==g){if(!o(t.y)){h=-1;continue}var p=[t.y-t.errorPlus*B,t.y+t.errorMinus*B];p[0]=this.area.h*p[0]+this.area.y;p[1]=this.area.h*p[1]+this.area.y;if(h>=0){s.moveTo(h,f[0]);s.lineTo(t.canvasx,p[0]);s.lineTo(t.canvasx,p[1]);s.lineTo(h,f[1]);s.closePath()}f[0]=p[0];f[1]=p[1];h=t.canvasx}}s.fill()}}else{if(q){for(var A=0;A<y;A++){var g=E[A];var r;if(A>0){r=E[A-1]}var v=n[A%d];s.save();s.strokeStyle=v;s.lineWidth=this.options.strokeWidth;var h=-1;var f=[-1,-1];var k=0;var B=this.layout.yscale;var a=new RGBColor(v);var D="rgba("+a.r+","+a.g+","+a.b+","+x+")";s.fillStyle=D;s.beginPath();for(var w=0;w<this.layout.points.length;w++){var t=this.layout.points[w];k++;if(t.name==g){if(!o(t.y)){h=-1;continue}var e=1+this.layout.minyval*this.layout.yscale;if(e<0){e=0}else{if(e>1){e=1}}var p=[t.y,e];p[0]=this.area.h*p[0]+this.area.y;p[1]=this.area.h*p[1]+this.area.y;if(h>=0){s.moveTo(h,f[0]);s.lineTo(t.canvasx,p[0]);s.lineTo(t.canvasx,p[1]);s.lineTo(h,f[1]);s.closePath()}f[0]=p[0];f[1]=p[1];h=t.canvasx}}s.fill()}}}for(var A=0;A<y;A++){var g=E[A];var v=n[A%d];b.save();var t=this.layout.points[0];var l=this.dygraph_.attr_("pointSize");var h=null,c=null;var u=this.dygraph_.attr_("drawPoints");var z=this.layout.points;for(var w=0;w<z.length;w++){var t=z[w];if(t.name==g){if(!o(t.canvasy)){h=c=null}else{var m=(!h&&(w==z.length-1||!o(z[w+1].canvasy)));if(!h){h=t.canvasx;c=t.canvasy}else{s.beginPath();s.strokeStyle=v;s.lineWidth=this.options.strokeWidth;s.moveTo(h,c);h=t.canvasx;c=t.canvasy;s.lineTo(h,c);s.stroke()}if(u||m){s.beginPath();s.fillStyle=v;s.arc(t.canvasx,t.canvasy,l,0,2*Math.PI,false);s.fill()}}}}}b.restore()};Dygraph=function(c,b,a){if(arguments.length>0){if(arguments.length==4){this.warn("Using deprecated four-argument dygraph constructor");this.__old_init__(c,b,arguments[2],arguments[3])}else{this.__init__(c,b,a)}}};Dygraph.NAME="Dygraph";Dygraph.VERSION="1.2";Dygraph.__repr__=function(){return"["+this.NAME+" "+this.VERSION+"]"};Dygraph.toString=function(){return this.__repr__()};Dygraph.DEFAULT_ROLL_PERIOD=1;Dygraph.DEFAULT_WIDTH=480;Dygraph.DEFAULT_HEIGHT=320;Dygraph.AXIS_LINE_WIDTH=0.3;Dygraph.DEFAULT_ATTRS={highlightCircleSize:3,pixelsPerXLabel:60,pixelsPerYLabel:30,labelsDivWidth:250,labelsDivStyles:{},labelsSeparateLines:false,labelsKMB:false,labelsKMG2:false,strokeWidth:1,axisTickSize:3,axisLabelFontSize:14,xAxisLabelWidth:50,yAxisLabelWidth:50,rightGap:5,showRoller:false,xValueFormatter:Dygraph.dateString_,xValueParser:Dygraph.dateParser,xTicker:Dygraph.dateTicker,delimiter:",",logScale:false,sigma:2,errorBars:false,fractions:false,wilsonInterval:true,customBars:false,fillGraph:false,fillAlpha:0.15,stackedGraph:false,hideOverlayOnMouseOut:true};Dygraph.DEBUG=1;Dygraph.INFO=2;Dygraph.WARNING=3;Dygraph.ERROR=3;Dygraph.prototype.__old_init__=function(f,d,e,b){if(e!=null){var a=["Date"];for(var c=0;c<e.length;c++){a.push(e[c])}Dygraph.update(b,{labels:a})}this.__init__(f,d,b)};Dygraph.prototype.__init__=function(c,b,a){if(a==null){a={}}this.maindiv_=c;this.file_=b;this.rollPeriod_=a.rollPeriod||Dygraph.DEFAULT_ROLL_PERIOD;this.previousVerticalX_=-1;this.fractions_=a.fractions||false;this.dateWindow_=a.dateWindow||null;this.valueRange_=a.valueRange||null;this.wilsonInterval_=a.wilsonInterval||true;c.innerHTML="";if(c.style.width==""){c.style.width=a.width||Dygraph.DEFAULT_WIDTH+"px"}if(c.style.height==""){c.style.height=a.height||Dygraph.DEFAULT_HEIGHT+"px"}this.width_=parseInt(c.style.width,10);this.height_=parseInt(c.style.height,10);if(c.style.width.indexOf("%")==c.style.width.length-1){this.width_=(this.width_*self.innerWidth/100)-10}if(c.style.height.indexOf("%")==c.style.height.length-1){this.height_=(this.height_*self.innerHeight/100)-10}if(a.stackedGraph){a.fillGraph=true}this.user_attrs_={};Dygraph.update(this.user_attrs_,a);this.attrs_={};Dygraph.update(this.attrs_,Dygraph.DEFAULT_ATTRS);this.labelsFromCSV_=(this.attr_("labels")==null);this.createInterface_();this.start_()};Dygraph.prototype.attr_=function(a){if(typeof(this.user_attrs_[a])!="undefined"){return this.user_attrs_[a]}else{if(typeof(this.attrs_[a])!="undefined"){return this.attrs_[a]}else{return null}}};Dygraph.prototype.log=function(a,b){if(typeof(console)!="undefined"){switch(a){case Dygraph.DEBUG:console.debug("dygraphs: "+b);break;case Dygraph.INFO:console.info("dygraphs: "+b);break;case Dygraph.WARNING:console.warn("dygraphs: "+b);break;case Dygraph.ERROR:console.error("dygraphs: "+b);break}}};Dygraph.prototype.info=function(a){this.log(Dygraph.INFO,a)};Dygraph.prototype.warn=function(a){this.log(Dygraph.WARNING,a)};Dygraph.prototype.error=function(a){this.log(Dygraph.ERROR,a)};Dygraph.prototype.rollPeriod=function(){return this.rollPeriod_};Dygraph.prototype.xAxisRange=function(){if(this.dateWindow_){return this.dateWindow_}var b=this.rawData_[0][0];var a=this.rawData_[this.rawData_.length-1][0];return[b,a]};Dygraph.addEvent=function(c,a,b){var d=function(f){if(!f){var f=window.event}b(f)};if(window.addEventListener){c.addEventListener(a,d,false)}else{c.attachEvent("on"+a,d)}};Dygraph.prototype.createInterface_=function(){var a=this.maindiv_;this.graphDiv=document.createElement("div");this.graphDiv.style.width=this.width_+"px";this.graphDiv.style.height=this.height_+"px";a.appendChild(this.graphDiv);this.canvas_=Dygraph.createCanvas();this.canvas_.style.position="absolute";this.canvas_.width=this.width_;this.canvas_.height=this.height_;this.canvas_.style.width=this.width_+"px";this.canvas_.style.height=this.height_+"px";this.graphDiv.appendChild(this.canvas_);this.hidden_=this.createPlotKitCanvas_(this.canvas_);var b=this;Dygraph.addEvent(this.hidden_,"mousemove",function(c){b.mouseMove_(c)});Dygraph.addEvent(this.hidden_,"mouseout",function(c){b.mouseOut_(c)});this.layoutOptions_={xOriginIsZero:false};Dygraph.update(this.layoutOptions_,this.attrs_);Dygraph.update(this.layoutOptions_,this.user_attrs_);Dygraph.update(this.layoutOptions_,{errorBars:(this.attr_("errorBars")||this.attr_("customBars"))});this.layout_=new DygraphLayout(this,this.layoutOptions_);this.renderOptions_={colorScheme:this.colors_,strokeColor:null,axisLineWidth:Dygraph.AXIS_LINE_WIDTH};Dygraph.update(this.renderOptions_,this.attrs_);Dygraph.update(this.renderOptions_,this.user_attrs_);this.plotter_=new DygraphCanvasRenderer(this,this.hidden_,this.layout_,this.renderOptions_);this.createStatusMessage_();this.createRollInterface_();this.createDragInterface_()};Dygraph.prototype.createPlotKitCanvas_=function(a){var b=Dygraph.createCanvas();b.style.position="absolute";b.style.top=a.style.top;b.style.left=a.style.left;b.width=this.width_;b.height=this.height_;b.style.width=this.width_+"px";b.style.height=this.height_+"px";this.graphDiv.appendChild(b);return b};Dygraph.hsvToRGB=function(h,g,k){var c;var d;var l;if(g===0){c=k;d=k;l=k}else{var e=Math.floor(h*6);var j=(h*6)-e;var b=k*(1-g);var a=k*(1-(g*j));var m=k*(1-(g*(1-j)));switch(e){case 1:c=a;d=k;l=b;break;case 2:c=b;d=k;l=m;break;case 3:c=b;d=a;l=k;break;case 4:c=m;d=b;l=k;break;case 5:c=k;d=b;l=a;break;case 6:case 0:c=k;d=m;l=b;break}}c=Math.floor(255*c+0.5);d=Math.floor(255*d+0.5);l=Math.floor(255*l+0.5);return"rgb("+c+","+d+","+l+")"};Dygraph.prototype.setColors_=function(){var e=this.attr_("labels").length-1;this.colors_=[];var b=this.attr_("colors");if(!b){var d=this.attr_("colorSaturation")||1;var h=this.attr_("colorValue")||0.5;for(var g=1;g<=e;g++){if(!this.visibility()[g-1]){continue}var a=g-parseInt(g%2?g/2:(g-e)/2,10);var c=(1*a/(1+e));this.colors_.push(Dygraph.hsvToRGB(c,d,h))}}else{for(var g=0;g<e;g++){if(!this.visibility()[g]){continue}var f=b[g%b.length];this.colors_.push(f)}}this.renderOptions_.colorScheme=this.colors_;Dygraph.update(this.plotter_.options,this.renderOptions_);Dygraph.update(this.layoutOptions_,this.user_attrs_);Dygraph.update(this.layoutOptions_,this.attrs_)};Dygraph.prototype.getColors=function(){return this.colors_};Dygraph.findPosX=function(a){var b=0;if(a.offsetParent){while(1){b+=a.offsetLeft;if(!a.offsetParent){break}a=a.offsetParent}}else{if(a.x){b+=a.x}}return b};Dygraph.findPosY=function(b){var a=0;if(b.offsetParent){while(1){a+=b.offsetTop;if(!b.offsetParent){break}b=b.offsetParent}}else{if(b.y){a+=b.y}}return a};Dygraph.prototype.createStatusMessage_=function(){if(!this.attr_("labelsDiv")){var a=this.attr_("labelsDivWidth");var c={position:"absolute",fontSize:"14px",zIndex:10,width:a+"px",top:"0px",left:(this.width_-a-2)+"px",background:"white",textAlign:"left",overflow:"hidden"};Dygraph.update(c,this.attr_("labelsDivStyles"));var d=document.createElement("div");for(var b in c){if(c.hasOwnProperty(b)){d.style[b]=c[b]}}this.graphDiv.appendChild(d);this.attrs_.labelsDiv=d}};Dygraph.prototype.createRollInterface_=function(){var f=this.attr_("showRoller")?"block":"none";var b={position:"absolute",zIndex:10,top:(this.plotter_.area.h-25)+"px",left:(this.plotter_.area.x+1)+"px",display:f};var e=document.createElement("input");e.type="text";e.size="2";e.value=this.rollPeriod_;for(var a in b){if(b.hasOwnProperty(a)){e.style[a]=b[a]}}var d=this.graphDiv;d.appendChild(e);var c=this;e.onchange=function(){c.adjustRoll(e.value)};return e};Dygraph.pageX=function(c){if(c.pageX){return(!c.pageX||c.pageX<0)?0:c.pageX}else{var d=document;var a=document.body;return c.clientX+(d.scrollLeft||a.scrollLeft)-(d.clientLeft||0)}};Dygraph.pageY=function(c){if(c.pageY){return(!c.pageY||c.pageY<0)?0:c.pageY}else{var d=document;var a=document.body;return c.clientY+(d.scrollTop||a.scrollTop)-(d.clientTop||0)}};Dygraph.prototype.createDragInterface_=function(){var n=this;var c=false;var e=false;var b=null;var a=null;var m=null;var k=null;var f=null;var l=null;var j=null;var g=0;var d=0;var i=function(o){return Dygraph.pageX(o)-g};var h=function(o){return Dygraph.pageX(o)-d};Dygraph.addEvent(this.hidden_,"mousemove",function(o){if(c){m=i(o);k=h(o);n.drawZoomRect_(b,m,f);f=m}else{if(e){m=i(o);k=h(o);n.dateWindow_[0]=l-(m/n.width_)*j;n.dateWindow_[1]=n.dateWindow_[0]+j;n.drawGraph_(n.rawData_)}}});Dygraph.addEvent(this.hidden_,"mousedown",function(o){g=Dygraph.findPosX(n.canvas_);d=Dygraph.findPosY(n.canvas_);b=i(o);a=h(o);if(o.altKey||o.shiftKey){if(!n.dateWindow_){return}e=true;j=n.dateWindow_[1]-n.dateWindow_[0];l=(b/n.width_)*j+n.dateWindow_[0]}else{c=true}});Dygraph.addEvent(document,"mouseup",function(o){if(c||e){c=false;b=null;a=null}if(e){e=false;l=null;j=null}});Dygraph.addEvent(this.hidden_,"mouseout",function(o){if(c){m=null;k=null}});Dygraph.addEvent(this.hidden_,"mouseup",function(o){if(c){c=false;m=i(o);k=h(o);var q=Math.abs(m-b);var p=Math.abs(k-a);if(q<2&&p<2&&n.attr_("clickCallback")!=null&&n.lastx_!=undefined){n.attr_("clickCallback")(o,n.lastx_,n.selPoints_)}if(q>=10){n.doZoom_(Math.min(b,m),Math.max(b,m))}else{n.canvas_.getContext("2d").clearRect(0,0,n.canvas_.width,n.canvas_.height)}b=null;a=null}if(e){e=false;l=null;j=null}});Dygraph.addEvent(this.hidden_,"dblclick",function(o){if(n.dateWindow_==null){return}n.dateWindow_=null;n.drawGraph_(n.rawData_);var p=n.rawData_[0][0];var q=n.rawData_[n.rawData_.length-1][0];if(n.attr_("zoomCallback")){n.attr_("zoomCallback")(p,q)}})};Dygraph.prototype.drawZoomRect_=function(c,d,b){var a=this.canvas_.getContext("2d");if(b){a.clearRect(Math.min(c,b),0,Math.abs(c-b),this.height_)}if(d&&c){a.fillStyle="rgba(128,128,128,0.33)";a.fillRect(Math.min(c,d),0,Math.abs(d-c),this.height_)}};Dygraph.prototype.doZoom_=function(g,e){var d=this.layout_.points;var f=null;var h=null;for(var c=0;c<d.length;c++){var b=d[c].canvasx;var a=d[c].xval;if(b<g&&(f==null||a>f)){f=a}if(b>e&&(h==null||a<h)){h=a}}if(f==null){f=d[0].xval}if(h==null){h=d[d.length-1].xval}this.dateWindow_=[f,h];this.drawGraph_(this.rawData_);if(this.attr_("zoomCallback")){this.attr_("zoomCallback")(f,h)}};Dygraph.prototype.mouseMove_=function(s){var m=Dygraph.pageX(s)-Dygraph.findPosX(this.hidden_);var t=this.layout_.points;var l=-1;var k=-1;var a=1e+100;var g=-1;for(var u=0;u<t.length;u++){var n=Math.abs(t[u].canvasx-m);if(n>a){break}a=n;g=u}if(g>=0){l=t[g].xval}if(m>t[t.length-1].canvasx){l=t[t.length-1].xval}this.selPoints_=[];for(var u=0;u<t.length;u++){if(t[u].xval==l){this.selPoints_.push(t[u])}}if(this.attr_("highlightCallback")){var h=this.lastHighlightCallbackX;if(h!==null&&l!=h){this.lastHighlightCallbackX=l;if(!this.attr_("stackedGraph")){this.attr_("highlightCallback")(s,l,this.selPoints_)}else{var b=this.selPoints_.map(function(c){return{xval:c.xval,yval:c.yval,name:c.name}});var o=0;for(var r=b.length-1;r>=0;r--){b[r].yval-=o;o+=b[r].yval}this.attr_("highlightCallback")(s,l,b)}}}var d=this.attr_("highlightCircleSize");var q=this.canvas_.getContext("2d");if(this.previousVerticalX_>=0){var h=this.previousVerticalX_;q.clearRect(h-d-1,0,2*d+2,this.height_)}var f=function(c){return c&&!isNaN(c)};if(this.selPoints_.length>0){var m=this.selPoints_[0].canvasx;var w=this.attr_("xValueFormatter")(l,this)+":";var e=this.colors_.length;for(var u=0;u<this.selPoints_.length;u++){if(!f(this.selPoints_[u].canvasy)){continue}if(this.attr_("labelsSeparateLines")){w+="<br/>"}var p=this.selPoints_[u];var v=new RGBColor(this.colors_[u%e]);w+=" <b><font color='"+v.toHex()+"'>"+p.name+"</font></b>:"+this.round_(p.yval,2)}this.attr_("labelsDiv").innerHTML=w;this.lastx_=l;q.save();for(var u=0;u<this.selPoints_.length;u++){if(!f(this.selPoints_[u%e].canvasy)){continue}q.beginPath();q.fillStyle=this.colors_[u%e];q.arc(m,this.selPoints_[u%e].canvasy,d,0,2*Math.PI,false);q.fill()}q.restore();this.previousVerticalX_=m}};Dygraph.prototype.mouseOut_=function(b){if(this.attr_("hideOverlayOnMouseOut")){var a=this.canvas_.getContext("2d");a.clearRect(0,0,this.width_,this.height_);this.attr_("labelsDiv").innerHTML=""}};Dygraph.zeropad=function(a){if(a<10){return"0"+a}else{return""+a}};Dygraph.prototype.hmsString_=function(a){var c=Dygraph.zeropad;var b=new Date(a);if(b.getSeconds()){return c(b.getHours())+":"+c(b.getMinutes())+":"+c(b.getSeconds())}else{return c(b.getHours())+":"+c(b.getMinutes())}};Dygraph.dateString_=function(b,j){var c=Dygraph.zeropad;var g=new Date(b);var h=""+g.getFullYear();var e=c(g.getMonth()+1);var i=c(g.getDate());var f="";var a=g.getHours()*3600+g.getMinutes()*60+g.getSeconds();if(a){f=" "+j.hmsString_(b)}return h+"/"+e+"/"+i+f};Dygraph.prototype.round_=function(c,b){var a=Math.pow(10,b);return Math.round(c*a)/a};Dygraph.prototype.loadedEvent_=function(a){this.rawData_=this.parseCSV_(a);this.drawGraph_(this.rawData_)};Dygraph.prototype.months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Dygraph.prototype.quarters=["Jan","Apr","Jul","Oct"];Dygraph.prototype.addXTicks_=function(){var a,c;if(this.dateWindow_){a=this.dateWindow_[0];c=this.dateWindow_[1]}else{a=this.rawData_[0][0];c=this.rawData_[this.rawData_.length-1][0]}var b=this.attr_("xTicker")(a,c,this);this.layout_.updateOptions({xTicks:b})};Dygraph.SECONDLY=0;Dygraph.TWO_SECONDLY=1;Dygraph.FIVE_SECONDLY=2;Dygraph.TEN_SECONDLY=3;Dygraph.THIRTY_SECONDLY=4;Dygraph.MINUTELY=5;Dygraph.TWO_MINUTELY=6;Dygraph.FIVE_MINUTELY=7;Dygraph.TEN_MINUTELY=8;Dygraph.THIRTY_MINUTELY=9;Dygraph.HOURLY=10;Dygraph.TWO_HOURLY=11;Dygraph.SIX_HOURLY=12;Dygraph.DAILY=13;Dygraph.WEEKLY=14;Dygraph.MONTHLY=15;Dygraph.QUARTERLY=16;Dygraph.BIANNUAL=17;Dygraph.ANNUAL=18;Dygraph.DECADAL=19;Dygraph.NUM_GRANULARITIES=20;Dygraph.SHORT_SPACINGS=[];Dygraph.SHORT_SPACINGS[Dygraph.SECONDLY]=1000*1;Dygraph.SHORT_SPACINGS[Dygraph.TWO_SECONDLY]=1000*2;Dygraph.SHORT_SPACINGS[Dygraph.FIVE_SECONDLY]=1000*5;Dygraph.SHORT_SPACINGS[Dygraph.TEN_SECONDLY]=1000*10;Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_SECONDLY]=1000*30;Dygraph.SHORT_SPACINGS[Dygraph.MINUTELY]=1000*60;Dygraph.SHORT_SPACINGS[Dygraph.TWO_MINUTELY]=1000*60*2;Dygraph.SHORT_SPACINGS[Dygraph.FIVE_MINUTELY]=1000*60*5;Dygraph.SHORT_SPACINGS[Dygraph.TEN_MINUTELY]=1000*60*10;Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_MINUTELY]=1000*60*30;Dygraph.SHORT_SPACINGS[Dygraph.HOURLY]=1000*3600;Dygraph.SHORT_SPACINGS[Dygraph.TWO_HOURLY]=1000*3600*2;Dygraph.SHORT_SPACINGS[Dygraph.SIX_HOURLY]=1000*3600*6;Dygraph.SHORT_SPACINGS[Dygraph.DAILY]=1000*86400;Dygraph.SHORT_SPACINGS[Dygraph.WEEKLY]=1000*604800;Dygraph.prototype.NumXTicks=function(e,b,g){if(g<Dygraph.MONTHLY){var h=Dygraph.SHORT_SPACINGS[g];return Math.floor(0.5+1*(b-e)/h)}else{var f=1;var d=12;if(g==Dygraph.QUARTERLY){d=3}if(g==Dygraph.BIANNUAL){d=2}if(g==Dygraph.ANNUAL){d=1}if(g==Dygraph.DECADAL){d=1;f=10}var c=365.2524*24*3600*1000;var a=1*(b-e)/c;return Math.floor(0.5+1*a*d/f)}};Dygraph.prototype.GetXAxis=function(n,k,a){var y=[];if(a<Dygraph.MONTHLY){var e=Dygraph.SHORT_SPACINGS[a];var u="%d%b";var v=e/1000;var w=new Date(n);if(v<=60){var h=w.getSeconds();w.setSeconds(h-h%v)}else{w.setSeconds(0);v/=60;if(v<=60){var h=w.getMinutes();w.setMinutes(h-h%v)}else{w.setMinutes(0);v/=60;if(v<=24){var h=w.getHours();w.setHours(h-h%v)}else{w.setHours(0);v/=24;if(v==7){w.setDate(w.getDate()-w.getDay())}}}}n=w.getTime();for(var l=n;l<=k;l+=e){var w=new Date(l);var b=w.getHours()*3600+w.getMinutes()*60+w.getSeconds();if(b==0||a>=Dygraph.DAILY){y.push({v:l,label:new Date(l+3600*1000).strftime(u)})}else{y.push({v:l,label:this.hmsString_(l)})}}}else{var f;var o=1;if(a==Dygraph.MONTHLY){f=[0,1,2,3,4,5,6,7,8,9,10,11,12]}else{if(a==Dygraph.QUARTERLY){f=[0,3,6,9]}else{if(a==Dygraph.BIANNUAL){f=[0,6]}else{if(a==Dygraph.ANNUAL){f=[0]}else{if(a==Dygraph.DECADAL){f=[0];o=10}}}}}var r=new Date(n).getFullYear();var p=new Date(k).getFullYear();var c=Dygraph.zeropad;for(var s=r;s<=p;s++){if(s%o!=0){continue}for(var q=0;q<f.length;q++){var m=s+"/"+c(1+f[q])+"/01";var l=Date.parse(m);if(l<n||l>k){continue}y.push({v:l,label:new Date(l).strftime("%b %y")})}}}return y};Dygraph.dateTicker=function(a,f,d){var b=-1;for(var e=0;e<Dygraph.NUM_GRANULARITIES;e++){var c=d.NumXTicks(a,f,e);if(d.width_/c>=d.attr_("pixelsPerXLabel")){b=e;break}}if(b>=0){return d.GetXAxis(a,f,b)}else{}};Dygraph.numericTicks=function(v,u,l){if(l.attr_("labelsKMG2")){var f=[1,2,4,8]}else{var f=[1,2,5]}var x,p,a,q;var h=l.attr_("pixelsPerYLabel");for(var t=-10;t<50;t++){if(l.attr_("labelsKMG2")){var c=Math.pow(16,t)}else{var c=Math.pow(10,t)}for(var s=0;s<f.length;s++){x=c*f[s];p=Math.floor(v/x)*x;a=Math.ceil(u/x)*x;q=(a-p)/x;var d=l.height_/q;if(d>h){break}}if(d>h){break}}var w=[];var r;var o=[];if(l.attr_("labelsKMB")){r=1000;o=["K","M","B","T"]}if(l.attr_("labelsKMG2")){if(r){l.warn("Setting both labelsKMB and labelsKMG2. Pick one!")}r=1024;o=["k","M","G","T"]}for(var t=0;t<q;t++){var g=p+t*x;var b=Math.abs(g);var e=l.round_(g,2);if(o.length){var m=r*r*r*r;for(var s=3;s>=0;s--,m/=r){if(b>=m){e=l.round_(g/m,1)+o[s];break}}}w.push({label:e,v:g})}return w};Dygraph.prototype.addYTicks_=function(c,b){var a=Dygraph.numericTicks(c,b,this);this.layout_.updateOptions({yAxis:[c,b],yTicks:a})};Dygraph.prototype.extremeValues_=function(d){var h=null,f=null;var b=this.attr_("errorBars")||this.attr_("customBars");if(b){for(var c=0;c<d.length;c++){var g=d[c][1][0];if(!g){continue}var a=g-d[c][1][1];var e=g+d[c][1][2];if(a>g){a=g}if(e<g){e=g}if(f==null||e>f){f=e}if(h==null||a<h){h=a}}}else{for(var c=0;c<d.length;c++){var g=d[c][1];if(g===null||isNaN(g)){continue}if(f==null||g>f){f=g}if(h==null||g<h){h=g}}}return[h,f]};Dygraph.prototype.drawGraph_=function(z){var v=null,u=null;this.layout_.removeAllDatasets();this.setColors_();this.attrs_.pointSize=0.5*this.attr_("highlightCircleSize");var c=[];var f=[];for(var t=1;t<z[0].length;t++){if(!this.visibility()[t-1]){continue}var e=[];for(var r=0;r<z.length;r++){var w=z[r][0];e[r]=[w,z[r][t]]}e=this.rollingAverage(e,this.rollPeriod_);var h=this.attr_("errorBars")||this.attr_("customBars");if(this.dateWindow_){var A=this.dateWindow_[0];var d=this.dateWindow_[1];var m=[];for(var q=0;q<e.length;q++){if(e[q][0]>=A&&e[q][0]<=d){m.push(e[q])}}e=m}var a=this.extremeValues_(e);var o=a[0];var n=a[1];if(!v||o<v){v=o}if(!u||n>u){u=n}if(h){var g=[];for(var r=0;r<e.length;r++){g[r]=[e[r][0],e[r][1][0],e[r][1][1],e[r][1][2]]}this.layout_.addDataset(this.attr_("labels")[t],g)}else{if(this.attr_("stackedGraph")){var g=[];var p=e.length;var x;for(var r=0;r<p;r++){if(c[e[r][0]]===undefined){c[e[r][0]]=0}x=e[r][1];c[e[r][0]]+=x;g[r]=[e[r][0],c[e[r][0]]];if(!u||c[e[r][0]]>u){u=c[e[r][0]]}}f.push([this.attr_("labels")[t],g])}else{this.layout_.addDataset(this.attr_("labels")[t],e)}}}if(f.length>0){for(var t=(f.length-1);t>=0;t--){this.layout_.addDataset(f[t][0],f[t][1])}}if(this.valueRange_!=null){this.addYTicks_(this.valueRange_[0],this.valueRange_[1])}else{if(this.attr_("includeZero")&&v>0){v=0}var s=u-v;if(s==0){s=u}var b=u+0.1*s;var y=v-0.1*s;if(y<0&&v>=0){y=0}if(b>0&&u<=0){b=0}if(this.attr_("includeZero")){if(u<0){b=0}if(v>0){y=0}}this.addYTicks_(y,b)}this.addXTicks_();this.layout_.updateOptions({dateWindow:this.dateWindow_});this.layout_.evaluateWithError();this.plotter_.clear();this.plotter_.render();this.canvas_.getContext("2d").clearRect(0,0,this.canvas_.width,this.canvas_.height);if(this.attr_("drawCallback")!==null){this.attr_("drawCallback")(this)}};Dygraph.prototype.rollingAverage=function(m,d){if(m.length<2){return m}var d=Math.min(d,m.length-1);var b=[];var s=this.attr_("sigma");if(this.fractions_){var k=0;var h=0;var e=100;for(var x=0;x<m.length;x++){k+=m[x][1][0];h+=m[x][1][1];if(x-d>=0){k-=m[x-d][1][0];h-=m[x-d][1][1]}var B=m[x][0];var v=h?k/h:0;if(this.attr_("errorBars")){if(this.wilsonInterval_){if(h){var t=v<0?0:v,u=h;var A=s*Math.sqrt(t*(1-t)/u+s*s/(4*u*u));var a=1+s*s/h;var F=(t+s*s/(2*h)-A)/a;var o=(t+s*s/(2*h)+A)/a;b[x]=[B,[t*e,(t-F)*e,(o-t)*e]]}else{b[x]=[B,[0,0,0]]}}else{var z=h?s*Math.sqrt(v*(1-v)/h):1;b[x]=[B,[e*v,e*z,e*z]]}}else{b[x]=[B,e*v]}}}else{if(this.attr_("customBars")){var F=0;var C=0;var o=0;var g=0;for(var x=0;x<m.length;x++){var E=m[x][1];var l=E[1];b[x]=[m[x][0],[l,l-E[0],E[2]-l]];if(l!=null&&!isNaN(l)){F+=E[0];C+=l;o+=E[2];g+=1}if(x-d>=0){var r=m[x-d];if(r[1][1]!=null&&!isNaN(r[1][1])){F-=r[1][0];C-=r[1][1];o-=r[1][2];g-=1}}b[x]=[m[x][0],[1*C/g,1*(C-F)/g,1*(o-C)/g]]}}else{var q=Math.min(d-1,m.length-2);if(!this.attr_("errorBars")){if(d==1){return m}for(var x=0;x<m.length;x++){var c=0;var D=0;for(var w=Math.max(0,x-d+1);w<x+1;w++){var l=m[w][1];if(l==null||isNaN(l)){continue}D++;c+=m[w][1]}if(D){b[x]=[m[x][0],c/D]}else{b[x]=[m[x][0],null]}}}else{for(var x=0;x<m.length;x++){var c=0;var f=0;var D=0;for(var w=Math.max(0,x-d+1);w<x+1;w++){var l=m[w][1][0];if(l==null||isNaN(l)){continue}D++;c+=m[w][1][0];f+=Math.pow(m[w][1][1],2)}if(D){var z=Math.sqrt(f)/D;b[x]=[m[x][0],[c/D,s*z,s*z]]}else{b[x]=[m[x][0],[null,null,null]]}}}}}return b};Dygraph.dateParser=function(b,a){var c;var e;if(b.search("-")!=-1){c=b.replace("-","/","g");while(c.search("-")!=-1){c=c.replace("-","/")}e=Date.parse(c)}else{if(b.length==8){c=b.substr(0,4)+"/"+b.substr(4,2)+"/"+b.substr(6,2);e=Date.parse(c)}else{e=Date.parse(b)}}if(!e||isNaN(e)){a.error("Couldn't parse "+b+" as a date")}return e};Dygraph.prototype.detectTypeFromString_=function(b){var a=false;if(b.indexOf("-")>=0||b.indexOf("/")>=0||isNaN(parseFloat(b))){a=true}else{if(b.length==8&&b>"19700101"&&b<"20371231"){a=true}}if(a){this.attrs_.xValueFormatter=Dygraph.dateString_;this.attrs_.xValueParser=Dygraph.dateParser;this.attrs_.xTicker=Dygraph.dateTicker}else{this.attrs_.xValueFormatter=function(c){return c};this.attrs_.xValueParser=function(c){return parseFloat(c)};this.attrs_.xTicker=Dygraph.numericTicks}};Dygraph.prototype.parseCSV_=function(h){var m=[];var q=h.split("\n");var b=this.attr_("delimiter");if(q[0].indexOf(b)==-1&&q[0].indexOf("\t")>=0){b="\t"}var a=0;if(this.labelsFromCSV_){a=1;this.attrs_.labels=q[0].split(b)}var c;var o=false;var d=this.attr_("labels").length;var l=false;for(var g=a;g<q.length;g++){var p=q[g];if(p.length==0){continue}if(p[0]=="#"){continue}var f=p.split(b);if(f.length<2){continue}var k=[];if(!o){this.detectTypeFromString_(f[0]);c=this.attr_("xValueParser");o=true}k[0]=c(f[0],this);if(this.fractions_){for(var e=1;e<f.length;e++){var n=f[e].split("/");k[e]=[parseFloat(n[0]),parseFloat(n[1])]}}else{if(this.attr_("errorBars")){for(var e=1;e<f.length;e+=2){k[(e+1)/2]=[parseFloat(f[e]),parseFloat(f[e+1])]}}else{if(this.attr_("customBars")){for(var e=1;e<f.length;e++){var n=f[e].split(";");k[e]=[parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2])]}}else{for(var e=1;e<f.length;e++){k[e]=parseFloat(f[e])}}}}if(m.length>0&&k[0]<m[m.length-1][0]){l=true}m.push(k);if(k.length!=d){this.error("Number of columns in line "+g+" ("+k.length+") does not agree with number of labels ("+d+") "+p)}}if(l){this.warn("CSV is out of order; order it correctly to speed loading.");m.sort(function(j,i){return j[0]-i[0]})}return m};Dygraph.prototype.parseArray_=function(b){if(b.length==0){this.error("Can't plot empty data set");return null}if(b[0].length==0){this.error("Data set cannot contain an empty row");return null}if(this.attr_("labels")==null){this.warn("Using default labels. Set labels explicitly via 'labels' in the options parameter");this.attrs_.labels=["X"];for(var a=1;a<b[0].length;a++){this.attrs_.labels.push("Y"+a)}}if(Dygraph.isDateLike(b[0][0])){this.attrs_.xValueFormatter=Dygraph.dateString_;this.attrs_.xTicker=Dygraph.dateTicker;var c=Dygraph.clone(b);for(var a=0;a<b.length;a++){if(c[a].length==0){this.error("Row "<<(1+a)<<" of data is empty");return null}if(c[a][0]==null||typeof(c[a][0].getTime)!="function"){this.error("x value in row "<<(1+a)<<" is not a Date");return null}c[a][0]=c[a][0].getTime()}return c}else{this.attrs_.xValueFormatter=function(d){return d};this.attrs_.xTicker=Dygraph.numericTicks;return b}};Dygraph.prototype.parseDataTable_=function(c){var h=c.getNumberOfColumns();var l=c.getNumberOfRows();var e=[];for(var d=0;d<h;d++){e.push(c.getColumnLabel(d));if(d!=0&&this.attr_("errorBars")){d+=1}}this.attrs_.labels=e;h=e.length;var a=c.getColumnType(0);if(a=="date"||a=="datetime"){this.attrs_.xValueFormatter=Dygraph.dateString_;this.attrs_.xValueParser=Dygraph.dateParser;this.attrs_.xTicker=Dygraph.dateTicker}else{if(a=="number"){this.attrs_.xValueFormatter=function(i){return i};this.attrs_.xValueParser=function(i){return parseFloat(i)};this.attrs_.xTicker=Dygraph.numericTicks}else{this.error("only 'date', 'datetime' and 'number' types are supported for column 1 of DataTable input (Got '"+a+"')");return null}}var g=[];var f=false;for(var d=0;d<l;d++){var k=[];if(typeof(c.getValue(d,0))==="undefined"||c.getValue(d,0)===null){this.warning("Ignoring row "+d+" of DataTable because of undefined or null first column.");continue}if(a=="date"||a=="datetime"){k.push(c.getValue(d,0).getTime())}else{k.push(c.getValue(d,0))}if(!this.attr_("errorBars")){for(var b=1;b<h;b++){k.push(c.getValue(d,b))}}else{for(var b=0;b<h-1;b++){k.push([c.getValue(d,1+2*b),c.getValue(d,2+2*b)])}}if(g.length>0&&k[0]<g[g.length-1][0]){f=true}g.push(k)}if(f){this.warn("DataTable is out of order; order it correctly to speed loading.");g.sort(function(j,i){return j[0]-i[0]})}return g};Dygraph.update=function(b,c){if(typeof(c)!="undefined"&&c!==null){for(var a in c){if(c.hasOwnProperty(a)){b[a]=c[a]}}}return b};Dygraph.isArrayLike=function(b){var a=typeof(b);if((a!="object"&&!(a=="function"&&typeof(b.item)=="function"))||b===null||typeof(b.length)!="number"||b.nodeType===3){return false}return true};Dygraph.isDateLike=function(a){if(typeof(a)!="object"||a===null||typeof(a.getTime)!="function"){return false}return true};Dygraph.clone=function(c){var b=[];for(var a=0;a<c.length;a++){if(Dygraph.isArrayLike(c[a])){b.push(Dygraph.clone(c[a]))}else{b.push(c[a])}}return b};Dygraph.prototype.start_=function(){if(typeof this.file_=="function"){this.loadedEvent_(this.file_())}else{if(Dygraph.isArrayLike(this.file_)){this.rawData_=this.parseArray_(this.file_);this.drawGraph_(this.rawData_)}else{if(typeof this.file_=="object"&&typeof this.file_.getColumnRange=="function"){this.rawData_=this.parseDataTable_(this.file_);this.drawGraph_(this.rawData_)}else{if(typeof this.file_=="string"){if(this.file_.indexOf("\n")>=0){this.loadedEvent_(this.file_)}else{var b=new XMLHttpRequest();var a=this;b.onreadystatechange=function(){if(b.readyState==4){if(b.status==200){a.loadedEvent_(b.responseText)}}};b.open("GET",this.file_,true);b.send(null)}}else{this.error("Unknown data format: "+(typeof this.file_))}}}}};Dygraph.prototype.updateOptions=function(a){if(a.rollPeriod){this.rollPeriod_=a.rollPeriod}if(a.dateWindow){this.dateWindow_=a.dateWindow}if(a.valueRange){this.valueRange_=a.valueRange}Dygraph.update(this.user_attrs_,a);this.labelsFromCSV_=(this.attr_("labels")==null);this.layout_.updateOptions({errorBars:this.attr_("errorBars")});if(a.file&&a.file!=this.file_){this.file_=a.file;this.start_()}else{this.drawGraph_(this.rawData_)}};Dygraph.prototype.resize=function(b,a){if((b===null)!=(a===null)){this.warn("Dygraph.resize() should be called with zero parameters or two non-NULL parameters. Pretending it was zero.");b=a=null}this.maindiv_.innerHTML="";this.attrs_.labelsDiv=null;if(b){this.maindiv_.style.width=b+"px";this.maindiv_.style.height=a+"px";this.width_=b;this.height_=a}else{this.width_=this.maindiv_.offsetWidth;this.height_=this.maindiv_.offsetHeight}this.createInterface_();this.drawGraph_(this.rawData_)};Dygraph.prototype.adjustRoll=function(a){this.rollPeriod_=a;this.drawGraph_(this.rawData_)};Dygraph.prototype.visibility=function(){if(!this.attr_("visibility")){this.attrs_.visibility=[]}while(this.attr_("visibility").length<this.rawData_[0].length-1){this.attr_("visibility").push(true)}return this.attr_("visibility")};Dygraph.prototype.setVisibility=function(b,c){var a=this.visibility();if(b<0&&b>=a.length){this.warn("invalid series number in setVisibility: "+b)}else{a[b]=c;this.drawGraph_(this.rawData_)}};Dygraph.createCanvas=function(){var a=document.createElement("canvas");isIE=(/MSIE/.test(navigator.userAgent)&&!window.opera);if(isIE){a=G_vmlCanvasManager.initElement(a)}return a};Dygraph.GVizChart=function(a){this.container=a};Dygraph.GVizChart.prototype.draw=function(b,a){this.container.innerHTML="";this.date_graph=new Dygraph(this.container,b,a)};DateGraph=Dygraph;function RGBColor(g){this.ok=false;if(g.charAt(0)=="#"){g=g.substr(1,6)}g=g.replace(/ /g,"");g=g.toLowerCase();var a={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var c in a){if(g==c){g=a[c]}}var h=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(i){return[parseInt(i[1]),parseInt(i[2]),parseInt(i[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(i){return[parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(i){return[parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16),parseInt(i[3]+i[3],16)]}}];for(var b=0;b<h.length;b++){var e=h[b].re;var d=h[b].process;var f=e.exec(g);if(f){channels=d(f);this.r=channels[0];this.g=channels[1];this.b=channels[2];this.ok=true}}this.r=(this.r<0||isNaN(this.r))?0:((this.r>255)?255:this.r);this.g=(this.g<0||isNaN(this.g))?0:((this.g>255)?255:this.g);this.b=(this.b<0||isNaN(this.b))?0:((this.b>255)?255:this.b);this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"};this.toHex=function(){var k=this.r.toString(16);var j=this.g.toString(16);var i=this.b.toString(16);if(k.length==1){k="0"+k}if(j.length==1){j="0"+j}if(i.length==1){i="0"+i}return"#"+k+j+i}}Date.ext={};Date.ext.util={};Date.ext.util.xPad=function(a,c,b){if(typeof(b)=="undefined"){b=10}for(;parseInt(a,10)<b&&b>1;b/=10){a=c.toString()+a}return a.toString()};Date.prototype.locale="en-GB";if(document.getElementsByTagName("html")&&document.getElementsByTagName("html")[0].lang){Date.prototype.locale=document.getElementsByTagName("html")[0].lang}Date.ext.locales={};Date.ext.locales.en={a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a %d %b %Y %T %Z",p:["AM","PM"],P:["am","pm"],x:"%d/%m/%y",X:"%T"};Date.ext.locales["en-US"]=Date.ext.locales.en;Date.ext.locales["en-US"].c="%a %d %b %Y %r %Z";Date.ext.locales["en-US"].x="%D";Date.ext.locales["en-US"].X="%r";Date.ext.locales["en-GB"]=Date.ext.locales.en;Date.ext.locales["en-AU"]=Date.ext.locales["en-GB"];Date.ext.formats={a:function(a){return Date.ext.locales[a.locale].a[a.getDay()]},A:function(a){return Date.ext.locales[a.locale].A[a.getDay()]},b:function(a){return Date.ext.locales[a.locale].b[a.getMonth()]},B:function(a){return Date.ext.locales[a.locale].B[a.getMonth()]},c:"toLocaleString",C:function(a){return Date.ext.util.xPad(parseInt(a.getFullYear()/100,10),0)},d:["getDate","0"],e:["getDate"," "],g:function(a){return Date.ext.util.xPad(parseInt(Date.ext.util.G(a)/100,10),0)},G:function(c){var e=c.getFullYear();var b=parseInt(Date.ext.formats.V(c),10);var a=parseInt(Date.ext.formats.W(c),10);if(a>b){e++}else{if(a===0&&b>=52){e--}}return e},H:["getHours","0"],I:function(b){var a=b.getHours()%12;return Date.ext.util.xPad(a===0?12:a,0)},j:function(c){var a=c-new Date(""+c.getFullYear()+"/1/1 GMT");a+=c.getTimezoneOffset()*60000;var b=parseInt(a/60000/60/24,10)+1;return Date.ext.util.xPad(b,0,100)},m:function(a){return Date.ext.util.xPad(a.getMonth()+1,0)},M:["getMinutes","0"],p:function(a){return Date.ext.locales[a.locale].p[a.getHours()>=12?1:0]},P:function(a){return Date.ext.locales[a.locale].P[a.getHours()>=12?1:0]},S:["getSeconds","0"],u:function(a){var b=a.getDay();return b===0?7:b},U:function(e){var a=parseInt(Date.ext.formats.j(e),10);var c=6-e.getDay();var b=parseInt((a+c)/7,10);return Date.ext.util.xPad(b,0)},V:function(e){var c=parseInt(Date.ext.formats.W(e),10);var a=(new Date(""+e.getFullYear()+"/1/1")).getDay();var b=c+(a>4||a<=1?0:1);if(b==53&&(new Date(""+e.getFullYear()+"/12/31")).getDay()<4){b=1}else{if(b===0){b=Date.ext.formats.V(new Date(""+(e.getFullYear()-1)+"/12/31"))}}return Date.ext.util.xPad(b,0)},w:"getDay",W:function(e){var a=parseInt(Date.ext.formats.j(e),10);var c=7-Date.ext.formats.u(e);var b=parseInt((a+c)/7,10);return Date.ext.util.xPad(b,0,10)},y:function(a){return Date.ext.util.xPad(a.getFullYear()%100,0)},Y:"getFullYear",z:function(c){var b=c.getTimezoneOffset();var a=Date.ext.util.xPad(parseInt(Math.abs(b/60),10),0);var e=Date.ext.util.xPad(b%60,0);return(b>0?"-":"+")+a+e},Z:function(a){return a.toString().replace(/^.*\(([^)]+)\)$/,"$1")},"%":function(a){return"%"}};Date.ext.aggregates={c:"locale",D:"%m/%d/%y",h:"%b",n:"\n",r:"%I:%M:%S %p",R:"%H:%M",t:"\t",T:"%H:%M:%S",x:"locale",X:"locale"};Date.ext.aggregates.z=Date.ext.formats.z(new Date());Date.ext.aggregates.Z=Date.ext.formats.Z(new Date());Date.ext.unsupported={};Date.prototype.strftime=function(a){if(!(this.locale in Date.ext.locales)){if(this.locale.replace(/-[a-zA-Z]+$/,"") in Date.ext.locales){this.locale=this.locale.replace(/-[a-zA-Z]+$/,"")}else{this.locale="en-GB"}}var c=this;while(a.match(/%[cDhnrRtTxXzZ]/)){a=a.replace(/%([cDhnrRtTxXzZ])/g,function(e,d){var g=Date.ext.aggregates[d];return(g=="locale"?Date.ext.locales[c.locale][d]:g)})}var b=a.replace(/%([aAbBCdegGHIjmMpPSuUVwWyY%])/g,function(e,d){var g=Date.ext.formats[d];if(typeof(g)=="string"){return c[g]()}else{if(typeof(g)=="function"){return g.call(c,c)}else{if(typeof(g)=="object"&&typeof(g[0])=="string"){return Date.ext.util.xPad(c[g[0]](),g[1])}else{return d}}}});c=null;return b}; | 8514 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8514/02e9e1822bf18b4633669cef5a3d9a7e01132439/dygraph-combined.js/buggy/dygraph-combined.js |
DygraphLayout=function(b,a){this.dygraph_=b;this.options={};Dygraph.update(this.options,a?a:{});this.datasets=new Array()};DygraphLayout.prototype.attr_=function(a){return this.dygraph_.attr_(a)};DygraphLayout.prototype.addDataset=function(a,b){this.datasets[a]=b};DygraphLayout.prototype.evaluate=function(){this._evaluateLimits();this._evaluateLineCharts();this._evaluateLineTicks()};DygraphLayout.prototype._evaluateLimits=function(){this.minxval=this.maxxval=null;if(this.options.dateWindow){this.minxval=this.options.dateWindow[0];this.maxxval=this.options.dateWindow[1]}else{for(var c in this.datasets){if(!this.datasets.hasOwnProperty(c)){continue}var d=this.datasets[c];var b=d[0][0];if(!this.minxval||b<this.minxval){this.minxval=b}var a=d[d.length-1][0];if(!this.maxxval||a>this.maxxval){this.maxxval=a}}}this.xrange=this.maxxval-this.minxval;this.xscale=(this.xrange!=0?1/this.xrange:1);this.minyval=this.options.yAxis[0];this.maxyval=this.options.yAxis[1];this.yrange=this.maxyval-this.minyval;this.yscale=(this.yrange!=0?1/this.yrange:1)};DygraphLayout.prototype._evaluateLineCharts=function(){this.points=new Array();for(var e in this.datasets){if(!this.datasets.hasOwnProperty(e)){continue}var d=this.datasets[e];for(var b=0;b<d.length;b++){var c=d[b];var a={x:((parseFloat(c[0])-this.minxval)*this.xscale),y:1-((parseFloat(c[1])-this.minyval)*this.yscale),xval:parseFloat(c[0]),yval:parseFloat(c[1]),name:e};if(a.y<=0){a.y=0}if(a.y>=1){a.y=1}if((a.x>=0)&&(a.x<=1)){this.points.push(a)}}}};DygraphLayout.prototype._evaluateLineTicks=function(){this.xticks=new Array();for(var c=0;c<this.options.xTicks.length;c++){var b=this.options.xTicks[c];var a=b.label;var d=this.xscale*(b.v-this.minxval);if((d>=0)&&(d<=1)){this.xticks.push([d,a])}}this.yticks=new Array();for(var c=0;c<this.options.yTicks.length;c++){var b=this.options.yTicks[c];var a=b.label;var d=1-(this.yscale*(b.v-this.minyval));if((d>=0)&&(d<=1)){this.yticks.push([d,a])}}};DygraphLayout.prototype.evaluateWithError=function(){this.evaluate();if(!this.options.errorBars){return}var d=0;for(var g in this.datasets){if(!this.datasets.hasOwnProperty(g)){continue}var c=0;var f=this.datasets[g];for(var c=0;c<f.length;c++,d++){var e=f[c];var a=parseFloat(e[0]);var b=parseFloat(e[1]);if(a==this.points[d].xval&&b==this.points[d].yval){this.points[d].errorMinus=parseFloat(e[2]);this.points[d].errorPlus=parseFloat(e[3])}}}};DygraphLayout.prototype.removeAllDatasets=function(){delete this.datasets;this.datasets=new Array()};DygraphLayout.prototype.updateOptions=function(a){Dygraph.update(this.options,a?a:{})};DygraphCanvasRenderer=function(c,b,d,a){this.dygraph_=c;this.options={strokeWidth:0.5,drawXAxis:true,drawYAxis:true,axisLineColor:"black",axisLineWidth:0.5,axisTickSize:3,axisLabelColor:"black",axisLabelFont:"Arial",axisLabelFontSize:9,axisLabelWidth:50,drawYGrid:true,drawXGrid:true,gridLineColor:"rgb(128,128,128)",fillAlpha:0.15,};Dygraph.update(this.options,a);this.layout=d;this.element=b;this.container=this.element.parentNode;this.height=this.element.height;this.width=this.element.width;if(!this.isIE&&!(DygraphCanvasRenderer.isSupported(this.element))){throw"Canvas is not supported."}this.xlabels=new Array();this.ylabels=new Array();this.area={x:this.options.yAxisLabelWidth+2*this.options.axisTickSize,y:0};this.area.w=this.width-this.area.x-this.options.rightGap;this.area.h=this.height-this.options.axisLabelFontSize-2*this.options.axisTickSize;this.container.style.position="relative";this.container.style.width=this.width+"px"};DygraphCanvasRenderer.prototype.clear=function(){if(this.isIE){try{if(this.clearDelay){this.clearDelay.cancel();this.clearDelay=null}var b=this.element.getContext("2d")}catch(d){this.clearDelay=MochiKit.Async.wait(this.IEDelay);this.clearDelay.addCallback(bind(this.clear,this));return}}var b=this.element.getContext("2d");b.clearRect(0,0,this.width,this.height);for(var a=0;a<this.xlabels.length;a++){var c=this.xlabels[a];c.parentNode.removeChild(c)}for(var a=0;a<this.ylabels.length;a++){var c=this.ylabels[a];c.parentNode.removeChild(c)}this.xlabels=new Array();this.ylabels=new Array()};DygraphCanvasRenderer.isSupported=function(g){var b=null;try{if(typeof(g)=="undefined"||g==null){b=document.createElement("canvas")}else{b=g}var c=b.getContext("2d")}catch(d){var f=navigator.appVersion.match(/MSIE (\d\.\d)/);var a=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);if((!f)||(f[1]<6)||(a)){return false}return true}return true};DygraphCanvasRenderer.prototype.render=function(){var b=this.element.getContext("2d");if(this.options.drawYGrid){var d=this.layout.yticks;b.save();b.strokeStyle=this.options.gridLineColor;b.lineWidth=this.options.axisLineWidth;for(var c=0;c<d.length;c++){var a=this.area.x;var e=this.area.y+d[c][0]*this.area.h;b.beginPath();b.moveTo(a,e);b.lineTo(a+this.area.w,e);b.closePath();b.stroke()}}if(this.options.drawXGrid){var d=this.layout.xticks;b.save();b.strokeStyle=this.options.gridLineColor;b.lineWidth=this.options.axisLineWidth;for(var c=0;c<d.length;c++){var a=this.area.x+d[c][0]*this.area.w;var e=this.area.y+this.area.h;b.beginPath();b.moveTo(a,e);b.lineTo(a,this.area.y);b.closePath();b.stroke()}}this._renderLineChart();this._renderAxis()};DygraphCanvasRenderer.prototype._renderAxis=function(){if(!this.options.drawXAxis&&!this.options.drawYAxis){return}var b=this.element.getContext("2d");var g={position:"absolute",fontSize:this.options.axisLabelFontSize+"px",zIndex:10,color:this.options.axisLabelColor,width:this.options.axisLabelWidth+"px",overflow:"hidden"};var d=function(i){var p=document.createElement("div");for(var o in g){if(g.hasOwnProperty(o)){p.style[o]=g[o]}}p.appendChild(document.createTextNode(i));return p};b.save();b.strokeStyle=this.options.axisLineColor;b.lineWidth=this.options.axisLineWidth;if(this.options.drawYAxis){if(this.layout.yticks&&this.layout.yticks.length>0){for(var e=0;e<this.layout.yticks.length;e++){var f=this.layout.yticks[e];if(typeof(f)=="function"){return}var l=this.area.x;var j=this.area.y+f[0]*this.area.h;b.beginPath();b.moveTo(l,j);b.lineTo(l-this.options.axisTickSize,j);b.closePath();b.stroke();var k=d(f[1]);var h=(j-this.options.axisLabelFontSize/2);if(h<0){h=0}if(h+this.options.axisLabelFontSize+3>this.height){k.style.bottom="0px"}else{k.style.top=h+"px"}k.style.left="0px";k.style.textAlign="right";k.style.width=this.options.yAxisLabelWidth+"px";this.container.appendChild(k);this.ylabels.push(k)}var m=this.ylabels[0];var n=this.options.axisLabelFontSize;var a=parseInt(m.style.top)+n;if(a>this.height-n){m.style.top=(parseInt(m.style.top)-n/2)+"px"}}b.beginPath();b.moveTo(this.area.x,this.area.y);b.lineTo(this.area.x,this.area.y+this.area.h);b.closePath();b.stroke()}if(this.options.drawXAxis){if(this.layout.xticks){for(var e=0;e<this.layout.xticks.length;e++){var f=this.layout.xticks[e];if(typeof(dataset)=="function"){return}var l=this.area.x+f[0]*this.area.w;var j=this.area.y+this.area.h;b.beginPath();b.moveTo(l,j);b.lineTo(l,j+this.options.axisTickSize);b.closePath();b.stroke();var k=d(f[1]);k.style.textAlign="center";k.style.bottom="0px";var c=(l-this.options.axisLabelWidth/2);if(c+this.options.axisLabelWidth>this.width){c=this.width-this.options.xAxisLabelWidth;k.style.textAlign="right"}if(c<0){c=0;k.style.textAlign="left"}k.style.left=c+"px";k.style.width=this.options.xAxisLabelWidth+"px";this.container.appendChild(k);this.xlabels.push(k)}}b.beginPath();b.moveTo(this.area.x,this.area.y+this.area.h);b.lineTo(this.area.x+this.area.w,this.area.y+this.area.h);b.closePath();b.stroke()}b.restore()};DygraphCanvasRenderer.prototype._renderLineChart=function(){var b=this.element.getContext("2d");var d=this.options.colorScheme.length;var n=this.options.colorScheme;var x=this.options.fillAlpha;var C=this.layout.options.errorBars;var q=this.layout.options.fillGraph;var E=[];for(var F in this.layout.datasets){if(this.layout.datasets.hasOwnProperty(F)){E.push(F)}}var y=E.length;for(var A=0;A<this.layout.points.length;A++){var t=this.layout.points[A];t.canvasx=this.area.w*t.x+this.area.x;t.canvasy=this.area.h*t.y+this.area.y}var o=function(i){return i&&!isNaN(i)};var s=b;if(C){if(q){this.dygraph_.warn("Can't use fillGraph option with error bars")}for(var A=0;A<y;A++){var g=E[A];var v=n[A%d];s.save();s.strokeStyle=v;s.lineWidth=this.options.strokeWidth;var h=-1;var f=[-1,-1];var k=0;var B=this.layout.yscale;var a=new RGBColor(v);var D="rgba("+a.r+","+a.g+","+a.b+","+x+")";s.fillStyle=D;s.beginPath();for(var w=0;w<this.layout.points.length;w++){var t=this.layout.points[w];k++;if(t.name==g){if(!o(t.y)){h=-1;continue}var p=[t.y-t.errorPlus*B,t.y+t.errorMinus*B];p[0]=this.area.h*p[0]+this.area.y;p[1]=this.area.h*p[1]+this.area.y;if(h>=0){s.moveTo(h,f[0]);s.lineTo(t.canvasx,p[0]);s.lineTo(t.canvasx,p[1]);s.lineTo(h,f[1]);s.closePath()}f[0]=p[0];f[1]=p[1];h=t.canvasx}}s.fill()}}else{if(q){for(var A=0;A<y;A++){var g=E[A];var r;if(A>0){r=E[A-1]}var v=n[A%d];s.save();s.strokeStyle=v;s.lineWidth=this.options.strokeWidth;var h=-1;var f=[-1,-1];var k=0;var B=this.layout.yscale;var a=new RGBColor(v);var D="rgba("+a.r+","+a.g+","+a.b+","+x+")";s.fillStyle=D;s.beginPath();for(var w=0;w<this.layout.points.length;w++){var t=this.layout.points[w];k++;if(t.name==g){if(!o(t.y)){h=-1;continue}var e=1+this.layout.minyval*this.layout.yscale;if(e<0){e=0}else{if(e>1){e=1}}var p=[t.y,e];p[0]=this.area.h*p[0]+this.area.y;p[1]=this.area.h*p[1]+this.area.y;if(h>=0){s.moveTo(h,f[0]);s.lineTo(t.canvasx,p[0]);s.lineTo(t.canvasx,p[1]);s.lineTo(h,f[1]);s.closePath()}f[0]=p[0];f[1]=p[1];h=t.canvasx}}s.fill()}}}for(var A=0;A<y;A++){var g=E[A];var v=n[A%d];b.save();var t=this.layout.points[0];var l=this.dygraph_.attr_("pointSize");var h=null,c=null;var u=this.dygraph_.attr_("drawPoints");var z=this.layout.points;for(var w=0;w<z.length;w++){var t=z[w];if(t.name==g){if(!o(t.canvasy)){h=c=null}else{var m=(!h&&(w==z.length-1||!o(z[w+1].canvasy)));if(!h){h=t.canvasx;c=t.canvasy}else{s.beginPath();s.strokeStyle=v;s.lineWidth=this.options.strokeWidth;s.moveTo(h,c);h=t.canvasx;c=t.canvasy;s.lineTo(h,c);s.stroke()}if(u||m){s.beginPath();s.fillStyle=v;s.arc(t.canvasx,t.canvasy,l,0,2*Math.PI,false);s.fill()}}}}}b.restore()};Dygraph=function(c,b,a){if(arguments.length>0){if(arguments.length==4){this.warn("Using deprecated four-argument dygraph constructor");this.__old_init__(c,b,arguments[2],arguments[3])}else{this.__init__(c,b,a)}}};Dygraph.NAME="Dygraph";Dygraph.VERSION="1.2";Dygraph.__repr__=function(){return"["+this.NAME+" "+this.VERSION+"]"};Dygraph.toString=function(){return this.__repr__()};Dygraph.DEFAULT_ROLL_PERIOD=1;Dygraph.DEFAULT_WIDTH=480;Dygraph.DEFAULT_HEIGHT=320;Dygraph.AXIS_LINE_WIDTH=0.3;Dygraph.DEFAULT_ATTRS={highlightCircleSize:3,pixelsPerXLabel:60,pixelsPerYLabel:30,labelsDivWidth:250,labelsDivStyles:{},labelsSeparateLines:false,labelsKMB:false,labelsKMG2:false,strokeWidth:1,axisTickSize:3,axisLabelFontSize:14,xAxisLabelWidth:50,yAxisLabelWidth:50,rightGap:5,showRoller:false,xValueFormatter:Dygraph.dateString_,xValueParser:Dygraph.dateParser,xTicker:Dygraph.dateTicker,delimiter:",",logScale:false,sigma:2,errorBars:false,fractions:false,wilsonInterval:true,customBars:false,fillGraph:false,fillAlpha:0.15,stackedGraph:false,hideOverlayOnMouseOut:true};Dygraph.DEBUG=1;Dygraph.INFO=2;Dygraph.WARNING=3;Dygraph.ERROR=3;Dygraph.prototype.__old_init__=function(f,d,e,b){if(e!=null){var a=["Date"];for(var c=0;c<e.length;c++){a.push(e[c])}Dygraph.update(b,{labels:a})}this.__init__(f,d,b)};Dygraph.prototype.__init__=function(c,b,a){if(a==null){a={}}this.maindiv_=c;this.file_=b;this.rollPeriod_=a.rollPeriod||Dygraph.DEFAULT_ROLL_PERIOD;this.previousVerticalX_=-1;this.fractions_=a.fractions||false;this.dateWindow_=a.dateWindow||null;this.valueRange_=a.valueRange||null;this.wilsonInterval_=a.wilsonInterval||true;c.innerHTML="";if(c.style.width==""){c.style.width=a.width||Dygraph.DEFAULT_WIDTH+"px"}if(c.style.height==""){c.style.height=a.height||Dygraph.DEFAULT_HEIGHT+"px"}this.width_=parseInt(c.style.width,10);this.height_=parseInt(c.style.height,10);if(c.style.width.indexOf("%")==c.style.width.length-1){this.width_=(this.width_*self.innerWidth/100)-10}if(c.style.height.indexOf("%")==c.style.height.length-1){this.height_=(this.height_*self.innerHeight/100)-10}if(a.stackedGraph){a.fillGraph=true}this.user_attrs_={};Dygraph.update(this.user_attrs_,a);this.attrs_={};Dygraph.update(this.attrs_,Dygraph.DEFAULT_ATTRS);this.labelsFromCSV_=(this.attr_("labels")==null);this.createInterface_();this.start_()};Dygraph.prototype.attr_=function(a){if(typeof(this.user_attrs_[a])!="undefined"){return this.user_attrs_[a]}else{if(typeof(this.attrs_[a])!="undefined"){return this.attrs_[a]}else{return null}}};Dygraph.prototype.log=function(a,b){if(typeof(console)!="undefined"){switch(a){case Dygraph.DEBUG:console.debug("dygraphs: "+b);break;case Dygraph.INFO:console.info("dygraphs: "+b);break;case Dygraph.WARNING:console.warn("dygraphs: "+b);break;case Dygraph.ERROR:console.error("dygraphs: "+b);break}}};Dygraph.prototype.info=function(a){this.log(Dygraph.INFO,a)};Dygraph.prototype.warn=function(a){this.log(Dygraph.WARNING,a)};Dygraph.prototype.error=function(a){this.log(Dygraph.ERROR,a)};Dygraph.prototype.rollPeriod=function(){return this.rollPeriod_};Dygraph.prototype.xAxisRange=function(){if(this.dateWindow_){return this.dateWindow_}var b=this.rawData_[0][0];var a=this.rawData_[this.rawData_.length-1][0];return[b,a]};Dygraph.addEvent=function(c,a,b){var d=function(f){if(!f){var f=window.event}b(f)};if(window.addEventListener){c.addEventListener(a,d,false)}else{c.attachEvent("on"+a,d)}};Dygraph.prototype.createInterface_=function(){var a=this.maindiv_;this.graphDiv=document.createElement("div");this.graphDiv.style.width=this.width_+"px";this.graphDiv.style.height=this.height_+"px";a.appendChild(this.graphDiv);this.canvas_=Dygraph.createCanvas();this.canvas_.style.position="absolute";this.canvas_.width=this.width_;this.canvas_.height=this.height_;this.canvas_.style.width=this.width_+"px";this.canvas_.style.height=this.height_+"px";this.graphDiv.appendChild(this.canvas_);this.hidden_=this.createPlotKitCanvas_(this.canvas_);var b=this;Dygraph.addEvent(this.hidden_,"mousemove",function(c){b.mouseMove_(c)});Dygraph.addEvent(this.hidden_,"mouseout",function(c){b.mouseOut_(c)});this.layoutOptions_={xOriginIsZero:false};Dygraph.update(this.layoutOptions_,this.attrs_);Dygraph.update(this.layoutOptions_,this.user_attrs_);Dygraph.update(this.layoutOptions_,{errorBars:(this.attr_("errorBars")||this.attr_("customBars"))});this.layout_=new DygraphLayout(this,this.layoutOptions_);this.renderOptions_={colorScheme:this.colors_,strokeColor:null,axisLineWidth:Dygraph.AXIS_LINE_WIDTH};Dygraph.update(this.renderOptions_,this.attrs_);Dygraph.update(this.renderOptions_,this.user_attrs_);this.plotter_=new DygraphCanvasRenderer(this,this.hidden_,this.layout_,this.renderOptions_);this.createStatusMessage_();this.createRollInterface_();this.createDragInterface_()};Dygraph.prototype.createPlotKitCanvas_=function(a){var b=Dygraph.createCanvas();b.style.position="absolute";b.style.top=a.style.top;b.style.left=a.style.left;b.width=this.width_;b.height=this.height_;b.style.width=this.width_+"px";b.style.height=this.height_+"px";this.graphDiv.appendChild(b);return b};Dygraph.hsvToRGB=function(h,g,k){var c;var d;var l;if(g===0){c=k;d=k;l=k}else{var e=Math.floor(h*6);var j=(h*6)-e;var b=k*(1-g);var a=k*(1-(g*j));var m=k*(1-(g*(1-j)));switch(e){case 1:c=a;d=k;l=b;break;case 2:c=b;d=k;l=m;break;case 3:c=b;d=a;l=k;break;case 4:c=m;d=b;l=k;break;case 5:c=k;d=b;l=a;break;case 6:case 0:c=k;d=m;l=b;break}}c=Math.floor(255*c+0.5);d=Math.floor(255*d+0.5);l=Math.floor(255*l+0.5);return"rgb("+c+","+d+","+l+")"};Dygraph.prototype.setColors_=function(){var e=this.attr_("labels").length-1;this.colors_=[];var b=this.attr_("colors");if(!b){var d=this.attr_("colorSaturation")||1;var h=this.attr_("colorValue")||0.5;for(var g=1;g<=e;g++){if(!this.visibility()[g-1]){continue}var a=g-parseInt(g%2?g/2:(g-e)/2,10);var c=(1*a/(1+e));this.colors_.push(Dygraph.hsvToRGB(c,d,h))}}else{for(var g=0;g<e;g++){if(!this.visibility()[g]){continue}var f=b[g%b.length];this.colors_.push(f)}}this.renderOptions_.colorScheme=this.colors_;Dygraph.update(this.plotter_.options,this.renderOptions_);Dygraph.update(this.layoutOptions_,this.user_attrs_);Dygraph.update(this.layoutOptions_,this.attrs_)};Dygraph.prototype.getColors=function(){return this.colors_};Dygraph.findPosX=function(a){var b=0;if(a.offsetParent){while(1){b+=a.offsetLeft;if(!a.offsetParent){break}a=a.offsetParent}}else{if(a.x){b+=a.x}}return b};Dygraph.findPosY=function(b){var a=0;if(b.offsetParent){while(1){a+=b.offsetTop;if(!b.offsetParent){break}b=b.offsetParent}}else{if(b.y){a+=b.y}}return a};Dygraph.prototype.createStatusMessage_=function(){if(!this.attr_("labelsDiv")){var a=this.attr_("labelsDivWidth");var c={position:"absolute",fontSize:"14px",zIndex:10,width:a+"px",top:"0px",left:(this.width_-a-2)+"px",background:"white",textAlign:"left",overflow:"hidden"};Dygraph.update(c,this.attr_("labelsDivStyles"));var d=document.createElement("div");for(var b in c){if(c.hasOwnProperty(b)){d.style[b]=c[b]}}this.graphDiv.appendChild(d);this.attrs_.labelsDiv=d}};Dygraph.prototype.createRollInterface_=function(){var f=this.attr_("showRoller")?"block":"none";var b={position:"absolute",zIndex:10,top:(this.plotter_.area.h-25)+"px",left:(this.plotter_.area.x+1)+"px",display:f};var e=document.createElement("input");e.type="text";e.size="2";e.value=this.rollPeriod_;for(var a in b){if(b.hasOwnProperty(a)){e.style[a]=b[a]}}var d=this.graphDiv;d.appendChild(e);var c=this;e.onchange=function(){c.adjustRoll(e.value)};return e};Dygraph.pageX=function(c){if(c.pageX){return(!c.pageX||c.pageX<0)?0:c.pageX}else{var d=document;var a=document.body;return c.clientX+(d.scrollLeft||a.scrollLeft)-(d.clientLeft||0)}};Dygraph.pageY=function(c){if(c.pageY){return(!c.pageY||c.pageY<0)?0:c.pageY}else{var d=document;var a=document.body;return c.clientY+(d.scrollTop||a.scrollTop)-(d.clientTop||0)}};Dygraph.prototype.createDragInterface_=function(){var n=this;var c=false;var e=false;var b=null;var a=null;var m=null;var k=null;var f=null;var l=null;var j=null;var g=0;var d=0;var i=function(o){return Dygraph.pageX(o)-g};var h=function(o){return Dygraph.pageX(o)-d};Dygraph.addEvent(this.hidden_,"mousemove",function(o){if(c){m=i(o);k=h(o);n.drawZoomRect_(b,m,f);f=m}else{if(e){m=i(o);k=h(o);n.dateWindow_[0]=l-(m/n.width_)*j;n.dateWindow_[1]=n.dateWindow_[0]+j;n.drawGraph_(n.rawData_)}}});Dygraph.addEvent(this.hidden_,"mousedown",function(o){g=Dygraph.findPosX(n.canvas_);d=Dygraph.findPosY(n.canvas_);b=i(o);a=h(o);if(o.altKey||o.shiftKey){if(!n.dateWindow_){return}e=true;j=n.dateWindow_[1]-n.dateWindow_[0];l=(b/n.width_)*j+n.dateWindow_[0]}else{c=true}});Dygraph.addEvent(document,"mouseup",function(o){if(c||e){c=false;b=null;a=null}if(e){e=false;l=null;j=null}});Dygraph.addEvent(this.hidden_,"mouseout",function(o){if(c){m=null;k=null}});Dygraph.addEvent(this.hidden_,"mouseup",function(o){if(c){c=false;m=i(o);k=h(o);var q=Math.abs(m-b);var p=Math.abs(k-a);if(q<2&&p<2&&n.attr_("clickCallback")!=null&&n.lastx_!=undefined){n.attr_("clickCallback")(o,n.lastx_,n.selPoints_)}if(q>=10){n.doZoom_(Math.min(b,m),Math.max(b,m))}else{n.canvas_.getContext("2d").clearRect(0,0,n.canvas_.width,n.canvas_.height)}b=null;a=null}if(e){e=false;l=null;j=null}});Dygraph.addEvent(this.hidden_,"dblclick",function(o){if(n.dateWindow_==null){return}n.dateWindow_=null;n.drawGraph_(n.rawData_);var p=n.rawData_[0][0];var q=n.rawData_[n.rawData_.length-1][0];if(n.attr_("zoomCallback")){n.attr_("zoomCallback")(p,q)}})};Dygraph.prototype.drawZoomRect_=function(c,d,b){var a=this.canvas_.getContext("2d");if(b){a.clearRect(Math.min(c,b),0,Math.abs(c-b),this.height_)}if(d&&c){a.fillStyle="rgba(128,128,128,0.33)";a.fillRect(Math.min(c,d),0,Math.abs(d-c),this.height_)}};Dygraph.prototype.doZoom_=function(g,e){var d=this.layout_.points;var f=null;var h=null;for(var c=0;c<d.length;c++){var b=d[c].canvasx;var a=d[c].xval;if(b<g&&(f==null||a>f)){f=a}if(b>e&&(h==null||a<h)){h=a}}if(f==null){f=d[0].xval}if(h==null){h=d[d.length-1].xval}this.dateWindow_=[f,h];this.drawGraph_(this.rawData_);if(this.attr_("zoomCallback")){this.attr_("zoomCallback")(f,h)}};Dygraph.prototype.mouseMove_=function(s){var m=Dygraph.pageX(s)-Dygraph.findPosX(this.hidden_);var t=this.layout_.points;var l=-1;var k=-1;var a=1e+100;var g=-1;for(var u=0;u<t.length;u++){var n=Math.abs(t[u].canvasx-m);if(n>a){break}a=n;g=u}if(g>=0){l=t[g].xval}if(m>t[t.length-1].canvasx){l=t[t.length-1].xval}this.selPoints_=[];for(var u=0;u<t.length;u++){if(t[u].xval==l){this.selPoints_.push(t[u])}}if(this.attr_("highlightCallback")){var h=this.lastHighlightCallbackX;if(h!==null&&l!=h){this.lastHighlightCallbackX=l;if(!this.attr_("stackedGraph")){this.attr_("highlightCallback")(s,l,this.selPoints_)}else{var b=this.selPoints_.map(function(c){return{xval:c.xval,yval:c.yval,name:c.name}});var o=0;for(var r=b.length-1;r>=0;r--){b[r].yval-=o;o+=b[r].yval}this.attr_("highlightCallback")(s,l,b)}}}var d=this.attr_("highlightCircleSize");var q=this.canvas_.getContext("2d");if(this.previousVerticalX_>=0){var h=this.previousVerticalX_;q.clearRect(h-d-1,0,2*d+2,this.height_)}var f=function(c){return c&&!isNaN(c)};if(this.selPoints_.length>0){var m=this.selPoints_[0].canvasx;var w=this.attr_("xValueFormatter")(l,this)+":";var e=this.colors_.length;for(var u=0;u<this.selPoints_.length;u++){if(!f(this.selPoints_[u].canvasy)){continue}if(this.attr_("labelsSeparateLines")){w+="<br/>"}var p=this.selPoints_[u];var v=new RGBColor(this.colors_[u%e]);w+=" <b><font color='"+v.toHex()+"'>"+p.name+"</font></b>:"+this.round_(p.yval,2)}this.attr_("labelsDiv").innerHTML=w;this.lastx_=l;q.save();for(var u=0;u<this.selPoints_.length;u++){if(!f(this.selPoints_[u%e].canvasy)){continue}q.beginPath();q.fillStyle=this.colors_[u%e];q.arc(m,this.selPoints_[u%e].canvasy,d,0,2*Math.PI,false);q.fill()}q.restore();this.previousVerticalX_=m}};Dygraph.prototype.mouseOut_=function(b){if(this.attr_("hideOverlayOnMouseOut")){var a=this.canvas_.getContext("2d");a.clearRect(0,0,this.width_,this.height_);this.attr_("labelsDiv").innerHTML=""}};Dygraph.zeropad=function(a){if(a<10){return"0"+a}else{return""+a}};Dygraph.prototype.hmsString_=function(a){var c=Dygraph.zeropad;var b=new Date(a);if(b.getSeconds()){return c(b.getHours())+":"+c(b.getMinutes())+":"+c(b.getSeconds())}else{return c(b.getHours())+":"+c(b.getMinutes())}};Dygraph.dateString_=function(b,j){var c=Dygraph.zeropad;var g=new Date(b);var h=""+g.getFullYear();var e=c(g.getMonth()+1);var i=c(g.getDate());var f="";var a=g.getHours()*3600+g.getMinutes()*60+g.getSeconds();if(a){f=" "+j.hmsString_(b)}return h+"/"+e+"/"+i+f};Dygraph.prototype.round_=function(c,b){var a=Math.pow(10,b);return Math.round(c*a)/a};Dygraph.prototype.loadedEvent_=function(a){this.rawData_=this.parseCSV_(a);this.drawGraph_(this.rawData_)};Dygraph.prototype.months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Dygraph.prototype.quarters=["Jan","Apr","Jul","Oct"];Dygraph.prototype.addXTicks_=function(){var a,c;if(this.dateWindow_){a=this.dateWindow_[0];c=this.dateWindow_[1]}else{a=this.rawData_[0][0];c=this.rawData_[this.rawData_.length-1][0]}var b=this.attr_("xTicker")(a,c,this);this.layout_.updateOptions({xTicks:b})};Dygraph.SECONDLY=0;Dygraph.TWO_SECONDLY=1;Dygraph.FIVE_SECONDLY=2;Dygraph.TEN_SECONDLY=3;Dygraph.THIRTY_SECONDLY=4;Dygraph.MINUTELY=5;Dygraph.TWO_MINUTELY=6;Dygraph.FIVE_MINUTELY=7;Dygraph.TEN_MINUTELY=8;Dygraph.THIRTY_MINUTELY=9;Dygraph.HOURLY=10;Dygraph.TWO_HOURLY=11;Dygraph.SIX_HOURLY=12;Dygraph.DAILY=13;Dygraph.WEEKLY=14;Dygraph.MONTHLY=15;Dygraph.QUARTERLY=16;Dygraph.BIANNUAL=17;Dygraph.ANNUAL=18;Dygraph.DECADAL=19;Dygraph.NUM_GRANULARITIES=20;Dygraph.SHORT_SPACINGS=[];Dygraph.SHORT_SPACINGS[Dygraph.SECONDLY]=1000*1;Dygraph.SHORT_SPACINGS[Dygraph.TWO_SECONDLY]=1000*2;Dygraph.SHORT_SPACINGS[Dygraph.FIVE_SECONDLY]=1000*5;Dygraph.SHORT_SPACINGS[Dygraph.TEN_SECONDLY]=1000*10;Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_SECONDLY]=1000*30;Dygraph.SHORT_SPACINGS[Dygraph.MINUTELY]=1000*60;Dygraph.SHORT_SPACINGS[Dygraph.TWO_MINUTELY]=1000*60*2;Dygraph.SHORT_SPACINGS[Dygraph.FIVE_MINUTELY]=1000*60*5;Dygraph.SHORT_SPACINGS[Dygraph.TEN_MINUTELY]=1000*60*10;Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_MINUTELY]=1000*60*30;Dygraph.SHORT_SPACINGS[Dygraph.HOURLY]=1000*3600;Dygraph.SHORT_SPACINGS[Dygraph.TWO_HOURLY]=1000*3600*2;Dygraph.SHORT_SPACINGS[Dygraph.SIX_HOURLY]=1000*3600*6;Dygraph.SHORT_SPACINGS[Dygraph.DAILY]=1000*86400;Dygraph.SHORT_SPACINGS[Dygraph.WEEKLY]=1000*604800;Dygraph.prototype.NumXTicks=function(e,b,g){if(g<Dygraph.MONTHLY){var h=Dygraph.SHORT_SPACINGS[g];return Math.floor(0.5+1*(b-e)/h)}else{var f=1;var d=12;if(g==Dygraph.QUARTERLY){d=3}if(g==Dygraph.BIANNUAL){d=2}if(g==Dygraph.ANNUAL){d=1}if(g==Dygraph.DECADAL){d=1;f=10}var c=365.2524*24*3600*1000;var a=1*(b-e)/c;return Math.floor(0.5+1*a*d/f)}};Dygraph.prototype.GetXAxis=function(n,k,a){var y=[];if(a<Dygraph.MONTHLY){var e=Dygraph.SHORT_SPACINGS[a];var u="%d%b";var v=e/1000;var w=new Date(n);if(v<=60){var h=w.getSeconds();w.setSeconds(h-h%v)}else{w.setSeconds(0);v/=60;if(v<=60){var h=w.getMinutes();w.setMinutes(h-h%v)}else{w.setMinutes(0);v/=60;if(v<=24){var h=w.getHours();w.setHours(h-h%v)}else{w.setHours(0);v/=24;if(v==7){w.setDate(w.getDate()-w.getDay())}}}}n=w.getTime();for(var l=n;l<=k;l+=e){var w=new Date(l);var b=w.getHours()*3600+w.getMinutes()*60+w.getSeconds();if(b==0||a>=Dygraph.DAILY){y.push({v:l,label:new Date(l+3600*1000).strftime(u)})}else{y.push({v:l,label:this.hmsString_(l)})}}}else{var f;var o=1;if(a==Dygraph.MONTHLY){f=[0,1,2,3,4,5,6,7,8,9,10,11,12]}else{if(a==Dygraph.QUARTERLY){f=[0,3,6,9]}else{if(a==Dygraph.BIANNUAL){f=[0,6]}else{if(a==Dygraph.ANNUAL){f=[0]}else{if(a==Dygraph.DECADAL){f=[0];o=10}}}}}var r=new Date(n).getFullYear();var p=new Date(k).getFullYear();var c=Dygraph.zeropad;for(var s=r;s<=p;s++){if(s%o!=0){continue}for(var q=0;q<f.length;q++){var m=s+"/"+c(1+f[q])+"/01";var l=Date.parse(m);if(l<n||l>k){continue}y.push({v:l,label:new Date(l).strftime("%b %y")})}}}return y};Dygraph.dateTicker=function(a,f,d){var b=-1;for(var e=0;e<Dygraph.NUM_GRANULARITIES;e++){var c=d.NumXTicks(a,f,e);if(d.width_/c>=d.attr_("pixelsPerXLabel")){b=e;break}}if(b>=0){return d.GetXAxis(a,f,b)}else{}};Dygraph.numericTicks=function(v,u,l){if(l.attr_("labelsKMG2")){var f=[1,2,4,8]}else{var f=[1,2,5]}var x,p,a,q;var h=l.attr_("pixelsPerYLabel");for(var t=-10;t<50;t++){if(l.attr_("labelsKMG2")){var c=Math.pow(16,t)}else{var c=Math.pow(10,t)}for(var s=0;s<f.length;s++){x=c*f[s];p=Math.floor(v/x)*x;a=Math.ceil(u/x)*x;q=(a-p)/x;var d=l.height_/q;if(d>h){break}}if(d>h){break}}var w=[];var r;var o=[];if(l.attr_("labelsKMB")){r=1000;o=["K","M","B","T"]}if(l.attr_("labelsKMG2")){if(r){l.warn("Setting both labelsKMB and labelsKMG2. Pick one!")}r=1024;o=["k","M","G","T"]}for(var t=0;t<q;t++){var g=p+t*x;var b=Math.abs(g);var e=l.round_(g,2);if(o.length){var m=r*r*r*r;for(var s=3;s>=0;s--,m/=r){if(b>=m){e=l.round_(g/m,1)+o[s];break}}}w.push({label:e,v:g})}return w};Dygraph.prototype.addYTicks_=function(c,b){var a=Dygraph.numericTicks(c,b,this);this.layout_.updateOptions({yAxis:[c,b],yTicks:a})};Dygraph.prototype.extremeValues_=function(d){var h=null,f=null;var b=this.attr_("errorBars")||this.attr_("customBars");if(b){for(var c=0;c<d.length;c++){var g=d[c][1][0];if(!g){continue}var a=g-d[c][1][1];var e=g+d[c][1][2];if(a>g){a=g}if(e<g){e=g}if(f==null||e>f){f=e}if(h==null||a<h){h=a}}}else{for(var c=0;c<d.length;c++){var g=d[c][1];if(g===null||isNaN(g)){continue}if(f==null||g>f){f=g}if(h==null||g<h){h=g}}}return[h,f]};Dygraph.prototype.drawGraph_=function(z){var v=null,u=null;this.layout_.removeAllDatasets();this.setColors_();this.attrs_.pointSize=0.5*this.attr_("highlightCircleSize");var c=[];var f=[];for(var t=1;t<z[0].length;t++){if(!this.visibility()[t-1]){continue}var e=[];for(var r=0;r<z.length;r++){var w=z[r][0];e[r]=[w,z[r][t]]}e=this.rollingAverage(e,this.rollPeriod_);var h=this.attr_("errorBars")||this.attr_("customBars");if(this.dateWindow_){var A=this.dateWindow_[0];var d=this.dateWindow_[1];var m=[];for(var q=0;q<e.length;q++){if(e[q][0]>=A&&e[q][0]<=d){m.push(e[q])}}e=m}var a=this.extremeValues_(e);var o=a[0];var n=a[1];if(!v||o<v){v=o}if(!u||n>u){u=n}if(h){var g=[];for(var r=0;r<e.length;r++){g[r]=[e[r][0],e[r][1][0],e[r][1][1],e[r][1][2]]}this.layout_.addDataset(this.attr_("labels")[t],g)}else{if(this.attr_("stackedGraph")){var g=[];var p=e.length;var x;for(var r=0;r<p;r++){if(c[e[r][0]]===undefined){c[e[r][0]]=0}x=e[r][1];c[e[r][0]]+=x;g[r]=[e[r][0],c[e[r][0]]];if(!u||c[e[r][0]]>u){u=c[e[r][0]]}}f.push([this.attr_("labels")[t],g])}else{this.layout_.addDataset(this.attr_("labels")[t],e)}}}if(f.length>0){for(var t=(f.length-1);t>=0;t--){this.layout_.addDataset(f[t][0],f[t][1])}}if(this.valueRange_!=null){this.addYTicks_(this.valueRange_[0],this.valueRange_[1])}else{if(this.attr_("includeZero")&&v>0){v=0}var s=u-v;if(s==0){s=u}var b=u+0.1*s;var y=v-0.1*s;if(y<0&&v>=0){y=0}if(b>0&&u<=0){b=0}if(this.attr_("includeZero")){if(u<0){b=0}if(v>0){y=0}}this.addYTicks_(y,b)}this.addXTicks_();this.layout_.updateOptions({dateWindow:this.dateWindow_});this.layout_.evaluateWithError();this.plotter_.clear();this.plotter_.render();this.canvas_.getContext("2d").clearRect(0,0,this.canvas_.width,this.canvas_.height);if(this.attr_("drawCallback")!==null){this.attr_("drawCallback")(this)}};Dygraph.prototype.rollingAverage=function(m,d){if(m.length<2){return m}var d=Math.min(d,m.length-1);var b=[];var s=this.attr_("sigma");if(this.fractions_){var k=0;var h=0;var e=100;for(var x=0;x<m.length;x++){k+=m[x][1][0];h+=m[x][1][1];if(x-d>=0){k-=m[x-d][1][0];h-=m[x-d][1][1]}var B=m[x][0];var v=h?k/h:0;if(this.attr_("errorBars")){if(this.wilsonInterval_){if(h){var t=v<0?0:v,u=h;var A=s*Math.sqrt(t*(1-t)/u+s*s/(4*u*u));var a=1+s*s/h;var F=(t+s*s/(2*h)-A)/a;var o=(t+s*s/(2*h)+A)/a;b[x]=[B,[t*e,(t-F)*e,(o-t)*e]]}else{b[x]=[B,[0,0,0]]}}else{var z=h?s*Math.sqrt(v*(1-v)/h):1;b[x]=[B,[e*v,e*z,e*z]]}}else{b[x]=[B,e*v]}}}else{if(this.attr_("customBars")){var F=0;var C=0;var o=0;var g=0;for(var x=0;x<m.length;x++){var E=m[x][1];var l=E[1];b[x]=[m[x][0],[l,l-E[0],E[2]-l]];if(l!=null&&!isNaN(l)){F+=E[0];C+=l;o+=E[2];g+=1}if(x-d>=0){var r=m[x-d];if(r[1][1]!=null&&!isNaN(r[1][1])){F-=r[1][0];C-=r[1][1];o-=r[1][2];g-=1}}b[x]=[m[x][0],[1*C/g,1*(C-F)/g,1*(o-C)/g]]}}else{var q=Math.min(d-1,m.length-2);if(!this.attr_("errorBars")){if(d==1){return m}for(var x=0;x<m.length;x++){var c=0;var D=0;for(var w=Math.max(0,x-d+1);w<x+1;w++){var l=m[w][1];if(l==null||isNaN(l)){continue}D++;c+=m[w][1]}if(D){b[x]=[m[x][0],c/D]}else{b[x]=[m[x][0],null]}}}else{for(var x=0;x<m.length;x++){var c=0;var f=0;var D=0;for(var w=Math.max(0,x-d+1);w<x+1;w++){var l=m[w][1][0];if(l==null||isNaN(l)){continue}D++;c+=m[w][1][0];f+=Math.pow(m[w][1][1],2)}if(D){var z=Math.sqrt(f)/D;b[x]=[m[x][0],[c/D,s*z,s*z]]}else{b[x]=[m[x][0],[null,null,null]]}}}}}return b};Dygraph.dateParser=function(b,a){var c;var e;if(b.length==10&&b.search("-")!=-1){c=b.replace("-","/","g");while(c.search("-")!=-1){c=c.replace("-","/")}e=Date.parse(c)}else{if(b.length==8){c=b.substr(0,4)+"/"+b.substr(4,2)+"/"+b.substr(6,2);e=Date.parse(c)}else{e=Date.parse(b)}}if(!e||isNaN(e)){a.error("Couldn't parse "+b+" as a date")}return e};Dygraph.prototype.detectTypeFromString_=function(b){var a=false;if(b.indexOf("-")>=0||b.indexOf("/")>=0||isNaN(parseFloat(b))){a=true}else{if(b.length==8&&b>"19700101"&&b<"20371231"){a=true}}if(a){this.attrs_.xValueFormatter=Dygraph.dateString_;this.attrs_.xValueParser=Dygraph.dateParser;this.attrs_.xTicker=Dygraph.dateTicker}else{this.attrs_.xValueFormatter=function(c){return c};this.attrs_.xValueParser=function(c){return parseFloat(c)};this.attrs_.xTicker=Dygraph.numericTicks}};Dygraph.prototype.parseCSV_=function(h){var m=[];var q=h.split("\n");var b=this.attr_("delimiter");if(q[0].indexOf(b)==-1&&q[0].indexOf("\t")>=0){b="\t"}var a=0;if(this.labelsFromCSV_){a=1;this.attrs_.labels=q[0].split(b)}var c;var o=false;var d=this.attr_("labels").length;var l=false;for(var g=a;g<q.length;g++){var p=q[g];if(p.length==0){continue}if(p[0]=="#"){continue}var f=p.split(b);if(f.length<2){continue}var k=[];if(!o){this.detectTypeFromString_(f[0]);c=this.attr_("xValueParser");o=true}k[0]=c(f[0],this);if(this.fractions_){for(var e=1;e<f.length;e++){var n=f[e].split("/");k[e]=[parseFloat(n[0]),parseFloat(n[1])]}}else{if(this.attr_("errorBars")){for(var e=1;e<f.length;e+=2){k[(e+1)/2]=[parseFloat(f[e]),parseFloat(f[e+1])]}}else{if(this.attr_("customBars")){for(var e=1;e<f.length;e++){var n=f[e].split(";");k[e]=[parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2])]}}else{for(var e=1;e<f.length;e++){k[e]=parseFloat(f[e])}}}}if(m.length>0&&k[0]<m[m.length-1][0]){l=true}m.push(k);if(k.length!=d){this.error("Number of columns in line "+g+" ("+k.length+") does not agree with number of labels ("+d+") "+p)}}if(l){this.warn("CSV is out of order; order it correctly to speed loading.");m.sort(function(j,i){return j[0]-i[0]})}return m};Dygraph.prototype.parseArray_=function(b){if(b.length==0){this.error("Can't plot empty data set");return null}if(b[0].length==0){this.error("Data set cannot contain an empty row");return null}if(this.attr_("labels")==null){this.warn("Using default labels. Set labels explicitly via 'labels' in the options parameter");this.attrs_.labels=["X"];for(var a=1;a<b[0].length;a++){this.attrs_.labels.push("Y"+a)}}if(Dygraph.isDateLike(b[0][0])){this.attrs_.xValueFormatter=Dygraph.dateString_;this.attrs_.xTicker=Dygraph.dateTicker;var c=Dygraph.clone(b);for(var a=0;a<b.length;a++){if(c[a].length==0){this.error("Row "<<(1+a)<<" of data is empty");return null}if(c[a][0]==null||typeof(c[a][0].getTime)!="function"){this.error("x value in row "<<(1+a)<<" is not a Date");return null}c[a][0]=c[a][0].getTime()}return c}else{this.attrs_.xValueFormatter=function(d){return d};this.attrs_.xTicker=Dygraph.numericTicks;return b}};Dygraph.prototype.parseDataTable_=function(c){var h=c.getNumberOfColumns();var l=c.getNumberOfRows();var e=[];for(var d=0;d<h;d++){e.push(c.getColumnLabel(d));if(d!=0&&this.attr_("errorBars")){d+=1}}this.attrs_.labels=e;h=e.length;var a=c.getColumnType(0);if(a=="date"||a=="datetime"){this.attrs_.xValueFormatter=Dygraph.dateString_;this.attrs_.xValueParser=Dygraph.dateParser;this.attrs_.xTicker=Dygraph.dateTicker}else{if(a=="number"){this.attrs_.xValueFormatter=function(i){return i};this.attrs_.xValueParser=function(i){return parseFloat(i)};this.attrs_.xTicker=Dygraph.numericTicks}else{this.error("only 'date', 'datetime' and 'number' types are supported for column 1 of DataTable input (Got '"+a+"')");return null}}var g=[];var f=false;for(var d=0;d<l;d++){var k=[];if(typeof(c.getValue(d,0))==="undefined"||c.getValue(d,0)===null){this.warning("Ignoring row "+d+" of DataTable because of undefined or null first column.");continue}if(a=="date"||a=="datetime"){k.push(c.getValue(d,0).getTime())}else{k.push(c.getValue(d,0))}if(!this.attr_("errorBars")){for(var b=1;b<h;b++){k.push(c.getValue(d,b))}}else{for(var b=0;b<h-1;b++){k.push([c.getValue(d,1+2*b),c.getValue(d,2+2*b)])}}if(g.length>0&&k[0]<g[g.length-1][0]){f=true}g.push(k)}if(f){this.warn("DataTable is out of order; order it correctly to speed loading.");g.sort(function(j,i){return j[0]-i[0]})}return g};Dygraph.update=function(b,c){if(typeof(c)!="undefined"&&c!==null){for(var a in c){if(c.hasOwnProperty(a)){b[a]=c[a]}}}return b};Dygraph.isArrayLike=function(b){var a=typeof(b);if((a!="object"&&!(a=="function"&&typeof(b.item)=="function"))||b===null||typeof(b.length)!="number"||b.nodeType===3){return false}return true};Dygraph.isDateLike=function(a){if(typeof(a)!="object"||a===null||typeof(a.getTime)!="function"){return false}return true};Dygraph.clone=function(c){var b=[];for(var a=0;a<c.length;a++){if(Dygraph.isArrayLike(c[a])){b.push(Dygraph.clone(c[a]))}else{b.push(c[a])}}return b};Dygraph.prototype.start_=function(){if(typeof this.file_=="function"){this.loadedEvent_(this.file_())}else{if(Dygraph.isArrayLike(this.file_)){this.rawData_=this.parseArray_(this.file_);this.drawGraph_(this.rawData_)}else{if(typeof this.file_=="object"&&typeof this.file_.getColumnRange=="function"){this.rawData_=this.parseDataTable_(this.file_);this.drawGraph_(this.rawData_)}else{if(typeof this.file_=="string"){if(this.file_.indexOf("\n")>=0){this.loadedEvent_(this.file_)}else{var b=new XMLHttpRequest();var a=this;b.onreadystatechange=function(){if(b.readyState==4){if(b.status==200){a.loadedEvent_(b.responseText)}}};b.open("GET",this.file_,true);b.send(null)}}else{this.error("Unknown data format: "+(typeof this.file_))}}}}};Dygraph.prototype.updateOptions=function(a){if(a.rollPeriod){this.rollPeriod_=a.rollPeriod}if(a.dateWindow){this.dateWindow_=a.dateWindow}if(a.valueRange){this.valueRange_=a.valueRange}Dygraph.update(this.user_attrs_,a);this.labelsFromCSV_=(this.attr_("labels")==null);this.layout_.updateOptions({errorBars:this.attr_("errorBars")});if(a.file&&a.file!=this.file_){this.file_=a.file;this.start_()}else{this.drawGraph_(this.rawData_)}};Dygraph.prototype.resize=function(b,a){if((b===null)!=(a===null)){this.warn("Dygraph.resize() should be called with zero parameters or two non-NULL parameters. Pretending it was zero.");b=a=null}this.maindiv_.innerHTML="";this.attrs_.labelsDiv=null;if(b){this.maindiv_.style.width=b+"px";this.maindiv_.style.height=a+"px";this.width_=b;this.height_=a}else{this.width_=this.maindiv_.offsetWidth;this.height_=this.maindiv_.offsetHeight}this.createInterface_();this.drawGraph_(this.rawData_)};Dygraph.prototype.adjustRoll=function(a){this.rollPeriod_=a;this.drawGraph_(this.rawData_)};Dygraph.prototype.visibility=function(){if(!this.attr_("visibility")){this.attrs_.visibility=[]}while(this.attr_("visibility").length<this.rawData_[0].length-1){this.attr_("visibility").push(true)}return this.attr_("visibility")};Dygraph.prototype.setVisibility=function(b,c){var a=this.visibility();if(b<0&&b>=a.length){this.warn("invalid series number in setVisibility: "+b)}else{a[b]=c;this.drawGraph_(this.rawData_)}};Dygraph.createCanvas=function(){var a=document.createElement("canvas");isIE=(/MSIE/.test(navigator.userAgent)&&!window.opera);if(isIE){a=G_vmlCanvasManager.initElement(a)}return a};Dygraph.GVizChart=function(a){this.container=a};Dygraph.GVizChart.prototype.draw=function(b,a){this.container.innerHTML="";this.date_graph=new Dygraph(this.container,b,a)};DateGraph=Dygraph;function RGBColor(g){this.ok=false;if(g.charAt(0)=="#"){g=g.substr(1,6)}g=g.replace(/ /g,"");g=g.toLowerCase();var a={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var c in a){if(g==c){g=a[c]}}var h=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(i){return[parseInt(i[1]),parseInt(i[2]),parseInt(i[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(i){return[parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(i){return[parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16),parseInt(i[3]+i[3],16)]}}];for(var b=0;b<h.length;b++){var e=h[b].re;var d=h[b].process;var f=e.exec(g);if(f){channels=d(f);this.r=channels[0];this.g=channels[1];this.b=channels[2];this.ok=true}}this.r=(this.r<0||isNaN(this.r))?0:((this.r>255)?255:this.r);this.g=(this.g<0||isNaN(this.g))?0:((this.g>255)?255:this.g);this.b=(this.b<0||isNaN(this.b))?0:((this.b>255)?255:this.b);this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"};this.toHex=function(){var k=this.r.toString(16);var j=this.g.toString(16);var i=this.b.toString(16);if(k.length==1){k="0"+k}if(j.length==1){j="0"+j}if(i.length==1){i="0"+i}return"#"+k+j+i}}Date.ext={};Date.ext.util={};Date.ext.util.xPad=function(a,c,b){if(typeof(b)=="undefined"){b=10}for(;parseInt(a,10)<b&&b>1;b/=10){a=c.toString()+a}return a.toString()};Date.prototype.locale="en-GB";if(document.getElementsByTagName("html")&&document.getElementsByTagName("html")[0].lang){Date.prototype.locale=document.getElementsByTagName("html")[0].lang}Date.ext.locales={};Date.ext.locales.en={a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a %d %b %Y %T %Z",p:["AM","PM"],P:["am","pm"],x:"%d/%m/%y",X:"%T"};Date.ext.locales["en-US"]=Date.ext.locales.en;Date.ext.locales["en-US"].c="%a %d %b %Y %r %Z";Date.ext.locales["en-US"].x="%D";Date.ext.locales["en-US"].X="%r";Date.ext.locales["en-GB"]=Date.ext.locales.en;Date.ext.locales["en-AU"]=Date.ext.locales["en-GB"];Date.ext.formats={a:function(a){return Date.ext.locales[a.locale].a[a.getDay()]},A:function(a){return Date.ext.locales[a.locale].A[a.getDay()]},b:function(a){return Date.ext.locales[a.locale].b[a.getMonth()]},B:function(a){return Date.ext.locales[a.locale].B[a.getMonth()]},c:"toLocaleString",C:function(a){return Date.ext.util.xPad(parseInt(a.getFullYear()/100,10),0)},d:["getDate","0"],e:["getDate"," "],g:function(a){return Date.ext.util.xPad(parseInt(Date.ext.util.G(a)/100,10),0)},G:function(c){var e=c.getFullYear();var b=parseInt(Date.ext.formats.V(c),10);var a=parseInt(Date.ext.formats.W(c),10);if(a>b){e++}else{if(a===0&&b>=52){e--}}return e},H:["getHours","0"],I:function(b){var a=b.getHours()%12;return Date.ext.util.xPad(a===0?12:a,0)},j:function(c){var a=c-new Date(""+c.getFullYear()+"/1/1 GMT");a+=c.getTimezoneOffset()*60000;var b=parseInt(a/60000/60/24,10)+1;return Date.ext.util.xPad(b,0,100)},m:function(a){return Date.ext.util.xPad(a.getMonth()+1,0)},M:["getMinutes","0"],p:function(a){return Date.ext.locales[a.locale].p[a.getHours()>=12?1:0]},P:function(a){return Date.ext.locales[a.locale].P[a.getHours()>=12?1:0]},S:["getSeconds","0"],u:function(a){var b=a.getDay();return b===0?7:b},U:function(e){var a=parseInt(Date.ext.formats.j(e),10);var c=6-e.getDay();var b=parseInt((a+c)/7,10);return Date.ext.util.xPad(b,0)},V:function(e){var c=parseInt(Date.ext.formats.W(e),10);var a=(new Date(""+e.getFullYear()+"/1/1")).getDay();var b=c+(a>4||a<=1?0:1);if(b==53&&(new Date(""+e.getFullYear()+"/12/31")).getDay()<4){b=1}else{if(b===0){b=Date.ext.formats.V(new Date(""+(e.getFullYear()-1)+"/12/31"))}}return Date.ext.util.xPad(b,0)},w:"getDay",W:function(e){var a=parseInt(Date.ext.formats.j(e),10);var c=7-Date.ext.formats.u(e);var b=parseInt((a+c)/7,10);return Date.ext.util.xPad(b,0,10)},y:function(a){return Date.ext.util.xPad(a.getFullYear()%100,0)},Y:"getFullYear",z:function(c){var b=c.getTimezoneOffset();var a=Date.ext.util.xPad(parseInt(Math.abs(b/60),10),0);var e=Date.ext.util.xPad(b%60,0);return(b>0?"-":"+")+a+e},Z:function(a){return a.toString().replace(/^.*\(([^)]+)\)$/,"$1")},"%":function(a){return"%"}};Date.ext.aggregates={c:"locale",D:"%m/%d/%y",h:"%b",n:"\n",r:"%I:%M:%S %p",R:"%H:%M",t:"\t",T:"%H:%M:%S",x:"locale",X:"locale"};Date.ext.aggregates.z=Date.ext.formats.z(new Date());Date.ext.aggregates.Z=Date.ext.formats.Z(new Date());Date.ext.unsupported={};Date.prototype.strftime=function(a){if(!(this.locale in Date.ext.locales)){if(this.locale.replace(/-[a-zA-Z]+$/,"") in Date.ext.locales){this.locale=this.locale.replace(/-[a-zA-Z]+$/,"")}else{this.locale="en-GB"}}var c=this;while(a.match(/%[cDhnrRtTxXzZ]/)){a=a.replace(/%([cDhnrRtTxXzZ])/g,function(e,d){var g=Date.ext.aggregates[d];return(g=="locale"?Date.ext.locales[c.locale][d]:g)})}var b=a.replace(/%([aAbBCdegGHIjmMpPSuUVwWyY%])/g,function(e,d){var g=Date.ext.formats[d];if(typeof(g)=="string"){return c[g]()}else{if(typeof(g)=="function"){return g.call(c,c)}else{if(typeof(g)=="object"&&typeof(g[0])=="string"){return Date.ext.util.xPad(c[g[0]](),g[1])}else{return d}}}});c=null;return b}; | DygraphLayout=function(b,a){this.dygraph_=b;this.options={};Dygraph.update(this.options,a?a:{});this.datasets=new Array()};DygraphLayout.prototype.attr_=function(a){return this.dygraph_.attr_(a)};DygraphLayout.prototype.addDataset=function(a,b){this.datasets[a]=b};DygraphLayout.prototype.evaluate=function(){this._evaluateLimits();this._evaluateLineCharts();this._evaluateLineTicks()};DygraphLayout.prototype._evaluateLimits=function(){this.minxval=this.maxxval=null;if(this.options.dateWindow){this.minxval=this.options.dateWindow[0];this.maxxval=this.options.dateWindow[1]}else{for(var c in this.datasets){if(!this.datasets.hasOwnProperty(c)){continue}var d=this.datasets[c];var b=d[0][0];if(!this.minxval||b<this.minxval){this.minxval=b}var a=d[d.length-1][0];if(!this.maxxval||a>this.maxxval){this.maxxval=a}}}this.xrange=this.maxxval-this.minxval;this.xscale=(this.xrange!=0?1/this.xrange:1);this.minyval=this.options.yAxis[0];this.maxyval=this.options.yAxis[1];this.yrange=this.maxyval-this.minyval;this.yscale=(this.yrange!=0?1/this.yrange:1)};DygraphLayout.prototype._evaluateLineCharts=function(){this.points=new Array();for(var e in this.datasets){if(!this.datasets.hasOwnProperty(e)){continue}var d=this.datasets[e];for(var b=0;b<d.length;b++){var c=d[b];var a={x:((parseFloat(c[0])-this.minxval)*this.xscale),y:1-((parseFloat(c[1])-this.minyval)*this.yscale),xval:parseFloat(c[0]),yval:parseFloat(c[1]),name:e};if(a.y<=0){a.y=0}if(a.y>=1){a.y=1}if((a.x>=0)&&(a.x<=1)){this.points.push(a)}}}};DygraphLayout.prototype._evaluateLineTicks=function(){this.xticks=new Array();for(var c=0;c<this.options.xTicks.length;c++){var b=this.options.xTicks[c];var a=b.label;var d=this.xscale*(b.v-this.minxval);if((d>=0)&&(d<=1)){this.xticks.push([d,a])}}this.yticks=new Array();for(var c=0;c<this.options.yTicks.length;c++){var b=this.options.yTicks[c];var a=b.label;var d=1-(this.yscale*(b.v-this.minyval));if((d>=0)&&(d<=1)){this.yticks.push([d,a])}}};DygraphLayout.prototype.evaluateWithError=function(){this.evaluate();if(!this.options.errorBars){return}var d=0;for(var g in this.datasets){if(!this.datasets.hasOwnProperty(g)){continue}var c=0;var f=this.datasets[g];for(var c=0;c<f.length;c++,d++){var e=f[c];var a=parseFloat(e[0]);var b=parseFloat(e[1]);if(a==this.points[d].xval&&b==this.points[d].yval){this.points[d].errorMinus=parseFloat(e[2]);this.points[d].errorPlus=parseFloat(e[3])}}}};DygraphLayout.prototype.removeAllDatasets=function(){delete this.datasets;this.datasets=new Array()};DygraphLayout.prototype.updateOptions=function(a){Dygraph.update(this.options,a?a:{})};DygraphCanvasRenderer=function(c,b,d,a){this.dygraph_=c;this.options={strokeWidth:0.5,drawXAxis:true,drawYAxis:true,axisLineColor:"black",axisLineWidth:0.5,axisTickSize:3,axisLabelColor:"black",axisLabelFont:"Arial",axisLabelFontSize:9,axisLabelWidth:50,drawYGrid:true,drawXGrid:true,gridLineColor:"rgb(128,128,128)",fillAlpha:0.15,};Dygraph.update(this.options,a);this.layout=d;this.element=b;this.container=this.element.parentNode;this.height=this.element.height;this.width=this.element.width;if(!this.isIE&&!(DygraphCanvasRenderer.isSupported(this.element))){throw"Canvas is not supported."}this.xlabels=new Array();this.ylabels=new Array();this.area={x:this.options.yAxisLabelWidth+2*this.options.axisTickSize,y:0};this.area.w=this.width-this.area.x-this.options.rightGap;this.area.h=this.height-this.options.axisLabelFontSize-2*this.options.axisTickSize;this.container.style.position="relative";this.container.style.width=this.width+"px"};DygraphCanvasRenderer.prototype.clear=function(){if(this.isIE){try{if(this.clearDelay){this.clearDelay.cancel();this.clearDelay=null}var b=this.element.getContext("2d")}catch(d){this.clearDelay=MochiKit.Async.wait(this.IEDelay);this.clearDelay.addCallback(bind(this.clear,this));return}}var b=this.element.getContext("2d");b.clearRect(0,0,this.width,this.height);for(var a=0;a<this.xlabels.length;a++){var c=this.xlabels[a];c.parentNode.removeChild(c)}for(var a=0;a<this.ylabels.length;a++){var c=this.ylabels[a];c.parentNode.removeChild(c)}this.xlabels=new Array();this.ylabels=new Array()};DygraphCanvasRenderer.isSupported=function(g){var b=null;try{if(typeof(g)=="undefined"||g==null){b=document.createElement("canvas")}else{b=g}var c=b.getContext("2d")}catch(d){var f=navigator.appVersion.match(/MSIE (\d\.\d)/);var a=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);if((!f)||(f[1]<6)||(a)){return false}return true}return true};DygraphCanvasRenderer.prototype.render=function(){var b=this.element.getContext("2d");if(this.options.drawYGrid){var d=this.layout.yticks;b.save();b.strokeStyle=this.options.gridLineColor;b.lineWidth=this.options.axisLineWidth;for(var c=0;c<d.length;c++){var a=this.area.x;var e=this.area.y+d[c][0]*this.area.h;b.beginPath();b.moveTo(a,e);b.lineTo(a+this.area.w,e);b.closePath();b.stroke()}}if(this.options.drawXGrid){var d=this.layout.xticks;b.save();b.strokeStyle=this.options.gridLineColor;b.lineWidth=this.options.axisLineWidth;for(var c=0;c<d.length;c++){var a=this.area.x+d[c][0]*this.area.w;var e=this.area.y+this.area.h;b.beginPath();b.moveTo(a,e);b.lineTo(a,this.area.y);b.closePath();b.stroke()}}this._renderLineChart();this._renderAxis()};DygraphCanvasRenderer.prototype._renderAxis=function(){if(!this.options.drawXAxis&&!this.options.drawYAxis){return}var b=this.element.getContext("2d");var g={position:"absolute",fontSize:this.options.axisLabelFontSize+"px",zIndex:10,color:this.options.axisLabelColor,width:this.options.axisLabelWidth+"px",overflow:"hidden"};var d=function(i){var p=document.createElement("div");for(var o in g){if(g.hasOwnProperty(o)){p.style[o]=g[o]}}p.appendChild(document.createTextNode(i));return p};b.save();b.strokeStyle=this.options.axisLineColor;b.lineWidth=this.options.axisLineWidth;if(this.options.drawYAxis){if(this.layout.yticks&&this.layout.yticks.length>0){for(var e=0;e<this.layout.yticks.length;e++){var f=this.layout.yticks[e];if(typeof(f)=="function"){return}var l=this.area.x;var j=this.area.y+f[0]*this.area.h;b.beginPath();b.moveTo(l,j);b.lineTo(l-this.options.axisTickSize,j);b.closePath();b.stroke();var k=d(f[1]);var h=(j-this.options.axisLabelFontSize/2);if(h<0){h=0}if(h+this.options.axisLabelFontSize+3>this.height){k.style.bottom="0px"}else{k.style.top=h+"px"}k.style.left="0px";k.style.textAlign="right";k.style.width=this.options.yAxisLabelWidth+"px";this.container.appendChild(k);this.ylabels.push(k)}var m=this.ylabels[0];var n=this.options.axisLabelFontSize;var a=parseInt(m.style.top)+n;if(a>this.height-n){m.style.top=(parseInt(m.style.top)-n/2)+"px"}}b.beginPath();b.moveTo(this.area.x,this.area.y);b.lineTo(this.area.x,this.area.y+this.area.h);b.closePath();b.stroke()}if(this.options.drawXAxis){if(this.layout.xticks){for(var e=0;e<this.layout.xticks.length;e++){var f=this.layout.xticks[e];if(typeof(dataset)=="function"){return}var l=this.area.x+f[0]*this.area.w;var j=this.area.y+this.area.h;b.beginPath();b.moveTo(l,j);b.lineTo(l,j+this.options.axisTickSize);b.closePath();b.stroke();var k=d(f[1]);k.style.textAlign="center";k.style.bottom="0px";var c=(l-this.options.axisLabelWidth/2);if(c+this.options.axisLabelWidth>this.width){c=this.width-this.options.xAxisLabelWidth;k.style.textAlign="right"}if(c<0){c=0;k.style.textAlign="left"}k.style.left=c+"px";k.style.width=this.options.xAxisLabelWidth+"px";this.container.appendChild(k);this.xlabels.push(k)}}b.beginPath();b.moveTo(this.area.x,this.area.y+this.area.h);b.lineTo(this.area.x+this.area.w,this.area.y+this.area.h);b.closePath();b.stroke()}b.restore()};DygraphCanvasRenderer.prototype._renderLineChart=function(){var b=this.element.getContext("2d");var d=this.options.colorScheme.length;var n=this.options.colorScheme;var x=this.options.fillAlpha;var C=this.layout.options.errorBars;var q=this.layout.options.fillGraph;var E=[];for(var F in this.layout.datasets){if(this.layout.datasets.hasOwnProperty(F)){E.push(F)}}var y=E.length;for(var A=0;A<this.layout.points.length;A++){var t=this.layout.points[A];t.canvasx=this.area.w*t.x+this.area.x;t.canvasy=this.area.h*t.y+this.area.y}var o=function(i){return i&&!isNaN(i)};var s=b;if(C){if(q){this.dygraph_.warn("Can't use fillGraph option with error bars")}for(var A=0;A<y;A++){var g=E[A];var v=n[A%d];s.save();s.strokeStyle=v;s.lineWidth=this.options.strokeWidth;var h=-1;var f=[-1,-1];var k=0;var B=this.layout.yscale;var a=new RGBColor(v);var D="rgba("+a.r+","+a.g+","+a.b+","+x+")";s.fillStyle=D;s.beginPath();for(var w=0;w<this.layout.points.length;w++){var t=this.layout.points[w];k++;if(t.name==g){if(!o(t.y)){h=-1;continue}var p=[t.y-t.errorPlus*B,t.y+t.errorMinus*B];p[0]=this.area.h*p[0]+this.area.y;p[1]=this.area.h*p[1]+this.area.y;if(h>=0){s.moveTo(h,f[0]);s.lineTo(t.canvasx,p[0]);s.lineTo(t.canvasx,p[1]);s.lineTo(h,f[1]);s.closePath()}f[0]=p[0];f[1]=p[1];h=t.canvasx}}s.fill()}}else{if(q){for(var A=0;A<y;A++){var g=E[A];var r;if(A>0){r=E[A-1]}var v=n[A%d];s.save();s.strokeStyle=v;s.lineWidth=this.options.strokeWidth;var h=-1;var f=[-1,-1];var k=0;var B=this.layout.yscale;var a=new RGBColor(v);var D="rgba("+a.r+","+a.g+","+a.b+","+x+")";s.fillStyle=D;s.beginPath();for(var w=0;w<this.layout.points.length;w++){var t=this.layout.points[w];k++;if(t.name==g){if(!o(t.y)){h=-1;continue}var e=1+this.layout.minyval*this.layout.yscale;if(e<0){e=0}else{if(e>1){e=1}}var p=[t.y,e];p[0]=this.area.h*p[0]+this.area.y;p[1]=this.area.h*p[1]+this.area.y;if(h>=0){s.moveTo(h,f[0]);s.lineTo(t.canvasx,p[0]);s.lineTo(t.canvasx,p[1]);s.lineTo(h,f[1]);s.closePath()}f[0]=p[0];f[1]=p[1];h=t.canvasx}}s.fill()}}}for(var A=0;A<y;A++){var g=E[A];var v=n[A%d];b.save();var t=this.layout.points[0];var l=this.dygraph_.attr_("pointSize");var h=null,c=null;var u=this.dygraph_.attr_("drawPoints");var z=this.layout.points;for(var w=0;w<z.length;w++){var t=z[w];if(t.name==g){if(!o(t.canvasy)){h=c=null}else{var m=(!h&&(w==z.length-1||!o(z[w+1].canvasy)));if(!h){h=t.canvasx;c=t.canvasy}else{s.beginPath();s.strokeStyle=v;s.lineWidth=this.options.strokeWidth;s.moveTo(h,c);h=t.canvasx;c=t.canvasy;s.lineTo(h,c);s.stroke()}if(u||m){s.beginPath();s.fillStyle=v;s.arc(t.canvasx,t.canvasy,l,0,2*Math.PI,false);s.fill()}}}}}b.restore()};Dygraph=function(c,b,a){if(arguments.length>0){if(arguments.length==4){this.warn("Using deprecated four-argument dygraph constructor");this.__old_init__(c,b,arguments[2],arguments[3])}else{this.__init__(c,b,a)}}};Dygraph.NAME="Dygraph";Dygraph.VERSION="1.2";Dygraph.__repr__=function(){return"["+this.NAME+" "+this.VERSION+"]"};Dygraph.toString=function(){return this.__repr__()};Dygraph.DEFAULT_ROLL_PERIOD=1;Dygraph.DEFAULT_WIDTH=480;Dygraph.DEFAULT_HEIGHT=320;Dygraph.AXIS_LINE_WIDTH=0.3;Dygraph.DEFAULT_ATTRS={highlightCircleSize:3,pixelsPerXLabel:60,pixelsPerYLabel:30,labelsDivWidth:250,labelsDivStyles:{},labelsSeparateLines:false,labelsKMB:false,labelsKMG2:false,strokeWidth:1,axisTickSize:3,axisLabelFontSize:14,xAxisLabelWidth:50,yAxisLabelWidth:50,rightGap:5,showRoller:false,xValueFormatter:Dygraph.dateString_,xValueParser:Dygraph.dateParser,xTicker:Dygraph.dateTicker,delimiter:",",logScale:false,sigma:2,errorBars:false,fractions:false,wilsonInterval:true,customBars:false,fillGraph:false,fillAlpha:0.15,stackedGraph:false,hideOverlayOnMouseOut:true};Dygraph.DEBUG=1;Dygraph.INFO=2;Dygraph.WARNING=3;Dygraph.ERROR=3;Dygraph.prototype.__old_init__=function(f,d,e,b){if(e!=null){var a=["Date"];for(var c=0;c<e.length;c++){a.push(e[c])}Dygraph.update(b,{labels:a})}this.__init__(f,d,b)};Dygraph.prototype.__init__=function(c,b,a){if(a==null){a={}}this.maindiv_=c;this.file_=b;this.rollPeriod_=a.rollPeriod||Dygraph.DEFAULT_ROLL_PERIOD;this.previousVerticalX_=-1;this.fractions_=a.fractions||false;this.dateWindow_=a.dateWindow||null;this.valueRange_=a.valueRange||null;this.wilsonInterval_=a.wilsonInterval||true;c.innerHTML="";if(c.style.width==""){c.style.width=a.width||Dygraph.DEFAULT_WIDTH+"px"}if(c.style.height==""){c.style.height=a.height||Dygraph.DEFAULT_HEIGHT+"px"}this.width_=parseInt(c.style.width,10);this.height_=parseInt(c.style.height,10);if(c.style.width.indexOf("%")==c.style.width.length-1){this.width_=(this.width_*self.innerWidth/100)-10}if(c.style.height.indexOf("%")==c.style.height.length-1){this.height_=(this.height_*self.innerHeight/100)-10}if(a.stackedGraph){a.fillGraph=true}this.user_attrs_={};Dygraph.update(this.user_attrs_,a);this.attrs_={};Dygraph.update(this.attrs_,Dygraph.DEFAULT_ATTRS);this.labelsFromCSV_=(this.attr_("labels")==null);this.createInterface_();this.start_()};Dygraph.prototype.attr_=function(a){if(typeof(this.user_attrs_[a])!="undefined"){return this.user_attrs_[a]}else{if(typeof(this.attrs_[a])!="undefined"){return this.attrs_[a]}else{return null}}};Dygraph.prototype.log=function(a,b){if(typeof(console)!="undefined"){switch(a){case Dygraph.DEBUG:console.debug("dygraphs: "+b);break;case Dygraph.INFO:console.info("dygraphs: "+b);break;case Dygraph.WARNING:console.warn("dygraphs: "+b);break;case Dygraph.ERROR:console.error("dygraphs: "+b);break}}};Dygraph.prototype.info=function(a){this.log(Dygraph.INFO,a)};Dygraph.prototype.warn=function(a){this.log(Dygraph.WARNING,a)};Dygraph.prototype.error=function(a){this.log(Dygraph.ERROR,a)};Dygraph.prototype.rollPeriod=function(){return this.rollPeriod_};Dygraph.prototype.xAxisRange=function(){if(this.dateWindow_){return this.dateWindow_}var b=this.rawData_[0][0];var a=this.rawData_[this.rawData_.length-1][0];return[b,a]};Dygraph.addEvent=function(c,a,b){var d=function(f){if(!f){var f=window.event}b(f)};if(window.addEventListener){c.addEventListener(a,d,false)}else{c.attachEvent("on"+a,d)}};Dygraph.prototype.createInterface_=function(){var a=this.maindiv_;this.graphDiv=document.createElement("div");this.graphDiv.style.width=this.width_+"px";this.graphDiv.style.height=this.height_+"px";a.appendChild(this.graphDiv);this.canvas_=Dygraph.createCanvas();this.canvas_.style.position="absolute";this.canvas_.width=this.width_;this.canvas_.height=this.height_;this.canvas_.style.width=this.width_+"px";this.canvas_.style.height=this.height_+"px";this.graphDiv.appendChild(this.canvas_);this.hidden_=this.createPlotKitCanvas_(this.canvas_);var b=this;Dygraph.addEvent(this.hidden_,"mousemove",function(c){b.mouseMove_(c)});Dygraph.addEvent(this.hidden_,"mouseout",function(c){b.mouseOut_(c)});this.layoutOptions_={xOriginIsZero:false};Dygraph.update(this.layoutOptions_,this.attrs_);Dygraph.update(this.layoutOptions_,this.user_attrs_);Dygraph.update(this.layoutOptions_,{errorBars:(this.attr_("errorBars")||this.attr_("customBars"))});this.layout_=new DygraphLayout(this,this.layoutOptions_);this.renderOptions_={colorScheme:this.colors_,strokeColor:null,axisLineWidth:Dygraph.AXIS_LINE_WIDTH};Dygraph.update(this.renderOptions_,this.attrs_);Dygraph.update(this.renderOptions_,this.user_attrs_);this.plotter_=new DygraphCanvasRenderer(this,this.hidden_,this.layout_,this.renderOptions_);this.createStatusMessage_();this.createRollInterface_();this.createDragInterface_()};Dygraph.prototype.createPlotKitCanvas_=function(a){var b=Dygraph.createCanvas();b.style.position="absolute";b.style.top=a.style.top;b.style.left=a.style.left;b.width=this.width_;b.height=this.height_;b.style.width=this.width_+"px";b.style.height=this.height_+"px";this.graphDiv.appendChild(b);return b};Dygraph.hsvToRGB=function(h,g,k){var c;var d;var l;if(g===0){c=k;d=k;l=k}else{var e=Math.floor(h*6);var j=(h*6)-e;var b=k*(1-g);var a=k*(1-(g*j));var m=k*(1-(g*(1-j)));switch(e){case 1:c=a;d=k;l=b;break;case 2:c=b;d=k;l=m;break;case 3:c=b;d=a;l=k;break;case 4:c=m;d=b;l=k;break;case 5:c=k;d=b;l=a;break;case 6:case 0:c=k;d=m;l=b;break}}c=Math.floor(255*c+0.5);d=Math.floor(255*d+0.5);l=Math.floor(255*l+0.5);return"rgb("+c+","+d+","+l+")"};Dygraph.prototype.setColors_=function(){var e=this.attr_("labels").length-1;this.colors_=[];var b=this.attr_("colors");if(!b){var d=this.attr_("colorSaturation")||1;var h=this.attr_("colorValue")||0.5;for(var g=1;g<=e;g++){if(!this.visibility()[g-1]){continue}var a=g-parseInt(g%2?g/2:(g-e)/2,10);var c=(1*a/(1+e));this.colors_.push(Dygraph.hsvToRGB(c,d,h))}}else{for(var g=0;g<e;g++){if(!this.visibility()[g]){continue}var f=b[g%b.length];this.colors_.push(f)}}this.renderOptions_.colorScheme=this.colors_;Dygraph.update(this.plotter_.options,this.renderOptions_);Dygraph.update(this.layoutOptions_,this.user_attrs_);Dygraph.update(this.layoutOptions_,this.attrs_)};Dygraph.prototype.getColors=function(){return this.colors_};Dygraph.findPosX=function(a){var b=0;if(a.offsetParent){while(1){b+=a.offsetLeft;if(!a.offsetParent){break}a=a.offsetParent}}else{if(a.x){b+=a.x}}return b};Dygraph.findPosY=function(b){var a=0;if(b.offsetParent){while(1){a+=b.offsetTop;if(!b.offsetParent){break}b=b.offsetParent}}else{if(b.y){a+=b.y}}return a};Dygraph.prototype.createStatusMessage_=function(){if(!this.attr_("labelsDiv")){var a=this.attr_("labelsDivWidth");var c={position:"absolute",fontSize:"14px",zIndex:10,width:a+"px",top:"0px",left:(this.width_-a-2)+"px",background:"white",textAlign:"left",overflow:"hidden"};Dygraph.update(c,this.attr_("labelsDivStyles"));var d=document.createElement("div");for(var b in c){if(c.hasOwnProperty(b)){d.style[b]=c[b]}}this.graphDiv.appendChild(d);this.attrs_.labelsDiv=d}};Dygraph.prototype.createRollInterface_=function(){var f=this.attr_("showRoller")?"block":"none";var b={position:"absolute",zIndex:10,top:(this.plotter_.area.h-25)+"px",left:(this.plotter_.area.x+1)+"px",display:f};var e=document.createElement("input");e.type="text";e.size="2";e.value=this.rollPeriod_;for(var a in b){if(b.hasOwnProperty(a)){e.style[a]=b[a]}}var d=this.graphDiv;d.appendChild(e);var c=this;e.onchange=function(){c.adjustRoll(e.value)};return e};Dygraph.pageX=function(c){if(c.pageX){return(!c.pageX||c.pageX<0)?0:c.pageX}else{var d=document;var a=document.body;return c.clientX+(d.scrollLeft||a.scrollLeft)-(d.clientLeft||0)}};Dygraph.pageY=function(c){if(c.pageY){return(!c.pageY||c.pageY<0)?0:c.pageY}else{var d=document;var a=document.body;return c.clientY+(d.scrollTop||a.scrollTop)-(d.clientTop||0)}};Dygraph.prototype.createDragInterface_=function(){var n=this;var c=false;var e=false;var b=null;var a=null;var m=null;var k=null;var f=null;var l=null;var j=null;var g=0;var d=0;var i=function(o){return Dygraph.pageX(o)-g};var h=function(o){return Dygraph.pageX(o)-d};Dygraph.addEvent(this.hidden_,"mousemove",function(o){if(c){m=i(o);k=h(o);n.drawZoomRect_(b,m,f);f=m}else{if(e){m=i(o);k=h(o);n.dateWindow_[0]=l-(m/n.width_)*j;n.dateWindow_[1]=n.dateWindow_[0]+j;n.drawGraph_(n.rawData_)}}});Dygraph.addEvent(this.hidden_,"mousedown",function(o){g=Dygraph.findPosX(n.canvas_);d=Dygraph.findPosY(n.canvas_);b=i(o);a=h(o);if(o.altKey||o.shiftKey){if(!n.dateWindow_){return}e=true;j=n.dateWindow_[1]-n.dateWindow_[0];l=(b/n.width_)*j+n.dateWindow_[0]}else{c=true}});Dygraph.addEvent(document,"mouseup",function(o){if(c||e){c=false;b=null;a=null}if(e){e=false;l=null;j=null}});Dygraph.addEvent(this.hidden_,"mouseout",function(o){if(c){m=null;k=null}});Dygraph.addEvent(this.hidden_,"mouseup",function(o){if(c){c=false;m=i(o);k=h(o);var q=Math.abs(m-b);var p=Math.abs(k-a);if(q<2&&p<2&&n.attr_("clickCallback")!=null&&n.lastx_!=undefined){n.attr_("clickCallback")(o,n.lastx_,n.selPoints_)}if(q>=10){n.doZoom_(Math.min(b,m),Math.max(b,m))}else{n.canvas_.getContext("2d").clearRect(0,0,n.canvas_.width,n.canvas_.height)}b=null;a=null}if(e){e=false;l=null;j=null}});Dygraph.addEvent(this.hidden_,"dblclick",function(o){if(n.dateWindow_==null){return}n.dateWindow_=null;n.drawGraph_(n.rawData_);var p=n.rawData_[0][0];var q=n.rawData_[n.rawData_.length-1][0];if(n.attr_("zoomCallback")){n.attr_("zoomCallback")(p,q)}})};Dygraph.prototype.drawZoomRect_=function(c,d,b){var a=this.canvas_.getContext("2d");if(b){a.clearRect(Math.min(c,b),0,Math.abs(c-b),this.height_)}if(d&&c){a.fillStyle="rgba(128,128,128,0.33)";a.fillRect(Math.min(c,d),0,Math.abs(d-c),this.height_)}};Dygraph.prototype.doZoom_=function(g,e){var d=this.layout_.points;var f=null;var h=null;for(var c=0;c<d.length;c++){var b=d[c].canvasx;var a=d[c].xval;if(b<g&&(f==null||a>f)){f=a}if(b>e&&(h==null||a<h)){h=a}}if(f==null){f=d[0].xval}if(h==null){h=d[d.length-1].xval}this.dateWindow_=[f,h];this.drawGraph_(this.rawData_);if(this.attr_("zoomCallback")){this.attr_("zoomCallback")(f,h)}};Dygraph.prototype.mouseMove_=function(s){var m=Dygraph.pageX(s)-Dygraph.findPosX(this.hidden_);var t=this.layout_.points;var l=-1;var k=-1;var a=1e+100;var g=-1;for(var u=0;u<t.length;u++){var n=Math.abs(t[u].canvasx-m);if(n>a){break}a=n;g=u}if(g>=0){l=t[g].xval}if(m>t[t.length-1].canvasx){l=t[t.length-1].xval}this.selPoints_=[];for(var u=0;u<t.length;u++){if(t[u].xval==l){this.selPoints_.push(t[u])}}if(this.attr_("highlightCallback")){var h=this.lastHighlightCallbackX;if(h!==null&&l!=h){this.lastHighlightCallbackX=l;if(!this.attr_("stackedGraph")){this.attr_("highlightCallback")(s,l,this.selPoints_)}else{var b=this.selPoints_.map(function(c){return{xval:c.xval,yval:c.yval,name:c.name}});var o=0;for(var r=b.length-1;r>=0;r--){b[r].yval-=o;o+=b[r].yval}this.attr_("highlightCallback")(s,l,b)}}}var d=this.attr_("highlightCircleSize");var q=this.canvas_.getContext("2d");if(this.previousVerticalX_>=0){var h=this.previousVerticalX_;q.clearRect(h-d-1,0,2*d+2,this.height_)}var f=function(c){return c&&!isNaN(c)};if(this.selPoints_.length>0){var m=this.selPoints_[0].canvasx;var w=this.attr_("xValueFormatter")(l,this)+":";var e=this.colors_.length;for(var u=0;u<this.selPoints_.length;u++){if(!f(this.selPoints_[u].canvasy)){continue}if(this.attr_("labelsSeparateLines")){w+="<br/>"}var p=this.selPoints_[u];var v=new RGBColor(this.colors_[u%e]);w+=" <b><font color='"+v.toHex()+"'>"+p.name+"</font></b>:"+this.round_(p.yval,2)}this.attr_("labelsDiv").innerHTML=w;this.lastx_=l;q.save();for(var u=0;u<this.selPoints_.length;u++){if(!f(this.selPoints_[u%e].canvasy)){continue}q.beginPath();q.fillStyle=this.colors_[u%e];q.arc(m,this.selPoints_[u%e].canvasy,d,0,2*Math.PI,false);q.fill()}q.restore();this.previousVerticalX_=m}};Dygraph.prototype.mouseOut_=function(b){if(this.attr_("hideOverlayOnMouseOut")){var a=this.canvas_.getContext("2d");a.clearRect(0,0,this.width_,this.height_);this.attr_("labelsDiv").innerHTML=""}};Dygraph.zeropad=function(a){if(a<10){return"0"+a}else{return""+a}};Dygraph.prototype.hmsString_=function(a){var c=Dygraph.zeropad;var b=new Date(a);if(b.getSeconds()){return c(b.getHours())+":"+c(b.getMinutes())+":"+c(b.getSeconds())}else{return c(b.getHours())+":"+c(b.getMinutes())}};Dygraph.dateString_=function(b,j){var c=Dygraph.zeropad;var g=new Date(b);var h=""+g.getFullYear();var e=c(g.getMonth()+1);var i=c(g.getDate());var f="";var a=g.getHours()*3600+g.getMinutes()*60+g.getSeconds();if(a){f=" "+j.hmsString_(b)}return h+"/"+e+"/"+i+f};Dygraph.prototype.round_=function(c,b){var a=Math.pow(10,b);return Math.round(c*a)/a};Dygraph.prototype.loadedEvent_=function(a){this.rawData_=this.parseCSV_(a);this.drawGraph_(this.rawData_)};Dygraph.prototype.months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Dygraph.prototype.quarters=["Jan","Apr","Jul","Oct"];Dygraph.prototype.addXTicks_=function(){var a,c;if(this.dateWindow_){a=this.dateWindow_[0];c=this.dateWindow_[1]}else{a=this.rawData_[0][0];c=this.rawData_[this.rawData_.length-1][0]}var b=this.attr_("xTicker")(a,c,this);this.layout_.updateOptions({xTicks:b})};Dygraph.SECONDLY=0;Dygraph.TWO_SECONDLY=1;Dygraph.FIVE_SECONDLY=2;Dygraph.TEN_SECONDLY=3;Dygraph.THIRTY_SECONDLY=4;Dygraph.MINUTELY=5;Dygraph.TWO_MINUTELY=6;Dygraph.FIVE_MINUTELY=7;Dygraph.TEN_MINUTELY=8;Dygraph.THIRTY_MINUTELY=9;Dygraph.HOURLY=10;Dygraph.TWO_HOURLY=11;Dygraph.SIX_HOURLY=12;Dygraph.DAILY=13;Dygraph.WEEKLY=14;Dygraph.MONTHLY=15;Dygraph.QUARTERLY=16;Dygraph.BIANNUAL=17;Dygraph.ANNUAL=18;Dygraph.DECADAL=19;Dygraph.NUM_GRANULARITIES=20;Dygraph.SHORT_SPACINGS=[];Dygraph.SHORT_SPACINGS[Dygraph.SECONDLY]=1000*1;Dygraph.SHORT_SPACINGS[Dygraph.TWO_SECONDLY]=1000*2;Dygraph.SHORT_SPACINGS[Dygraph.FIVE_SECONDLY]=1000*5;Dygraph.SHORT_SPACINGS[Dygraph.TEN_SECONDLY]=1000*10;Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_SECONDLY]=1000*30;Dygraph.SHORT_SPACINGS[Dygraph.MINUTELY]=1000*60;Dygraph.SHORT_SPACINGS[Dygraph.TWO_MINUTELY]=1000*60*2;Dygraph.SHORT_SPACINGS[Dygraph.FIVE_MINUTELY]=1000*60*5;Dygraph.SHORT_SPACINGS[Dygraph.TEN_MINUTELY]=1000*60*10;Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_MINUTELY]=1000*60*30;Dygraph.SHORT_SPACINGS[Dygraph.HOURLY]=1000*3600;Dygraph.SHORT_SPACINGS[Dygraph.TWO_HOURLY]=1000*3600*2;Dygraph.SHORT_SPACINGS[Dygraph.SIX_HOURLY]=1000*3600*6;Dygraph.SHORT_SPACINGS[Dygraph.DAILY]=1000*86400;Dygraph.SHORT_SPACINGS[Dygraph.WEEKLY]=1000*604800;Dygraph.prototype.NumXTicks=function(e,b,g){if(g<Dygraph.MONTHLY){var h=Dygraph.SHORT_SPACINGS[g];return Math.floor(0.5+1*(b-e)/h)}else{var f=1;var d=12;if(g==Dygraph.QUARTERLY){d=3}if(g==Dygraph.BIANNUAL){d=2}if(g==Dygraph.ANNUAL){d=1}if(g==Dygraph.DECADAL){d=1;f=10}var c=365.2524*24*3600*1000;var a=1*(b-e)/c;return Math.floor(0.5+1*a*d/f)}};Dygraph.prototype.GetXAxis=function(n,k,a){var y=[];if(a<Dygraph.MONTHLY){var e=Dygraph.SHORT_SPACINGS[a];var u="%d%b";var v=e/1000;var w=new Date(n);if(v<=60){var h=w.getSeconds();w.setSeconds(h-h%v)}else{w.setSeconds(0);v/=60;if(v<=60){var h=w.getMinutes();w.setMinutes(h-h%v)}else{w.setMinutes(0);v/=60;if(v<=24){var h=w.getHours();w.setHours(h-h%v)}else{w.setHours(0);v/=24;if(v==7){w.setDate(w.getDate()-w.getDay())}}}}n=w.getTime();for(var l=n;l<=k;l+=e){var w=new Date(l);var b=w.getHours()*3600+w.getMinutes()*60+w.getSeconds();if(b==0||a>=Dygraph.DAILY){y.push({v:l,label:new Date(l+3600*1000).strftime(u)})}else{y.push({v:l,label:this.hmsString_(l)})}}}else{var f;var o=1;if(a==Dygraph.MONTHLY){f=[0,1,2,3,4,5,6,7,8,9,10,11,12]}else{if(a==Dygraph.QUARTERLY){f=[0,3,6,9]}else{if(a==Dygraph.BIANNUAL){f=[0,6]}else{if(a==Dygraph.ANNUAL){f=[0]}else{if(a==Dygraph.DECADAL){f=[0];o=10}}}}}var r=new Date(n).getFullYear();var p=new Date(k).getFullYear();var c=Dygraph.zeropad;for(var s=r;s<=p;s++){if(s%o!=0){continue}for(var q=0;q<f.length;q++){var m=s+"/"+c(1+f[q])+"/01";var l=Date.parse(m);if(l<n||l>k){continue}y.push({v:l,label:new Date(l).strftime("%b %y")})}}}return y};Dygraph.dateTicker=function(a,f,d){var b=-1;for(var e=0;e<Dygraph.NUM_GRANULARITIES;e++){var c=d.NumXTicks(a,f,e);if(d.width_/c>=d.attr_("pixelsPerXLabel")){b=e;break}}if(b>=0){return d.GetXAxis(a,f,b)}else{}};Dygraph.numericTicks=function(v,u,l){if(l.attr_("labelsKMG2")){var f=[1,2,4,8]}else{var f=[1,2,5]}var x,p,a,q;var h=l.attr_("pixelsPerYLabel");for(var t=-10;t<50;t++){if(l.attr_("labelsKMG2")){var c=Math.pow(16,t)}else{var c=Math.pow(10,t)}for(var s=0;s<f.length;s++){x=c*f[s];p=Math.floor(v/x)*x;a=Math.ceil(u/x)*x;q=(a-p)/x;var d=l.height_/q;if(d>h){break}}if(d>h){break}}var w=[];var r;var o=[];if(l.attr_("labelsKMB")){r=1000;o=["K","M","B","T"]}if(l.attr_("labelsKMG2")){if(r){l.warn("Setting both labelsKMB and labelsKMG2. Pick one!")}r=1024;o=["k","M","G","T"]}for(var t=0;t<q;t++){var g=p+t*x;var b=Math.abs(g);var e=l.round_(g,2);if(o.length){var m=r*r*r*r;for(var s=3;s>=0;s--,m/=r){if(b>=m){e=l.round_(g/m,1)+o[s];break}}}w.push({label:e,v:g})}return w};Dygraph.prototype.addYTicks_=function(c,b){var a=Dygraph.numericTicks(c,b,this);this.layout_.updateOptions({yAxis:[c,b],yTicks:a})};Dygraph.prototype.extremeValues_=function(d){var h=null,f=null;var b=this.attr_("errorBars")||this.attr_("customBars");if(b){for(var c=0;c<d.length;c++){var g=d[c][1][0];if(!g){continue}var a=g-d[c][1][1];var e=g+d[c][1][2];if(a>g){a=g}if(e<g){e=g}if(f==null||e>f){f=e}if(h==null||a<h){h=a}}}else{for(var c=0;c<d.length;c++){var g=d[c][1];if(g===null||isNaN(g)){continue}if(f==null||g>f){f=g}if(h==null||g<h){h=g}}}return[h,f]};Dygraph.prototype.drawGraph_=function(z){var v=null,u=null;this.layout_.removeAllDatasets();this.setColors_();this.attrs_.pointSize=0.5*this.attr_("highlightCircleSize");var c=[];var f=[];for(var t=1;t<z[0].length;t++){if(!this.visibility()[t-1]){continue}var e=[];for(var r=0;r<z.length;r++){var w=z[r][0];e[r]=[w,z[r][t]]}e=this.rollingAverage(e,this.rollPeriod_);var h=this.attr_("errorBars")||this.attr_("customBars");if(this.dateWindow_){var A=this.dateWindow_[0];var d=this.dateWindow_[1];var m=[];for(var q=0;q<e.length;q++){if(e[q][0]>=A&&e[q][0]<=d){m.push(e[q])}}e=m}var a=this.extremeValues_(e);var o=a[0];var n=a[1];if(!v||o<v){v=o}if(!u||n>u){u=n}if(h){var g=[];for(var r=0;r<e.length;r++){g[r]=[e[r][0],e[r][1][0],e[r][1][1],e[r][1][2]]}this.layout_.addDataset(this.attr_("labels")[t],g)}else{if(this.attr_("stackedGraph")){var g=[];var p=e.length;var x;for(var r=0;r<p;r++){if(c[e[r][0]]===undefined){c[e[r][0]]=0}x=e[r][1];c[e[r][0]]+=x;g[r]=[e[r][0],c[e[r][0]]];if(!u||c[e[r][0]]>u){u=c[e[r][0]]}}f.push([this.attr_("labels")[t],g])}else{this.layout_.addDataset(this.attr_("labels")[t],e)}}}if(f.length>0){for(var t=(f.length-1);t>=0;t--){this.layout_.addDataset(f[t][0],f[t][1])}}if(this.valueRange_!=null){this.addYTicks_(this.valueRange_[0],this.valueRange_[1])}else{if(this.attr_("includeZero")&&v>0){v=0}var s=u-v;if(s==0){s=u}var b=u+0.1*s;var y=v-0.1*s;if(y<0&&v>=0){y=0}if(b>0&&u<=0){b=0}if(this.attr_("includeZero")){if(u<0){b=0}if(v>0){y=0}}this.addYTicks_(y,b)}this.addXTicks_();this.layout_.updateOptions({dateWindow:this.dateWindow_});this.layout_.evaluateWithError();this.plotter_.clear();this.plotter_.render();this.canvas_.getContext("2d").clearRect(0,0,this.canvas_.width,this.canvas_.height);if(this.attr_("drawCallback")!==null){this.attr_("drawCallback")(this)}};Dygraph.prototype.rollingAverage=function(m,d){if(m.length<2){return m}var d=Math.min(d,m.length-1);var b=[];var s=this.attr_("sigma");if(this.fractions_){var k=0;var h=0;var e=100;for(var x=0;x<m.length;x++){k+=m[x][1][0];h+=m[x][1][1];if(x-d>=0){k-=m[x-d][1][0];h-=m[x-d][1][1]}var B=m[x][0];var v=h?k/h:0;if(this.attr_("errorBars")){if(this.wilsonInterval_){if(h){var t=v<0?0:v,u=h;var A=s*Math.sqrt(t*(1-t)/u+s*s/(4*u*u));var a=1+s*s/h;var F=(t+s*s/(2*h)-A)/a;var o=(t+s*s/(2*h)+A)/a;b[x]=[B,[t*e,(t-F)*e,(o-t)*e]]}else{b[x]=[B,[0,0,0]]}}else{var z=h?s*Math.sqrt(v*(1-v)/h):1;b[x]=[B,[e*v,e*z,e*z]]}}else{b[x]=[B,e*v]}}}else{if(this.attr_("customBars")){var F=0;var C=0;var o=0;var g=0;for(var x=0;x<m.length;x++){var E=m[x][1];var l=E[1];b[x]=[m[x][0],[l,l-E[0],E[2]-l]];if(l!=null&&!isNaN(l)){F+=E[0];C+=l;o+=E[2];g+=1}if(x-d>=0){var r=m[x-d];if(r[1][1]!=null&&!isNaN(r[1][1])){F-=r[1][0];C-=r[1][1];o-=r[1][2];g-=1}}b[x]=[m[x][0],[1*C/g,1*(C-F)/g,1*(o-C)/g]]}}else{var q=Math.min(d-1,m.length-2);if(!this.attr_("errorBars")){if(d==1){return m}for(var x=0;x<m.length;x++){var c=0;var D=0;for(var w=Math.max(0,x-d+1);w<x+1;w++){var l=m[w][1];if(l==null||isNaN(l)){continue}D++;c+=m[w][1]}if(D){b[x]=[m[x][0],c/D]}else{b[x]=[m[x][0],null]}}}else{for(var x=0;x<m.length;x++){var c=0;var f=0;var D=0;for(var w=Math.max(0,x-d+1);w<x+1;w++){var l=m[w][1][0];if(l==null||isNaN(l)){continue}D++;c+=m[w][1][0];f+=Math.pow(m[w][1][1],2)}if(D){var z=Math.sqrt(f)/D;b[x]=[m[x][0],[c/D,s*z,s*z]]}else{b[x]=[m[x][0],[null,null,null]]}}}}}return b};Dygraph.dateParser=function(b,a){var c;var e;if(b.search("-")!=-1){c=b.replace("-","/","g");while(c.search("-")!=-1){c=c.replace("-","/")}e=Date.parse(c)}else{if(b.length==8){c=b.substr(0,4)+"/"+b.substr(4,2)+"/"+b.substr(6,2);e=Date.parse(c)}else{e=Date.parse(b)}}if(!e||isNaN(e)){a.error("Couldn't parse "+b+" as a date")}return e};Dygraph.prototype.detectTypeFromString_=function(b){var a=false;if(b.indexOf("-")>=0||b.indexOf("/")>=0||isNaN(parseFloat(b))){a=true}else{if(b.length==8&&b>"19700101"&&b<"20371231"){a=true}}if(a){this.attrs_.xValueFormatter=Dygraph.dateString_;this.attrs_.xValueParser=Dygraph.dateParser;this.attrs_.xTicker=Dygraph.dateTicker}else{this.attrs_.xValueFormatter=function(c){return c};this.attrs_.xValueParser=function(c){return parseFloat(c)};this.attrs_.xTicker=Dygraph.numericTicks}};Dygraph.prototype.parseCSV_=function(h){var m=[];var q=h.split("\n");var b=this.attr_("delimiter");if(q[0].indexOf(b)==-1&&q[0].indexOf("\t")>=0){b="\t"}var a=0;if(this.labelsFromCSV_){a=1;this.attrs_.labels=q[0].split(b)}var c;var o=false;var d=this.attr_("labels").length;var l=false;for(var g=a;g<q.length;g++){var p=q[g];if(p.length==0){continue}if(p[0]=="#"){continue}var f=p.split(b);if(f.length<2){continue}var k=[];if(!o){this.detectTypeFromString_(f[0]);c=this.attr_("xValueParser");o=true}k[0]=c(f[0],this);if(this.fractions_){for(var e=1;e<f.length;e++){var n=f[e].split("/");k[e]=[parseFloat(n[0]),parseFloat(n[1])]}}else{if(this.attr_("errorBars")){for(var e=1;e<f.length;e+=2){k[(e+1)/2]=[parseFloat(f[e]),parseFloat(f[e+1])]}}else{if(this.attr_("customBars")){for(var e=1;e<f.length;e++){var n=f[e].split(";");k[e]=[parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2])]}}else{for(var e=1;e<f.length;e++){k[e]=parseFloat(f[e])}}}}if(m.length>0&&k[0]<m[m.length-1][0]){l=true}m.push(k);if(k.length!=d){this.error("Number of columns in line "+g+" ("+k.length+") does not agree with number of labels ("+d+") "+p)}}if(l){this.warn("CSV is out of order; order it correctly to speed loading.");m.sort(function(j,i){return j[0]-i[0]})}return m};Dygraph.prototype.parseArray_=function(b){if(b.length==0){this.error("Can't plot empty data set");return null}if(b[0].length==0){this.error("Data set cannot contain an empty row");return null}if(this.attr_("labels")==null){this.warn("Using default labels. Set labels explicitly via 'labels' in the options parameter");this.attrs_.labels=["X"];for(var a=1;a<b[0].length;a++){this.attrs_.labels.push("Y"+a)}}if(Dygraph.isDateLike(b[0][0])){this.attrs_.xValueFormatter=Dygraph.dateString_;this.attrs_.xTicker=Dygraph.dateTicker;var c=Dygraph.clone(b);for(var a=0;a<b.length;a++){if(c[a].length==0){this.error("Row "<<(1+a)<<" of data is empty");return null}if(c[a][0]==null||typeof(c[a][0].getTime)!="function"){this.error("x value in row "<<(1+a)<<" is not a Date");return null}c[a][0]=c[a][0].getTime()}return c}else{this.attrs_.xValueFormatter=function(d){return d};this.attrs_.xTicker=Dygraph.numericTicks;return b}};Dygraph.prototype.parseDataTable_=function(c){var h=c.getNumberOfColumns();var l=c.getNumberOfRows();var e=[];for(var d=0;d<h;d++){e.push(c.getColumnLabel(d));if(d!=0&&this.attr_("errorBars")){d+=1}}this.attrs_.labels=e;h=e.length;var a=c.getColumnType(0);if(a=="date"||a=="datetime"){this.attrs_.xValueFormatter=Dygraph.dateString_;this.attrs_.xValueParser=Dygraph.dateParser;this.attrs_.xTicker=Dygraph.dateTicker}else{if(a=="number"){this.attrs_.xValueFormatter=function(i){return i};this.attrs_.xValueParser=function(i){return parseFloat(i)};this.attrs_.xTicker=Dygraph.numericTicks}else{this.error("only 'date', 'datetime' and 'number' types are supported for column 1 of DataTable input (Got '"+a+"')");return null}}var g=[];var f=false;for(var d=0;d<l;d++){var k=[];if(typeof(c.getValue(d,0))==="undefined"||c.getValue(d,0)===null){this.warning("Ignoring row "+d+" of DataTable because of undefined or null first column.");continue}if(a=="date"||a=="datetime"){k.push(c.getValue(d,0).getTime())}else{k.push(c.getValue(d,0))}if(!this.attr_("errorBars")){for(var b=1;b<h;b++){k.push(c.getValue(d,b))}}else{for(var b=0;b<h-1;b++){k.push([c.getValue(d,1+2*b),c.getValue(d,2+2*b)])}}if(g.length>0&&k[0]<g[g.length-1][0]){f=true}g.push(k)}if(f){this.warn("DataTable is out of order; order it correctly to speed loading.");g.sort(function(j,i){return j[0]-i[0]})}return g};Dygraph.update=function(b,c){if(typeof(c)!="undefined"&&c!==null){for(var a in c){if(c.hasOwnProperty(a)){b[a]=c[a]}}}return b};Dygraph.isArrayLike=function(b){var a=typeof(b);if((a!="object"&&!(a=="function"&&typeof(b.item)=="function"))||b===null||typeof(b.length)!="number"||b.nodeType===3){return false}return true};Dygraph.isDateLike=function(a){if(typeof(a)!="object"||a===null||typeof(a.getTime)!="function"){return false}return true};Dygraph.clone=function(c){var b=[];for(var a=0;a<c.length;a++){if(Dygraph.isArrayLike(c[a])){b.push(Dygraph.clone(c[a]))}else{b.push(c[a])}}return b};Dygraph.prototype.start_=function(){if(typeof this.file_=="function"){this.loadedEvent_(this.file_())}else{if(Dygraph.isArrayLike(this.file_)){this.rawData_=this.parseArray_(this.file_);this.drawGraph_(this.rawData_)}else{if(typeof this.file_=="object"&&typeof this.file_.getColumnRange=="function"){this.rawData_=this.parseDataTable_(this.file_);this.drawGraph_(this.rawData_)}else{if(typeof this.file_=="string"){if(this.file_.indexOf("\n")>=0){this.loadedEvent_(this.file_)}else{var b=new XMLHttpRequest();var a=this;b.onreadystatechange=function(){if(b.readyState==4){if(b.status==200){a.loadedEvent_(b.responseText)}}};b.open("GET",this.file_,true);b.send(null)}}else{this.error("Unknown data format: "+(typeof this.file_))}}}}};Dygraph.prototype.updateOptions=function(a){if(a.rollPeriod){this.rollPeriod_=a.rollPeriod}if(a.dateWindow){this.dateWindow_=a.dateWindow}if(a.valueRange){this.valueRange_=a.valueRange}Dygraph.update(this.user_attrs_,a);this.labelsFromCSV_=(this.attr_("labels")==null);this.layout_.updateOptions({errorBars:this.attr_("errorBars")});if(a.file&&a.file!=this.file_){this.file_=a.file;this.start_()}else{this.drawGraph_(this.rawData_)}};Dygraph.prototype.resize=function(b,a){if((b===null)!=(a===null)){this.warn("Dygraph.resize() should be called with zero parameters or two non-NULL parameters. Pretending it was zero.");b=a=null}this.maindiv_.innerHTML="";this.attrs_.labelsDiv=null;if(b){this.maindiv_.style.width=b+"px";this.maindiv_.style.height=a+"px";this.width_=b;this.height_=a}else{this.width_=this.maindiv_.offsetWidth;this.height_=this.maindiv_.offsetHeight}this.createInterface_();this.drawGraph_(this.rawData_)};Dygraph.prototype.adjustRoll=function(a){this.rollPeriod_=a;this.drawGraph_(this.rawData_)};Dygraph.prototype.visibility=function(){if(!this.attr_("visibility")){this.attrs_.visibility=[]}while(this.attr_("visibility").length<this.rawData_[0].length-1){this.attr_("visibility").push(true)}return this.attr_("visibility")};Dygraph.prototype.setVisibility=function(b,c){var a=this.visibility();if(b<0&&b>=a.length){this.warn("invalid series number in setVisibility: "+b)}else{a[b]=c;this.drawGraph_(this.rawData_)}};Dygraph.createCanvas=function(){var a=document.createElement("canvas");isIE=(/MSIE/.test(navigator.userAgent)&&!window.opera);if(isIE){a=G_vmlCanvasManager.initElement(a)}return a};Dygraph.GVizChart=function(a){this.container=a};Dygraph.GVizChart.prototype.draw=function(b,a){this.container.innerHTML="";this.date_graph=new Dygraph(this.container,b,a)};DateGraph=Dygraph;function RGBColor(g){this.ok=false;if(g.charAt(0)=="#"){g=g.substr(1,6)}g=g.replace(/ /g,"");g=g.toLowerCase();var a={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var c in a){if(g==c){g=a[c]}}var h=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(i){return[parseInt(i[1]),parseInt(i[2]),parseInt(i[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(i){return[parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(i){return[parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16),parseInt(i[3]+i[3],16)]}}];for(var b=0;b<h.length;b++){var e=h[b].re;var d=h[b].process;var f=e.exec(g);if(f){channels=d(f);this.r=channels[0];this.g=channels[1];this.b=channels[2];this.ok=true}}this.r=(this.r<0||isNaN(this.r))?0:((this.r>255)?255:this.r);this.g=(this.g<0||isNaN(this.g))?0:((this.g>255)?255:this.g);this.b=(this.b<0||isNaN(this.b))?0:((this.b>255)?255:this.b);this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"};this.toHex=function(){var k=this.r.toString(16);var j=this.g.toString(16);var i=this.b.toString(16);if(k.length==1){k="0"+k}if(j.length==1){j="0"+j}if(i.length==1){i="0"+i}return"#"+k+j+i}}Date.ext={};Date.ext.util={};Date.ext.util.xPad=function(a,c,b){if(typeof(b)=="undefined"){b=10}for(;parseInt(a,10)<b&&b>1;b/=10){a=c.toString()+a}return a.toString()};Date.prototype.locale="en-GB";if(document.getElementsByTagName("html")&&document.getElementsByTagName("html")[0].lang){Date.prototype.locale=document.getElementsByTagName("html")[0].lang}Date.ext.locales={};Date.ext.locales.en={a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a %d %b %Y %T %Z",p:["AM","PM"],P:["am","pm"],x:"%d/%m/%y",X:"%T"};Date.ext.locales["en-US"]=Date.ext.locales.en;Date.ext.locales["en-US"].c="%a %d %b %Y %r %Z";Date.ext.locales["en-US"].x="%D";Date.ext.locales["en-US"].X="%r";Date.ext.locales["en-GB"]=Date.ext.locales.en;Date.ext.locales["en-AU"]=Date.ext.locales["en-GB"];Date.ext.formats={a:function(a){return Date.ext.locales[a.locale].a[a.getDay()]},A:function(a){return Date.ext.locales[a.locale].A[a.getDay()]},b:function(a){return Date.ext.locales[a.locale].b[a.getMonth()]},B:function(a){return Date.ext.locales[a.locale].B[a.getMonth()]},c:"toLocaleString",C:function(a){return Date.ext.util.xPad(parseInt(a.getFullYear()/100,10),0)},d:["getDate","0"],e:["getDate"," "],g:function(a){return Date.ext.util.xPad(parseInt(Date.ext.util.G(a)/100,10),0)},G:function(c){var e=c.getFullYear();var b=parseInt(Date.ext.formats.V(c),10);var a=parseInt(Date.ext.formats.W(c),10);if(a>b){e++}else{if(a===0&&b>=52){e--}}return e},H:["getHours","0"],I:function(b){var a=b.getHours()%12;return Date.ext.util.xPad(a===0?12:a,0)},j:function(c){var a=c-new Date(""+c.getFullYear()+"/1/1 GMT");a+=c.getTimezoneOffset()*60000;var b=parseInt(a/60000/60/24,10)+1;return Date.ext.util.xPad(b,0,100)},m:function(a){return Date.ext.util.xPad(a.getMonth()+1,0)},M:["getMinutes","0"],p:function(a){return Date.ext.locales[a.locale].p[a.getHours()>=12?1:0]},P:function(a){return Date.ext.locales[a.locale].P[a.getHours()>=12?1:0]},S:["getSeconds","0"],u:function(a){var b=a.getDay();return b===0?7:b},U:function(e){var a=parseInt(Date.ext.formats.j(e),10);var c=6-e.getDay();var b=parseInt((a+c)/7,10);return Date.ext.util.xPad(b,0)},V:function(e){var c=parseInt(Date.ext.formats.W(e),10);var a=(new Date(""+e.getFullYear()+"/1/1")).getDay();var b=c+(a>4||a<=1?0:1);if(b==53&&(new Date(""+e.getFullYear()+"/12/31")).getDay()<4){b=1}else{if(b===0){b=Date.ext.formats.V(new Date(""+(e.getFullYear()-1)+"/12/31"))}}return Date.ext.util.xPad(b,0)},w:"getDay",W:function(e){var a=parseInt(Date.ext.formats.j(e),10);var c=7-Date.ext.formats.u(e);var b=parseInt((a+c)/7,10);return Date.ext.util.xPad(b,0,10)},y:function(a){return Date.ext.util.xPad(a.getFullYear()%100,0)},Y:"getFullYear",z:function(c){var b=c.getTimezoneOffset();var a=Date.ext.util.xPad(parseInt(Math.abs(b/60),10),0);var e=Date.ext.util.xPad(b%60,0);return(b>0?"-":"+")+a+e},Z:function(a){return a.toString().replace(/^.*\(([^)]+)\)$/,"$1")},"%":function(a){return"%"}};Date.ext.aggregates={c:"locale",D:"%m/%d/%y",h:"%b",n:"\n",r:"%I:%M:%S %p",R:"%H:%M",t:"\t",T:"%H:%M:%S",x:"locale",X:"locale"};Date.ext.aggregates.z=Date.ext.formats.z(new Date());Date.ext.aggregates.Z=Date.ext.formats.Z(new Date());Date.ext.unsupported={};Date.prototype.strftime=function(a){if(!(this.locale in Date.ext.locales)){if(this.locale.replace(/-[a-zA-Z]+$/,"") in Date.ext.locales){this.locale=this.locale.replace(/-[a-zA-Z]+$/,"")}else{this.locale="en-GB"}}var c=this;while(a.match(/%[cDhnrRtTxXzZ]/)){a=a.replace(/%([cDhnrRtTxXzZ])/g,function(e,d){var g=Date.ext.aggregates[d];return(g=="locale"?Date.ext.locales[c.locale][d]:g)})}var b=a.replace(/%([aAbBCdegGHIjmMpPSuUVwWyY%])/g,function(e,d){var g=Date.ext.formats[d];if(typeof(g)=="string"){return c[g]()}else{if(typeof(g)=="function"){return g.call(c,c)}else{if(typeof(g)=="object"&&typeof(g[0])=="string"){return Date.ext.util.xPad(c[g[0]](),g[1])}else{return d}}}});c=null;return b}; | DygraphLayout=function(b,a){this.dygraph_=b;this.options={};Dygraph.update(this.options,a?a:{});this.datasets=new Array()};DygraphLayout.prototype.attr_=function(a){return this.dygraph_.attr_(a)};DygraphLayout.prototype.addDataset=function(a,b){this.datasets[a]=b};DygraphLayout.prototype.evaluate=function(){this._evaluateLimits();this._evaluateLineCharts();this._evaluateLineTicks()};DygraphLayout.prototype._evaluateLimits=function(){this.minxval=this.maxxval=null;if(this.options.dateWindow){this.minxval=this.options.dateWindow[0];this.maxxval=this.options.dateWindow[1]}else{for(var c in this.datasets){if(!this.datasets.hasOwnProperty(c)){continue}var d=this.datasets[c];var b=d[0][0];if(!this.minxval||b<this.minxval){this.minxval=b}var a=d[d.length-1][0];if(!this.maxxval||a>this.maxxval){this.maxxval=a}}}this.xrange=this.maxxval-this.minxval;this.xscale=(this.xrange!=0?1/this.xrange:1);this.minyval=this.options.yAxis[0];this.maxyval=this.options.yAxis[1];this.yrange=this.maxyval-this.minyval;this.yscale=(this.yrange!=0?1/this.yrange:1)};DygraphLayout.prototype._evaluateLineCharts=function(){this.points=new Array();for(var e in this.datasets){if(!this.datasets.hasOwnProperty(e)){continue}var d=this.datasets[e];for(var b=0;b<d.length;b++){var c=d[b];var a={x:((parseFloat(c[0])-this.minxval)*this.xscale),y:1-((parseFloat(c[1])-this.minyval)*this.yscale),xval:parseFloat(c[0]),yval:parseFloat(c[1]),name:e};if(a.y<=0){a.y=0}if(a.y>=1){a.y=1}if((a.x>=0)&&(a.x<=1)){this.points.push(a)}}}};DygraphLayout.prototype._evaluateLineTicks=function(){this.xticks=new Array();for(var c=0;c<this.options.xTicks.length;c++){var b=this.options.xTicks[c];var a=b.label;var d=this.xscale*(b.v-this.minxval);if((d>=0)&&(d<=1)){this.xticks.push([d,a])}}this.yticks=new Array();for(var c=0;c<this.options.yTicks.length;c++){var b=this.options.yTicks[c];var a=b.label;var d=1-(this.yscale*(b.v-this.minyval));if((d>=0)&&(d<=1)){this.yticks.push([d,a])}}};DygraphLayout.prototype.evaluateWithError=function(){this.evaluate();if(!this.options.errorBars){return}var d=0;for(var g in this.datasets){if(!this.datasets.hasOwnProperty(g)){continue}var c=0;var f=this.datasets[g];for(var c=0;c<f.length;c++,d++){var e=f[c];var a=parseFloat(e[0]);var b=parseFloat(e[1]);if(a==this.points[d].xval&&b==this.points[d].yval){this.points[d].errorMinus=parseFloat(e[2]);this.points[d].errorPlus=parseFloat(e[3])}}}};DygraphLayout.prototype.removeAllDatasets=function(){delete this.datasets;this.datasets=new Array()};DygraphLayout.prototype.updateOptions=function(a){Dygraph.update(this.options,a?a:{})};DygraphCanvasRenderer=function(c,b,d,a){this.dygraph_=c;this.options={strokeWidth:0.5,drawXAxis:true,drawYAxis:true,axisLineColor:"black",axisLineWidth:0.5,axisTickSize:3,axisLabelColor:"black",axisLabelFont:"Arial",axisLabelFontSize:9,axisLabelWidth:50,drawYGrid:true,drawXGrid:true,gridLineColor:"rgb(128,128,128)",fillAlpha:0.15,};Dygraph.update(this.options,a);this.layout=d;this.element=b;this.container=this.element.parentNode;this.height=this.element.height;this.width=this.element.width;if(!this.isIE&&!(DygraphCanvasRenderer.isSupported(this.element))){throw"Canvas is not supported."}this.xlabels=new Array();this.ylabels=new Array();this.area={x:this.options.yAxisLabelWidth+2*this.options.axisTickSize,y:0};this.area.w=this.width-this.area.x-this.options.rightGap;this.area.h=this.height-this.options.axisLabelFontSize-2*this.options.axisTickSize;this.container.style.position="relative";this.container.style.width=this.width+"px"};DygraphCanvasRenderer.prototype.clear=function(){if(this.isIE){try{if(this.clearDelay){this.clearDelay.cancel();this.clearDelay=null}var b=this.element.getContext("2d")}catch(d){this.clearDelay=MochiKit.Async.wait(this.IEDelay);this.clearDelay.addCallback(bind(this.clear,this));return}}var b=this.element.getContext("2d");b.clearRect(0,0,this.width,this.height);for(var a=0;a<this.xlabels.length;a++){var c=this.xlabels[a];c.parentNode.removeChild(c)}for(var a=0;a<this.ylabels.length;a++){var c=this.ylabels[a];c.parentNode.removeChild(c)}this.xlabels=new Array();this.ylabels=new Array()};DygraphCanvasRenderer.isSupported=function(g){var b=null;try{if(typeof(g)=="undefined"||g==null){b=document.createElement("canvas")}else{b=g}var c=b.getContext("2d")}catch(d){var f=navigator.appVersion.match(/MSIE (\d\.\d)/);var a=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);if((!f)||(f[1]<6)||(a)){return false}return true}return true};DygraphCanvasRenderer.prototype.render=function(){var b=this.element.getContext("2d");if(this.options.drawYGrid){var d=this.layout.yticks;b.save();b.strokeStyle=this.options.gridLineColor;b.lineWidth=this.options.axisLineWidth;for(var c=0;c<d.length;c++){var a=this.area.x;var e=this.area.y+d[c][0]*this.area.h;b.beginPath();b.moveTo(a,e);b.lineTo(a+this.area.w,e);b.closePath();b.stroke()}}if(this.options.drawXGrid){var d=this.layout.xticks;b.save();b.strokeStyle=this.options.gridLineColor;b.lineWidth=this.options.axisLineWidth;for(var c=0;c<d.length;c++){var a=this.area.x+d[c][0]*this.area.w;var e=this.area.y+this.area.h;b.beginPath();b.moveTo(a,e);b.lineTo(a,this.area.y);b.closePath();b.stroke()}}this._renderLineChart();this._renderAxis()};DygraphCanvasRenderer.prototype._renderAxis=function(){if(!this.options.drawXAxis&&!this.options.drawYAxis){return}var b=this.element.getContext("2d");var g={position:"absolute",fontSize:this.options.axisLabelFontSize+"px",zIndex:10,color:this.options.axisLabelColor,width:this.options.axisLabelWidth+"px",overflow:"hidden"};var d=function(i){var p=document.createElement("div");for(var o in g){if(g.hasOwnProperty(o)){p.style[o]=g[o]}}p.appendChild(document.createTextNode(i));return p};b.save();b.strokeStyle=this.options.axisLineColor;b.lineWidth=this.options.axisLineWidth;if(this.options.drawYAxis){if(this.layout.yticks&&this.layout.yticks.length>0){for(var e=0;e<this.layout.yticks.length;e++){var f=this.layout.yticks[e];if(typeof(f)=="function"){return}var l=this.area.x;var j=this.area.y+f[0]*this.area.h;b.beginPath();b.moveTo(l,j);b.lineTo(l-this.options.axisTickSize,j);b.closePath();b.stroke();var k=d(f[1]);var h=(j-this.options.axisLabelFontSize/2);if(h<0){h=0}if(h+this.options.axisLabelFontSize+3>this.height){k.style.bottom="0px"}else{k.style.top=h+"px"}k.style.left="0px";k.style.textAlign="right";k.style.width=this.options.yAxisLabelWidth+"px";this.container.appendChild(k);this.ylabels.push(k)}var m=this.ylabels[0];var n=this.options.axisLabelFontSize;var a=parseInt(m.style.top)+n;if(a>this.height-n){m.style.top=(parseInt(m.style.top)-n/2)+"px"}}b.beginPath();b.moveTo(this.area.x,this.area.y);b.lineTo(this.area.x,this.area.y+this.area.h);b.closePath();b.stroke()}if(this.options.drawXAxis){if(this.layout.xticks){for(var e=0;e<this.layout.xticks.length;e++){var f=this.layout.xticks[e];if(typeof(dataset)=="function"){return}var l=this.area.x+f[0]*this.area.w;var j=this.area.y+this.area.h;b.beginPath();b.moveTo(l,j);b.lineTo(l,j+this.options.axisTickSize);b.closePath();b.stroke();var k=d(f[1]);k.style.textAlign="center";k.style.bottom="0px";var c=(l-this.options.axisLabelWidth/2);if(c+this.options.axisLabelWidth>this.width){c=this.width-this.options.xAxisLabelWidth;k.style.textAlign="right"}if(c<0){c=0;k.style.textAlign="left"}k.style.left=c+"px";k.style.width=this.options.xAxisLabelWidth+"px";this.container.appendChild(k);this.xlabels.push(k)}}b.beginPath();b.moveTo(this.area.x,this.area.y+this.area.h);b.lineTo(this.area.x+this.area.w,this.area.y+this.area.h);b.closePath();b.stroke()}b.restore()};DygraphCanvasRenderer.prototype._renderLineChart=function(){var b=this.element.getContext("2d");var d=this.options.colorScheme.length;var n=this.options.colorScheme;var x=this.options.fillAlpha;var C=this.layout.options.errorBars;var q=this.layout.options.fillGraph;var E=[];for(var F in this.layout.datasets){if(this.layout.datasets.hasOwnProperty(F)){E.push(F)}}var y=E.length;for(var A=0;A<this.layout.points.length;A++){var t=this.layout.points[A];t.canvasx=this.area.w*t.x+this.area.x;t.canvasy=this.area.h*t.y+this.area.y}var o=function(i){return i&&!isNaN(i)};var s=b;if(C){if(q){this.dygraph_.warn("Can't use fillGraph option with error bars")}for(var A=0;A<y;A++){var g=E[A];var v=n[A%d];s.save();s.strokeStyle=v;s.lineWidth=this.options.strokeWidth;var h=-1;var f=[-1,-1];var k=0;var B=this.layout.yscale;var a=new RGBColor(v);var D="rgba("+a.r+","+a.g+","+a.b+","+x+")";s.fillStyle=D;s.beginPath();for(var w=0;w<this.layout.points.length;w++){var t=this.layout.points[w];k++;if(t.name==g){if(!o(t.y)){h=-1;continue}var p=[t.y-t.errorPlus*B,t.y+t.errorMinus*B];p[0]=this.area.h*p[0]+this.area.y;p[1]=this.area.h*p[1]+this.area.y;if(h>=0){s.moveTo(h,f[0]);s.lineTo(t.canvasx,p[0]);s.lineTo(t.canvasx,p[1]);s.lineTo(h,f[1]);s.closePath()}f[0]=p[0];f[1]=p[1];h=t.canvasx}}s.fill()}}else{if(q){for(var A=0;A<y;A++){var g=E[A];var r;if(A>0){r=E[A-1]}var v=n[A%d];s.save();s.strokeStyle=v;s.lineWidth=this.options.strokeWidth;var h=-1;var f=[-1,-1];var k=0;var B=this.layout.yscale;var a=new RGBColor(v);var D="rgba("+a.r+","+a.g+","+a.b+","+x+")";s.fillStyle=D;s.beginPath();for(var w=0;w<this.layout.points.length;w++){var t=this.layout.points[w];k++;if(t.name==g){if(!o(t.y)){h=-1;continue}var e=1+this.layout.minyval*this.layout.yscale;if(e<0){e=0}else{if(e>1){e=1}}var p=[t.y,e];p[0]=this.area.h*p[0]+this.area.y;p[1]=this.area.h*p[1]+this.area.y;if(h>=0){s.moveTo(h,f[0]);s.lineTo(t.canvasx,p[0]);s.lineTo(t.canvasx,p[1]);s.lineTo(h,f[1]);s.closePath()}f[0]=p[0];f[1]=p[1];h=t.canvasx}}s.fill()}}}for(var A=0;A<y;A++){var g=E[A];var v=n[A%d];b.save();var t=this.layout.points[0];var l=this.dygraph_.attr_("pointSize");var h=null,c=null;var u=this.dygraph_.attr_("drawPoints");var z=this.layout.points;for(var w=0;w<z.length;w++){var t=z[w];if(t.name==g){if(!o(t.canvasy)){h=c=null}else{var m=(!h&&(w==z.length-1||!o(z[w+1].canvasy)));if(!h){h=t.canvasx;c=t.canvasy}else{s.beginPath();s.strokeStyle=v;s.lineWidth=this.options.strokeWidth;s.moveTo(h,c);h=t.canvasx;c=t.canvasy;s.lineTo(h,c);s.stroke()}if(u||m){s.beginPath();s.fillStyle=v;s.arc(t.canvasx,t.canvasy,l,0,2*Math.PI,false);s.fill()}}}}}b.restore()};Dygraph=function(c,b,a){if(arguments.length>0){if(arguments.length==4){this.warn("Using deprecated four-argument dygraph constructor");this.__old_init__(c,b,arguments[2],arguments[3])}else{this.__init__(c,b,a)}}};Dygraph.NAME="Dygraph";Dygraph.VERSION="1.2";Dygraph.__repr__=function(){return"["+this.NAME+" "+this.VERSION+"]"};Dygraph.toString=function(){return this.__repr__()};Dygraph.DEFAULT_ROLL_PERIOD=1;Dygraph.DEFAULT_WIDTH=480;Dygraph.DEFAULT_HEIGHT=320;Dygraph.AXIS_LINE_WIDTH=0.3;Dygraph.DEFAULT_ATTRS={highlightCircleSize:3,pixelsPerXLabel:60,pixelsPerYLabel:30,labelsDivWidth:250,labelsDivStyles:{},labelsSeparateLines:false,labelsKMB:false,labelsKMG2:false,strokeWidth:1,axisTickSize:3,axisLabelFontSize:14,xAxisLabelWidth:50,yAxisLabelWidth:50,rightGap:5,showRoller:false,xValueFormatter:Dygraph.dateString_,xValueParser:Dygraph.dateParser,xTicker:Dygraph.dateTicker,delimiter:",",logScale:false,sigma:2,errorBars:false,fractions:false,wilsonInterval:true,customBars:false,fillGraph:false,fillAlpha:0.15,stackedGraph:false,hideOverlayOnMouseOut:true};Dygraph.DEBUG=1;Dygraph.INFO=2;Dygraph.WARNING=3;Dygraph.ERROR=3;Dygraph.prototype.__old_init__=function(f,d,e,b){if(e!=null){var a=["Date"];for(var c=0;c<e.length;c++){a.push(e[c])}Dygraph.update(b,{labels:a})}this.__init__(f,d,b)};Dygraph.prototype.__init__=function(c,b,a){if(a==null){a={}}this.maindiv_=c;this.file_=b;this.rollPeriod_=a.rollPeriod||Dygraph.DEFAULT_ROLL_PERIOD;this.previousVerticalX_=-1;this.fractions_=a.fractions||false;this.dateWindow_=a.dateWindow||null;this.valueRange_=a.valueRange||null;this.wilsonInterval_=a.wilsonInterval||true;c.innerHTML="";if(c.style.width==""){c.style.width=a.width||Dygraph.DEFAULT_WIDTH+"px"}if(c.style.height==""){c.style.height=a.height||Dygraph.DEFAULT_HEIGHT+"px"}this.width_=parseInt(c.style.width,10);this.height_=parseInt(c.style.height,10);if(c.style.width.indexOf("%")==c.style.width.length-1){this.width_=(this.width_*self.innerWidth/100)-10}if(c.style.height.indexOf("%")==c.style.height.length-1){this.height_=(this.height_*self.innerHeight/100)-10}if(a.stackedGraph){a.fillGraph=true}this.user_attrs_={};Dygraph.update(this.user_attrs_,a);this.attrs_={};Dygraph.update(this.attrs_,Dygraph.DEFAULT_ATTRS);this.labelsFromCSV_=(this.attr_("labels")==null);this.createInterface_();this.start_()};Dygraph.prototype.attr_=function(a){if(typeof(this.user_attrs_[a])!="undefined"){return this.user_attrs_[a]}else{if(typeof(this.attrs_[a])!="undefined"){return this.attrs_[a]}else{return null}}};Dygraph.prototype.log=function(a,b){if(typeof(console)!="undefined"){switch(a){case Dygraph.DEBUG:console.debug("dygraphs: "+b);break;case Dygraph.INFO:console.info("dygraphs: "+b);break;case Dygraph.WARNING:console.warn("dygraphs: "+b);break;case Dygraph.ERROR:console.error("dygraphs: "+b);break}}};Dygraph.prototype.info=function(a){this.log(Dygraph.INFO,a)};Dygraph.prototype.warn=function(a){this.log(Dygraph.WARNING,a)};Dygraph.prototype.error=function(a){this.log(Dygraph.ERROR,a)};Dygraph.prototype.rollPeriod=function(){return this.rollPeriod_};Dygraph.prototype.xAxisRange=function(){if(this.dateWindow_){return this.dateWindow_}var b=this.rawData_[0][0];var a=this.rawData_[this.rawData_.length-1][0];return[b,a]};Dygraph.addEvent=function(c,a,b){var d=function(f){if(!f){var f=window.event}b(f)};if(window.addEventListener){c.addEventListener(a,d,false)}else{c.attachEvent("on"+a,d)}};Dygraph.prototype.createInterface_=function(){var a=this.maindiv_;this.graphDiv=document.createElement("div");this.graphDiv.style.width=this.width_+"px";this.graphDiv.style.height=this.height_+"px";a.appendChild(this.graphDiv);this.canvas_=Dygraph.createCanvas();this.canvas_.style.position="absolute";this.canvas_.width=this.width_;this.canvas_.height=this.height_;this.canvas_.style.width=this.width_+"px";this.canvas_.style.height=this.height_+"px";this.graphDiv.appendChild(this.canvas_);this.hidden_=this.createPlotKitCanvas_(this.canvas_);var b=this;Dygraph.addEvent(this.hidden_,"mousemove",function(c){b.mouseMove_(c)});Dygraph.addEvent(this.hidden_,"mouseout",function(c){b.mouseOut_(c)});this.layoutOptions_={xOriginIsZero:false};Dygraph.update(this.layoutOptions_,this.attrs_);Dygraph.update(this.layoutOptions_,this.user_attrs_);Dygraph.update(this.layoutOptions_,{errorBars:(this.attr_("errorBars")||this.attr_("customBars"))});this.layout_=new DygraphLayout(this,this.layoutOptions_);this.renderOptions_={colorScheme:this.colors_,strokeColor:null,axisLineWidth:Dygraph.AXIS_LINE_WIDTH};Dygraph.update(this.renderOptions_,this.attrs_);Dygraph.update(this.renderOptions_,this.user_attrs_);this.plotter_=new DygraphCanvasRenderer(this,this.hidden_,this.layout_,this.renderOptions_);this.createStatusMessage_();this.createRollInterface_();this.createDragInterface_()};Dygraph.prototype.createPlotKitCanvas_=function(a){var b=Dygraph.createCanvas();b.style.position="absolute";b.style.top=a.style.top;b.style.left=a.style.left;b.width=this.width_;b.height=this.height_;b.style.width=this.width_+"px";b.style.height=this.height_+"px";this.graphDiv.appendChild(b);return b};Dygraph.hsvToRGB=function(h,g,k){var c;var d;var l;if(g===0){c=k;d=k;l=k}else{var e=Math.floor(h*6);var j=(h*6)-e;var b=k*(1-g);var a=k*(1-(g*j));var m=k*(1-(g*(1-j)));switch(e){case 1:c=a;d=k;l=b;break;case 2:c=b;d=k;l=m;break;case 3:c=b;d=a;l=k;break;case 4:c=m;d=b;l=k;break;case 5:c=k;d=b;l=a;break;case 6:case 0:c=k;d=m;l=b;break}}c=Math.floor(255*c+0.5);d=Math.floor(255*d+0.5);l=Math.floor(255*l+0.5);return"rgb("+c+","+d+","+l+")"};Dygraph.prototype.setColors_=function(){var e=this.attr_("labels").length-1;this.colors_=[];var b=this.attr_("colors");if(!b){var d=this.attr_("colorSaturation")||1;var h=this.attr_("colorValue")||0.5;for(var g=1;g<=e;g++){if(!this.visibility()[g-1]){continue}var a=g-parseInt(g%2?g/2:(g-e)/2,10);var c=(1*a/(1+e));this.colors_.push(Dygraph.hsvToRGB(c,d,h))}}else{for(var g=0;g<e;g++){if(!this.visibility()[g]){continue}var f=b[g%b.length];this.colors_.push(f)}}this.renderOptions_.colorScheme=this.colors_;Dygraph.update(this.plotter_.options,this.renderOptions_);Dygraph.update(this.layoutOptions_,this.user_attrs_);Dygraph.update(this.layoutOptions_,this.attrs_)};Dygraph.prototype.getColors=function(){return this.colors_};Dygraph.findPosX=function(a){var b=0;if(a.offsetParent){while(1){b+=a.offsetLeft;if(!a.offsetParent){break}a=a.offsetParent}}else{if(a.x){b+=a.x}}return b};Dygraph.findPosY=function(b){var a=0;if(b.offsetParent){while(1){a+=b.offsetTop;if(!b.offsetParent){break}b=b.offsetParent}}else{if(b.y){a+=b.y}}return a};Dygraph.prototype.createStatusMessage_=function(){if(!this.attr_("labelsDiv")){var a=this.attr_("labelsDivWidth");var c={position:"absolute",fontSize:"14px",zIndex:10,width:a+"px",top:"0px",left:(this.width_-a-2)+"px",background:"white",textAlign:"left",overflow:"hidden"};Dygraph.update(c,this.attr_("labelsDivStyles"));var d=document.createElement("div");for(var b in c){if(c.hasOwnProperty(b)){d.style[b]=c[b]}}this.graphDiv.appendChild(d);this.attrs_.labelsDiv=d}};Dygraph.prototype.createRollInterface_=function(){var f=this.attr_("showRoller")?"block":"none";var b={position:"absolute",zIndex:10,top:(this.plotter_.area.h-25)+"px",left:(this.plotter_.area.x+1)+"px",display:f};var e=document.createElement("input");e.type="text";e.size="2";e.value=this.rollPeriod_;for(var a in b){if(b.hasOwnProperty(a)){e.style[a]=b[a]}}var d=this.graphDiv;d.appendChild(e);var c=this;e.onchange=function(){c.adjustRoll(e.value)};return e};Dygraph.pageX=function(c){if(c.pageX){return(!c.pageX||c.pageX<0)?0:c.pageX}else{var d=document;var a=document.body;return c.clientX+(d.scrollLeft||a.scrollLeft)-(d.clientLeft||0)}};Dygraph.pageY=function(c){if(c.pageY){return(!c.pageY||c.pageY<0)?0:c.pageY}else{var d=document;var a=document.body;return c.clientY+(d.scrollTop||a.scrollTop)-(d.clientTop||0)}};Dygraph.prototype.createDragInterface_=function(){var n=this;var c=false;var e=false;var b=null;var a=null;var m=null;var k=null;var f=null;var l=null;var j=null;var g=0;var d=0;var i=function(o){return Dygraph.pageX(o)-g};var h=function(o){return Dygraph.pageX(o)-d};Dygraph.addEvent(this.hidden_,"mousemove",function(o){if(c){m=i(o);k=h(o);n.drawZoomRect_(b,m,f);f=m}else{if(e){m=i(o);k=h(o);n.dateWindow_[0]=l-(m/n.width_)*j;n.dateWindow_[1]=n.dateWindow_[0]+j;n.drawGraph_(n.rawData_)}}});Dygraph.addEvent(this.hidden_,"mousedown",function(o){g=Dygraph.findPosX(n.canvas_);d=Dygraph.findPosY(n.canvas_);b=i(o);a=h(o);if(o.altKey||o.shiftKey){if(!n.dateWindow_){return}e=true;j=n.dateWindow_[1]-n.dateWindow_[0];l=(b/n.width_)*j+n.dateWindow_[0]}else{c=true}});Dygraph.addEvent(document,"mouseup",function(o){if(c||e){c=false;b=null;a=null}if(e){e=false;l=null;j=null}});Dygraph.addEvent(this.hidden_,"mouseout",function(o){if(c){m=null;k=null}});Dygraph.addEvent(this.hidden_,"mouseup",function(o){if(c){c=false;m=i(o);k=h(o);var q=Math.abs(m-b);var p=Math.abs(k-a);if(q<2&&p<2&&n.attr_("clickCallback")!=null&&n.lastx_!=undefined){n.attr_("clickCallback")(o,n.lastx_,n.selPoints_)}if(q>=10){n.doZoom_(Math.min(b,m),Math.max(b,m))}else{n.canvas_.getContext("2d").clearRect(0,0,n.canvas_.width,n.canvas_.height)}b=null;a=null}if(e){e=false;l=null;j=null}});Dygraph.addEvent(this.hidden_,"dblclick",function(o){if(n.dateWindow_==null){return}n.dateWindow_=null;n.drawGraph_(n.rawData_);var p=n.rawData_[0][0];var q=n.rawData_[n.rawData_.length-1][0];if(n.attr_("zoomCallback")){n.attr_("zoomCallback")(p,q)}})};Dygraph.prototype.drawZoomRect_=function(c,d,b){var a=this.canvas_.getContext("2d");if(b){a.clearRect(Math.min(c,b),0,Math.abs(c-b),this.height_)}if(d&&c){a.fillStyle="rgba(128,128,128,0.33)";a.fillRect(Math.min(c,d),0,Math.abs(d-c),this.height_)}};Dygraph.prototype.doZoom_=function(g,e){var d=this.layout_.points;var f=null;var h=null;for(var c=0;c<d.length;c++){var b=d[c].canvasx;var a=d[c].xval;if(b<g&&(f==null||a>f)){f=a}if(b>e&&(h==null||a<h)){h=a}}if(f==null){f=d[0].xval}if(h==null){h=d[d.length-1].xval}this.dateWindow_=[f,h];this.drawGraph_(this.rawData_);if(this.attr_("zoomCallback")){this.attr_("zoomCallback")(f,h)}};Dygraph.prototype.mouseMove_=function(s){var m=Dygraph.pageX(s)-Dygraph.findPosX(this.hidden_);var t=this.layout_.points;var l=-1;var k=-1;var a=1e+100;var g=-1;for(var u=0;u<t.length;u++){var n=Math.abs(t[u].canvasx-m);if(n>a){break}a=n;g=u}if(g>=0){l=t[g].xval}if(m>t[t.length-1].canvasx){l=t[t.length-1].xval}this.selPoints_=[];for(var u=0;u<t.length;u++){if(t[u].xval==l){this.selPoints_.push(t[u])}}if(this.attr_("highlightCallback")){var h=this.lastHighlightCallbackX;if(h!==null&&l!=h){this.lastHighlightCallbackX=l;if(!this.attr_("stackedGraph")){this.attr_("highlightCallback")(s,l,this.selPoints_)}else{var b=this.selPoints_.map(function(c){return{xval:c.xval,yval:c.yval,name:c.name}});var o=0;for(var r=b.length-1;r>=0;r--){b[r].yval-=o;o+=b[r].yval}this.attr_("highlightCallback")(s,l,b)}}}var d=this.attr_("highlightCircleSize");var q=this.canvas_.getContext("2d");if(this.previousVerticalX_>=0){var h=this.previousVerticalX_;q.clearRect(h-d-1,0,2*d+2,this.height_)}var f=function(c){return c&&!isNaN(c)};if(this.selPoints_.length>0){var m=this.selPoints_[0].canvasx;var w=this.attr_("xValueFormatter")(l,this)+":";var e=this.colors_.length;for(var u=0;u<this.selPoints_.length;u++){if(!f(this.selPoints_[u].canvasy)){continue}if(this.attr_("labelsSeparateLines")){w+="<br/>"}var p=this.selPoints_[u];var v=new RGBColor(this.colors_[u%e]);w+=" <b><font color='"+v.toHex()+"'>"+p.name+"</font></b>:"+this.round_(p.yval,2)}this.attr_("labelsDiv").innerHTML=w;this.lastx_=l;q.save();for(var u=0;u<this.selPoints_.length;u++){if(!f(this.selPoints_[u%e].canvasy)){continue}q.beginPath();q.fillStyle=this.colors_[u%e];q.arc(m,this.selPoints_[u%e].canvasy,d,0,2*Math.PI,false);q.fill()}q.restore();this.previousVerticalX_=m}};Dygraph.prototype.mouseOut_=function(b){if(this.attr_("hideOverlayOnMouseOut")){var a=this.canvas_.getContext("2d");a.clearRect(0,0,this.width_,this.height_);this.attr_("labelsDiv").innerHTML=""}};Dygraph.zeropad=function(a){if(a<10){return"0"+a}else{return""+a}};Dygraph.prototype.hmsString_=function(a){var c=Dygraph.zeropad;var b=new Date(a);if(b.getSeconds()){return c(b.getHours())+":"+c(b.getMinutes())+":"+c(b.getSeconds())}else{return c(b.getHours())+":"+c(b.getMinutes())}};Dygraph.dateString_=function(b,j){var c=Dygraph.zeropad;var g=new Date(b);var h=""+g.getFullYear();var e=c(g.getMonth()+1);var i=c(g.getDate());var f="";var a=g.getHours()*3600+g.getMinutes()*60+g.getSeconds();if(a){f=" "+j.hmsString_(b)}return h+"/"+e+"/"+i+f};Dygraph.prototype.round_=function(c,b){var a=Math.pow(10,b);return Math.round(c*a)/a};Dygraph.prototype.loadedEvent_=function(a){this.rawData_=this.parseCSV_(a);this.drawGraph_(this.rawData_)};Dygraph.prototype.months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Dygraph.prototype.quarters=["Jan","Apr","Jul","Oct"];Dygraph.prototype.addXTicks_=function(){var a,c;if(this.dateWindow_){a=this.dateWindow_[0];c=this.dateWindow_[1]}else{a=this.rawData_[0][0];c=this.rawData_[this.rawData_.length-1][0]}var b=this.attr_("xTicker")(a,c,this);this.layout_.updateOptions({xTicks:b})};Dygraph.SECONDLY=0;Dygraph.TWO_SECONDLY=1;Dygraph.FIVE_SECONDLY=2;Dygraph.TEN_SECONDLY=3;Dygraph.THIRTY_SECONDLY=4;Dygraph.MINUTELY=5;Dygraph.TWO_MINUTELY=6;Dygraph.FIVE_MINUTELY=7;Dygraph.TEN_MINUTELY=8;Dygraph.THIRTY_MINUTELY=9;Dygraph.HOURLY=10;Dygraph.TWO_HOURLY=11;Dygraph.SIX_HOURLY=12;Dygraph.DAILY=13;Dygraph.WEEKLY=14;Dygraph.MONTHLY=15;Dygraph.QUARTERLY=16;Dygraph.BIANNUAL=17;Dygraph.ANNUAL=18;Dygraph.DECADAL=19;Dygraph.NUM_GRANULARITIES=20;Dygraph.SHORT_SPACINGS=[];Dygraph.SHORT_SPACINGS[Dygraph.SECONDLY]=1000*1;Dygraph.SHORT_SPACINGS[Dygraph.TWO_SECONDLY]=1000*2;Dygraph.SHORT_SPACINGS[Dygraph.FIVE_SECONDLY]=1000*5;Dygraph.SHORT_SPACINGS[Dygraph.TEN_SECONDLY]=1000*10;Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_SECONDLY]=1000*30;Dygraph.SHORT_SPACINGS[Dygraph.MINUTELY]=1000*60;Dygraph.SHORT_SPACINGS[Dygraph.TWO_MINUTELY]=1000*60*2;Dygraph.SHORT_SPACINGS[Dygraph.FIVE_MINUTELY]=1000*60*5;Dygraph.SHORT_SPACINGS[Dygraph.TEN_MINUTELY]=1000*60*10;Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_MINUTELY]=1000*60*30;Dygraph.SHORT_SPACINGS[Dygraph.HOURLY]=1000*3600;Dygraph.SHORT_SPACINGS[Dygraph.TWO_HOURLY]=1000*3600*2;Dygraph.SHORT_SPACINGS[Dygraph.SIX_HOURLY]=1000*3600*6;Dygraph.SHORT_SPACINGS[Dygraph.DAILY]=1000*86400;Dygraph.SHORT_SPACINGS[Dygraph.WEEKLY]=1000*604800;Dygraph.prototype.NumXTicks=function(e,b,g){if(g<Dygraph.MONTHLY){var h=Dygraph.SHORT_SPACINGS[g];return Math.floor(0.5+1*(b-e)/h)}else{var f=1;var d=12;if(g==Dygraph.QUARTERLY){d=3}if(g==Dygraph.BIANNUAL){d=2}if(g==Dygraph.ANNUAL){d=1}if(g==Dygraph.DECADAL){d=1;f=10}var c=365.2524*24*3600*1000;var a=1*(b-e)/c;return Math.floor(0.5+1*a*d/f)}};Dygraph.prototype.GetXAxis=function(n,k,a){var y=[];if(a<Dygraph.MONTHLY){var e=Dygraph.SHORT_SPACINGS[a];var u="%d%b";var v=e/1000;var w=new Date(n);if(v<=60){var h=w.getSeconds();w.setSeconds(h-h%v)}else{w.setSeconds(0);v/=60;if(v<=60){var h=w.getMinutes();w.setMinutes(h-h%v)}else{w.setMinutes(0);v/=60;if(v<=24){var h=w.getHours();w.setHours(h-h%v)}else{w.setHours(0);v/=24;if(v==7){w.setDate(w.getDate()-w.getDay())}}}}n=w.getTime();for(var l=n;l<=k;l+=e){var w=new Date(l);var b=w.getHours()*3600+w.getMinutes()*60+w.getSeconds();if(b==0||a>=Dygraph.DAILY){y.push({v:l,label:new Date(l+3600*1000).strftime(u)})}else{y.push({v:l,label:this.hmsString_(l)})}}}else{var f;var o=1;if(a==Dygraph.MONTHLY){f=[0,1,2,3,4,5,6,7,8,9,10,11,12]}else{if(a==Dygraph.QUARTERLY){f=[0,3,6,9]}else{if(a==Dygraph.BIANNUAL){f=[0,6]}else{if(a==Dygraph.ANNUAL){f=[0]}else{if(a==Dygraph.DECADAL){f=[0];o=10}}}}}var r=new Date(n).getFullYear();var p=new Date(k).getFullYear();var c=Dygraph.zeropad;for(var s=r;s<=p;s++){if(s%o!=0){continue}for(var q=0;q<f.length;q++){var m=s+"/"+c(1+f[q])+"/01";var l=Date.parse(m);if(l<n||l>k){continue}y.push({v:l,label:new Date(l).strftime("%b %y")})}}}return y};Dygraph.dateTicker=function(a,f,d){var b=-1;for(var e=0;e<Dygraph.NUM_GRANULARITIES;e++){var c=d.NumXTicks(a,f,e);if(d.width_/c>=d.attr_("pixelsPerXLabel")){b=e;break}}if(b>=0){return d.GetXAxis(a,f,b)}else{}};Dygraph.numericTicks=function(v,u,l){if(l.attr_("labelsKMG2")){var f=[1,2,4,8]}else{var f=[1,2,5]}var x,p,a,q;var h=l.attr_("pixelsPerYLabel");for(var t=-10;t<50;t++){if(l.attr_("labelsKMG2")){var c=Math.pow(16,t)}else{var c=Math.pow(10,t)}for(var s=0;s<f.length;s++){x=c*f[s];p=Math.floor(v/x)*x;a=Math.ceil(u/x)*x;q=(a-p)/x;var d=l.height_/q;if(d>h){break}}if(d>h){break}}var w=[];var r;var o=[];if(l.attr_("labelsKMB")){r=1000;o=["K","M","B","T"]}if(l.attr_("labelsKMG2")){if(r){l.warn("Setting both labelsKMB and labelsKMG2. Pick one!")}r=1024;o=["k","M","G","T"]}for(var t=0;t<q;t++){var g=p+t*x;var b=Math.abs(g);var e=l.round_(g,2);if(o.length){var m=r*r*r*r;for(var s=3;s>=0;s--,m/=r){if(b>=m){e=l.round_(g/m,1)+o[s];break}}}w.push({label:e,v:g})}return w};Dygraph.prototype.addYTicks_=function(c,b){var a=Dygraph.numericTicks(c,b,this);this.layout_.updateOptions({yAxis:[c,b],yTicks:a})};Dygraph.prototype.extremeValues_=function(d){var h=null,f=null;var b=this.attr_("errorBars")||this.attr_("customBars");if(b){for(var c=0;c<d.length;c++){var g=d[c][1][0];if(!g){continue}var a=g-d[c][1][1];var e=g+d[c][1][2];if(a>g){a=g}if(e<g){e=g}if(f==null||e>f){f=e}if(h==null||a<h){h=a}}}else{for(var c=0;c<d.length;c++){var g=d[c][1];if(g===null||isNaN(g)){continue}if(f==null||g>f){f=g}if(h==null||g<h){h=g}}}return[h,f]};Dygraph.prototype.drawGraph_=function(z){var v=null,u=null;this.layout_.removeAllDatasets();this.setColors_();this.attrs_.pointSize=0.5*this.attr_("highlightCircleSize");var c=[];var f=[];for(var t=1;t<z[0].length;t++){if(!this.visibility()[t-1]){continue}var e=[];for(var r=0;r<z.length;r++){var w=z[r][0];e[r]=[w,z[r][t]]}e=this.rollingAverage(e,this.rollPeriod_);var h=this.attr_("errorBars")||this.attr_("customBars");if(this.dateWindow_){var A=this.dateWindow_[0];var d=this.dateWindow_[1];var m=[];for(var q=0;q<e.length;q++){if(e[q][0]>=A&&e[q][0]<=d){m.push(e[q])}}e=m}var a=this.extremeValues_(e);var o=a[0];var n=a[1];if(!v||o<v){v=o}if(!u||n>u){u=n}if(h){var g=[];for(var r=0;r<e.length;r++){g[r]=[e[r][0],e[r][1][0],e[r][1][1],e[r][1][2]]}this.layout_.addDataset(this.attr_("labels")[t],g)}else{if(this.attr_("stackedGraph")){var g=[];var p=e.length;var x;for(var r=0;r<p;r++){if(c[e[r][0]]===undefined){c[e[r][0]]=0}x=e[r][1];c[e[r][0]]+=x;g[r]=[e[r][0],c[e[r][0]]];if(!u||c[e[r][0]]>u){u=c[e[r][0]]}}f.push([this.attr_("labels")[t],g])}else{this.layout_.addDataset(this.attr_("labels")[t],e)}}}if(f.length>0){for(var t=(f.length-1);t>=0;t--){this.layout_.addDataset(f[t][0],f[t][1])}}if(this.valueRange_!=null){this.addYTicks_(this.valueRange_[0],this.valueRange_[1])}else{if(this.attr_("includeZero")&&v>0){v=0}var s=u-v;if(s==0){s=u}var b=u+0.1*s;var y=v-0.1*s;if(y<0&&v>=0){y=0}if(b>0&&u<=0){b=0}if(this.attr_("includeZero")){if(u<0){b=0}if(v>0){y=0}}this.addYTicks_(y,b)}this.addXTicks_();this.layout_.updateOptions({dateWindow:this.dateWindow_});this.layout_.evaluateWithError();this.plotter_.clear();this.plotter_.render();this.canvas_.getContext("2d").clearRect(0,0,this.canvas_.width,this.canvas_.height);if(this.attr_("drawCallback")!==null){this.attr_("drawCallback")(this)}};Dygraph.prototype.rollingAverage=function(m,d){if(m.length<2){return m}var d=Math.min(d,m.length-1);var b=[];var s=this.attr_("sigma");if(this.fractions_){var k=0;var h=0;var e=100;for(var x=0;x<m.length;x++){k+=m[x][1][0];h+=m[x][1][1];if(x-d>=0){k-=m[x-d][1][0];h-=m[x-d][1][1]}var B=m[x][0];var v=h?k/h:0;if(this.attr_("errorBars")){if(this.wilsonInterval_){if(h){var t=v<0?0:v,u=h;var A=s*Math.sqrt(t*(1-t)/u+s*s/(4*u*u));var a=1+s*s/h;var F=(t+s*s/(2*h)-A)/a;var o=(t+s*s/(2*h)+A)/a;b[x]=[B,[t*e,(t-F)*e,(o-t)*e]]}else{b[x]=[B,[0,0,0]]}}else{var z=h?s*Math.sqrt(v*(1-v)/h):1;b[x]=[B,[e*v,e*z,e*z]]}}else{b[x]=[B,e*v]}}}else{if(this.attr_("customBars")){var F=0;var C=0;var o=0;var g=0;for(var x=0;x<m.length;x++){var E=m[x][1];var l=E[1];b[x]=[m[x][0],[l,l-E[0],E[2]-l]];if(l!=null&&!isNaN(l)){F+=E[0];C+=l;o+=E[2];g+=1}if(x-d>=0){var r=m[x-d];if(r[1][1]!=null&&!isNaN(r[1][1])){F-=r[1][0];C-=r[1][1];o-=r[1][2];g-=1}}b[x]=[m[x][0],[1*C/g,1*(C-F)/g,1*(o-C)/g]]}}else{var q=Math.min(d-1,m.length-2);if(!this.attr_("errorBars")){if(d==1){return m}for(var x=0;x<m.length;x++){var c=0;var D=0;for(var w=Math.max(0,x-d+1);w<x+1;w++){var l=m[w][1];if(l==null||isNaN(l)){continue}D++;c+=m[w][1]}if(D){b[x]=[m[x][0],c/D]}else{b[x]=[m[x][0],null]}}}else{for(var x=0;x<m.length;x++){var c=0;var f=0;var D=0;for(var w=Math.max(0,x-d+1);w<x+1;w++){var l=m[w][1][0];if(l==null||isNaN(l)){continue}D++;c+=m[w][1][0];f+=Math.pow(m[w][1][1],2)}if(D){var z=Math.sqrt(f)/D;b[x]=[m[x][0],[c/D,s*z,s*z]]}else{b[x]=[m[x][0],[null,null,null]]}}}}}return b};Dygraph.dateParser=function(b,a){var c;var e;if(b.length==10&&b.search("-")!=-1){c=b.replace("-","/","g");while(c.search("-")!=-1){c=c.replace("-","/")}e=Date.parse(c)}else{if(b.length==8){c=b.substr(0,4)+"/"+b.substr(4,2)+"/"+b.substr(6,2);e=Date.parse(c)}else{e=Date.parse(b)}}if(!e||isNaN(e)){a.error("Couldn't parse "+b+" as a date")}return e};Dygraph.prototype.detectTypeFromString_=function(b){var a=false;if(b.indexOf("-")>=0||b.indexOf("/")>=0||isNaN(parseFloat(b))){a=true}else{if(b.length==8&&b>"19700101"&&b<"20371231"){a=true}}if(a){this.attrs_.xValueFormatter=Dygraph.dateString_;this.attrs_.xValueParser=Dygraph.dateParser;this.attrs_.xTicker=Dygraph.dateTicker}else{this.attrs_.xValueFormatter=function(c){return c};this.attrs_.xValueParser=function(c){return parseFloat(c)};this.attrs_.xTicker=Dygraph.numericTicks}};Dygraph.prototype.parseCSV_=function(h){var m=[];var q=h.split("\n");var b=this.attr_("delimiter");if(q[0].indexOf(b)==-1&&q[0].indexOf("\t")>=0){b="\t"}var a=0;if(this.labelsFromCSV_){a=1;this.attrs_.labels=q[0].split(b)}var c;var o=false;var d=this.attr_("labels").length;var l=false;for(var g=a;g<q.length;g++){var p=q[g];if(p.length==0){continue}if(p[0]=="#"){continue}var f=p.split(b);if(f.length<2){continue}var k=[];if(!o){this.detectTypeFromString_(f[0]);c=this.attr_("xValueParser");o=true}k[0]=c(f[0],this);if(this.fractions_){for(var e=1;e<f.length;e++){var n=f[e].split("/");k[e]=[parseFloat(n[0]),parseFloat(n[1])]}}else{if(this.attr_("errorBars")){for(var e=1;e<f.length;e+=2){k[(e+1)/2]=[parseFloat(f[e]),parseFloat(f[e+1])]}}else{if(this.attr_("customBars")){for(var e=1;e<f.length;e++){var n=f[e].split(";");k[e]=[parseFloat(n[0]),parseFloat(n[1]),parseFloat(n[2])]}}else{for(var e=1;e<f.length;e++){k[e]=parseFloat(f[e])}}}}if(m.length>0&&k[0]<m[m.length-1][0]){l=true}m.push(k);if(k.length!=d){this.error("Number of columns in line "+g+" ("+k.length+") does not agree with number of labels ("+d+") "+p)}}if(l){this.warn("CSV is out of order; order it correctly to speed loading.");m.sort(function(j,i){return j[0]-i[0]})}return m};Dygraph.prototype.parseArray_=function(b){if(b.length==0){this.error("Can't plot empty data set");return null}if(b[0].length==0){this.error("Data set cannot contain an empty row");return null}if(this.attr_("labels")==null){this.warn("Using default labels. Set labels explicitly via 'labels' in the options parameter");this.attrs_.labels=["X"];for(var a=1;a<b[0].length;a++){this.attrs_.labels.push("Y"+a)}}if(Dygraph.isDateLike(b[0][0])){this.attrs_.xValueFormatter=Dygraph.dateString_;this.attrs_.xTicker=Dygraph.dateTicker;var c=Dygraph.clone(b);for(var a=0;a<b.length;a++){if(c[a].length==0){this.error("Row "<<(1+a)<<" of data is empty");return null}if(c[a][0]==null||typeof(c[a][0].getTime)!="function"){this.error("x value in row "<<(1+a)<<" is not a Date");return null}c[a][0]=c[a][0].getTime()}return c}else{this.attrs_.xValueFormatter=function(d){return d};this.attrs_.xTicker=Dygraph.numericTicks;return b}};Dygraph.prototype.parseDataTable_=function(c){var h=c.getNumberOfColumns();var l=c.getNumberOfRows();var e=[];for(var d=0;d<h;d++){e.push(c.getColumnLabel(d));if(d!=0&&this.attr_("errorBars")){d+=1}}this.attrs_.labels=e;h=e.length;var a=c.getColumnType(0);if(a=="date"||a=="datetime"){this.attrs_.xValueFormatter=Dygraph.dateString_;this.attrs_.xValueParser=Dygraph.dateParser;this.attrs_.xTicker=Dygraph.dateTicker}else{if(a=="number"){this.attrs_.xValueFormatter=function(i){return i};this.attrs_.xValueParser=function(i){return parseFloat(i)};this.attrs_.xTicker=Dygraph.numericTicks}else{this.error("only 'date', 'datetime' and 'number' types are supported for column 1 of DataTable input (Got '"+a+"')");return null}}var g=[];var f=false;for(var d=0;d<l;d++){var k=[];if(typeof(c.getValue(d,0))==="undefined"||c.getValue(d,0)===null){this.warning("Ignoring row "+d+" of DataTable because of undefined or null first column.");continue}if(a=="date"||a=="datetime"){k.push(c.getValue(d,0).getTime())}else{k.push(c.getValue(d,0))}if(!this.attr_("errorBars")){for(var b=1;b<h;b++){k.push(c.getValue(d,b))}}else{for(var b=0;b<h-1;b++){k.push([c.getValue(d,1+2*b),c.getValue(d,2+2*b)])}}if(g.length>0&&k[0]<g[g.length-1][0]){f=true}g.push(k)}if(f){this.warn("DataTable is out of order; order it correctly to speed loading.");g.sort(function(j,i){return j[0]-i[0]})}return g};Dygraph.update=function(b,c){if(typeof(c)!="undefined"&&c!==null){for(var a in c){if(c.hasOwnProperty(a)){b[a]=c[a]}}}return b};Dygraph.isArrayLike=function(b){var a=typeof(b);if((a!="object"&&!(a=="function"&&typeof(b.item)=="function"))||b===null||typeof(b.length)!="number"||b.nodeType===3){return false}return true};Dygraph.isDateLike=function(a){if(typeof(a)!="object"||a===null||typeof(a.getTime)!="function"){return false}return true};Dygraph.clone=function(c){var b=[];for(var a=0;a<c.length;a++){if(Dygraph.isArrayLike(c[a])){b.push(Dygraph.clone(c[a]))}else{b.push(c[a])}}return b};Dygraph.prototype.start_=function(){if(typeof this.file_=="function"){this.loadedEvent_(this.file_())}else{if(Dygraph.isArrayLike(this.file_)){this.rawData_=this.parseArray_(this.file_);this.drawGraph_(this.rawData_)}else{if(typeof this.file_=="object"&&typeof this.file_.getColumnRange=="function"){this.rawData_=this.parseDataTable_(this.file_);this.drawGraph_(this.rawData_)}else{if(typeof this.file_=="string"){if(this.file_.indexOf("\n")>=0){this.loadedEvent_(this.file_)}else{var b=new XMLHttpRequest();var a=this;b.onreadystatechange=function(){if(b.readyState==4){if(b.status==200){a.loadedEvent_(b.responseText)}}};b.open("GET",this.file_,true);b.send(null)}}else{this.error("Unknown data format: "+(typeof this.file_))}}}}};Dygraph.prototype.updateOptions=function(a){if(a.rollPeriod){this.rollPeriod_=a.rollPeriod}if(a.dateWindow){this.dateWindow_=a.dateWindow}if(a.valueRange){this.valueRange_=a.valueRange}Dygraph.update(this.user_attrs_,a);this.labelsFromCSV_=(this.attr_("labels")==null);this.layout_.updateOptions({errorBars:this.attr_("errorBars")});if(a.file&&a.file!=this.file_){this.file_=a.file;this.start_()}else{this.drawGraph_(this.rawData_)}};Dygraph.prototype.resize=function(b,a){if((b===null)!=(a===null)){this.warn("Dygraph.resize() should be called with zero parameters or two non-NULL parameters. Pretending it was zero.");b=a=null}this.maindiv_.innerHTML="";this.attrs_.labelsDiv=null;if(b){this.maindiv_.style.width=b+"px";this.maindiv_.style.height=a+"px";this.width_=b;this.height_=a}else{this.width_=this.maindiv_.offsetWidth;this.height_=this.maindiv_.offsetHeight}this.createInterface_();this.drawGraph_(this.rawData_)};Dygraph.prototype.adjustRoll=function(a){this.rollPeriod_=a;this.drawGraph_(this.rawData_)};Dygraph.prototype.visibility=function(){if(!this.attr_("visibility")){this.attrs_.visibility=[]}while(this.attr_("visibility").length<this.rawData_[0].length-1){this.attr_("visibility").push(true)}return this.attr_("visibility")};Dygraph.prototype.setVisibility=function(b,c){var a=this.visibility();if(b<0&&b>=a.length){this.warn("invalid series number in setVisibility: "+b)}else{a[b]=c;this.drawGraph_(this.rawData_)}};Dygraph.createCanvas=function(){var a=document.createElement("canvas");isIE=(/MSIE/.test(navigator.userAgent)&&!window.opera);if(isIE){a=G_vmlCanvasManager.initElement(a)}return a};Dygraph.GVizChart=function(a){this.container=a};Dygraph.GVizChart.prototype.draw=function(b,a){this.container.innerHTML="";this.date_graph=new Dygraph(this.container,b,a)};DateGraph=Dygraph;function RGBColor(g){this.ok=false;if(g.charAt(0)=="#"){g=g.substr(1,6)}g=g.replace(/ /g,"");g=g.toLowerCase();var a={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var c in a){if(g==c){g=a[c]}}var h=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(i){return[parseInt(i[1]),parseInt(i[2]),parseInt(i[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(i){return[parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(i){return[parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16),parseInt(i[3]+i[3],16)]}}];for(var b=0;b<h.length;b++){var e=h[b].re;var d=h[b].process;var f=e.exec(g);if(f){channels=d(f);this.r=channels[0];this.g=channels[1];this.b=channels[2];this.ok=true}}this.r=(this.r<0||isNaN(this.r))?0:((this.r>255)?255:this.r);this.g=(this.g<0||isNaN(this.g))?0:((this.g>255)?255:this.g);this.b=(this.b<0||isNaN(this.b))?0:((this.b>255)?255:this.b);this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"};this.toHex=function(){var k=this.r.toString(16);var j=this.g.toString(16);var i=this.b.toString(16);if(k.length==1){k="0"+k}if(j.length==1){j="0"+j}if(i.length==1){i="0"+i}return"#"+k+j+i}}Date.ext={};Date.ext.util={};Date.ext.util.xPad=function(a,c,b){if(typeof(b)=="undefined"){b=10}for(;parseInt(a,10)<b&&b>1;b/=10){a=c.toString()+a}return a.toString()};Date.prototype.locale="en-GB";if(document.getElementsByTagName("html")&&document.getElementsByTagName("html")[0].lang){Date.prototype.locale=document.getElementsByTagName("html")[0].lang}Date.ext.locales={};Date.ext.locales.en={a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a %d %b %Y %T %Z",p:["AM","PM"],P:["am","pm"],x:"%d/%m/%y",X:"%T"};Date.ext.locales["en-US"]=Date.ext.locales.en;Date.ext.locales["en-US"].c="%a %d %b %Y %r %Z";Date.ext.locales["en-US"].x="%D";Date.ext.locales["en-US"].X="%r";Date.ext.locales["en-GB"]=Date.ext.locales.en;Date.ext.locales["en-AU"]=Date.ext.locales["en-GB"];Date.ext.formats={a:function(a){return Date.ext.locales[a.locale].a[a.getDay()]},A:function(a){return Date.ext.locales[a.locale].A[a.getDay()]},b:function(a){return Date.ext.locales[a.locale].b[a.getMonth()]},B:function(a){return Date.ext.locales[a.locale].B[a.getMonth()]},c:"toLocaleString",C:function(a){return Date.ext.util.xPad(parseInt(a.getFullYear()/100,10),0)},d:["getDate","0"],e:["getDate"," "],g:function(a){return Date.ext.util.xPad(parseInt(Date.ext.util.G(a)/100,10),0)},G:function(c){var e=c.getFullYear();var b=parseInt(Date.ext.formats.V(c),10);var a=parseInt(Date.ext.formats.W(c),10);if(a>b){e++}else{if(a===0&&b>=52){e--}}return e},H:["getHours","0"],I:function(b){var a=b.getHours()%12;return Date.ext.util.xPad(a===0?12:a,0)},j:function(c){var a=c-new Date(""+c.getFullYear()+"/1/1 GMT");a+=c.getTimezoneOffset()*60000;var b=parseInt(a/60000/60/24,10)+1;return Date.ext.util.xPad(b,0,100)},m:function(a){return Date.ext.util.xPad(a.getMonth()+1,0)},M:["getMinutes","0"],p:function(a){return Date.ext.locales[a.locale].p[a.getHours()>=12?1:0]},P:function(a){return Date.ext.locales[a.locale].P[a.getHours()>=12?1:0]},S:["getSeconds","0"],u:function(a){var b=a.getDay();return b===0?7:b},U:function(e){var a=parseInt(Date.ext.formats.j(e),10);var c=6-e.getDay();var b=parseInt((a+c)/7,10);return Date.ext.util.xPad(b,0)},V:function(e){var c=parseInt(Date.ext.formats.W(e),10);var a=(new Date(""+e.getFullYear()+"/1/1")).getDay();var b=c+(a>4||a<=1?0:1);if(b==53&&(new Date(""+e.getFullYear()+"/12/31")).getDay()<4){b=1}else{if(b===0){b=Date.ext.formats.V(new Date(""+(e.getFullYear()-1)+"/12/31"))}}return Date.ext.util.xPad(b,0)},w:"getDay",W:function(e){var a=parseInt(Date.ext.formats.j(e),10);var c=7-Date.ext.formats.u(e);var b=parseInt((a+c)/7,10);return Date.ext.util.xPad(b,0,10)},y:function(a){return Date.ext.util.xPad(a.getFullYear()%100,0)},Y:"getFullYear",z:function(c){var b=c.getTimezoneOffset();var a=Date.ext.util.xPad(parseInt(Math.abs(b/60),10),0);var e=Date.ext.util.xPad(b%60,0);return(b>0?"-":"+")+a+e},Z:function(a){return a.toString().replace(/^.*\(([^)]+)\)$/,"$1")},"%":function(a){return"%"}};Date.ext.aggregates={c:"locale",D:"%m/%d/%y",h:"%b",n:"\n",r:"%I:%M:%S %p",R:"%H:%M",t:"\t",T:"%H:%M:%S",x:"locale",X:"locale"};Date.ext.aggregates.z=Date.ext.formats.z(new Date());Date.ext.aggregates.Z=Date.ext.formats.Z(new Date());Date.ext.unsupported={};Date.prototype.strftime=function(a){if(!(this.locale in Date.ext.locales)){if(this.locale.replace(/-[a-zA-Z]+$/,"") in Date.ext.locales){this.locale=this.locale.replace(/-[a-zA-Z]+$/,"")}else{this.locale="en-GB"}}var c=this;while(a.match(/%[cDhnrRtTxXzZ]/)){a=a.replace(/%([cDhnrRtTxXzZ])/g,function(e,d){var g=Date.ext.aggregates[d];return(g=="locale"?Date.ext.locales[c.locale][d]:g)})}var b=a.replace(/%([aAbBCdegGHIjmMpPSuUVwWyY%])/g,function(e,d){var g=Date.ext.formats[d];if(typeof(g)=="string"){return c[g]()}else{if(typeof(g)=="function"){return g.call(c,c)}else{if(typeof(g)=="object"&&typeof(g[0])=="string"){return Date.ext.util.xPad(c[g[0]](),g[1])}else{return d}}}});c=null;return b}; | 8514 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8514/986a502699fd8068c3b90b46dabafe2d29c45a46/dygraph-combined.js/clean/dygraph-combined.js |
p?setTimeout(arguments.callee,0):z()}})()}o(z)}}var t=window.DomReady={},B=navigator.userAgent.toLowerCase(),y={version:(B.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(B),opera:/opera/.test(B),msie:/msie/.test(B)&&!/opera/.test(B),mozilla:/mozilla/.test(B)&&!/(compatible|webkit)/.test(B)},C=false,A=false,E=[];t.ready=function(p){v();A?p.call(window,[]):E.push(function(){return p.call(window,[])})};v()})();(function(z,o){function v(j,n){for(var u=[],x=0;x<j.length;x++)u.push(j[x]);for(x=0;x<u.length;x++)n(u[x])}function t(){v([p,d],function(j){v(o.getElementsByTagName(j),function(n){var u=true;if(n.canPlayType)if(n.src&&n.canPlayType(B(j,n.src)))u=false;else v(n.getElementsByTagName("source"),function(x){if(n.canPlayType(B(j,x.src,x.type)))u=false});u&&t.createFallback(j,n)})})}function B(j,n,u){return u||k[j][n.split(".").slice(-1)[0]]||F[j]}function y(j,n){var u=j.getAttribute(n);return u==true|| | p?setTimeout(arguments.callee,0):z()}})()}o(z)}}var t=window.DomReady={},B=navigator.userAgent.toLowerCase(),y={version:(B.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(B),opera:/opera/.test(B),msie:/msie/.test(B)&&!/opera/.test(B),mozilla:/mozilla/.test(B)&&!/(compatible|webkit)/.test(B)},C=false,A=false,E=[];t.ready=function(p){v();A?p.call(window,[]):E.push(function(){return p.call(window,[])})};v()})();(function(z,o){function v(j,n){for(var u=[],x=0;x<j.length;x++)u.push(j[x]);for(x=0;x<u.length;x++)n(u[x])}function t(){v([p,d],function(j){v(o.getElementsByTagName(j),function(n){var u=true,x=navigator.userAgent.toLowerCase().search("android")>-1;if(n.canPlayType)if(n.src){var H=B(j,n.src);if(n.canPlayType(H)||x&&H.search("mp4")>-1)u=false}else v(n.getElementsByTagName("source"),function(G){G=B(j,G.src,G.type);if(n.canPlayType(G)||x&&G.search("mp4")>-1)u=false});if(u)t.createFallback(j,n);else x&& | p?setTimeout(arguments.callee,0):z()}})()}o(z)}}var t=window.DomReady={},B=navigator.userAgent.toLowerCase(),y={version:(B.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(B),opera:/opera/.test(B),msie:/msie/.test(B)&&!/opera/.test(B),mozilla:/mozilla/.test(B)&&!/(compatible|webkit)/.test(B)},C=false,A=false,E=[];t.ready=function(p){v();A?p.call(window,[]):E.push(function(){return p.call(window,[])})};v()})();(function(z,o){function v(j,n){for(var u=[],x=0;x<j.length;x++)u.push(j[x]);for(x=0;x<u.length;x++)n(u[x])}function t(){v([p,d],function(j){v(o.getElementsByTagName(j),function(n){var u=true;if(n.canPlayType)if(n.src&&n.canPlayType(B(j,n.src)))u=false;else v(n.getElementsByTagName("source"),function(x){if(n.canPlayType(B(j,x.src,x.type)))u=false});u&&t.createFallback(j,n)})})}function B(j,n,u){return u||k[j][n.split(".").slice(-1)[0]]||F[j]}function y(j,n){var u=j.getAttribute(n);return u==true|| | 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 |
flashembed(this,f,e)});return f.api===false?this:a}})();(function(A,o){function v(j,n){for(var t=[],w=0;w<j.length;w++)t.push(j[w]);for(w=0;w<t.length;w++)n(t[w])}function s(){v([x,f],function(j){v(o.getElementsByTagName(j),function(n){var t=true;if(n.canPlayType)if(n.src&&n.canPlayType(F(j,n.src)))t=false;else v(n.getElementsByTagName("source"),function(w){if(n.canPlayType(F(j,w.src,w.type)))t=false});t&&s.createFallback(j,n)})})}function F(j,n,t){return t||k[j][n.split(".").slice(-1)[0]]||C[j]}function y(j,n){var t=j.getAttribute(n);return t==true|| | flashembed(this,f,e)});return f.api===false?this:a}})();(function(A,o){function v(j,n){for(var t=[],w=0;w<j.length;w++)t.push(j[w]);for(w=0;w<t.length;w++)n(t[w])}function s(){v([x,f],function(j){v(o.getElementsByTagName(j),function(n){var t=true;if(n.canPlayType)if(n.src&&n.canPlayType(F(j,n.src)))t=false;else v(n.getElementsByTagName("source"),function(w){if(n.canPlayType(F(j,w.src,w.type)))t=false});if(t)s.createFallback(j,n);else navigator.userAgent.search("android")>-1&&n.addEventListener("click",function(){n.play()},false)})})}function F(j,n,t){return t|| | flashembed(this,f,e)});return f.api===false?this:a}})();(function(A,o){function v(j,n){for(var t=[],w=0;w<j.length;w++)t.push(j[w]);for(w=0;w<t.length;w++)n(t[w])}function s(){v([x,f],function(j){v(o.getElementsByTagName(j),function(n){var t=true;if(n.canPlayType)if(n.src&&n.canPlayType(F(j,n.src)))t=false;else v(n.getElementsByTagName("source"),function(w){if(n.canPlayType(F(j,w.src,w.type)))t=false});t&&s.createFallback(j,n)})})}function F(j,n,t){return t||k[j][n.split(".").slice(-1)[0]]||C[j]}function y(j,n){var t=j.getAttribute(n);return t==true|| | 2604 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2604/7afbf9795e0d90b71fcbf9a5261296dc645382ce/jquery.html5media.min.js/buggy/conference/static/conference/html5media-1.1.2/html5media/jquery.html5media.min.js |
arguments[o];j=j===false?0:j===true?1:j.toDateString?j.toDateString():j;f.args[o-2]=j}f.feedback=true;A[l]=Z(f,l);B()}function H(d,c,f){var l=function(){var j=i.getElement(d);if(j){if(f)j.timer=setTimeout(j.tm,c);else{j.timer=null;j.tm=null}j.onclick&&j.onclick()}},o=i.getElement(d);o.timer=setTimeout(l,c);o.tm=l}function V(d,c){setTimeout(function(){if(R[d]===true)c();else R[d]=c},20)}function K(d){if(R[d]!==true){typeof R[d]!=="undefined"&&R[d]();R[d]=true}}function G(d,c,f){function l(){var s= | if(!a)a=window.event;if(a){for(var b=a=h.target(a);b&&b!=A;)b=b.parentNode;return b==A?h.isIElt9?a:null:A}else return A}function V(a){var b=Z(a);if(b&&!W){if(!a)a=window.event;W=true;if(h.isIElt9){h.firedTarget=a.srcElement||b;b.fireEvent("onmousemove",a);h.firedTarget=null}else h.condCall(b,"onmousemove",a);return W=false}else return true}function O(a){var b=Z(a);h.capture(null);if(b){if(!a)a=window.event;if(h.isIElt9){h.firedTarget=a.srcElement||b;b.fireEvent("onmouseup",a);h.firedTarget=null}else h.condCall(b, | arguments[o];j=j===false?0:j===true?1:j.toDateString?j.toDateString():j;f.args[o-2]=j}f.feedback=true;A[l]=Z(f,l);B()}function H(d,c,f){var l=function(){var j=i.getElement(d);if(j){if(f)j.timer=setTimeout(j.tm,c);else{j.timer=null;j.tm=null}j.onclick&&j.onclick()}},o=i.getElement(d);o.timer=setTimeout(l,c);o.tm=l}function V(d,c){setTimeout(function(){if(R[d]===true)c();else R[d]=c},20)}function K(d){if(R[d]!==true){typeof R[d]!=="undefined"&&R[d]();R[d]=true}}function G(d,c,f){function l(){var s= | 5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/3b5851a0b7bf3537f85cb0ca962bb299b0ff8b6f/Wt.min.js/clean/src/web/skeleton/Wt.min.js |
(function(b){var c=b.each;function a(F,E,I){var e,J,B,n;r();n=E.getParent(I.getStart(),"th,td");if(n){J=D(n);B=G();n=v(J.x,J.y)}function w(L,K){L=L.cloneNode(K);L.removeAttribute("id");return L}function r(){var K=0;e=[];c(["thead","tbody","tfoot"],function(L){var M=E.select(L+" tr",F);c(M,function(N,O){O+=K;c(E.select("td,th",N),function(U,P){var Q,R,S,T;if(e[O]){while(e[O][P]){P++}}S=g(U,"rowspan");T=g(U,"colspan");for(R=O;R<O+S;R++){if(!e[R]){e[R]=[]}for(Q=P;Q<P+T;Q++){e[R][Q]={part:L,real:R==O&&Q==P,elm:U,rowspan:S,colspan:T}}}})});K+=M.length})}function v(K,M){var L;L=e[M];if(L){return L[K]}}function g(L,K){return parseInt(L.getAttribute(K)||1)}function h(K){return E.hasClass(K.elm,"mceSelected")||K==n}function j(){var K=[];c(F.rows,function(L){c(L.cells,function(M){if(E.hasClass(M,"mceSelected")||M==n.elm){K.push(L);return false}})});return K}function q(){var K=E.createRng();K.setStartAfter(F);K.setEndAfter(F);I.setRng(K);E.remove(F)}function d(K){var L;b.walk(K,function(N){var M;if(N.nodeType==3){c(E.getParents(N.parentNode,null,K).reverse(),function(O){O=w(O,false);if(!L){L=M=O}else{if(M){M.appendChild(O)}}M=O});if(M){M.innerHTML=b.isIE?" ":'<br _mce_bogus="1" />'}return false}},"childNodes");K=w(K,false);K.rowSpan=K.colSpan=1;if(L){K.appendChild(L)}else{if(!b.isIE){K.innerHTML='<br _mce_bogus="1" />'}}return K}function p(){var K=E.createRng();c(E.select("tr",F),function(L){if(L.cells.length==0){E.remove(L)}});if(E.select("tr",F).length==0){K.setStartAfter(F);K.setEndAfter(F);I.setRng(K);E.remove(F);return}c(E.select("thead,tbody,tfoot",F),function(L){if(L.rows.length==0){E.remove(L)}});r();row=e[Math.min(e.length-1,J.y)];if(row){I.select(row[Math.min(row.length-1,J.x)].elm,true);I.collapse(true)}}function s(Q,O,S,P){var N,L,K,M,R;N=e[O][Q].elm.parentNode;for(K=1;K<=S;K++){N=E.getNext(N,"tr");if(N){for(L=Q;L>=0;L--){R=e[O+K][L].elm;if(R.parentNode==N){for(M=1;M<=P;M++){E.insertAfter(d(R),R)}break}}if(L==-1){for(M=1;M<=P;M++){N.insertBefore(d(N.cells[0]),N.cells[0])}}}}}function A(){c(e,function(K,L){c(K,function(N,M){var Q,P,R,O;if(h(N)){N=N.elm;Q=g(N,"colspan");P=g(N,"rowspan");if(Q>1||P>1){N.colSpan=N.rowSpan=1;for(O=0;O<Q-1;O++){E.insertAfter(d(N),N)}s(M,L,P-1,Q)}}})})}function o(S,P,V){var N,M,U,T,R,O,Q,K,S,L;if(S){pos=D(S);N=pos.x;M=pos.y;U=N+(P-1);T=M+(V-1)}else{N=J.x;M=J.y;U=B.x;T=B.y}Q=v(N,M);K=v(U,T);if(Q&&K&&Q.part==K.part){A();r();Q=v(N,M).elm;Q.colSpan=(U-N)+1;Q.rowSpan=(T-M)+1;for(O=M;O<=T;O++){for(R=N;R<=U;R++){S=e[O][R].elm;if(S!=Q){L=b.grep(S.childNodes);c(L,function(X,W){if(X.nodeName!="BR"||W!=L.length-1){Q.appendChild(X)}});E.remove(S)}}}p()}}function k(N){var K,P,M,O,Q,R,L,S;c(e,function(T,U){c(T,function(W,V){if(h(W)){W=W.elm;Q=W.parentNode;R=w(Q,false);K=U;if(N){return false}}});if(N){return !K}});for(O=0;O<e[0].length;O++){P=e[K][O].elm;if(P!=M){if(!N){rowSpan=g(P,"rowspan");if(rowSpan>1){P.rowSpan=rowSpan+1;continue}}else{if(K>0&&e[K-1][O]){S=e[K-1][O].elm;rowSpan=g(S,"rowspan");if(rowSpan>1){S.rowSpan=rowSpan+1;continue}}}L=d(P);L.colSpan=P.colSpan;R.appendChild(L);M=P}}if(R.hasChildNodes()){if(!N){E.insertAfter(R,Q)}else{Q.parentNode.insertBefore(R,Q)}}}function f(L){var M,K;c(e,function(N,O){c(N,function(Q,P){if(h(Q)){M=P;if(L){return false}}});if(L){return !M}});c(e,function(Q,R){var N=Q[M].elm,O,P;if(N!=K){P=g(N,"colspan");O=g(N,"rowspan");if(P==1){if(!L){E.insertAfter(d(N),N);s(M,R,O-1,P)}else{N.parentNode.insertBefore(d(N),N);s(M,R,O-1,P)}}else{N.colSpan++}K=N}})}function m(){var K=[];c(e,function(L,M){c(L,function(O,N){if(h(O)&&b.inArray(K,N)===-1){c(e,function(R){var P=R[N].elm,Q;Q=g(P,"colspan");if(Q>1){P.colSpan=Q-1}else{E.remove(P)}});K.push(N)}})});p()}function l(){var L;function K(O){var N,P,M;N=E.getNext(O,"tr");c(O.cells,function(Q){var R=g(Q,"rowspan");if(R>1){Q.rowSpan=R-1;P=D(Q);s(P.x,P.y,1,1)}});P=D(O.cells[0]);c(e[P.y],function(Q){var R;Q=Q.elm;if(Q!=M){R=g(Q,"rowspan");if(R<=1){E.remove(Q)}else{Q.rowSpan=R-1}M=Q}})}L=j();c(L.reverse(),function(M){K(M)});p()}function C(){var K=j();E.remove(K);p();return K}function H(){var K=j();c(K,function(M,L){K[L]=w(M,true)});return K}function z(M,L){var N=j(),K=N[L?0:N.length-1],O=K.cells.length;c(e,function(Q){var P;O=0;c(Q,function(S,R){if(S.real){O+=S.colspan}if(S.elm.parentNode==K){P=1}});if(P){return false}});if(!L){M.reverse()}c(M,function(R){var Q=R.cells.length,P;for(i=0;i<Q;i++){P=R.cells[i];P.colSpan=P.rowSpan=1}for(i=Q;i<O;i++){R.appendChild(d(R.cells[Q-1]))}for(i=O;i<Q;i++){E.remove(R.cells[i])}if(L){K.parentNode.insertBefore(R,K)}else{E.insertAfter(R,K)}})}function D(K){var L;c(e,function(M,N){c(M,function(P,O){if(P.elm==K){L={x:O,y:N};return false}});return !L});return L}function u(K){J=D(K)}function G(){var M,L,K;L=K=0;c(e,function(N,O){c(N,function(Q,P){var S,R;if(h(Q)){Q=e[O][P];if(P>L){L=P}if(O>K){K=O}if(Q.real){S=Q.colspan-1;R=Q.rowspan-1;if(S){if(P+S>L){L=P+S}}if(R){if(O+R>K){K=O+R}}}}})});return{x:L,y:K}}function t(Q){var N,M,S,R,L,K,O,P;B=D(Q);if(J&&B){N=Math.min(J.x,B.x);M=Math.min(J.y,B.y);S=Math.max(J.x,B.x);R=Math.max(J.y,B.y);L=S;K=R;for(y=M;y<=K;y++){Q=e[y][N];if(!Q.real){if(N-(Q.colspan-1)<N){N-=Q.colspan-1}}}for(x=N;x<=L;x++){Q=e[M][x];if(!Q.real){if(M-(Q.rowspan-1)<M){M-=Q.rowspan-1}}}for(y=M;y<=R;y++){for(x=N;x<=S;x++){Q=e[y][x];if(Q.real){O=Q.colspan-1;P=Q.rowspan-1;if(O){if(x+O>L){L=x+O}}if(P){if(y+P>K){K=y+P}}}}}E.removeClass(E.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=M;y<=K;y++){for(x=N;x<=L;x++){E.addClass(e[y][x].elm,"mceSelected")}}}}b.extend(this,{deleteTable:q,split:A,merge:o,insertRow:k,insertCol:f,deleteCols:m,deleteRows:l,cutRows:C,copyRows:H,pasteRows:z,getPos:D,setStartCell:u,setEndCell:t})}b.create("tinymce.plugins.TablePlugin",{init:function(e,f){var d,j;function h(m){var l=e.selection,k=e.dom.getParent(m||l.getNode(),"table");if(k){return new a(k,e.dom,l)}}function g(){e.getBody().style.webkitUserSelect="";e.dom.removeClass(e.dom.select("td.mceSelected,th.mceSelected"),"mceSelected")}c([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(k){e.addButton(k[0],{title:k[1],cmd:k[2],ui:k[3]})});if(!b.isIE){e.onClick.add(function(k,l){l=l.target;if(l.nodeName==="TABLE"){k.selection.select(l)}})}e.onNodeChange.add(function(l,k,o){var m;o=l.selection.getStart();m=l.dom.getParent(o,"td,th,caption");k.setActive("table",o.nodeName==="TABLE"||!!m);if(m&&m.nodeName==="CAPTION"){m=0}k.setDisabled("delete_table",!m);k.setDisabled("delete_col",!m);k.setDisabled("delete_table",!m);k.setDisabled("delete_row",!m);k.setDisabled("col_after",!m);k.setDisabled("col_before",!m);k.setDisabled("row_after",!m);k.setDisabled("row_before",!m);k.setDisabled("row_props",!m);k.setDisabled("cell_props",!m);k.setDisabled("split_cells",!m);k.setDisabled("merge_cells",!m)});e.onInit.add(function(l){var k,o,p=l.dom,m;d=l.windowManager;l.onMouseDown.add(function(q,r){if(r.button!=2){g();o=p.getParent(r.target,"td,th");k=p.getParent(o,"table")}});p.bind(l.getDoc(),"mouseover",function(t){var r,q,s=t.target;if(o&&(m||s!=o)&&(s.nodeName=="TD"||s.nodeName=="TH")){q=p.getParent(s,"table");if(q==k){if(!m){m=h(q);m.setStartCell(o);l.getBody().style.webkitUserSelect="none"}m.setEndCell(s)}r=l.selection.getSel();if(r.removeAllRanges){r.removeAllRanges()}else{r.empty()}t.preventDefault()}});l.onMouseUp.add(function(z,A){var r,t=z.selection,B,C=t.getSel(),q,u,s,w;if(o){if(m){z.getBody().style.webkitUserSelect=""}function v(D,F){var E=new b.dom.TreeWalker(D,D);do{if(D.nodeType==3&&b.trim(D.nodeValue).length!=0){if(F){r.setStart(D,0)}else{r.setEnd(D,D.nodeValue.length)}return}if(D.nodeName=="BR"){if(F){r.setStartBefore(D)}else{r.setEndBefore(D)}return}}while(D=(F?E.next():E.prev()))}B=p.select("td.mceSelected,th.mceSelected");if(B.length>0){r=p.createRng();u=B[0];w=B[B.length-1];v(u,1);q=new b.dom.TreeWalker(u,p.getParent(B[0],"table"));do{if(u.nodeName=="TD"||u.nodeName=="TH"){if(!p.hasClass(u,"mceSelected")){break}s=u}}while(u=q.next());v(s);t.setRng(r)}z.nodeChanged();o=m=k=null}});l.onKeyUp.add(function(q,r){g()});if(l&&l.plugins.contextmenu){l.plugins.contextmenu.onContextMenu.add(function(s,q,u){var v,t=l.selection,r=t.getNode()||l.getBody();if(l.dom.getParent(u,"td")||l.dom.getParent(u,"th")||l.dom.select("td.mceSelected,th.mceSelected").length){q.removeAll();if(r.nodeName=="A"&&!l.dom.getAttrib(r,"name")){q.add({title:"advanced.link_desc",icon:"link",cmd:l.plugins.advlink?"mceAdvLink":"mceLink",ui:true});q.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});q.addSeparator()}if(r.nodeName=="IMG"&&r.className.indexOf("mceItem")==-1){q.add({title:"advanced.image_desc",icon:"image",cmd:l.plugins.advimage?"mceAdvImage":"mceImage",ui:true});q.addSeparator()}q.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});q.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});q.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});q.addSeparator();v=q.addMenu({title:"table.cell"});v.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});v.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});v.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});v=q.addMenu({title:"table.row"});v.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});v.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});v.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});v.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});v.addSeparator();v.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});v.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});v.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!j);v.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!j);v=q.addMenu({title:"table.col"});v.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});v.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});v.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{q.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(!b.isIE){function n(){var q;for(q=l.getBody().lastChild;q&&q.nodeType==3&&!q.nodeValue.length;q=q.previousSibling){}if(q&&q.nodeName=="TABLE"){l.dom.add(l.getBody(),"p",null,'<br mce_bogus="1" />')}}if(b.isGecko){l.onKeyDown.add(function(r,t){var q,s,u=r.dom;if(t.keyCode==37||t.keyCode==38){q=r.selection.getRng();s=u.getParent(q.startContainer,"table");if(s&&r.getBody().firstChild==s){if(isAtStart(q,s)){q=u.createRng();q.setStartBefore(s);q.setEndBefore(s);r.selection.setRng(q);t.preventDefault()}}}})}l.onKeyUp.add(n);l.onSetContent.add(n);l.onVisualAid.add(n);l.onPreProcess.add(function(q,s){var r=s.node.lastChild;if(r&&r.childNodes.length==1&&r.firstChild.nodeName=="BR"){q.dom.remove(r)}});n()}});c({mceTableSplitCells:function(k){k.split()},mceTableMergeCells:function(l){var m,n,k;k=e.dom.getParent(e.selection.getNode(),"th,td");if(k){m=k.rowSpan;n=k.colSpan}if(!e.dom.select("td.mceSelected,th.mceSelected").length){d.open({url:f+"/merge_cells.htm",width:240+parseInt(e.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(e.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:m,cols:n,onaction:function(o){l.merge(k,o.cols,o.rows)},plugin_url:f})}else{l.merge()}},mceTableInsertRowBefore:function(k){k.insertRow(true)},mceTableInsertRowAfter:function(k){k.insertRow()},mceTableInsertColBefore:function(k){k.insertCol(true)},mceTableInsertColAfter:function(k){k.insertCol()},mceTableDeleteCol:function(k){k.deleteCols()},mceTableDeleteRow:function(k){k.deleteRows()},mceTableCutRow:function(k){j=k.cutRows()},mceTableCopyRow:function(k){j=k.copyRows()},mceTablePasteRowBefore:function(k){k.pasteRows(j,true)},mceTablePasteRowAfter:function(k){k.pasteRows(j)},mceTableDelete:function(k){k.deleteTable()}},function(l,k){e.addCommand(k,function(){var m=h();if(m){l(m);e.execCommand("mceRepaint");g()}})});c({mceInsertTable:function(k){d.open({url:f+"/table.htm",width:400+parseInt(e.getLang("table.table_delta_width",0)),height:320+parseInt(e.getLang("table.table_delta_height",0)),inline:1},{plugin_url:f,action:k?k.action:0})},mceTableRowProps:function(){d.open({url:f+"/row.htm",width:400+parseInt(e.getLang("table.rowprops_delta_width",0)),height:295+parseInt(e.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:f})},mceTableCellProps:function(){d.open({url:f+"/cell.htm",width:400+parseInt(e.getLang("table.cellprops_delta_width",0)),height:295+parseInt(e.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:f})}},function(l,k){e.addCommand(k,function(m,n){l(n)})})}});b.PluginManager.add("table",b.plugins.TablePlugin)})(tinymce); | (function(c){var d=c.each;function b(f,g){var h=g.ownerDocument,e=h.createRange(),j;e.setStartBefore(g);e.setEnd(f.endContainer,f.endOffset);j=h.createElement("body");j.appendChild(e.cloneContents());return j.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(G,F,J){var f,K,C,o;s();o=F.getParent(J.getStart(),"th,td");if(o){K=E(o);C=H();o=w(K.x,K.y)}function z(M,L){M=M.cloneNode(L);M.removeAttribute("id");return M}function s(){var L=0;f=[];d(["thead","tbody","tfoot"],function(M){var N=F.select("> "+M+" tr",G);d(N,function(O,P){P+=L;d(F.select("> td, > th",O),function(V,Q){var R,S,T,U;if(f[P]){while(f[P][Q]){Q++}}T=h(V,"rowspan");U=h(V,"colspan");for(S=P;S<P+T;S++){if(!f[S]){f[S]=[]}for(R=Q;R<Q+U;R++){f[S][R]={part:M,real:S==P&&R==Q,elm:V,rowspan:T,colspan:U}}}})});L+=N.length})}function w(L,N){var M;M=f[N];if(M){return M[L]}}function h(M,L){return parseInt(M.getAttribute(L)||1)}function j(L){return F.hasClass(L.elm,"mceSelected")||L==o}function k(){var L=[];d(G.rows,function(M){d(M.cells,function(N){if(F.hasClass(N,"mceSelected")||N==o.elm){L.push(M);return false}})});return L}function r(){var L=F.createRng();L.setStartAfter(G);L.setEndAfter(G);J.setRng(L);F.remove(G)}function e(L){var M;c.walk(L,function(O){var N;if(O.nodeType==3){d(F.getParents(O.parentNode,null,L).reverse(),function(P){P=z(P,false);if(!M){M=N=P}else{if(N){N.appendChild(P)}}N=P});if(N){N.innerHTML=c.isIE?" ":'<br _mce_bogus="1" />'}return false}},"childNodes");L=z(L,false);L.rowSpan=L.colSpan=1;if(M){L.appendChild(M)}else{if(!c.isIE){L.innerHTML='<br _mce_bogus="1" />'}}return L}function q(){var L=F.createRng();d(F.select("tr",G),function(M){if(M.cells.length==0){F.remove(M)}});if(F.select("tr",G).length==0){L.setStartAfter(G);L.setEndAfter(G);J.setRng(L);F.remove(G);return}d(F.select("thead,tbody,tfoot",G),function(M){if(M.rows.length==0){F.remove(M)}});s();row=f[Math.min(f.length-1,K.y)];if(row){J.select(row[Math.min(row.length-1,K.x)].elm,true);J.collapse(true)}}function t(R,P,T,Q){var O,M,L,N,S;O=f[P][R].elm.parentNode;for(L=1;L<=T;L++){O=F.getNext(O,"tr");if(O){for(M=R;M>=0;M--){S=f[P+L][M].elm;if(S.parentNode==O){for(N=1;N<=Q;N++){F.insertAfter(e(S),S)}break}}if(M==-1){for(N=1;N<=Q;N++){O.insertBefore(e(O.cells[0]),O.cells[0])}}}}}function B(){d(f,function(L,M){d(L,function(O,N){var R,Q,S,P;if(j(O)){O=O.elm;R=h(O,"colspan");Q=h(O,"rowspan");if(R>1||Q>1){O.colSpan=O.rowSpan=1;for(P=0;P<R-1;P++){F.insertAfter(e(O),O)}t(N,M,Q-1,R)}}})})}function p(T,Q,W){var O,N,V,U,S,P,R,L,T,M;if(T){pos=E(T);O=pos.x;N=pos.y;V=O+(Q-1);U=N+(W-1)}else{O=K.x;N=K.y;V=C.x;U=C.y}R=w(O,N);L=w(V,U);if(R&&L&&R.part==L.part){B();s();R=w(O,N).elm;R.colSpan=(V-O)+1;R.rowSpan=(U-N)+1;for(P=N;P<=U;P++){for(S=O;S<=V;S++){T=f[P][S].elm;if(T!=R){M=c.grep(T.childNodes);d(M,function(Y,X){if(Y.nodeName!="BR"||X!=M.length-1){R.appendChild(Y)}});F.remove(T)}}}q()}}function l(O){var L,Q,N,P,R,S,M,T;d(f,function(U,V){d(U,function(X,W){if(j(X)){X=X.elm;R=X.parentNode;S=z(R,false);L=V;if(O){return false}}});if(O){return !L}});for(P=0;P<f[0].length;P++){Q=f[L][P].elm;if(Q!=N){if(!O){rowSpan=h(Q,"rowspan");if(rowSpan>1){Q.rowSpan=rowSpan+1;continue}}else{if(L>0&&f[L-1][P]){T=f[L-1][P].elm;rowSpan=h(T,"rowspan");if(rowSpan>1){T.rowSpan=rowSpan+1;continue}}}M=e(Q);M.colSpan=Q.colSpan;S.appendChild(M);N=Q}}if(S.hasChildNodes()){if(!O){F.insertAfter(S,R)}else{R.parentNode.insertBefore(S,R)}}}function g(M){var N,L;d(f,function(O,P){d(O,function(R,Q){if(j(R)){N=Q;if(M){return false}}});if(M){return !N}});d(f,function(R,S){var O=R[N].elm,P,Q;if(O!=L){Q=h(O,"colspan");P=h(O,"rowspan");if(Q==1){if(!M){F.insertAfter(e(O),O);t(N,S,P-1,Q)}else{O.parentNode.insertBefore(e(O),O);t(N,S,P-1,Q)}}else{O.colSpan++}L=O}})}function n(){var L=[];d(f,function(M,N){d(M,function(P,O){if(j(P)&&c.inArray(L,O)===-1){d(f,function(S){var Q=S[O].elm,R;R=h(Q,"colspan");if(R>1){Q.colSpan=R-1}else{F.remove(Q)}});L.push(O)}})});q()}function m(){var M;function L(P){var O,Q,N;O=F.getNext(P,"tr");d(P.cells,function(R){var S=h(R,"rowspan");if(S>1){R.rowSpan=S-1;Q=E(R);t(Q.x,Q.y,1,1)}});Q=E(P.cells[0]);d(f[Q.y],function(R){var S;R=R.elm;if(R!=N){S=h(R,"rowspan");if(S<=1){F.remove(R)}else{R.rowSpan=S-1}N=R}})}M=k();d(M.reverse(),function(N){L(N)});q()}function D(){var L=k();F.remove(L);q();return L}function I(){var L=k();d(L,function(N,M){L[M]=z(N,true)});return L}function A(N,M){var O=k(),L=O[M?0:O.length-1],P=L.cells.length;d(f,function(R){var Q;P=0;d(R,function(T,S){if(T.real){P+=T.colspan}if(T.elm.parentNode==L){Q=1}});if(Q){return false}});if(!M){N.reverse()}d(N,function(S){var R=S.cells.length,Q;for(i=0;i<R;i++){Q=S.cells[i];Q.colSpan=Q.rowSpan=1}for(i=R;i<P;i++){S.appendChild(e(S.cells[R-1]))}for(i=P;i<R;i++){F.remove(S.cells[i])}if(M){L.parentNode.insertBefore(S,L)}else{F.insertAfter(S,L)}})}function E(L){var M;d(f,function(N,O){d(N,function(Q,P){if(Q.elm==L){M={x:P,y:O};return false}});return !M});return M}function v(L){K=E(L)}function H(){var N,M,L;M=L=0;d(f,function(O,P){d(O,function(R,Q){var T,S;if(j(R)){R=f[P][Q];if(Q>M){M=Q}if(P>L){L=P}if(R.real){T=R.colspan-1;S=R.rowspan-1;if(T){if(Q+T>M){M=Q+T}}if(S){if(P+S>L){L=P+S}}}}})});return{x:M,y:L}}function u(R){var O,N,T,S,M,L,P,Q;C=E(R);if(K&&C){O=Math.min(K.x,C.x);N=Math.min(K.y,C.y);T=Math.max(K.x,C.x);S=Math.max(K.y,C.y);M=T;L=S;for(y=N;y<=L;y++){R=f[y][O];if(!R.real){if(O-(R.colspan-1)<O){O-=R.colspan-1}}}for(x=O;x<=M;x++){R=f[N][x];if(!R.real){if(N-(R.rowspan-1)<N){N-=R.rowspan-1}}}for(y=N;y<=S;y++){for(x=O;x<=T;x++){R=f[y][x];if(R.real){P=R.colspan-1;Q=R.rowspan-1;if(P){if(x+P>M){M=x+P}}if(Q){if(y+Q>L){L=y+Q}}}}}F.removeClass(F.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=N;y<=L;y++){for(x=O;x<=M;x++){F.addClass(f[y][x].elm,"mceSelected")}}}}c.extend(this,{deleteTable:r,split:B,merge:p,insertRow:l,insertCol:g,deleteCols:n,deleteRows:m,cutRows:D,copyRows:I,pasteRows:A,getPos:E,setStartCell:v,setEndCell:u})}c.create("tinymce.plugins.TablePlugin",{init:function(f,g){var e,k;function j(n){var m=f.selection,l=f.dom.getParent(n||m.getNode(),"table");if(l){return new a(l,f.dom,m)}}function h(){f.getBody().style.webkitUserSelect="";f.dom.removeClass(f.dom.select("td.mceSelected,th.mceSelected"),"mceSelected")}d([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(l){f.addButton(l[0],{title:l[1],cmd:l[2],ui:l[3]})});if(!c.isIE){f.onClick.add(function(l,m){m=m.target;if(m.nodeName==="TABLE"){l.selection.select(m)}})}f.onNodeChange.add(function(m,l,q){var o;q=m.selection.getStart();o=m.dom.getParent(q,"td,th,caption");l.setActive("table",q.nodeName==="TABLE"||!!o);if(o&&o.nodeName==="CAPTION"){o=0}l.setDisabled("delete_table",!o);l.setDisabled("delete_col",!o);l.setDisabled("delete_table",!o);l.setDisabled("delete_row",!o);l.setDisabled("col_after",!o);l.setDisabled("col_before",!o);l.setDisabled("row_after",!o);l.setDisabled("row_before",!o);l.setDisabled("row_props",!o);l.setDisabled("cell_props",!o);l.setDisabled("split_cells",!o);l.setDisabled("merge_cells",!o)});f.onInit.add(function(m){var l,p,q=m.dom,n;e=m.windowManager;m.onMouseDown.add(function(r,s){if(s.button!=2){h();p=q.getParent(s.target,"td,th");l=q.getParent(p,"table")}});q.bind(m.getDoc(),"mouseover",function(u){var s,r,t=u.target;if(p&&(n||t!=p)&&(t.nodeName=="TD"||t.nodeName=="TH")){r=q.getParent(t,"table");if(r==l){if(!n){n=j(r);n.setStartCell(p);m.getBody().style.webkitUserSelect="none"}n.setEndCell(t)}s=m.selection.getSel();if(s.removeAllRanges){s.removeAllRanges()}else{s.empty()}u.preventDefault()}});m.onMouseUp.add(function(A,B){var s,u=A.selection,C,D=u.getSel(),r,v,t,z;if(p){if(n){A.getBody().style.webkitUserSelect=""}function w(E,G){var F=new c.dom.TreeWalker(E,E);do{if(E.nodeType==3&&c.trim(E.nodeValue).length!=0){if(G){s.setStart(E,0)}else{s.setEnd(E,E.nodeValue.length)}return}if(E.nodeName=="BR"){if(G){s.setStartBefore(E)}else{s.setEndBefore(E)}return}}while(E=(G?F.next():F.prev()))}C=q.select("td.mceSelected,th.mceSelected");if(C.length>0){s=q.createRng();v=C[0];z=C[C.length-1];w(v,1);r=new c.dom.TreeWalker(v,q.getParent(C[0],"table"));do{if(v.nodeName=="TD"||v.nodeName=="TH"){if(!q.hasClass(v,"mceSelected")){break}t=v}}while(v=r.next());w(t);u.setRng(s)}A.nodeChanged();p=n=l=null}});m.onKeyUp.add(function(r,s){h()});if(m&&m.plugins.contextmenu){m.plugins.contextmenu.onContextMenu.add(function(t,r,v){var w,u=m.selection,s=u.getNode()||m.getBody();if(m.dom.getParent(v,"td")||m.dom.getParent(v,"th")||m.dom.select("td.mceSelected,th.mceSelected").length){r.removeAll();if(s.nodeName=="A"&&!m.dom.getAttrib(s,"name")){r.add({title:"advanced.link_desc",icon:"link",cmd:m.plugins.advlink?"mceAdvLink":"mceLink",ui:true});r.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});r.addSeparator()}if(s.nodeName=="IMG"&&s.className.indexOf("mceItem")==-1){r.add({title:"advanced.image_desc",icon:"image",cmd:m.plugins.advimage?"mceAdvImage":"mceImage",ui:true});r.addSeparator()}r.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});r.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});r.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});r.addSeparator();w=r.addMenu({title:"table.cell"});w.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});w.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});w.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});w=r.addMenu({title:"table.row"});w.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});w.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});w.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});w.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});w.addSeparator();w.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});w.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});w.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!k);w.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!k);w=r.addMenu({title:"table.col"});w.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});w.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});w.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{r.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(!c.isIE){function o(){var r;for(r=m.getBody().lastChild;r&&r.nodeType==3&&!r.nodeValue.length;r=r.previousSibling){}if(r&&r.nodeName=="TABLE"){m.dom.add(m.getBody(),"p",null,'<br mce_bogus="1" />')}}if(c.isGecko){m.onKeyDown.add(function(s,u){var r,t,v=s.dom;if(u.keyCode==37||u.keyCode==38){r=s.selection.getRng();t=v.getParent(r.startContainer,"table");if(t&&s.getBody().firstChild==t){if(b(r,t)){r=v.createRng();r.setStartBefore(t);r.setEndBefore(t);s.selection.setRng(r);u.preventDefault()}}}})}m.onKeyUp.add(o);m.onSetContent.add(o);m.onVisualAid.add(o);m.onPreProcess.add(function(r,t){var s=t.node.lastChild;if(s&&s.childNodes.length==1&&s.firstChild.nodeName=="BR"){r.dom.remove(s)}});o()}});d({mceTableSplitCells:function(l){l.split()},mceTableMergeCells:function(m){var n,o,l;l=f.dom.getParent(f.selection.getNode(),"th,td");if(l){n=l.rowSpan;o=l.colSpan}if(!f.dom.select("td.mceSelected,th.mceSelected").length){e.open({url:g+"/merge_cells.htm",width:240+parseInt(f.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(f.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:n,cols:o,onaction:function(p){m.merge(l,p.cols,p.rows)},plugin_url:g})}else{m.merge()}},mceTableInsertRowBefore:function(l){l.insertRow(true)},mceTableInsertRowAfter:function(l){l.insertRow()},mceTableInsertColBefore:function(l){l.insertCol(true)},mceTableInsertColAfter:function(l){l.insertCol()},mceTableDeleteCol:function(l){l.deleteCols()},mceTableDeleteRow:function(l){l.deleteRows()},mceTableCutRow:function(l){k=l.cutRows()},mceTableCopyRow:function(l){k=l.copyRows()},mceTablePasteRowBefore:function(l){l.pasteRows(k,true)},mceTablePasteRowAfter:function(l){l.pasteRows(k)},mceTableDelete:function(l){l.deleteTable()}},function(m,l){f.addCommand(l,function(){var n=j();if(n){m(n);f.execCommand("mceRepaint");h()}})});d({mceInsertTable:function(l){e.open({url:g+"/table.htm",width:400+parseInt(f.getLang("table.table_delta_width",0)),height:320+parseInt(f.getLang("table.table_delta_height",0)),inline:1},{plugin_url:g,action:l?l.action:0})},mceTableRowProps:function(){e.open({url:g+"/row.htm",width:400+parseInt(f.getLang("table.rowprops_delta_width",0)),height:295+parseInt(f.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:g})},mceTableCellProps:function(){e.open({url:g+"/cell.htm",width:400+parseInt(f.getLang("table.cellprops_delta_width",0)),height:295+parseInt(f.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:g})}},function(m,l){f.addCommand(l,function(n,o){m(o)})})}});c.PluginManager.add("table",c.plugins.TablePlugin)})(tinymce); | (function(b){var c=b.each;function a(F,E,I){var e,J,B,n;r();n=E.getParent(I.getStart(),"th,td");if(n){J=D(n);B=G();n=v(J.x,J.y)}function w(L,K){L=L.cloneNode(K);L.removeAttribute("id");return L}function r(){var K=0;e=[];c(["thead","tbody","tfoot"],function(L){var M=E.select(L+" tr",F);c(M,function(N,O){O+=K;c(E.select("td,th",N),function(U,P){var Q,R,S,T;if(e[O]){while(e[O][P]){P++}}S=g(U,"rowspan");T=g(U,"colspan");for(R=O;R<O+S;R++){if(!e[R]){e[R]=[]}for(Q=P;Q<P+T;Q++){e[R][Q]={part:L,real:R==O&&Q==P,elm:U,rowspan:S,colspan:T}}}})});K+=M.length})}function v(K,M){var L;L=e[M];if(L){return L[K]}}function g(L,K){return parseInt(L.getAttribute(K)||1)}function h(K){return E.hasClass(K.elm,"mceSelected")||K==n}function j(){var K=[];c(F.rows,function(L){c(L.cells,function(M){if(E.hasClass(M,"mceSelected")||M==n.elm){K.push(L);return false}})});return K}function q(){var K=E.createRng();K.setStartAfter(F);K.setEndAfter(F);I.setRng(K);E.remove(F)}function d(K){var L;b.walk(K,function(N){var M;if(N.nodeType==3){c(E.getParents(N.parentNode,null,K).reverse(),function(O){O=w(O,false);if(!L){L=M=O}else{if(M){M.appendChild(O)}}M=O});if(M){M.innerHTML=b.isIE?" ":'<br _mce_bogus="1" />'}return false}},"childNodes");K=w(K,false);K.rowSpan=K.colSpan=1;if(L){K.appendChild(L)}else{if(!b.isIE){K.innerHTML='<br _mce_bogus="1" />'}}return K}function p(){var K=E.createRng();c(E.select("tr",F),function(L){if(L.cells.length==0){E.remove(L)}});if(E.select("tr",F).length==0){K.setStartAfter(F);K.setEndAfter(F);I.setRng(K);E.remove(F);return}c(E.select("thead,tbody,tfoot",F),function(L){if(L.rows.length==0){E.remove(L)}});r();row=e[Math.min(e.length-1,J.y)];if(row){I.select(row[Math.min(row.length-1,J.x)].elm,true);I.collapse(true)}}function s(Q,O,S,P){var N,L,K,M,R;N=e[O][Q].elm.parentNode;for(K=1;K<=S;K++){N=E.getNext(N,"tr");if(N){for(L=Q;L>=0;L--){R=e[O+K][L].elm;if(R.parentNode==N){for(M=1;M<=P;M++){E.insertAfter(d(R),R)}break}}if(L==-1){for(M=1;M<=P;M++){N.insertBefore(d(N.cells[0]),N.cells[0])}}}}}function A(){c(e,function(K,L){c(K,function(N,M){var Q,P,R,O;if(h(N)){N=N.elm;Q=g(N,"colspan");P=g(N,"rowspan");if(Q>1||P>1){N.colSpan=N.rowSpan=1;for(O=0;O<Q-1;O++){E.insertAfter(d(N),N)}s(M,L,P-1,Q)}}})})}function o(S,P,V){var N,M,U,T,R,O,Q,K,S,L;if(S){pos=D(S);N=pos.x;M=pos.y;U=N+(P-1);T=M+(V-1)}else{N=J.x;M=J.y;U=B.x;T=B.y}Q=v(N,M);K=v(U,T);if(Q&&K&&Q.part==K.part){A();r();Q=v(N,M).elm;Q.colSpan=(U-N)+1;Q.rowSpan=(T-M)+1;for(O=M;O<=T;O++){for(R=N;R<=U;R++){S=e[O][R].elm;if(S!=Q){L=b.grep(S.childNodes);c(L,function(X,W){if(X.nodeName!="BR"||W!=L.length-1){Q.appendChild(X)}});E.remove(S)}}}p()}}function k(N){var K,P,M,O,Q,R,L,S;c(e,function(T,U){c(T,function(W,V){if(h(W)){W=W.elm;Q=W.parentNode;R=w(Q,false);K=U;if(N){return false}}});if(N){return !K}});for(O=0;O<e[0].length;O++){P=e[K][O].elm;if(P!=M){if(!N){rowSpan=g(P,"rowspan");if(rowSpan>1){P.rowSpan=rowSpan+1;continue}}else{if(K>0&&e[K-1][O]){S=e[K-1][O].elm;rowSpan=g(S,"rowspan");if(rowSpan>1){S.rowSpan=rowSpan+1;continue}}}L=d(P);L.colSpan=P.colSpan;R.appendChild(L);M=P}}if(R.hasChildNodes()){if(!N){E.insertAfter(R,Q)}else{Q.parentNode.insertBefore(R,Q)}}}function f(L){var M,K;c(e,function(N,O){c(N,function(Q,P){if(h(Q)){M=P;if(L){return false}}});if(L){return !M}});c(e,function(Q,R){var N=Q[M].elm,O,P;if(N!=K){P=g(N,"colspan");O=g(N,"rowspan");if(P==1){if(!L){E.insertAfter(d(N),N);s(M,R,O-1,P)}else{N.parentNode.insertBefore(d(N),N);s(M,R,O-1,P)}}else{N.colSpan++}K=N}})}function m(){var K=[];c(e,function(L,M){c(L,function(O,N){if(h(O)&&b.inArray(K,N)===-1){c(e,function(R){var P=R[N].elm,Q;Q=g(P,"colspan");if(Q>1){P.colSpan=Q-1}else{E.remove(P)}});K.push(N)}})});p()}function l(){var L;function K(O){var N,P,M;N=E.getNext(O,"tr");c(O.cells,function(Q){var R=g(Q,"rowspan");if(R>1){Q.rowSpan=R-1;P=D(Q);s(P.x,P.y,1,1)}});P=D(O.cells[0]);c(e[P.y],function(Q){var R;Q=Q.elm;if(Q!=M){R=g(Q,"rowspan");if(R<=1){E.remove(Q)}else{Q.rowSpan=R-1}M=Q}})}L=j();c(L.reverse(),function(M){K(M)});p()}function C(){var K=j();E.remove(K);p();return K}function H(){var K=j();c(K,function(M,L){K[L]=w(M,true)});return K}function z(M,L){var N=j(),K=N[L?0:N.length-1],O=K.cells.length;c(e,function(Q){var P;O=0;c(Q,function(S,R){if(S.real){O+=S.colspan}if(S.elm.parentNode==K){P=1}});if(P){return false}});if(!L){M.reverse()}c(M,function(R){var Q=R.cells.length,P;for(i=0;i<Q;i++){P=R.cells[i];P.colSpan=P.rowSpan=1}for(i=Q;i<O;i++){R.appendChild(d(R.cells[Q-1]))}for(i=O;i<Q;i++){E.remove(R.cells[i])}if(L){K.parentNode.insertBefore(R,K)}else{E.insertAfter(R,K)}})}function D(K){var L;c(e,function(M,N){c(M,function(P,O){if(P.elm==K){L={x:O,y:N};return false}});return !L});return L}function u(K){J=D(K)}function G(){var M,L,K;L=K=0;c(e,function(N,O){c(N,function(Q,P){var S,R;if(h(Q)){Q=e[O][P];if(P>L){L=P}if(O>K){K=O}if(Q.real){S=Q.colspan-1;R=Q.rowspan-1;if(S){if(P+S>L){L=P+S}}if(R){if(O+R>K){K=O+R}}}}})});return{x:L,y:K}}function t(Q){var N,M,S,R,L,K,O,P;B=D(Q);if(J&&B){N=Math.min(J.x,B.x);M=Math.min(J.y,B.y);S=Math.max(J.x,B.x);R=Math.max(J.y,B.y);L=S;K=R;for(y=M;y<=K;y++){Q=e[y][N];if(!Q.real){if(N-(Q.colspan-1)<N){N-=Q.colspan-1}}}for(x=N;x<=L;x++){Q=e[M][x];if(!Q.real){if(M-(Q.rowspan-1)<M){M-=Q.rowspan-1}}}for(y=M;y<=R;y++){for(x=N;x<=S;x++){Q=e[y][x];if(Q.real){O=Q.colspan-1;P=Q.rowspan-1;if(O){if(x+O>L){L=x+O}}if(P){if(y+P>K){K=y+P}}}}}E.removeClass(E.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=M;y<=K;y++){for(x=N;x<=L;x++){E.addClass(e[y][x].elm,"mceSelected")}}}}b.extend(this,{deleteTable:q,split:A,merge:o,insertRow:k,insertCol:f,deleteCols:m,deleteRows:l,cutRows:C,copyRows:H,pasteRows:z,getPos:D,setStartCell:u,setEndCell:t})}b.create("tinymce.plugins.TablePlugin",{init:function(e,f){var d,j;function h(m){var l=e.selection,k=e.dom.getParent(m||l.getNode(),"table");if(k){return new a(k,e.dom,l)}}function g(){e.getBody().style.webkitUserSelect="";e.dom.removeClass(e.dom.select("td.mceSelected,th.mceSelected"),"mceSelected")}c([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(k){e.addButton(k[0],{title:k[1],cmd:k[2],ui:k[3]})});if(!b.isIE){e.onClick.add(function(k,l){l=l.target;if(l.nodeName==="TABLE"){k.selection.select(l)}})}e.onNodeChange.add(function(l,k,o){var m;o=l.selection.getStart();m=l.dom.getParent(o,"td,th,caption");k.setActive("table",o.nodeName==="TABLE"||!!m);if(m&&m.nodeName==="CAPTION"){m=0}k.setDisabled("delete_table",!m);k.setDisabled("delete_col",!m);k.setDisabled("delete_table",!m);k.setDisabled("delete_row",!m);k.setDisabled("col_after",!m);k.setDisabled("col_before",!m);k.setDisabled("row_after",!m);k.setDisabled("row_before",!m);k.setDisabled("row_props",!m);k.setDisabled("cell_props",!m);k.setDisabled("split_cells",!m);k.setDisabled("merge_cells",!m)});e.onInit.add(function(l){var k,o,p=l.dom,m;d=l.windowManager;l.onMouseDown.add(function(q,r){if(r.button!=2){g();o=p.getParent(r.target,"td,th");k=p.getParent(o,"table")}});p.bind(l.getDoc(),"mouseover",function(t){var r,q,s=t.target;if(o&&(m||s!=o)&&(s.nodeName=="TD"||s.nodeName=="TH")){q=p.getParent(s,"table");if(q==k){if(!m){m=h(q);m.setStartCell(o);l.getBody().style.webkitUserSelect="none"}m.setEndCell(s)}r=l.selection.getSel();if(r.removeAllRanges){r.removeAllRanges()}else{r.empty()}t.preventDefault()}});l.onMouseUp.add(function(z,A){var r,t=z.selection,B,C=t.getSel(),q,u,s,w;if(o){if(m){z.getBody().style.webkitUserSelect=""}function v(D,F){var E=new b.dom.TreeWalker(D,D);do{if(D.nodeType==3&&b.trim(D.nodeValue).length!=0){if(F){r.setStart(D,0)}else{r.setEnd(D,D.nodeValue.length)}return}if(D.nodeName=="BR"){if(F){r.setStartBefore(D)}else{r.setEndBefore(D)}return}}while(D=(F?E.next():E.prev()))}B=p.select("td.mceSelected,th.mceSelected");if(B.length>0){r=p.createRng();u=B[0];w=B[B.length-1];v(u,1);q=new b.dom.TreeWalker(u,p.getParent(B[0],"table"));do{if(u.nodeName=="TD"||u.nodeName=="TH"){if(!p.hasClass(u,"mceSelected")){break}s=u}}while(u=q.next());v(s);t.setRng(r)}z.nodeChanged();o=m=k=null}});l.onKeyUp.add(function(q,r){g()});if(l&&l.plugins.contextmenu){l.plugins.contextmenu.onContextMenu.add(function(s,q,u){var v,t=l.selection,r=t.getNode()||l.getBody();if(l.dom.getParent(u,"td")||l.dom.getParent(u,"th")||l.dom.select("td.mceSelected,th.mceSelected").length){q.removeAll();if(r.nodeName=="A"&&!l.dom.getAttrib(r,"name")){q.add({title:"advanced.link_desc",icon:"link",cmd:l.plugins.advlink?"mceAdvLink":"mceLink",ui:true});q.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});q.addSeparator()}if(r.nodeName=="IMG"&&r.className.indexOf("mceItem")==-1){q.add({title:"advanced.image_desc",icon:"image",cmd:l.plugins.advimage?"mceAdvImage":"mceImage",ui:true});q.addSeparator()}q.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});q.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});q.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});q.addSeparator();v=q.addMenu({title:"table.cell"});v.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});v.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});v.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});v=q.addMenu({title:"table.row"});v.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});v.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});v.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});v.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});v.addSeparator();v.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});v.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});v.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!j);v.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!j);v=q.addMenu({title:"table.col"});v.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});v.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});v.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{q.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(!b.isIE){function n(){var q;for(q=l.getBody().lastChild;q&&q.nodeType==3&&!q.nodeValue.length;q=q.previousSibling){}if(q&&q.nodeName=="TABLE"){l.dom.add(l.getBody(),"p",null,'<br mce_bogus="1" />')}}if(b.isGecko){l.onKeyDown.add(function(r,t){var q,s,u=r.dom;if(t.keyCode==37||t.keyCode==38){q=r.selection.getRng();s=u.getParent(q.startContainer,"table");if(s&&r.getBody().firstChild==s){if(isAtStart(q,s)){q=u.createRng();q.setStartBefore(s);q.setEndBefore(s);r.selection.setRng(q);t.preventDefault()}}}})}l.onKeyUp.add(n);l.onSetContent.add(n);l.onVisualAid.add(n);l.onPreProcess.add(function(q,s){var r=s.node.lastChild;if(r&&r.childNodes.length==1&&r.firstChild.nodeName=="BR"){q.dom.remove(r)}});n()}});c({mceTableSplitCells:function(k){k.split()},mceTableMergeCells:function(l){var m,n,k;k=e.dom.getParent(e.selection.getNode(),"th,td");if(k){m=k.rowSpan;n=k.colSpan}if(!e.dom.select("td.mceSelected,th.mceSelected").length){d.open({url:f+"/merge_cells.htm",width:240+parseInt(e.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(e.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:m,cols:n,onaction:function(o){l.merge(k,o.cols,o.rows)},plugin_url:f})}else{l.merge()}},mceTableInsertRowBefore:function(k){k.insertRow(true)},mceTableInsertRowAfter:function(k){k.insertRow()},mceTableInsertColBefore:function(k){k.insertCol(true)},mceTableInsertColAfter:function(k){k.insertCol()},mceTableDeleteCol:function(k){k.deleteCols()},mceTableDeleteRow:function(k){k.deleteRows()},mceTableCutRow:function(k){j=k.cutRows()},mceTableCopyRow:function(k){j=k.copyRows()},mceTablePasteRowBefore:function(k){k.pasteRows(j,true)},mceTablePasteRowAfter:function(k){k.pasteRows(j)},mceTableDelete:function(k){k.deleteTable()}},function(l,k){e.addCommand(k,function(){var m=h();if(m){l(m);e.execCommand("mceRepaint");g()}})});c({mceInsertTable:function(k){d.open({url:f+"/table.htm",width:400+parseInt(e.getLang("table.table_delta_width",0)),height:320+parseInt(e.getLang("table.table_delta_height",0)),inline:1},{plugin_url:f,action:k?k.action:0})},mceTableRowProps:function(){d.open({url:f+"/row.htm",width:400+parseInt(e.getLang("table.rowprops_delta_width",0)),height:295+parseInt(e.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:f})},mceTableCellProps:function(){d.open({url:f+"/cell.htm",width:400+parseInt(e.getLang("table.cellprops_delta_width",0)),height:295+parseInt(e.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:f})}},function(l,k){e.addCommand(k,function(m,n){l(n)})})}});b.PluginManager.add("table",b.plugins.TablePlugin)})(tinymce); | 2459 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/2459/f0a8c3f0ce7a9f858140b3d0f675f2c67f440409/editor_plugin.js/buggy/default_www/backend/core/js/tiny_mce/plugins/table/editor_plugin.js |
ia=(new Date).getTime()}else if(X){clearTimeout(Q);v()}else if((new Date).getTime()-ia>m.updateDelay){clearTimeout(Q);v()}}function F(d){ea=d;q._p_.comm.responseReceived(d)}function v(){Q=null;if(P){if(!ja){if(confirm("The application was quited, do you want to restart?"))document.location=document.location;ja=true}}else{var d,c,e,j="&rand="+Math.round(Math.random(ka)*1E5);if(A.length>0){d=S();c=d.feedback?setTimeout(h,_$_INDICATOR_TIMEOUT_$_):null;e=false}else{d={result:"signal=poll"};c=null;e=true}K= q._p_.comm.sendUpdate(la+j,"request=jsupdate&"+d.result+"&ackId="+ea,c,ea,-1);L=e?setTimeout(s,_$_SERVER_PUSH_TIMEOUT_$_):null}}function I(d,c){var e={},j=A.length;e.signal="user";e.id=typeof d==="string"?d:d==q?"app":d.id;if(typeof c==="object"){e.name=c.name;e.object=c.eventObject;e.event=c.event}else{e.name=c;e.object=e.event=null}e.args=[];for(var n=2;n<arguments.length;++n){var i=arguments[n];i=i===false?0:i===true?1:i.toDateString?i.toDateString():i;e.args[n-2]=i}e.feedback=true;A[j]=B(e,j); | function k(d){clearTimeout(d);document.body.style.cursor="auto";if(ba!=null){try{ba()}catch(c){}ba=null}}function h(){document.body.style.cursor="wait";ba=hideLoadingIndicator;showLoadingIndicator()}function o(d){ha=d}function E(d){if(d){d="(function() {"+d+"})();";window.execScript?window.execScript(d):window.eval(d)}r._p_.autoJavaScript()}function v(d,c,e){if(!P){if(d==0){_$_$ifnot_DEBUG_$_();try{_$_$endif_$_();E(c);_$_$ifnot_DEBUG_$_()}catch(j){alert("Wt internal error: "+j+", code: "+j.code+", description: "+ j.description)}_$_$endif_$_();e&&k(e)}else A=da.concat(A);da=[];if(L){clearTimeout(L);L=null}K=null;if(d>0)++Y;else Y=0;if(!P)if(ha||A.length>0)if(d==1){d=Math.min(12E4,Math.exp(Y)*500);Q=setTimeout(function(){w()},d)}else w()}}function s(){K.abort();L=K=null;P||w()}function z(d,c,e,j){m.checkReleaseCapture(d,e);_$_$if_STRICTLY_SERIALIZED_EVENTS_$_();if(!K){_$_$endif_$_();var n={},i=A.length;n.object=d;n.signal=c;n.event=e;n.feedback=j;A[i]=B(n,i);y();E();_$_$if_STRICTLY_SERIALIZED_EVENTS_$_()}_$_$endif_$_()} | ia=(new Date).getTime()}else if(X){clearTimeout(Q);v()}else if((new Date).getTime()-ia>m.updateDelay){clearTimeout(Q);v()}}function F(d){ea=d;q._p_.comm.responseReceived(d)}function v(){Q=null;if(P){if(!ja){if(confirm("The application was quited, do you want to restart?"))document.location=document.location;ja=true}}else{var d,c,e,j="&rand="+Math.round(Math.random(ka)*1E5);if(A.length>0){d=S();c=d.feedback?setTimeout(h,_$_INDICATOR_TIMEOUT_$_):null;e=false}else{d={result:"signal=poll"};c=null;e=true}K=q._p_.comm.sendUpdate(la+j,"request=jsupdate&"+d.result+"&ackId="+ea,c,ea,-1);L=e?setTimeout(s,_$_SERVER_PUSH_TIMEOUT_$_):null}}function I(d,c){var e={},j=A.length;e.signal="user";e.id=typeof d==="string"?d:d==q?"app":d.id;if(typeof c==="object"){e.name=c.name;e.object=c.eventObject;e.event=c.event}else{e.name=c;e.object=e.event=null}e.args=[];for(var n=2;n<arguments.length;++n){var i=arguments[n];i=i===false?0:i===true?1:i.toDateString?i.toDateString():i;e.args[n-2]=i}e.feedback=true;A[j]=B(e,j); | 5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/5ef73eac2bce6b2921b061ea13b75eea94f2dd7b/Wt.min.js/buggy/src/web/skeleton/Wt.min.js |
if(P){J.target.type='popup';J.target.name=P[1];var Q;while(Q=o.exec(P[2])){if(Q[2]=='yes'||Q[2]=='1')J.target[Q[1]]=true;else if(isFinite(Q[2]))J.target[Q[1]]=Q[2];}}}else{var R=N.match(k);if(R)J.target.type=J.target.name=N;else{J.target.type='frame';J.target.name=N;}}var S=this,T=function(Z,aa){var ab=D.getAttribute(aa);if(ab!==null)J.adv[Z]=ab||'';};T('advId','id');T('advLangDir','dir');T('advAccessKey','accessKey');T('advName','name');T('advLangCode','lang');T('advTabIndex','tabindex');T('advTitle','title');T('advContentType','type');T('advCSSClasses','class');T('advCharset','charset');T('advStyles','style');}var U=C.document.getElementsByTag('img'),V=new CKEDITOR.dom.nodeList(C.document.$.anchors),W=J.anchors=[];for(var X=0;X<U.count();X++){var Y=U.getItem(X);if(Y.getAttribute('_cke_realelement')&&Y.getAttribute('_cke_real_element_type')=='anchor')W.push(C.restoreRealElement(Y));}for(X=0;X<V.count();X++)W.push(V.getItem(X));for(X=0;X<W.length;X++){Y=W[X];W[X]={name:Y.getAttribute('name'),id:Y.getAttribute('id')};}this._.selectedElement=D;return J;},q=function(C,D){if(D[C])this.setValue(D[C][this.id]||'');},r=function(C){return q.call(this,'target',C);},s=function(C){return q.call(this,'adv',C);},t=function(C,D){if(!D[C])D[C]={};D[C][this.id]=this.getValue()||'';},u=function(C){return t.call(this,'target',C);},v=function(C){return t.call(this,'adv',C);};function w(C){return C.replace(/\\'/g,"'");};function x(C){return C.replace(/'/g,'\\$&');};var y=a.config.emailProtection||'';if(y&&y!='encode'){var z={};y.replace(/^([^(]+)\(([^)]+)\)$/,function(C,D,E){z.name=D;z.params=[];E.replace(/[^,\s]+/g,function(F){z.params.push(F);});});}function A(C){var D,E=z.name,F=z.params,G,H;D=[E,'('];for(var I=0;I<F.length;I++){G=F[I].toLowerCase();H=C[G];I>0&&D.push(',');D.push("'",H?x(encodeURIComponent(C[G])):'',"'");}D.push(')');return D.join('');};function B(C){var D,E=C.length,F=[];for(var G=0;G<E;G++){D=C.charCodeAt(G);F.push(D);}return 'String.fromCharCode('+F.join(',')+')';};return{title:a.lang.link.title,minWidth:350,minHeight:230,contents:[{id:'info',label:a.lang.link.info,title:a.lang.link.info,elements:[{id:'linkType',type:'select',label:a.lang.link.type,'default':'url',items:[[a.lang.link.toUrl,'url'],[a.lang.link.toAnchor,'anchor'],[a.lang.link.toEmail,'email']],onChange:d,setup:function(C){if(C.type)this.setValue(C.type);},commit:function(C){C.type=this.getValue();}},{type:'vbox',id:'urlOptions',children:[{type:'hbox',widths:['25%','75%'],children:[{id:'protocol',type:'select',label:a.lang.common.protocol,'default':'http: | if(P){J.target.type='popup';J.target.name=P[1];var Q;while(Q=o.exec(P[2])){if(Q[2]=='yes'||Q[2]=='1')J.target[Q[1]]=true;else if(isFinite(Q[2]))J.target[Q[1]]=Q[2];}}}else{var R=N.match(k);if(R)J.target.type=J.target.name=N;else{J.target.type='frame';J.target.name=N;}}var S=this,T=function(Z,aa){var ab=D.getAttribute(aa);if(ab!==null)J.adv[Z]=ab||'';};T('advId','id');T('advLangDir','dir');T('advAccessKey','accessKey');T('advName','name');T('advLangCode','lang');T('advTabIndex','tabindex');T('advTitle','title');T('advContentType','type');T('advCSSClasses','class');T('advCharset','charset');T('advStyles','style');}var U=C.document.getElementsByTag('img'),V=new CKEDITOR.dom.nodeList(C.document.$.anchors),W=J.anchors=[];for(var X=0;X<U.count();X++){var Y=U.getItem(X);if(Y.getAttribute('_cke_realelement')&&Y.getAttribute('_cke_real_element_type')=='anchor')W.push(C.restoreRealElement(Y));}for(X=0;X<V.count();X++)W.push(V.getItem(X));for(X=0;X<W.length;X++){Y=W[X];W[X]={name:Y.getAttribute('name'),id:Y.getAttribute('id')};}this._.selectedElement=D;return J;},q=function(C,D){if(D[C])this.setValue(D[C][this.id]||'');},r=function(C){return q.call(this,'target',C);},s=function(C){return q.call(this,'adv',C);},t=function(C,D){if(!D[C])D[C]={};D[C][this.id]=this.getValue()||'';},u=function(C){return t.call(this,'target',C);},v=function(C){return t.call(this,'adv',C);};function w(C){return C.replace(/\\'/g,"'");};function x(C){return C.replace(/'/g,'\\$&');};var y=a.config.emailProtection||'';if(y&&y!='encode'){var z={};y.replace(/^([^(]+)\(([^)]+)\)$/,function(C,D,E){z.name=D;z.params=[];E.replace(/[^,\s]+/g,function(F){z.params.push(F);});});}function A(C){var D,E=z.name,F=z.params,G,H;D=[E,'('];for(var I=0;I<F.length;I++){G=F[I].toLowerCase();H=C[G];I>0&&D.push(',');D.push("'",H?x(encodeURIComponent(C[G])):'',"'");}D.push(')');return D.join('');};function B(C){var D,E=C.length,F=[];for(var G=0;G<E;G++){D=C.charCodeAt(G);F.push(D);}return 'String.fromCharCode('+F.join(',')+')';};return{title:a.lang.link.title,minWidth:350,minHeight:230,contents:[{id:'info',label:a.lang.link.info,title:a.lang.link.info,elements:[{id:'linkType',type:'select',label:a.lang.link.type,'default':'url',items:[[a.lang.link.toUrl,'url'],[a.lang.link.toAnchor,'anchor'],[a.lang.link.toEmail,'email']],onChange:d,setup:function(C){if(C.type)this.setValue(C.type);},commit:function(C){C.type=this.getValue();}},{type:'vbox',id:'urlOptions',children:[{type:'hbox',widths:['25%','75%'],children:[{id:'protocol',type:'select',label:a.lang.common.protocol,'default':'http: | if(P){J.target.type='popup';J.target.name=P[1];var Q;while(Q=o.exec(P[2])){if(Q[2]=='yes'||Q[2]=='1')J.target[Q[1]]=true;else if(isFinite(Q[2]))J.target[Q[1]]=Q[2];}}}else{var R=N.match(k);if(R)J.target.type=J.target.name=N;else{J.target.type='frame';J.target.name=N;}}var S=this,T=function(Z,aa){var ab=D.getAttribute(aa);if(ab!==null)J.adv[Z]=ab||'';};T('advId','id');T('advLangDir','dir');T('advAccessKey','accessKey');T('advName','name');T('advLangCode','lang');T('advTabIndex','tabindex');T('advTitle','title');T('advContentType','type');T('advCSSClasses','class');T('advCharset','charset');T('advStyles','style');}var U=C.document.getElementsByTag('img'),V=new CKEDITOR.dom.nodeList(C.document.$.anchors),W=J.anchors=[];for(var X=0;X<U.count();X++){var Y=U.getItem(X);if(Y.getAttribute('_cke_realelement')&&Y.getAttribute('_cke_real_element_type')=='anchor')W.push(C.restoreRealElement(Y));}for(X=0;X<V.count();X++)W.push(V.getItem(X));for(X=0;X<W.length;X++){Y=W[X];W[X]={name:Y.getAttribute('name'),id:Y.getAttribute('id')};}this._.selectedElement=D;return J;},q=function(C,D){if(D[C])this.setValue(D[C][this.id]||'');},r=function(C){return q.call(this,'target',C);},s=function(C){return q.call(this,'adv',C);},t=function(C,D){if(!D[C])D[C]={};D[C][this.id]=this.getValue()||'';},u=function(C){return t.call(this,'target',C);},v=function(C){return t.call(this,'adv',C);};function w(C){return C.replace(/\\'/g,"'");};function x(C){return C.replace(/'/g,'\\$&');};var y=a.config.emailProtection||'';if(y&&y!='encode'){var z={};y.replace(/^([^(]+)\(([^)]+)\)$/,function(C,D,E){z.name=D;z.params=[];E.replace(/[^,\s]+/g,function(F){z.params.push(F);});});}function A(C){var D,E=z.name,F=z.params,G,H;D=[E,'('];for(var I=0;I<F.length;I++){G=F[I].toLowerCase();H=C[G];I>0&&D.push(',');D.push("'",H?x(encodeURIComponent(C[G])):'',"'");}D.push(')');return D.join('');};function B(C){var D,E=C.length,F=[];for(var G=0;G<E;G++){D=C.charCodeAt(G);F.push(D);}return 'String.fromCharCode('+F.join(',')+')';};return{title:a.lang.link.title,minWidth:350,minHeight:230,contents:[{id:'info',label:a.lang.link.info,title:a.lang.link.info,elements:[{id:'linkType',type:'select',label:a.lang.link.type,'default':'url',items:[[a.lang.link.toUrl,'url'],[a.lang.link.toAnchor,'anchor'],[a.lang.link.toEmail,'email']],onChange:d,setup:function(C){if(C.type)this.setValue(C.type);},commit:function(C){C.type=this.getValue();}},{type:'vbox',id:'urlOptions',children:[{type:'hbox',widths:['25%','75%'],children:[{id:'protocol',type:'select',label:a.lang.common.protocol,'default':'http://',style:'width : 100%;',items:[['http://'],['https://'],['ftp://'],['news://'],[a.lang.link.other,'']],setup:function(C){if(C.url)this.setValue(C.url.protocol||''); | 8656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8656/debb161f7671ff5bddc8def2221db94ff111ff1b/link.js/clean/ckeditor/plugins/link/dialogs/link.js |
F.fakeObj=false;var C=F.getParentEditor(),D=C.getSelection(),E=null;if((E=b.getSelectedLink(C))&&E.hasAttribute('href'))D.selectElement(E);else if((E=D.getSelectedElement())&&E.is('img')&&E.getAttribute('_cke_real_element_type')&&E.getAttribute('_cke_real_element_type')=='anchor'){F.fakeObj=E;E=C.restoreRealElement(F.fakeObj);D.selectElement(F.fakeObj);}else E=null;F.setupContent(p.apply(F,[C,E]));},onOk:function(){var C={href:'javascript:void(0)/*'+CKEDITOR.tools.getNextNumber()+'*/'},D=[],E={href:C.href},F=this,G=this.getParentEditor();this.commitContent(E);switch(E.type||'url'){case 'url':var H=E.url&&E.url.protocol!=undefined?E.url.protocol:'http: | F.fakeObj=false;var C=F.getParentEditor(),D=C.getSelection(),E=null;if((E=b.getSelectedLink(C))&&E.hasAttribute('href'))D.selectElement(E);else if((E=D.getSelectedElement())&&E.is('img')&&E.getAttribute('_cke_real_element_type')&&E.getAttribute('_cke_real_element_type')=='anchor'){F.fakeObj=E;E=C.restoreRealElement(F.fakeObj);D.selectElement(F.fakeObj);}else E=null;F.setupContent(p.apply(F,[C,E]));},onOk:function(){var C={href:'javascript:void(0)/*'+CKEDITOR.tools.getNextNumber()+'*/'},D=[],E={href:C.href},F=this,G=this.getParentEditor();this.commitContent(E);switch(E.type||'url'){case 'url':var H=E.url&&E.url.protocol!=undefined?E.url.protocol:'http: | F.fakeObj=false;var C=F.getParentEditor(),D=C.getSelection(),E=null;if((E=b.getSelectedLink(C))&&E.hasAttribute('href'))D.selectElement(E);else if((E=D.getSelectedElement())&&E.is('img')&&E.getAttribute('_cke_real_element_type')&&E.getAttribute('_cke_real_element_type')=='anchor'){F.fakeObj=E;E=C.restoreRealElement(F.fakeObj);D.selectElement(F.fakeObj);}else E=null;F.setupContent(p.apply(F,[C,E]));},onOk:function(){var C={href:'javascript:void(0)/*'+CKEDITOR.tools.getNextNumber()+'*/'},D=[],E={href:C.href},F=this,G=this.getParentEditor();this.commitContent(E);switch(E.type||'url'){case 'url':var H=E.url&&E.url.protocol!=undefined?E.url.protocol:'http://',I=E.url&&E.url.url||'';C._cke_saved_href=I.indexOf('/')===0?I:H+I;break;case 'anchor':var J=E.anchor&&E.anchor.name,K=E.anchor&&E.anchor.id;C._cke_saved_href='#'+(J||K||'');break;case 'email':var L,M=E.email,N=M.address;switch(y){case '':case 'encode':var O=encodeURIComponent(M.subject||''),P=encodeURIComponent(M.body||''),Q=[];O&&Q.push('subject='+O);P&&Q.push('body='+P);Q=Q.length?'?'+Q.join('&'):'';if(y=='encode'){L=["javascript:void(location.href='mailto:'+",B(N)];Q&&L.push("+'",x(Q),"'");L.push(')');}else L=['mailto:',N,Q];break;default:var R=N.split('@',2);M.name=R[0];M.domain=R[1];L=['javascript:',A(M)];}C._cke_saved_href=L.join('');break;}if(E.target)if(E.target.type=='popup'){var S=["window.open(this.href, '",E.target.name||'',"', '"],T=['resizable','status','location','toolbar','menubar','fullscreen','scrollbars','dependent'],U=T.length,V=function(ah){if(E.target[ah])T.push(ah+'='+E.target[ah]);};for(var W=0;W<U;W++)T[W]=T[W]+(E.target[T[W]]?'=yes':'=no');V('width');V('left');V('height');V('top');S.push(T.join(','),"'); return false;");C._cke_pa_onclick=S.join('');}else{if(E.target.type!='notSet'&&E.target.name)C.target=E.target.name;else D.push('target');D.push('_cke_pa_onclick','onclick');}if(E.adv){var X=function(ah,ai){var aj=E.adv[ah];if(aj)C[ai]=aj;else D.push(ai);};if(this._.selectedElement)X('advId','id');X('advLangDir','dir');X('advAccessKey','accessKey');X('advName','name');X('advLangCode','lang');X('advTabIndex','tabindex');X('advTitle','title');X('advContentType','type');X('advCSSClasses','class');X('advCharset','charset');X('advStyles','style');}if(!this._.selectedElement){var Y=G.getSelection(),Z=Y.getRanges();if(Z.length==1&&Z[0].collapsed){var aa=new CKEDITOR.dom.text(C._cke_saved_href,G.document);Z[0].insertNode(aa);Z[0].selectNodeContents(aa);Y.selectRanges(Z);}var ab=new CKEDITOR.style({element:'a',attributes:C}); | 8656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8656/debb161f7671ff5bddc8def2221db94ff111ff1b/link.js/clean/ckeditor/plugins/link/dialogs/link.js |
if(!K){_$_$endif_$_();var m={},i=A.length;m.object=d;m.signal=c;m.event=e;m.feedback=j;A[i]=B(m,i);x();E();_$_$if_STRICTLY_SERIALIZED_EVENTS_$_()}_$_$endif_$_()}function x(){if(K!=null&&L!=null){clearTimeout(L);K.abort();K=null}if(K==null)if(Q==null){Q=setTimeout(function(){v()},n.updateDelay);ia=(new Date).getTime()}else if(X){clearTimeout(Q);v()}else if((new Date).getTime()-ia>n.updateDelay){clearTimeout(Q);v()}}function F(d){ea=d;q._p_.comm.responseReceived(d)}function v(){Q=null;if(P){if(!ja){if(confirm("The application was quited, do you want to restart?"))document.location= document.location;ja=true}}else{var d,c,e,j="&rand="+Math.round(Math.random(ka)*1E5);if(A.length>0){d=S();c=d.feedback?setTimeout(k,_$_INDICATOR_TIMEOUT_$_):null;e=false}else{d={result:"signal=poll"};c=null;e=true}K=q._p_.comm.sendUpdate(la+j,"request=jsupdate&"+d.result+"&ackId="+ea,c,ea,-1);L=e?setTimeout(r,_$_SERVER_PUSH_TIMEOUT_$_):null}}function I(d,c){var e={},j=A.length;e.signal="user";e.id=typeof d==="string"?d:d==q?"app":d.id;if(typeof c==="object"){e.name=c.name;e.object=c.eventObject;e.event= | v()}}function F(d){ea=d;q._p_.comm.responseReceived(d)}function v(){Q=null;if(P){if(!ja){if(confirm("The application was quited, do you want to restart?"))document.location=document.location;ja=true}}else{var d,c,e,j="&rand="+Math.round(Math.random(ka)*1E5);if(A.length>0){d=S();c=d.feedback?setTimeout(k,_$_INDICATOR_TIMEOUT_$_):null;e=false}else{d={result:"signal=poll"};c=null;e=true}K=q._p_.comm.sendUpdate(la+j,"request=jsupdate&"+d.result+"&ackId="+ea,c,ea,-1);L=e?setTimeout(r,_$_SERVER_PUSH_TIMEOUT_$_): null}}function I(d,c){var e={},j=A.length;e.signal="user";e.id=typeof d==="string"?d:d==q?"app":d.id;if(typeof c==="object"){e.name=c.name;e.object=c.eventObject;e.event=c.event}else{e.name=c;e.object=e.event=null}e.args=[];for(var m=2;m<arguments.length;++m){var i=arguments[m];i=i===false?0:i===true?1:i.toDateString?i.toDateString():i;e.args[m-2]=i}e.feedback=true;A[j]=B(e,j);x()}function U(d,c,e){var j=function(){var i=n.getElement(d);if(i){if(e)i.timer=setTimeout(i.tm,c);else{i.timer=null;i.tm= | if(!K){_$_$endif_$_();var m={},i=A.length;m.object=d;m.signal=c;m.event=e;m.feedback=j;A[i]=B(m,i);x();E();_$_$if_STRICTLY_SERIALIZED_EVENTS_$_()}_$_$endif_$_()}function x(){if(K!=null&&L!=null){clearTimeout(L);K.abort();K=null}if(K==null)if(Q==null){Q=setTimeout(function(){v()},n.updateDelay);ia=(new Date).getTime()}else if(X){clearTimeout(Q);v()}else if((new Date).getTime()-ia>n.updateDelay){clearTimeout(Q);v()}}function F(d){ea=d;q._p_.comm.responseReceived(d)}function v(){Q=null;if(P){if(!ja){if(confirm("The application was quited, do you want to restart?"))document.location=document.location;ja=true}}else{var d,c,e,j="&rand="+Math.round(Math.random(ka)*1E5);if(A.length>0){d=S();c=d.feedback?setTimeout(k,_$_INDICATOR_TIMEOUT_$_):null;e=false}else{d={result:"signal=poll"};c=null;e=true}K=q._p_.comm.sendUpdate(la+j,"request=jsupdate&"+d.result+"&ackId="+ea,c,ea,-1);L=e?setTimeout(r,_$_SERVER_PUSH_TIMEOUT_$_):null}}function I(d,c){var e={},j=A.length;e.signal="user";e.id=typeof d==="string"?d:d==q?"app":d.id;if(typeof c==="object"){e.name=c.name;e.object=c.eventObject;e.event= | 5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/f66c0eb2940a2bd1ae4228c285fecc8162d03bfb/Wt.min.js/buggy/src/web/skeleton/Wt.min.js |
}else{v=w.startContainer;v=v.getChild(w.startOffset);if(v){if(x(v)===false)v=null;}else v=x(w.startContainer,true)===false?null:w.startContainer.getNextSourceNode(true,z,x);}while(v&&!this._.end){this.current=v;if(!this.evaluator||this.evaluator(v)!==false){if(!u)return v;}else if(u&&this.evaluator)return false;v=v[A](false,z,x);}this.end();return this.current=null;};function m(t){var u,v=null;while(u=l.call(this,t))v=u;return v;};d.walker=e.createClass({$:function(t){this.range=t;this._={};},proto:{end:function(){this._.end=1;},next:function(){return l.call(this);},previous:function(){return l.call(this,true);},checkForward:function(){return l.call(this,false,true)!==false;},checkBackward:function(){return l.call(this,true,true)!==false;},lastForward:function(){return m.call(this);},lastBackward:function(){return m.call(this,true);},reset:function(){delete this.current;this._={};}}});var n={block:1,'list-item':1,table:1,'table-row-group':1,'table-header-group':1,'table-footer-group':1,'table-row':1,'table-column-group':1,'table-column':1,'table-cell':1,'table-caption':1},o={hr:1};h.prototype.isBlockBoundary=function(t){var u=e.extend({},o,t||{});return n[this.getComputedStyle('display')]||u[this.getName()];};d.walker.blockBoundary=function(t){return function(u,v){return!(u.type==1&&u.isBlockBoundary(t));};};d.walker.listItemBoundary=function(){return this.blockBoundary({br:1});};d.walker.bookmarkContents=function(t){},d.walker.bookmark=function(t,u){function v(w){return w&&w.getName&&w.getName()=='span'&&w.hasAttribute('_fck_bookmark');};return function(w){var x,y;x=w&&!w.getName&&(y=w.getParent())&&v(y);x=t?x:x||v(w);return u^x;};};d.walker.whitespaces=function(t){return function(u){var v=u&&u.type==3&&!e.trim(u.getText());return t^v;};};d.walker.invisible=function(t){var u=d.walker.whitespaces();return function(v){var w=u(v)||v.is&&!v.$.offsetHeight;return t^w;};};var p=/^[\t\r\n ]*(?: |\xa0)$/,q=d.walker.whitespaces(true),r=d.walker.bookmark(false,true),s=function(t){return r(t)&&q(t);};h.prototype.getBogus=function(){var t=this.getLast(s);if(t&&(!c?t.is&&t.is('br'):t.getText&&p.test(t.getText())))return t;return false;};})();d.range=function(l){var m=this;m.startContainer=null;m.startOffset=null;m.endContainer=null;m.endOffset=null;m.collapsed=true;m.document=l;};(function(){var l=function(t){t.collapsed=t.startContainer&&t.endContainer&&t.startContainer.equals(t.endContainer)&&t.startOffset==t.endOffset;},m=function(t,u,v){t.optimizeBookmark();var w=t.startContainer,x=t.endContainer,y=t.startOffset,z=t.endOffset,A,B; | var r=window.open('',null,o,true);if(!r)return false;try{r.moveTo(q,p);r.resizeTo(m,n);r.focus();r.location.href=l;}catch(s){r=window.open(l,null,o,true);}return true;}});(function(){var l={modes:{wysiwyg:1,source:1},canUndo:false,exec:function(n){var o,p=n.config,q=p.baseHref?'<base href="'+p.baseHref+'"/>':'',r=b.isCustomDomain();if(p.fullPage)o=n.getData().replace(/<head>/,'$&'+q).replace(/[^>]*(?=<\/title>)/,n.lang.preview);else{var s='<body ',t=n.document&&n.document.getBody();if(t){if(t.getAttribute('id'))s+='id="'+t.getAttribute('id')+'" ';if(t.getAttribute('class'))s+='class="'+t.getAttribute('class')+'" ';}s+='>';o=n.config.docType+'<html dir="'+n.config.contentsLangDirection+'">'+'<head>'+q+'<title>'+n.lang.preview+'</title>'+e.buildStyleHtml(n.config.contentsCss)+'</head>'+s+n.getData()+'</body></html>';}var u=640,v=420,w=80;try{var x=window.screen;u=Math.round(x.width*0.8);v=Math.round(x.height*0.7);w=Math.round(x.width*0.1);}catch(A){}var y='';if(r){window._cke_htmlToLoad=o;y='javascript:void( (function(){document.open();document.domain="'+document.domain+'";'+'document.write( window.opener._cke_htmlToLoad );'+'document.close();'+'window.opener._cke_htmlToLoad = null;'+'})() )';}var z=window.open(y,null,'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+u+',height='+v+',left='+w);if(!r){z.document.open();z.document.write(o);z.document.close();}}},m='preview';j.add(m,{init:function(n){n.addCommand(m,l);n.ui.addButton('Preview',{label:n.lang.preview,command:m});}});})();j.add('print',{init:function(l){var m='print',n=l.addCommand(m,j.print);l.ui.addButton('Print',{label:l.lang.print,command:m});}});j.print={exec:function(l){if(b.opera)return;else if(b.gecko)l.window.$.print();else l.document.$.execCommand('Print');},canUndo:false,modes:{wysiwyg:!b.opera}};j.add('removeformat',{requires:['selection'],init:function(l){l.addCommand('removeFormat',j.removeformat.commands.removeformat);l.ui.addButton('RemoveFormat',{label:l.lang.removeFormat,command:'removeFormat'});l._.removeFormat={filters:[]};}});j.removeformat={commands:{removeformat:{exec:function(l){var m=l._.removeFormatRegex||(l._.removeFormatRegex=new RegExp('^(?:'+l.config.removeFormatTags.replace(/,/g,'|')+')$','i')),n=l._.removeAttributes||(l._.removeAttributes=l.config.removeFormatAttributes.split(',')),o=j.removeformat.filter,p=l.getSelection().getRanges(true),q=p.createIterator(),r;while(r=q.getNextRange()){if(r.collapsed)continue;r.enlarge(1);var s=r.createBookmark(),t=s.startNode,u=s.endNode,v=function(y){var z=new d.elementPath(y),A=z.elements; for(var B=1,C;C=A[B];B++){if(C.equals(z.block)||C.equals(z.blockLimit))break;if(m.test(C.getName())&&o(l,C))y.breakParent(C);}};v(t);v(u);var w=t.getNextSourceNode(true,1);while(w){if(w.equals(u))break;var x=w.getNextSourceNode(false,1);if(!(w.getName()=='img'&&w.getAttribute('_cke_realelement'))&&o(l,w))if(m.test(w.getName()))w.remove(true);else{w.removeAttributes(n);l.fire('removeFormatCleanup',w);}w=x;}r.moveToBookmark(s);}l.getSelection().selectRanges(p);}}},filter:function(l,m){var n=l._.removeFormat.filters;for(var o=0;o<n.length;o++){if(n[o](m)===false)return false;}return true;}};a.editor.prototype.addRemoveFormatFilter=function(l){this._.removeFormat.filters.push(l);};i.removeFormatTags='b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var';i.removeFormatAttributes='class,style,lang,width,height,align,hspace,valign';j.add('resize',{init:function(l){var m=l.config;!m.resize_dir&&(m.resize_dir='both');m.resize_maxWidth==undefined&&(m.resize_maxWidth=3000);m.resize_maxHeight==undefined&&(m.resize_maxHeight=3000);m.resize_minWidth==undefined&&(m.resize_minWidth=750);m.resize_minHeight==undefined&&(m.resize_minHeight=250);if(m.resize_enabled!==false){var n=null,o,p,q=(m.resize_dir=='both'||m.resize_dir=='horizontal')&&m.resize_minWidth!=m.resize_maxWidth,r=(m.resize_dir=='both'||m.resize_dir=='vertical')&&m.resize_minHeight!=m.resize_maxHeight;function s(v){var w=v.data.$.screenX-o.x,x=v.data.$.screenY-o.y,y=p.width,z=p.height,A=y+w*(l.lang.dir=='rtl'?-1:1),B=z+x;if(q)y=Math.max(m.resize_minWidth,Math.min(A,m.resize_maxWidth));if(r)z=Math.max(m.resize_minHeight,Math.min(B,m.resize_maxHeight));l.resize(y,z);};function t(v){a.document.removeListener('mousemove',s);a.document.removeListener('mouseup',t);if(l.document){l.document.removeListener('mousemove',s);l.document.removeListener('mouseup',t);}};var u=e.addFunction(function(v){if(!n)n=l.getResizable();p={width:n.$.offsetWidth||0,height:n.$.offsetHeight||0};o={x:v.screenX,y:v.screenY};m.resize_minWidth>p.width&&(m.resize_minWidth=p.width);m.resize_minHeight>p.height&&(m.resize_minHeight=p.height);a.document.on('mousemove',s);a.document.on('mouseup',t);if(l.document){l.document.on('mousemove',s);l.document.on('mouseup',t);}});l.on('destroy',function(){e.removeFunction(u);});l.on('themeSpace',function(v){if(v.data.space=='bottom'){var w='';if(q&&!r)w=' cke_resizer_horizontal';if(!q&&r)w=' cke_resizer_vertical';v.data.html+='<div class="cke_resizer'+w+'"'+' title="'+e.htmlEncode(l.lang.resize)+'"'+' onmousedown="CKEDITOR.tools.callFunction('+u+', event)"'+'></div>'; | }else{v=w.startContainer;v=v.getChild(w.startOffset);if(v){if(x(v)===false)v=null;}else v=x(w.startContainer,true)===false?null:w.startContainer.getNextSourceNode(true,z,x);}while(v&&!this._.end){this.current=v;if(!this.evaluator||this.evaluator(v)!==false){if(!u)return v;}else if(u&&this.evaluator)return false;v=v[A](false,z,x);}this.end();return this.current=null;};function m(t){var u,v=null;while(u=l.call(this,t))v=u;return v;};d.walker=e.createClass({$:function(t){this.range=t;this._={};},proto:{end:function(){this._.end=1;},next:function(){return l.call(this);},previous:function(){return l.call(this,true);},checkForward:function(){return l.call(this,false,true)!==false;},checkBackward:function(){return l.call(this,true,true)!==false;},lastForward:function(){return m.call(this);},lastBackward:function(){return m.call(this,true);},reset:function(){delete this.current;this._={};}}});var n={block:1,'list-item':1,table:1,'table-row-group':1,'table-header-group':1,'table-footer-group':1,'table-row':1,'table-column-group':1,'table-column':1,'table-cell':1,'table-caption':1},o={hr:1};h.prototype.isBlockBoundary=function(t){var u=e.extend({},o,t||{});return n[this.getComputedStyle('display')]||u[this.getName()];};d.walker.blockBoundary=function(t){return function(u,v){return!(u.type==1&&u.isBlockBoundary(t));};};d.walker.listItemBoundary=function(){return this.blockBoundary({br:1});};d.walker.bookmarkContents=function(t){},d.walker.bookmark=function(t,u){function v(w){return w&&w.getName&&w.getName()=='span'&&w.hasAttribute('_fck_bookmark');};return function(w){var x,y;x=w&&!w.getName&&(y=w.getParent())&&v(y);x=t?x:x||v(w);return u^x;};};d.walker.whitespaces=function(t){return function(u){var v=u&&u.type==3&&!e.trim(u.getText());return t^v;};};d.walker.invisible=function(t){var u=d.walker.whitespaces();return function(v){var w=u(v)||v.is&&!v.$.offsetHeight;return t^w;};};var p=/^[\t\r\n ]*(?: |\xa0)$/,q=d.walker.whitespaces(true),r=d.walker.bookmark(false,true),s=function(t){return r(t)&&q(t);};h.prototype.getBogus=function(){var t=this.getLast(s);if(t&&(!c?t.is&&t.is('br'):t.getText&&p.test(t.getText())))return t;return false;};})();d.range=function(l){var m=this;m.startContainer=null;m.startOffset=null;m.endContainer=null;m.endOffset=null;m.collapsed=true;m.document=l;};(function(){var l=function(t){t.collapsed=t.startContainer&&t.endContainer&&t.startContainer.equals(t.endContainer)&&t.startOffset==t.endOffset;},m=function(t,u,v){t.optimizeBookmark();var w=t.startContainer,x=t.endContainer,y=t.startOffset,z=t.endOffset,A,B; | 8656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8656/debb161f7671ff5bddc8def2221db94ff111ff1b/ckeditor.js/buggy/ckeditor/ckeditor.js |
va=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ha.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=va(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===A||f===e))if(e!=null||f){a.type="change";a.liveFired= | var va=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},wa=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?wa:va,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?wa:va)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!== | va=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ha.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=va(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===A||f===e))if(e!=null||f){a.type="change";a.liveFired= | 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 |
va=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ha.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=va(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===A||f===e))if(e!=null||f){a.type="change";a.liveFired= | var va=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},wa=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?wa:va,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?wa:va)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!== | va=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ha.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=va(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===A||f===e))if(e!=null||f){a.type="change";a.liveFired= | 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.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i= e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); | "__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(sa," ").indexOf(a)>-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one"; if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var l=f[h];if(l.selected&&(c.support.optDisabled?!l.disabled:l.getAttribute("disabled")===null)&&(!l.parentNode.disabled||!c.nodeName(l.parentNode,"optgroup"))){a=c(l).val();if(b)return a;d.push(a)}}return d}if(ta.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Sa,"")}return B}var k=c.isFunction(a);return this.each(function(o){var x=c(this),r=a;if(this.nodeType===1){if(k)r= a.call(this,o,x.val());if(r==null)r="";else if(typeof r==="number")r+="";else if(c.isArray(r))r=c.map(r,function(C){return C==null?"":C+""});if(c.isArray(r)&&ta.test(this.type))this.checked=c.inArray(x.val(),r)>=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true}, | this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); | 3959 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/3959/6ffc2de1d5816f49b1cdf002161144b28f2dc6e5/jquery.js/clean/javascript/jquery.js |
a.split(ca);e=o[i++];){n=f?n:!j.hasClass(e);j[n?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(ya," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===v){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value|| {}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i<d;i++){var j=e[i];if(j.selected){a=c(j).val();if(b)return a;f.push(a)}}return f}if(za.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Wa,"")}return v}var n=c.isFunction(a);return this.each(function(o){var m=c(this),s=a;if(this.nodeType===1){if(n)s=a.call(this,o,m.val()); if(typeof s==="number")s+="";if(c.isArray(s)&&za.test(this.type))this.checked=c.inArray(m.val(),s)>=0;else if(c.nodeName(this,"select")){var x=c.makeArray(s);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),x)>=0});if(!x.length)this.selectedIndex=-1}else this.value=s}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return v;if(f&&b in c.attrFn)return c(a)[b](d); | this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i= e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); | a.split(ca);e=o[i++];){n=f?n:!j.hasClass(e);j[n?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(ya," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===v){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i<d;i++){var j=e[i];if(j.selected){a=c(j).val();if(b)return a;f.push(a)}}return f}if(za.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Wa,"")}return v}var n=c.isFunction(a);return this.each(function(o){var m=c(this),s=a;if(this.nodeType===1){if(n)s=a.call(this,o,m.val());if(typeof s==="number")s+="";if(c.isArray(s)&&za.test(this.type))this.checked=c.inArray(m.val(),s)>=0;else if(c.nodeName(this,"select")){var x=c.makeArray(s);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),x)>=0});if(!x.length)this.selectedIndex=-1}else this.value=s}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return v;if(f&&b in c.attrFn)return c(a)[b](d); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/e67dc72e11289d294cc6b462fc98149983bd62f4/jquery.js/clean/wp-includes/js/jquery/jquery.js |
if ( value == undefined ) { | if ( value === undefined ) { var elem = this[0]; | val: function( value ) { if ( value == undefined ) { if ( this.length ) { var elem = this[0]; // We need to handle select boxes special if ( jQuery.nodeName( elem, "select" ) ) { var index = elem.selectedIndex, values = [], options = elem.options, one = elem.type == "select-one"; // Nothing was selected if ( index < 0 ) return null; // Loop through all the selected options for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { var option = options[ i ]; if ( option.selected ) { // Get the specifc value for the option value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; // We don't need an array for one selects if ( one ) return value; // Multi-Selects return an array values.push( value ); } } return values; // Everything else, we just grab the value } else return (this[0].value || "").replace(/\r/g, ""); } return undefined; } if( value.constructor == Number ) value += ''; return this.each(function(){ if ( this.nodeType != 1 ) return; if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) this.checked = (jQuery.inArray(this.value, value) >= 0 || jQuery.inArray(this.name, value) >= 0); else if ( jQuery.nodeName( this, "select" ) ) { var values = jQuery.makeArray(value); jQuery( "option", this ).each(function(){ this.selected = (jQuery.inArray( this.value, values ) >= 0 || jQuery.inArray( this.text, values ) >= 0); }); if ( !values.length ) this.selectedIndex = -1; } else this.value = value; }); }, | 7481 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/7481/dab47d32976aaaf622fe19a0f6372d9c7d38a3b0/jquery-latest.js/buggy/public/javascripts/jquery-latest.js |
if ( this.length ) { var elem = this[0]; | if ( elem ) { if ( jQuery.nodeName( elem, "option" ) ) { return (elem.attributes.value || {}).specified ? elem.value : elem.text; } | val: function( value ) { if ( value == undefined ) { if ( this.length ) { var elem = this[0]; // We need to handle select boxes special if ( jQuery.nodeName( elem, "select" ) ) { var index = elem.selectedIndex, values = [], options = elem.options, one = elem.type == "select-one"; // Nothing was selected if ( index < 0 ) return null; // Loop through all the selected options for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { var option = options[ i ]; if ( option.selected ) { // Get the specifc value for the option value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; // We don't need an array for one selects if ( one ) return value; // Multi-Selects return an array values.push( value ); } } return values; // Everything else, we just grab the value } else return (this[0].value || "").replace(/\r/g, ""); } return undefined; } if( value.constructor == Number ) value += ''; return this.each(function(){ if ( this.nodeType != 1 ) return; if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) this.checked = (jQuery.inArray(this.value, value) >= 0 || jQuery.inArray(this.name, value) >= 0); else if ( jQuery.nodeName( this, "select" ) ) { var values = jQuery.makeArray(value); jQuery( "option", this ).each(function(){ this.selected = (jQuery.inArray( this.value, values ) >= 0 || jQuery.inArray( this.text, values ) >= 0); }); if ( !values.length ) this.selectedIndex = -1; } else this.value = value; }); }, | 7481 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/7481/dab47d32976aaaf622fe19a0f6372d9c7d38a3b0/jquery-latest.js/buggy/public/javascripts/jquery-latest.js |
one = elem.type == "select-one"; | one = elem.type === "select-one"; | val: function( value ) { if ( value == undefined ) { if ( this.length ) { var elem = this[0]; // We need to handle select boxes special if ( jQuery.nodeName( elem, "select" ) ) { var index = elem.selectedIndex, values = [], options = elem.options, one = elem.type == "select-one"; // Nothing was selected if ( index < 0 ) return null; // Loop through all the selected options for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { var option = options[ i ]; if ( option.selected ) { // Get the specifc value for the option value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; // We don't need an array for one selects if ( one ) return value; // Multi-Selects return an array values.push( value ); } } return values; // Everything else, we just grab the value } else return (this[0].value || "").replace(/\r/g, ""); } return undefined; } if( value.constructor == Number ) value += ''; return this.each(function(){ if ( this.nodeType != 1 ) return; if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) this.checked = (jQuery.inArray(this.value, value) >= 0 || jQuery.inArray(this.name, value) >= 0); else if ( jQuery.nodeName( this, "select" ) ) { var values = jQuery.makeArray(value); jQuery( "option", this ).each(function(){ this.selected = (jQuery.inArray( this.value, values ) >= 0 || jQuery.inArray( this.text, values ) >= 0); }); if ( !values.length ) this.selectedIndex = -1; } else this.value = value; }); }, | 7481 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/7481/dab47d32976aaaf622fe19a0f6372d9c7d38a3b0/jquery-latest.js/buggy/public/javascripts/jquery-latest.js |
if ( index < 0 ) | if ( index < 0 ) { | val: function( value ) { if ( value == undefined ) { if ( this.length ) { var elem = this[0]; // We need to handle select boxes special if ( jQuery.nodeName( elem, "select" ) ) { var index = elem.selectedIndex, values = [], options = elem.options, one = elem.type == "select-one"; // Nothing was selected if ( index < 0 ) return null; // Loop through all the selected options for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { var option = options[ i ]; if ( option.selected ) { // Get the specifc value for the option value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; // We don't need an array for one selects if ( one ) return value; // Multi-Selects return an array values.push( value ); } } return values; // Everything else, we just grab the value } else return (this[0].value || "").replace(/\r/g, ""); } return undefined; } if( value.constructor == Number ) value += ''; return this.each(function(){ if ( this.nodeType != 1 ) return; if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) this.checked = (jQuery.inArray(this.value, value) >= 0 || jQuery.inArray(this.name, value) >= 0); else if ( jQuery.nodeName( this, "select" ) ) { var values = jQuery.makeArray(value); jQuery( "option", this ).each(function(){ this.selected = (jQuery.inArray( this.value, values ) >= 0 || jQuery.inArray( this.text, values ) >= 0); }); if ( !values.length ) this.selectedIndex = -1; } else this.value = value; }); }, | 7481 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/7481/dab47d32976aaaf622fe19a0f6372d9c7d38a3b0/jquery-latest.js/buggy/public/javascripts/jquery-latest.js |
value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; | value = jQuery(option).val(); | val: function( value ) { if ( value == undefined ) { if ( this.length ) { var elem = this[0]; // We need to handle select boxes special if ( jQuery.nodeName( elem, "select" ) ) { var index = elem.selectedIndex, values = [], options = elem.options, one = elem.type == "select-one"; // Nothing was selected if ( index < 0 ) return null; // Loop through all the selected options for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { var option = options[ i ]; if ( option.selected ) { // Get the specifc value for the option value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; // We don't need an array for one selects if ( one ) return value; // Multi-Selects return an array values.push( value ); } } return values; // Everything else, we just grab the value } else return (this[0].value || "").replace(/\r/g, ""); } return undefined; } if( value.constructor == Number ) value += ''; return this.each(function(){ if ( this.nodeType != 1 ) return; if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) this.checked = (jQuery.inArray(this.value, value) >= 0 || jQuery.inArray(this.name, value) >= 0); else if ( jQuery.nodeName( this, "select" ) ) { var values = jQuery.makeArray(value); jQuery( "option", this ).each(function(){ this.selected = (jQuery.inArray( this.value, values ) >= 0 || jQuery.inArray( this.text, values ) >= 0); }); if ( !values.length ) this.selectedIndex = -1; } else this.value = value; }); }, | 7481 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/7481/dab47d32976aaaf622fe19a0f6372d9c7d38a3b0/jquery-latest.js/buggy/public/javascripts/jquery-latest.js |
if ( one ) | if ( one ) { | val: function( value ) { if ( value == undefined ) { if ( this.length ) { var elem = this[0]; // We need to handle select boxes special if ( jQuery.nodeName( elem, "select" ) ) { var index = elem.selectedIndex, values = [], options = elem.options, one = elem.type == "select-one"; // Nothing was selected if ( index < 0 ) return null; // Loop through all the selected options for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { var option = options[ i ]; if ( option.selected ) { // Get the specifc value for the option value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; // We don't need an array for one selects if ( one ) return value; // Multi-Selects return an array values.push( value ); } } return values; // Everything else, we just grab the value } else return (this[0].value || "").replace(/\r/g, ""); } return undefined; } if( value.constructor == Number ) value += ''; return this.each(function(){ if ( this.nodeType != 1 ) return; if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) this.checked = (jQuery.inArray(this.value, value) >= 0 || jQuery.inArray(this.name, value) >= 0); else if ( jQuery.nodeName( this, "select" ) ) { var values = jQuery.makeArray(value); jQuery( "option", this ).each(function(){ this.selected = (jQuery.inArray( this.value, values ) >= 0 || jQuery.inArray( this.text, values ) >= 0); }); if ( !values.length ) this.selectedIndex = -1; } else this.value = value; }); }, | 7481 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/7481/dab47d32976aaaf622fe19a0f6372d9c7d38a3b0/jquery-latest.js/buggy/public/javascripts/jquery-latest.js |
} else return (this[0].value || "").replace(/\r/g, ""); | return (elem.value || "").replace(rreturn, ""); | val: function( value ) { if ( value == undefined ) { if ( this.length ) { var elem = this[0]; // We need to handle select boxes special if ( jQuery.nodeName( elem, "select" ) ) { var index = elem.selectedIndex, values = [], options = elem.options, one = elem.type == "select-one"; // Nothing was selected if ( index < 0 ) return null; // Loop through all the selected options for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { var option = options[ i ]; if ( option.selected ) { // Get the specifc value for the option value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; // We don't need an array for one selects if ( one ) return value; // Multi-Selects return an array values.push( value ); } } return values; // Everything else, we just grab the value } else return (this[0].value || "").replace(/\r/g, ""); } return undefined; } if( value.constructor == Number ) value += ''; return this.each(function(){ if ( this.nodeType != 1 ) return; if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) this.checked = (jQuery.inArray(this.value, value) >= 0 || jQuery.inArray(this.name, value) >= 0); else if ( jQuery.nodeName( this, "select" ) ) { var values = jQuery.makeArray(value); jQuery( "option", this ).each(function(){ this.selected = (jQuery.inArray( this.value, values ) >= 0 || jQuery.inArray( this.text, values ) >= 0); }); if ( !values.length ) this.selectedIndex = -1; } else this.value = value; }); }, | 7481 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/7481/dab47d32976aaaf622fe19a0f6372d9c7d38a3b0/jquery-latest.js/buggy/public/javascripts/jquery-latest.js |
if( value.constructor == Number ) value += ''; | var isFunction = jQuery.isFunction(value); | val: function( value ) { if ( value == undefined ) { if ( this.length ) { var elem = this[0]; // We need to handle select boxes special if ( jQuery.nodeName( elem, "select" ) ) { var index = elem.selectedIndex, values = [], options = elem.options, one = elem.type == "select-one"; // Nothing was selected if ( index < 0 ) return null; // Loop through all the selected options for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { var option = options[ i ]; if ( option.selected ) { // Get the specifc value for the option value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; // We don't need an array for one selects if ( one ) return value; // Multi-Selects return an array values.push( value ); } } return values; // Everything else, we just grab the value } else return (this[0].value || "").replace(/\r/g, ""); } return undefined; } if( value.constructor == Number ) value += ''; return this.each(function(){ if ( this.nodeType != 1 ) return; if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) this.checked = (jQuery.inArray(this.value, value) >= 0 || jQuery.inArray(this.name, value) >= 0); else if ( jQuery.nodeName( this, "select" ) ) { var values = jQuery.makeArray(value); jQuery( "option", this ).each(function(){ this.selected = (jQuery.inArray( this.value, values ) >= 0 || jQuery.inArray( this.text, values ) >= 0); }); if ( !values.length ) this.selectedIndex = -1; } else this.value = value; }); }, | 7481 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/7481/dab47d32976aaaf622fe19a0f6372d9c7d38a3b0/jquery-latest.js/buggy/public/javascripts/jquery-latest.js |
return this.each(function(){ if ( this.nodeType != 1 ) | return this.each(function(i) { var self = jQuery(this), val = value; if ( this.nodeType !== 1 ) { | val: function( value ) { if ( value == undefined ) { if ( this.length ) { var elem = this[0]; // We need to handle select boxes special if ( jQuery.nodeName( elem, "select" ) ) { var index = elem.selectedIndex, values = [], options = elem.options, one = elem.type == "select-one"; // Nothing was selected if ( index < 0 ) return null; // Loop through all the selected options for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { var option = options[ i ]; if ( option.selected ) { // Get the specifc value for the option value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; // We don't need an array for one selects if ( one ) return value; // Multi-Selects return an array values.push( value ); } } return values; // Everything else, we just grab the value } else return (this[0].value || "").replace(/\r/g, ""); } return undefined; } if( value.constructor == Number ) value += ''; return this.each(function(){ if ( this.nodeType != 1 ) return; if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) this.checked = (jQuery.inArray(this.value, value) >= 0 || jQuery.inArray(this.name, value) >= 0); else if ( jQuery.nodeName( this, "select" ) ) { var values = jQuery.makeArray(value); jQuery( "option", this ).each(function(){ this.selected = (jQuery.inArray( this.value, values ) >= 0 || jQuery.inArray( this.text, values ) >= 0); }); if ( !values.length ) this.selectedIndex = -1; } else this.value = value; }); }, | 7481 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/7481/dab47d32976aaaf622fe19a0f6372d9c7d38a3b0/jquery-latest.js/buggy/public/javascripts/jquery-latest.js |
if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) this.checked = (jQuery.inArray(this.value, value) >= 0 || jQuery.inArray(this.name, value) >= 0); | if ( isFunction ) { val = value.call(this, i, self.val()); } | val: function( value ) { if ( value == undefined ) { if ( this.length ) { var elem = this[0]; // We need to handle select boxes special if ( jQuery.nodeName( elem, "select" ) ) { var index = elem.selectedIndex, values = [], options = elem.options, one = elem.type == "select-one"; // Nothing was selected if ( index < 0 ) return null; // Loop through all the selected options for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { var option = options[ i ]; if ( option.selected ) { // Get the specifc value for the option value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; // We don't need an array for one selects if ( one ) return value; // Multi-Selects return an array values.push( value ); } } return values; // Everything else, we just grab the value } else return (this[0].value || "").replace(/\r/g, ""); } return undefined; } if( value.constructor == Number ) value += ''; return this.each(function(){ if ( this.nodeType != 1 ) return; if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) this.checked = (jQuery.inArray(this.value, value) >= 0 || jQuery.inArray(this.name, value) >= 0); else if ( jQuery.nodeName( this, "select" ) ) { var values = jQuery.makeArray(value); jQuery( "option", this ).each(function(){ this.selected = (jQuery.inArray( this.value, values ) >= 0 || jQuery.inArray( this.text, values ) >= 0); }); if ( !values.length ) this.selectedIndex = -1; } else this.value = value; }); }, | 7481 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/7481/dab47d32976aaaf622fe19a0f6372d9c7d38a3b0/jquery-latest.js/buggy/public/javascripts/jquery-latest.js |
else if ( jQuery.nodeName( this, "select" ) ) { var values = jQuery.makeArray(value); | if ( typeof val === "number" ) { val += ""; } | val: function( value ) { if ( value == undefined ) { if ( this.length ) { var elem = this[0]; // We need to handle select boxes special if ( jQuery.nodeName( elem, "select" ) ) { var index = elem.selectedIndex, values = [], options = elem.options, one = elem.type == "select-one"; // Nothing was selected if ( index < 0 ) return null; // Loop through all the selected options for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { var option = options[ i ]; if ( option.selected ) { // Get the specifc value for the option value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; // We don't need an array for one selects if ( one ) return value; // Multi-Selects return an array values.push( value ); } } return values; // Everything else, we just grab the value } else return (this[0].value || "").replace(/\r/g, ""); } return undefined; } if( value.constructor == Number ) value += ''; return this.each(function(){ if ( this.nodeType != 1 ) return; if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) this.checked = (jQuery.inArray(this.value, value) >= 0 || jQuery.inArray(this.name, value) >= 0); else if ( jQuery.nodeName( this, "select" ) ) { var values = jQuery.makeArray(value); jQuery( "option", this ).each(function(){ this.selected = (jQuery.inArray( this.value, values ) >= 0 || jQuery.inArray( this.text, values ) >= 0); }); if ( !values.length ) this.selectedIndex = -1; } else this.value = value; }); }, | 7481 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/7481/dab47d32976aaaf622fe19a0f6372d9c7d38a3b0/jquery-latest.js/buggy/public/javascripts/jquery-latest.js |
jQuery( "option", this ).each(function(){ this.selected = (jQuery.inArray( this.value, values ) >= 0 || jQuery.inArray( this.text, values ) >= 0); | if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) { this.checked = jQuery.inArray( self.val(), val ) >= 0; } else if ( jQuery.nodeName( this, "select" ) ) { var values = jQuery.makeArray(val); jQuery( "option", this ).each(function() { this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; | val: function( value ) { if ( value == undefined ) { if ( this.length ) { var elem = this[0]; // We need to handle select boxes special if ( jQuery.nodeName( elem, "select" ) ) { var index = elem.selectedIndex, values = [], options = elem.options, one = elem.type == "select-one"; // Nothing was selected if ( index < 0 ) return null; // Loop through all the selected options for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { var option = options[ i ]; if ( option.selected ) { // Get the specifc value for the option value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; // We don't need an array for one selects if ( one ) return value; // Multi-Selects return an array values.push( value ); } } return values; // Everything else, we just grab the value } else return (this[0].value || "").replace(/\r/g, ""); } return undefined; } if( value.constructor == Number ) value += ''; return this.each(function(){ if ( this.nodeType != 1 ) return; if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) this.checked = (jQuery.inArray(this.value, value) >= 0 || jQuery.inArray(this.name, value) >= 0); else if ( jQuery.nodeName( this, "select" ) ) { var values = jQuery.makeArray(value); jQuery( "option", this ).each(function(){ this.selected = (jQuery.inArray( this.value, values ) >= 0 || jQuery.inArray( this.text, values ) >= 0); }); if ( !values.length ) this.selectedIndex = -1; } else this.value = value; }); }, | 7481 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/7481/dab47d32976aaaf622fe19a0f6372d9c7d38a3b0/jquery-latest.js/buggy/public/javascripts/jquery-latest.js |
if ( !values.length ) | if ( !values.length ) { | val: function( value ) { if ( value == undefined ) { if ( this.length ) { var elem = this[0]; // We need to handle select boxes special if ( jQuery.nodeName( elem, "select" ) ) { var index = elem.selectedIndex, values = [], options = elem.options, one = elem.type == "select-one"; // Nothing was selected if ( index < 0 ) return null; // Loop through all the selected options for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { var option = options[ i ]; if ( option.selected ) { // Get the specifc value for the option value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; // We don't need an array for one selects if ( one ) return value; // Multi-Selects return an array values.push( value ); } } return values; // Everything else, we just grab the value } else return (this[0].value || "").replace(/\r/g, ""); } return undefined; } if( value.constructor == Number ) value += ''; return this.each(function(){ if ( this.nodeType != 1 ) return; if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) this.checked = (jQuery.inArray(this.value, value) >= 0 || jQuery.inArray(this.name, value) >= 0); else if ( jQuery.nodeName( this, "select" ) ) { var values = jQuery.makeArray(value); jQuery( "option", this ).each(function(){ this.selected = (jQuery.inArray( this.value, values ) >= 0 || jQuery.inArray( this.text, values ) >= 0); }); if ( !values.length ) this.selectedIndex = -1; } else this.value = value; }); }, | 7481 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/7481/dab47d32976aaaf622fe19a0f6372d9c7d38a3b0/jquery-latest.js/buggy/public/javascripts/jquery-latest.js |
} else this.value = value; | } else { this.value = val; } | val: function( value ) { if ( value == undefined ) { if ( this.length ) { var elem = this[0]; // We need to handle select boxes special if ( jQuery.nodeName( elem, "select" ) ) { var index = elem.selectedIndex, values = [], options = elem.options, one = elem.type == "select-one"; // Nothing was selected if ( index < 0 ) return null; // Loop through all the selected options for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { var option = options[ i ]; if ( option.selected ) { // Get the specifc value for the option value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; // We don't need an array for one selects if ( one ) return value; // Multi-Selects return an array values.push( value ); } } return values; // Everything else, we just grab the value } else return (this[0].value || "").replace(/\r/g, ""); } return undefined; } if( value.constructor == Number ) value += ''; return this.each(function(){ if ( this.nodeType != 1 ) return; if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) this.checked = (jQuery.inArray(this.value, value) >= 0 || jQuery.inArray(this.name, value) >= 0); else if ( jQuery.nodeName( this, "select" ) ) { var values = jQuery.makeArray(value); jQuery( "option", this ).each(function(){ this.selected = (jQuery.inArray( this.value, values ) >= 0 || jQuery.inArray( this.text, values ) >= 0); }); if ( !values.length ) this.selectedIndex = -1; } else this.value = value; }); }, | 7481 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/7481/dab47d32976aaaf622fe19a0f6372d9c7d38a3b0/jquery-latest.js/buggy/public/javascripts/jquery-latest.js |
}, | } | val: function( value ) { if ( value == undefined ) { if ( this.length ) { var elem = this[0]; // We need to handle select boxes special if ( jQuery.nodeName( elem, "select" ) ) { var index = elem.selectedIndex, values = [], options = elem.options, one = elem.type == "select-one"; // Nothing was selected if ( index < 0 ) return null; // Loop through all the selected options for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { var option = options[ i ]; if ( option.selected ) { // Get the specifc value for the option value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; // We don't need an array for one selects if ( one ) return value; // Multi-Selects return an array values.push( value ); } } return values; // Everything else, we just grab the value } else return (this[0].value || "").replace(/\r/g, ""); } return undefined; } if( value.constructor == Number ) value += ''; return this.each(function(){ if ( this.nodeType != 1 ) return; if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) this.checked = (jQuery.inArray(this.value, value) >= 0 || jQuery.inArray(this.name, value) >= 0); else if ( jQuery.nodeName( this, "select" ) ) { var values = jQuery.makeArray(value); jQuery( "option", this ).each(function(){ this.selected = (jQuery.inArray( this.value, values ) >= 0 || jQuery.inArray( this.text, values ) >= 0); }); if ( !values.length ) this.selectedIndex = -1; } else this.value = value; }); }, | 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 l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); | this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i= e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); | (function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); | 8656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8656/4120b09b68ebe356eaf79e35f7e2d6ee441dee08/jquery.js/clean/js/jquery.js |
val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var k=f[h];if(k.selected&&(c.support.optDisabled?!k.disabled:k.getAttribute("disabled")===null)&&(!k.parentNode.disabled||!c.nodeName(k.parentNode,"optgroup"))){a=c(k).val();if(b)return a;d.push(a)}}return d}if(ra.test(b.type)&& !c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Pa,"")}return A}var l=c.isFunction(a);return this.each(function(n){var s=c(this),v=a;if(this.nodeType===1){if(l)v=a.call(this,n,s.val());if(v==null)v="";else if(typeof v==="number")v+="";else if(c.isArray(v))v=c.map(v,function(D){return D==null?"":D+""});if(c.isArray(v)&&ra.test(this.type))this.checked=c.inArray(s.val(),v)>=0;else if(c.nodeName(this,"select")){var B=c.makeArray(v);c("option",this).each(function(){this.selected= c.inArray(c(this).val(),B)>=0});if(!B.length)this.selectedIndex=-1}else this.value=v}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return A;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==A;b=e&&c.props[b]||b;if(a.nodeType===1){var h=Qa.test(b);if((b in a||a[b]!==A)&&e&&!h){if(f){b==="type"&&Ra.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); | "__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(sa," ").indexOf(a)>-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one"; if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var l=f[h];if(l.selected&&(c.support.optDisabled?!l.disabled:l.getAttribute("disabled")===null)&&(!l.parentNode.disabled||!c.nodeName(l.parentNode,"optgroup"))){a=c(l).val();if(b)return a;d.push(a)}}return d}if(ta.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Sa,"")}return B}var k=c.isFunction(a);return this.each(function(o){var x=c(this),r=a;if(this.nodeType===1){if(k)r= a.call(this,o,x.val());if(r==null)r="";else if(typeof r==="number")r+="";else if(c.isArray(r))r=c.map(r,function(C){return C==null?"":C+""});if(c.isArray(r)&&ta.test(this.type))this.checked=c.inArray(x.val(),r)>=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true}, | val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var k=f[h];if(k.selected&&(c.support.optDisabled?!k.disabled:k.getAttribute("disabled")===null)&&(!k.parentNode.disabled||!c.nodeName(k.parentNode,"optgroup"))){a=c(k).val();if(b)return a;d.push(a)}}return d}if(ra.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Pa,"")}return A}var l=c.isFunction(a);return this.each(function(n){var s=c(this),v=a;if(this.nodeType===1){if(l)v=a.call(this,n,s.val());if(v==null)v="";else if(typeof v==="number")v+="";else if(c.isArray(v))v=c.map(v,function(D){return D==null?"":D+""});if(c.isArray(v)&&ra.test(this.type))this.checked=c.inArray(s.val(),v)>=0;else if(c.nodeName(this,"select")){var B=c.makeArray(v);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),B)>=0});if(!B.length)this.selectedIndex=-1}else this.value=v}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return A;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==A;b=e&&c.props[b]||b;if(a.nodeType===1){var h=Qa.test(b);if((b in a||a[b]!==A)&&e&&!h){if(f){b==="type"&&Ra.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); | 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 |
val: function( value ) { if ( !arguments.length ) { var elem = this[0]; if ( elem ) { if ( jQuery.nodeName( elem, "option" ) ) { var val = elem.attributes.value; return !val || val.specified ? elem.value : elem.text; } if ( jQuery.nodeName( elem, "select" ) ) { var index = elem.selectedIndex, values = [], options = elem.options, one = elem.type === "select-one"; if ( index < 0 ) { return null; } for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { var option = options[ i ]; if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { value = jQuery(option).val(); if ( one ) { return value; } values.push( value ); } } return values; } if ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) { return elem.getAttribute("value") === null ? "on" : elem.value; } return (elem.value || "").replace(rreturn, ""); } return undefined; } var isFunction = jQuery.isFunction(value); return this.each(function(i) { var self = jQuery(this), val = value; if ( this.nodeType !== 1 ) { return; } if ( isFunction ) { val = value.call(this, i, self.val()); } if ( val == null ) { val = ""; } else if ( typeof val === "number" ) { val += ""; } else if ( jQuery.isArray(val) ) { val = jQuery.map(val, function (value) { return value == null ? "" : value + ""; }); } if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) { this.checked = jQuery.inArray( self.val(), val ) >= 0; } else if ( jQuery.nodeName( this, "select" ) ) { var values = jQuery.makeArray(val); jQuery( "option", this ).each(function() { this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; }); if ( !values.length ) { this.selectedIndex = -1; } } else { this.value = val; } }); } | "__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(sa," ").indexOf(a)>-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one"; if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var l=f[h];if(l.selected&&(c.support.optDisabled?!l.disabled:l.getAttribute("disabled")===null)&&(!l.parentNode.disabled||!c.nodeName(l.parentNode,"optgroup"))){a=c(l).val();if(b)return a;d.push(a)}}return d}if(ta.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Sa,"")}return B}var k=c.isFunction(a);return this.each(function(o){var x=c(this),r=a;if(this.nodeType===1){if(k)r= a.call(this,o,x.val());if(r==null)r="";else if(typeof r==="number")r+="";else if(c.isArray(r))r=c.map(r,function(C){return C==null?"":C+""});if(c.isArray(r)&&ta.test(this.type))this.checked=c.inArray(x.val(),r)>=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true}, | val: function( value ) { if ( !arguments.length ) { var elem = this[0]; if ( elem ) { if ( jQuery.nodeName( elem, "option" ) ) { // attributes.value is undefined in Blackberry 4.7 but // uses .value. See #6932 var val = elem.attributes.value; return !val || val.specified ? elem.value : elem.text; } // We need to handle select boxes special if ( jQuery.nodeName( elem, "select" ) ) { var index = elem.selectedIndex, values = [], options = elem.options, one = elem.type === "select-one"; // Nothing was selected if ( index < 0 ) { return null; } // Loop through all the selected options for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { var option = options[ i ]; // Don't return options that are disabled or in a disabled optgroup if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { // Get the specific value for the option value = jQuery(option).val(); // We don't need an array for one selects if ( one ) { return value; } // Multi-Selects return an array values.push( value ); } } return values; } // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified if ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) { return elem.getAttribute("value") === null ? "on" : elem.value; } // Everything else, we just grab the value return (elem.value || "").replace(rreturn, ""); } return undefined; } var isFunction = jQuery.isFunction(value); return this.each(function(i) { var self = jQuery(this), val = value; if ( this.nodeType !== 1 ) { return; } if ( isFunction ) { val = value.call(this, i, self.val()); } // Treat null/undefined as ""; convert numbers to string if ( val == null ) { val = ""; } else if ( typeof val === "number" ) { val += ""; } else if ( jQuery.isArray(val) ) { val = jQuery.map(val, function (value) { return value == null ? "" : value + ""; }); } if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) { this.checked = jQuery.inArray( self.val(), val ) >= 0; } else if ( jQuery.nodeName( this, "select" ) ) { var values = jQuery.makeArray(val); jQuery( "option", this ).each(function() { this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; }); if ( !values.length ) { this.selectedIndex = -1; } } else { this.value = val; } }); } | 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 l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); | " "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(za," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i<d;i++){var j=e[i];if(j.selected){a=c(j).val();if(b)return a;f.push(a)}}return f}if(Aa.test(b.type)&& !c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Va,"")}return w}var o=c.isFunction(a);return this.each(function(p){var n=c(this),t=a;if(this.nodeType===1){if(o)t=a.call(this,p,n.val());if(typeof t==="number")t+="";if(c.isArray(t)&&Aa.test(this.type))this.checked=c.inArray(n.val(),t)>=0;else if(c.nodeName(this,"select")){var z=c.makeArray(t);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),z)>=0});if(!z.length)this.selectedIndex= -1}else this.value=t}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Wa.test(b);if(b in a&&f&&!i){if(e){if(b==="type"&&Xa.test(a.nodeName)&&a.parentNode)throw"type property can't be changed";a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue; | (function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); | 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 l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); | a.split(ca);e=o[i++];){n=f?n:!j.hasClass(e);j[n?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(ya," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===v){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value|| {}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i<d;i++){var j=e[i];if(j.selected){a=c(j).val();if(b)return a;f.push(a)}}return f}if(za.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Wa,"")}return v}var n=c.isFunction(a);return this.each(function(o){var m=c(this),s=a;if(this.nodeType===1){if(n)s=a.call(this,o,m.val()); if(typeof s==="number")s+="";if(c.isArray(s)&&za.test(this.type))this.checked=c.inArray(m.val(),s)>=0;else if(c.nodeName(this,"select")){var x=c.makeArray(s);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),x)>=0});if(!x.length)this.selectedIndex=-1}else this.value=s}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return v;if(f&&b in c.attrFn)return c(a)[b](d); | (function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); | 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 |
this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i= e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); | val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var k=f[h];if(k.selected&&(c.support.optDisabled?!k.disabled:k.getAttribute("disabled")===null)&&(!k.parentNode.disabled||!c.nodeName(k.parentNode,"optgroup"))){a=c(k).val();if(b)return a;d.push(a)}}return d}if(ra.test(b.type)&& !c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Pa,"")}return A}var l=c.isFunction(a);return this.each(function(n){var s=c(this),v=a;if(this.nodeType===1){if(l)v=a.call(this,n,s.val());if(v==null)v="";else if(typeof v==="number")v+="";else if(c.isArray(v))v=c.map(v,function(D){return D==null?"":D+""});if(c.isArray(v)&&ra.test(this.type))this.checked=c.inArray(s.val(),v)>=0;else if(c.nodeName(this,"select")){var B=c.makeArray(v);c("option",this).each(function(){this.selected= c.inArray(c(this).val(),B)>=0});if(!B.length)this.selectedIndex=-1}else this.value=v}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return A;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==A;b=e&&c.props[b]||b;if(a.nodeType===1){var h=Qa.test(b);if((b in a||a[b]!==A)&&e&&!h){if(f){b==="type"&&Ra.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); | this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); | 8656 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8656/debb161f7671ff5bddc8def2221db94ff111ff1b/jquery.js/clean/js/jquery.js |
val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var k=f[h];if(k.selected&&(c.support.optDisabled?!k.disabled:k.getAttribute("disabled")===null)&&(!k.parentNode.disabled||!c.nodeName(k.parentNode,"optgroup"))){a=c(k).val();if(b)return a;d.push(a)}}return d}if(ra.test(b.type)&& !c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Pa,"")}return A}var l=c.isFunction(a);return this.each(function(n){var s=c(this),v=a;if(this.nodeType===1){if(l)v=a.call(this,n,s.val());if(v==null)v="";else if(typeof v==="number")v+="";else if(c.isArray(v))v=c.map(v,function(D){return D==null?"":D+""});if(c.isArray(v)&&ra.test(this.type))this.checked=c.inArray(s.val(),v)>=0;else if(c.nodeName(this,"select")){var B=c.makeArray(v);c("option",this).each(function(){this.selected= c.inArray(c(this).val(),B)>=0});if(!B.length)this.selectedIndex=-1}else this.value=v}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return A;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==A;b=e&&c.props[b]||b;if(a.nodeType===1){var h=Qa.test(b);if((b in a||a[b]!==A)&&e&&!h){if(f){b==="type"&&Ra.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); | "__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(sa," ").indexOf(a)>-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one"; if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var l=f[h];if(l.selected&&(c.support.optDisabled?!l.disabled:l.getAttribute("disabled")===null)&&(!l.parentNode.disabled||!c.nodeName(l.parentNode,"optgroup"))){a=c(l).val();if(b)return a;d.push(a)}}return d}if(ta.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Sa,"")}return B}var k=c.isFunction(a);return this.each(function(o){var x=c(this),r=a;if(this.nodeType===1){if(k)r= a.call(this,o,x.val());if(r==null)r="";else if(typeof r==="number")r+="";else if(c.isArray(r))r=c.map(r,function(C){return C==null?"":C+""});if(c.isArray(r)&&ta.test(this.type))this.checked=c.inArray(x.val(),r)>=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true}, | val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var k=f[h];if(k.selected&&(c.support.optDisabled?!k.disabled:k.getAttribute("disabled")===null)&&(!k.parentNode.disabled||!c.nodeName(k.parentNode,"optgroup"))){a=c(k).val();if(b)return a;d.push(a)}}return d}if(ra.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Pa,"")}return A}var l=c.isFunction(a);return this.each(function(n){var s=c(this),v=a;if(this.nodeType===1){if(l)v=a.call(this,n,s.val());if(v==null)v="";else if(typeof v==="number")v+="";else if(c.isArray(v))v=c.map(v,function(D){return D==null?"":D+""});if(c.isArray(v)&&ra.test(this.type))this.checked=c.inArray(s.val(),v)>=0;else if(c.nodeName(this,"select")){var B=c.makeArray(v);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),B)>=0});if(!B.length)this.selectedIndex=-1}else this.value=v}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return A;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==A;b=e&&c.props[b]||b;if(a.nodeType===1){var h=Qa.test(b);if((b in a||a[b]!==A)&&e&&!h){if(f){b==="type"&&Ra.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); | 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 |
a.split(ca);e=o[i++];){n=f?n:!j.hasClass(e);j[n?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(ya," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===v){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value|| {}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i<d;i++){var j=e[i];if(j.selected){a=c(j).val();if(b)return a;f.push(a)}}return f}if(za.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Wa,"")}return v}var n=c.isFunction(a);return this.each(function(o){var m=c(this),s=a;if(this.nodeType===1){if(n)s=a.call(this,o,m.val()); if(typeof s==="number")s+="";if(c.isArray(s)&&za.test(this.type))this.checked=c.inArray(m.val(),s)>=0;else if(c.nodeName(this,"select")){var x=c.makeArray(s);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),x)>=0});if(!x.length)this.selectedIndex=-1}else this.value=s}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return v;if(f&&b in c.attrFn)return c(a)[b](d); | this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i= e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); | a.split(ca);e=o[i++];){n=f?n:!j.hasClass(e);j[n?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(ya," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===v){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i<d;i++){var j=e[i];if(j.selected){a=c(j).val();if(b)return a;f.push(a)}}return f}if(za.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Wa,"")}return v}var n=c.isFunction(a);return this.each(function(o){var m=c(this),s=a;if(this.nodeType===1){if(n)s=a.call(this,o,m.val());if(typeof s==="number")s+="";if(c.isArray(s)&&za.test(this.type))this.checked=c.inArray(m.val(),s)>=0;else if(c.nodeName(this,"select")){var x=c.makeArray(s);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),x)>=0});if(!x.length)this.selectedIndex=-1}else this.value=s}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return v;if(f&&b in c.attrFn)return c(a)[b](d); | 8560 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8560/4d748e5cbfcbd91691b089e42cffdf43918e6201/jquery.min.js/clean/web/javascript/jquery/jquery.min.js |
this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i= e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); | val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var k=f[h];if(k.selected&&(c.support.optDisabled?!k.disabled:k.getAttribute("disabled")===null)&&(!k.parentNode.disabled||!c.nodeName(k.parentNode,"optgroup"))){a=c(k).val();if(b)return a;d.push(a)}}return d}if(ra.test(b.type)&& !c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Pa,"")}return A}var l=c.isFunction(a);return this.each(function(n){var s=c(this),v=a;if(this.nodeType===1){if(l)v=a.call(this,n,s.val());if(v==null)v="";else if(typeof v==="number")v+="";else if(c.isArray(v))v=c.map(v,function(D){return D==null?"":D+""});if(c.isArray(v)&&ra.test(this.type))this.checked=c.inArray(s.val(),v)>=0;else if(c.nodeName(this,"select")){var B=c.makeArray(v);c("option",this).each(function(){this.selected= c.inArray(c(this).val(),B)>=0});if(!B.length)this.selectedIndex=-1}else this.value=v}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return A;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==A;b=e&&c.props[b]||b;if(a.nodeType===1){var h=Qa.test(b);if((b in a||a[b]!==A)&&e&&!h){if(f){b==="type"&&Ra.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); | this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/8e2f21f44411204c60060f830cb1a800533462d2/jquery.js/buggy/wp-includes/js/jquery/jquery.js |
a===false?"":d.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,e=this.length;b<e;b++)if((" "+this[b].className+" ").replace(ia," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===v){var b=this[0];if(b){if(d.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(d.nodeName(b,"select")){var e=b.selectedIndex,g=[],h=b.options;b=b.type==="select-one";if(e<0)return null;var k=b?e:0;for(e=b?e+1:h.length;k<e;k++){var l=h[k];if(l.selected){a= d(l).val();if(b)return a;g.push(a)}}return g}if(ja.test(b.type)&&!d.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Ea,"")}return v}var q=d.isFunction(a);return this.each(function(p){var o=d(this),w=a;if(this.nodeType===1){if(q)w=a.call(this,p,o.val());if(typeof w==="number")w+="";if(d.isArray(w)&&ja.test(this.type))this.checked=d.inArray(o.val(),w)>=0;else if(d.nodeName(this,"select")){var A=d.makeArray(w);d("option",this).each(function(){this.selected= d.inArray(d(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=w}})}});d.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,e,g){if(!a||a.nodeType===3||a.nodeType===8)return v;if(g&&b in d.attrFn)return d(a)[b](e);g=a.nodeType!==1||!d.isXMLDoc(a);var h=e!==v;b=g&&d.props[b]||b;if(a.nodeType===1){var k=Fa.test(b);if(b in a&&g&&!k){if(h){if(b==="type"&&Ga.test(a.nodeName)&&a.parentNode)throw"type property can't be changed"; | l[q?"addClass":"removeClass"](h)}else if(e==="undefined"||e==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,e=this.length;b<e;b++)if((" "+this[b].className+" ").replace(ia," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===v){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b, "select")){var e=b.selectedIndex,f=[],h=b.options;b=b.type==="select-one";if(e<0)return null;var k=b?e:0;for(e=b?e+1:h.length;k<e;k++){var l=h[k];if(l.selected){a=c(l).val();if(b)return a;f.push(a)}}return f}if(ja.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Ea,"")}return v}var q=c.isFunction(a);return this.each(function(p){var o=c(this),w=a;if(this.nodeType===1){if(q)w=a.call(this,p,o.val());if(typeof w==="number")w+="";if(c.isArray(w)&& ja.test(this.type))this.checked=c.inArray(o.val(),w)>=0;else if(c.nodeName(this,"select")){var A=c.makeArray(w);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=w}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,e,f){if(!a||a.nodeType===3||a.nodeType===8)return v;if(f&&b in c.attrFn)return c(a)[b](e);f=a.nodeType!==1||!c.isXMLDoc(a);var h=e!== | a===false?"":d.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,e=this.length;b<e;b++)if((" "+this[b].className+" ").replace(ia," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===v){var b=this[0];if(b){if(d.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(d.nodeName(b,"select")){var e=b.selectedIndex,g=[],h=b.options;b=b.type==="select-one";if(e<0)return null;var k=b?e:0;for(e=b?e+1:h.length;k<e;k++){var l=h[k];if(l.selected){a=d(l).val();if(b)return a;g.push(a)}}return g}if(ja.test(b.type)&&!d.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Ea,"")}return v}var q=d.isFunction(a);return this.each(function(p){var o=d(this),w=a;if(this.nodeType===1){if(q)w=a.call(this,p,o.val());if(typeof w==="number")w+="";if(d.isArray(w)&&ja.test(this.type))this.checked=d.inArray(o.val(),w)>=0;else if(d.nodeName(this,"select")){var A=d.makeArray(w);d("option",this).each(function(){this.selected=d.inArray(d(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=w}})}});d.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,e,g){if(!a||a.nodeType===3||a.nodeType===8)return v;if(g&&b in d.attrFn)return d(a)[b](e);g=a.nodeType!==1||!d.isXMLDoc(a);var h=e!==v;b=g&&d.props[b]||b;if(a.nodeType===1){var k=Fa.test(b);if(b in a&&g&&!k){if(h){if(b==="type"&&Ga.test(a.nodeName)&&a.parentNode)throw"type property can't be changed"; | 5677 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/5677/bb76d586bec69eabec79913009e9ba30d248e123/jquery.min.js/buggy/src/web/skeleton/jquery.min.js |
" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(za," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i<d;i++){var j=e[i];if(j.selected){a=c(j).val();if(b)return a;f.push(a)}}return f}if(Aa.test(b.type)&& !c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Va,"")}return w}var o=c.isFunction(a);return this.each(function(p){var n=c(this),t=a;if(this.nodeType===1){if(o)t=a.call(this,p,n.val());if(typeof t==="number")t+="";if(c.isArray(t)&&Aa.test(this.type))this.checked=c.inArray(n.val(),t)>=0;else if(c.nodeName(this,"select")){var z=c.makeArray(t);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),z)>=0});if(!z.length)this.selectedIndex= -1}else this.value=t}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Wa.test(b);if(b in a&&f&&!i){if(e){if(b==="type"&&Xa.test(a.nodeName)&&a.parentNode)throw"type property can't be changed";a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue; | a.split(ca);e=o[i++];){n=f?n:!j.hasClass(e);j[n?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(ya," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===v){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value|| {}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i<d;i++){var j=e[i];if(j.selected){a=c(j).val();if(b)return a;f.push(a)}}return f}if(za.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Wa,"")}return v}var n=c.isFunction(a);return this.each(function(o){var m=c(this),s=a;if(this.nodeType===1){if(n)s=a.call(this,o,m.val()); if(typeof s==="number")s+="";if(c.isArray(s)&&za.test(this.type))this.checked=c.inArray(m.val(),s)>=0;else if(c.nodeName(this,"select")){var x=c.makeArray(s);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),x)>=0});if(!x.length)this.selectedIndex=-1}else this.value=s}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return v;if(f&&b in c.attrFn)return c(a)[b](d); | " "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(za," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i<d;i++){var j=e[i];if(j.selected){a=c(j).val();if(b)return a;f.push(a)}}return f}if(Aa.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Va,"")}return w}var o=c.isFunction(a);return this.each(function(p){var n=c(this),t=a;if(this.nodeType===1){if(o)t=a.call(this,p,n.val());if(typeof t==="number")t+="";if(c.isArray(t)&&Aa.test(this.type))this.checked=c.inArray(n.val(),t)>=0;else if(c.nodeName(this,"select")){var z=c.makeArray(t);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),z)>=0});if(!z.length)this.selectedIndex=-1}else this.value=t}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Wa.test(b);if(b in a&&f&&!i){if(e){if(b==="type"&&Xa.test(a.nodeName)&&a.parentNode)throw"type property can't be changed";a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue; | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/59fd2fb902fce80768d38770b0d96a19623d08d2/jquery.js/buggy/wp-includes/js/jquery/jquery.js |
sep_cnt = 0; | sep_cnt = 0; colonp = 0; | function validate_ip6addr(o){ is_ip6 = true; sep_cnt = 0; pos = 0; len = o.value.length; for (i=0; i<len; i++) { c=o.value.charAt(i); if (c==':') { sep_cnt++; if (i > pos) num = parseInt(o.value.substring(pos, i), 16); else num = 0; if (sep_cnt > 7 || num > 0xffff) { is_ip6 = false; break; } pos = i+1; } else if (!(c>='0'&&c<='9') && !(c>='a'&&c<='f') && !(c>='A'&&c<='F')) { is_ip6 = false; break; } } if (pos < len){ // Check final part if (parseInt(o.value.substring(pos, len), 16) > 0xffff) is_ip6 = false; } if (!is_ip6) { alert(o.value + ' is not a valid IPv6 address!'); o.focus(); return false; } return true;} | 1589 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/1589/fc48c560a5f4c09071fea1adaff64fcb671e7577/general.js/buggy/www/web_asus_en/general.js |
if (!is_ip6) | if (!is_ip6 || (sep_cnt != 7 && colonp == 0)) | function validate_ip6addr(o){ is_ip6 = true; sep_cnt = 0; pos = 0; len = o.value.length; for (i=0; i<len; i++) { c=o.value.charAt(i); if (c==':') { sep_cnt++; if (i > pos) num = parseInt(o.value.substring(pos, i), 16); else num = 0; if (sep_cnt > 7 || num > 0xffff) { is_ip6 = false; break; } pos = i+1; } else if (!(c>='0'&&c<='9') && !(c>='a'&&c<='f') && !(c>='A'&&c<='F')) { is_ip6 = false; break; } } if (pos < len){ // Check final part if (parseInt(o.value.substring(pos, len), 16) > 0xffff) is_ip6 = false; } if (!is_ip6) { alert(o.value + ' is not a valid IPv6 address!'); o.focus(); return false; } return true;} | 1589 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/1589/fc48c560a5f4c09071fea1adaff64fcb671e7577/general.js/buggy/www/web_asus_en/general.js |
ip1 = (ip >> 16) % 0xffff; ip2 = ip & 0xffff; | ip1 = (ip >> 16) & 0xffff; ip2 = ip & 0xffff; | function validate_ipaddr(o, v){ num = -1; pos = 0; if (o.value.length===0) { if (v=='dhcp_start' || v=='dhcp_end' || v=='wan_ipaddr' || v=='ipv6_sit_remote' || v=='ipv6_sit_local' || v=='ipv6_sit_relay') { alert("Fields can't be blank!!!"); o.focus(); } return true; } for(i=0; i<o.value.length; i++) { c=o.value.charAt(i); if(c>='0' && c<='9') { if ( num==-1 ) { num = (c-'0'); } else { num = num*10 + (c-'0'); } } else { if ( num<0 || num>255 || c!='.') { alert(o.value + ' is not a valid IP address!'); o.value = ""; o.focus(); return false; } if (pos===0) v1=num; else if (pos==1) v2=num; else if (pos==2) v3=num; num = -1; pos++; } } if (pos!=3 || num<0 || num>255) { alert(o.value + ' is not a valid IP address!'); o.value = ""; o.focus(); return false; } else v4=num; o.value = v1 + "." + v2 + "." + v3 + "." + v4; if ((v1 > 0) && (v1 < 127)) mask = "255.0.0.0"; else if ((v1 > 127) && (v1 < 192)) mask = "255.255.0.0"; else if ((v1 > 191) && (v1 < 224)) mask = "255.255.255.0"; else mask = "0.0.0.0";// if (v=='ExternalIPAddress' && document.form.wan_netmask.value == '') if (v=='wan_ipaddr' && document.form.wan_netmask.value==="") {// document.form.wan_netmask.value = "255.255.255.0"; document.form.wan_netmask.value = mask; }// else if (v=='IPRouters' && document.form.lan_netmask.value === '') else if (v=='lan_ipaddr' && document.form.lan_netmask.value==="" ) {// document.form.lan_netmask.value = "255.255.255.0"; document.form.lan_netmask.value = mask; } else if (v=='dhcp_start') { if (intoa(o.value)>intoa(document.form.dhcp_end.value)) { tmp = document.form.dhcp_start.value; document.form.dhcp_start.value = document.form.dhcp_end.value; document.form.dhcp_end.value = tmp; } } else if (v=='dhcp_end') { if (intoa(document.form.dhcp_start.value)>intoa(o.value)) { tmp = document.form.dhcp_start.value; document.form.dhcp_start.value = document.form.dhcp_end.value; document.form.dhcp_end.value = tmp; } } else if (v=='ipv6_sit_local') { ip = intoa(o.value); if (ip > 0) { ip1 = (ip >> 16) % 0xffff; ip2 = ip & 0xffff; prefix = '2002:' + ip1.toString(16) +':' + ip2.toString(16) + ':'; document.form.ipv6_wan_addr.value = prefix+'0::1'; document.form.ipv6_lan_addr.value = prefix+'1::1'; } } return true;} | 1589 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/1589/7ed027b1f3e63f4ef65d820b50388b65bbcaa476/general.js/clean/www/web_asus_en/general.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 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(){a(".hide-column-tog","#adv-settings").click(function(){var b=a(this).val();if(a(this).attr("checked")){a(".column-"+b).show()}else{a(".column-"+b).hide()}columns.save_manage_columns_state()})},save_manage_columns_state:function(){var b=a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",");a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})}};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("textarea#newcontent").keydown(function(k){if(k.keyCode!=9){return true}var i=k.target,m=i.selectionStart,h=i.selectionEnd,l=i.value,g,j;k.stopPropagation();k.preventDefault();if(document.selection){i.focus();j=document.selection.createRange();j.text="\t"}else{if(m>=0){g=this.scrollTop;i.value=l.substring(0,m).concat("\t",l.substring(h));i.selectionStart=i.selectionEnd=m+1;this.scrollTop=g}}})});jQuery(document).ready(function(b){var a=b("span.turbo-nag","#user_info");if(!a.length||("undefined"!=typeof(google)&&google.gears)){return}if("undefined"!=typeof GearsFactory){return}else{try{if(("undefined"!=typeof window.ActiveXObject&&ActiveXObject("Gears.Factory"))||("undefined"!=typeof navigator.mimeTypes&&navigator.mimeTypes["application/x-googlegears"])){return}}catch(c){}}a.show()}); | var showNotice,adminMenu,columns,validateForm;(function($){adminMenu={init:function(){var menu=$("#adminmenu");$(".wp-menu-toggle",menu).each(function(){var t=$(this),sub=t.siblings(".wp-submenu");if(sub.length){t.click(function(){adminMenu.toggle(sub)})}else{t.hide()}});this.favorites();$(".separator",menu).click(function(){if($("body").hasClass("folded")){adminMenu.fold(1);deleteUserSetting("mfold")}else{adminMenu.fold();setUserSetting("mfold","f")}return false});if($("body").hasClass("folded")){this.fold()}this.restoreMenuState()},restoreMenuState:function(){$("li.wp-has-submenu","#adminmenu").each(function(i,e){var v=getUserSetting("m"+i);if($(e).hasClass("wp-has-current-submenu")){return true}if("o"==v){$(e).addClass("wp-menu-open")}else{if("c"==v){$(e).removeClass("wp-menu-open")}}})},toggle:function(el){var id=el.slideToggle(150,function(){el.css("display","")}).parent().toggleClass("wp-menu-open").attr("id");if(id){$("li.wp-has-submenu","#adminmenu").each(function(i,e){if(id==e.id){var v=$(e).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+i,v)}})}return false},fold:function(off){if(off){$("body").removeClass("folded");$("#adminmenu li.wp-has-submenu").unbind()}else{$("body").addClass("folded");$("#adminmenu li.wp-has-submenu").hoverIntent({over:function(e){var m,b,h,o,f;m=$(this).find(".wp-submenu");b=$(this).offset().top+m.height()+1;h=$("#wpwrap").height();o=60+b-h;f=$(window).height()+$(window).scrollTop()-15;if(f<(b-o)){o=b-f}if(o>1){m.css({marginTop:"-"+o+"px"})}else{if(m.css("marginTop")){m.css({marginTop:""})}}m.addClass("sub-open")},out:function(){$(this).find(".wp-submenu").removeClass("sub-open").css({marginTop:""})},timeout:220,sensitivity:8,interval:100})}},favorites:function(){$("#favorite-inside").width($("#favorite-actions").width()-4);$("#favorite-toggle, #favorite-inside").bind("mouseenter",function(){$("#favorite-inside").removeClass("slideUp").addClass("slideDown");setTimeout(function(){if($("#favorite-inside").hasClass("slideDown")){$("#favorite-inside").slideDown(100);$("#favorite-first").addClass("slide-down")}},200)}).bind("mouseleave",function(){$("#favorite-inside").removeClass("slideDown").addClass("slideUp");setTimeout(function(){if($("#favorite-inside").hasClass("slideUp")){$("#favorite-inside").slideUp(100,function(){$("#favorite-first").removeClass("slide-down")})}},300)})}};$(document).ready(function(){adminMenu.init()});columns={init:function(){$(".hide-column-tog","#adv-settings").click(function(){var column=$(this).val();if($(this).attr("checked")){$(".column-"+column).show()}else{$(".column-"+column).hide()}columns.save_manage_columns_state()})},save_manage_columns_state:function(){var hidden=$(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",");$.post(ajaxurl,{action:"hidden-columns",hidden:hidden,screenoptionnonce:$("#screenoptionnonce").val(),page:pagenow})}};$(document).ready(function(){columns.init()});validateForm=function(form){return !$(form).find(".form-required").filter(function(){return $("input:visible",this).val()==""}).addClass("form-invalid").find("input:visible").change(function(){$(this).closest(".form-invalid").removeClass("form-invalid")}).size()}})(jQuery);showNotice={warn:function(){var msg=commonL10n.warnDelete||"";if(confirm(msg)){return true}return false},note:function(text){alert(text)}};jQuery(document).ready(function($){var lastClicked=false,checks,first,last,checked;$("div.wrap h2:first").nextAll("div.updated, div.error").addClass("below-h2");$("div.updated, div.error").not(".below-h2, .inline").insertAfter($("div.wrap h2:first"));$("#show-settings-link").click(function(){if(!$("#screen-options-wrap").hasClass("screen-options-open")){$("#contextual-help-link-wrap").css("visibility","hidden")}$("#screen-options-wrap").slideToggle("fast",function(){if($(this).hasClass("screen-options-open")){$("#show-settings-link").css({backgroundImage:'url("images/screen-options-right.gif")'});$("#contextual-help-link-wrap").css("visibility","");$(this).removeClass("screen-options-open")}else{$("#show-settings-link").css({backgroundImage:'url("images/screen-options-right-up.gif")'});$(this).addClass("screen-options-open")}});return false});$("#contextual-help-link").click(function(){if(!$("#contextual-help-wrap").hasClass("contextual-help-open")){$("#screen-options-link-wrap").css("visibility","hidden")}$("#contextual-help-wrap").slideToggle("fast",function(){if($(this).hasClass("contextual-help-open")){$("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right.gif")'});$("#screen-options-link-wrap").css("visibility","");$(this).removeClass("contextual-help-open")}else{$("#contextual-help-link").css({backgroundImage:'url("images/screen-options-right-up.gif")'});$(this).addClass("contextual-help-open")}});return false});$("tbody").children().children(".check-column").find(":checkbox").click(function(e){if("undefined"==e.shiftKey){return true}if(e.shiftKey){if(!lastClicked){return true}checks=$(lastClicked).closest("form").find(":checkbox");first=checks.index(lastClicked);last=checks.index(this);checked=$(this).attr("checked");if(0<first&&0<last&&first!=last){checks.slice(first,last).attr("checked",function(){if($(this).closest("tr").is(":visible")){return checked?"checked":""}return""})}}lastClicked=this;return true});$("thead, tfoot").find(":checkbox").click(function(e){var c=$(this).attr("checked"),kbtoggle="undefined"==typeof toggleWithKeyboard?false:toggleWithKeyboard,toggle=e.shiftKey||kbtoggle;$(this).closest("table").children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if($(this).closest("tr").is(":hidden")){return""}if(toggle){return $(this).attr("checked")?"":"checked"}else{if(c){return"checked"}}return""});$(this).closest("table").children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").attr("checked",function(){if(toggle){return""}else{if(c){return"checked"}}return""})});$("#default-password-nag-no").click(function(){setUserSetting("default_password_nag","hide");$("div.default-password-nag").hide();return false});$("#newcontent").keydown(function(e){if(e.keyCode!=9){return true}var el=e.target,selStart=el.selectionStart,selEnd=el.selectionEnd,val=el.value,scroll,sel;try{this.lastKey=9}catch(err){}if(document.selection){el.focus();sel=document.selection.createRange();sel.text="\t"}else{if(selStart>=0){scroll=this.scrollTop;el.value=val.substring(0,selStart).concat("\t",val.substring(selEnd));el.selectionStart=el.selectionEnd=selStart+1;this.scrollTop=scroll}}if(e.stopPropagation){e.stopPropagation()}if(e.preventDefault){e.preventDefault()}});$("#newcontent").blur(function(e){if(this.lastKey&&9==this.lastKey){this.focus()}})});jQuery(document).ready(function($){var turboNag=$("span.turbo-nag","#user_info");if(!turboNag.length||("undefined"!=typeof(google)&&google.gears)){return}if("undefined"!=typeof GearsFactory){return}else{try{if(("undefined"!=typeof window.ActiveXObject&&ActiveXObject("Gears.Factory"))||("undefined"!=typeof navigator.mimeTypes&&navigator.mimeTypes["application/x-googlegears"])){return}}catch(e){}}turboNag.show()}); | 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(){a(".hide-column-tog","#adv-settings").click(function(){var b=a(this).val();if(a(this).attr("checked")){a(".column-"+b).show()}else{a(".column-"+b).hide()}columns.save_manage_columns_state()})},save_manage_columns_state:function(){var b=a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",");a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})}};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("textarea#newcontent").keydown(function(k){if(k.keyCode!=9){return true}var i=k.target,m=i.selectionStart,h=i.selectionEnd,l=i.value,g,j;k.stopPropagation();k.preventDefault();if(document.selection){i.focus();j=document.selection.createRange();j.text="\t"}else{if(m>=0){g=this.scrollTop;i.value=l.substring(0,m).concat("\t",l.substring(h));i.selectionStart=i.selectionEnd=m+1;this.scrollTop=g}}})});jQuery(document).ready(function(b){var a=b("span.turbo-nag","#user_info");if(!a.length||("undefined"!=typeof(google)&&google.gears)){return}if("undefined"!=typeof GearsFactory){return}else{try{if(("undefined"!=typeof window.ActiveXObject&&ActiveXObject("Gears.Factory"))||("undefined"!=typeof navigator.mimeTypes&&navigator.mimeTypes["application/x-googlegears"])){return}}catch(c){}}a.show()}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/97dd47f08676bd120074363e908fda55be9b73f5/common.js/clean/wp-admin/js/common.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 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 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 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 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 |
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(){a(".hide-column-tog","#adv-settings").click(function(){var b=a(this).val();if(a(this).attr("checked")){a(".column-"+b).show()}else{a(".column-"+b).hide()}columns.save_manage_columns_state()})},save_manage_columns_state:function(){var b=a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",");a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})}};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").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})});jQuery(document).ready(function(b){var a=b("span.turbo-nag","#user_info");if(!a.length||("undefined"!=typeof(google)&&google.gears)){return}if("undefined"!=typeof GearsFactory){return}else{try{if(("undefined"!=typeof window.ActiveXObject&&ActiveXObject("Gears.Factory"))||("undefined"!=typeof navigator.mimeTypes&&navigator.mimeTypes["application/x-googlegears"])){return}}catch(c){}}a.show()}); | 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(){a(".hide-column-tog","#adv-settings").click(function(){var b=a(this).val();if(a(this).attr("checked")){a(".column-"+b).show()}else{a(".column-"+b).hide()}columns.save_manage_columns_state()})},save_manage_columns_state:function(){var b=a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",");a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})}};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").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("textarea#newcontent").keydown(function(k){if(k.keyCode!=9){return true}var i=k.target,m=i.selectionStart,h=i.selectionEnd,l=i.value,g,j;k.stopPropagation();k.preventDefault();if(document.selection){i.focus();j=document.selection.createRange();j.text="\t"}else{if(m>=0){g=this.scrollTop;i.value=l.substring(0,m).concat("\t",l.substring(h));i.selectionStart=i.selectionEnd=m+1;this.scrollTop=g}}})});jQuery(document).ready(function(b){var a=b("span.turbo-nag","#user_info");if(!a.length||("undefined"!=typeof(google)&&google.gears)){return}if("undefined"!=typeof GearsFactory){return}else{try{if(("undefined"!=typeof window.ActiveXObject&&ActiveXObject("Gears.Factory"))||("undefined"!=typeof navigator.mimeTypes&&navigator.mimeTypes["application/x-googlegears"])){return}}catch(c){}}a.show()}); | 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(){a(".hide-column-tog","#adv-settings").click(function(){var b=a(this).val();if(a(this).attr("checked")){a(".column-"+b).show()}else{a(".column-"+b).hide()}columns.save_manage_columns_state()})},save_manage_columns_state:function(){var b=a(".manage-column").filter(":hidden").map(function(){return this.id}).get().join(",");a.post(ajaxurl,{action:"hidden-columns",hidden:b,screenoptionnonce:a("#screenoptionnonce").val(),page:pagenow})}};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").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})});jQuery(document).ready(function(b){var a=b("span.turbo-nag","#user_info");if(!a.length||("undefined"!=typeof(google)&&google.gears)){return}if("undefined"!=typeof GearsFactory){return}else{try{if(("undefined"!=typeof window.ActiveXObject&&ActiveXObject("Gears.Factory"))||("undefined"!=typeof navigator.mimeTypes&&navigator.mimeTypes["application/x-googlegears"])){return}}catch(c){}}a.show()}); | 10574 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/10574/de62d2baffee7122147485cee12893cd2735b94b/common.js/buggy/wp-admin/js/common.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 |
}; | } | function validateWCSInfoWindow() { var win = Ext.getCmp('wcsDownloadFrm'); var form = win.getForm(); var timePositionFieldSet = Ext.getCmp('timePositionFldSet'); var timePeriodFieldSet = Ext.getCmp('timePeriodFldSet'); var bboxFieldSet = Ext.getCmp('bboxFldSet'); if (!form.isValid()) { Ext.Msg.alert('Invalid Fields','One or more fields are invalid'); return false; } var usingTimePosition = timePositionFieldSet && !timePositionFieldSet.collapsed; var usingTimePeriod = timePeriodFieldSet && !timePeriodFieldSet.collapsed; var usingBbox = bboxFieldSet && !bboxFieldSet.collapsed; if (!usingBbox && !(usingTimePosition || usingTimePeriod)) { Ext.Msg.alert('No Constraints', 'You must specify at least one spatial or temporal constraint'); return false; } if (usingTimePosition && usingTimePeriod) { Ext.Msg.alert('Too many temporal', 'You may only specify a single temporal constraint'); return false; } return true;}; | 6764 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/6764/b2fad2a6d4a0c3fc93e125067ad7bbaf16c2c614/GenericWCSInfoWindow.js/buggy/src/main/webapp/js/GenericWCSInfoWindow.js |
var firstField = this.ownerCt.find('name', 'password')[0]; if (firstField && firstField.getRawValue() != s) { return "Passwords don't match"; } return true; } | var firstField = this.ownerCt.find('name', 'newPassword')[0]; if (firstField && firstField.getRawValue() != s) { return "Passwords don't match"; } return true; } | validator : function(s) { var firstField = this.ownerCt.find('name', 'password')[0]; if (firstField && firstField.getRawValue() != s) { return "Passwords don't match"; } return true; } | 786 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/786/78da50986287f9bfa0cc6c46cb571737b536be75/repoServer.UserEditPanel.js/clean/nexus/nexus-webapp/src/main/webapp/js/repoServer/repoServer.UserEditPanel.js |
validator: function (opts) (opts.indexOf("l") < 0 || opts.indexOf("r") < 0) }, | { validator: function (value) value >= 0 && value <= 15 }); | validator: function (opts) (opts.indexOf("l") < 0 || opts.indexOf("r") < 0) }, | 8883 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/8883/5c13a4aee6d76c48021ae5803eaac42a16d50fce/liberator.js/buggy/common/content/liberator.js |
validator : function(s) { var firstField = this.ownerCt.find('name', 'password')[0]; if (firstField && firstField.getRawValue() != s) { return "Passwords don't match"; } | validator : function(v) { if (v && v.length != 0 && v.match(WHITE_SPACE_REGEX)) { | validator : function(s) { var firstField = this.ownerCt.find('name', 'password')[0]; if (firstField && firstField.getRawValue() != s) { return "Passwords don't match"; } return true; } | 786 /local1/tlutelli/issta_data/temp/all_js/javascript/2010_temp/2010/786/2fa17c0a1679a587f4052e61646630efde7574b1/repoServer.UserEditPanel.js/clean/nexus/nexus-webapp/src/main/webapp/js/repoServer/repoServer.UserEditPanel.js |