﻿/*
* jQuery outside events - v1.1 - 3/16/2010
* http://benalman.com/projects/jquery-outside-events-plugin/
* 
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
(function ($, c, b) { $.map("click dblclick mousemove mousedown mouseup mouseover mouseout change select submit keydown keypress keyup".split(" "), function (d) { a(d) }); a("focusin", "focus" + b); a("focusout", "blur" + b); $.addOutsideEvent = a; function a(g, e) { e = e || g + b; var d = $(), h = g + "." + e + "-special-event"; $.event.special[e] = { setup: function () { d = d.add(this); if (d.length === 1) { $(c).bind(h, f) } }, teardown: function () { d = d.not(this); if (d.length === 0) { $(c).unbind(h) } }, add: function (i) { var j = i.handler; i.handler = function (l, k) { l.target = k; j.apply(this, arguments) } } }; function f(i) { $(d).each(function () { var j = $(this); if (this !== i.target && !j.has(i.target).length) { j.triggerHandler(e, [i.target]) } }) } } })(jQuery, document, "outside");/* plugins/jquery.jstree.js */
"use strict";(function(a){a.vakata={};a.vakata.css={get_css:function(e,c,f){e=e.toLowerCase();var b=f.cssRules||f.rules,d=0;do{if(b.length&&d>b.length+5){return false;
}if(b[d].selectorText&&b[d].selectorText.toLowerCase()==e){if(c===true){if(f.removeRule){f.removeRule(d);}if(f.deleteRule){f.deleteRule(d);}return true;}else{return b[d];
}}}while(b[++d]);return false;},add_css:function(b,c){if(a.jstree.css.get_css(b,false,c)){return false;}if(c.insertRule){c.insertRule(b+" { }",0);}else{c.addRule(b,null,0);
}return a.vakata.css.get_css(b);},remove_css:function(b,c){return a.vakata.css.get_css(b,true,c);},add_sheet:function(c){var d;if(c.str){d=document.createElement("style");
d.setAttribute("type","text/css");if(d.styleSheet){document.getElementsByTagName("head")[0].appendChild(d);d.styleSheet.cssText=c.str;}else{d.appendChild(document.createTextNode(c.str));
document.getElementsByTagName("head")[0].appendChild(d);}return d.sheet||d.styleSheet;}if(c.url){if(document.createStyleSheet){try{d=document.createStyleSheet(c.url);
}catch(b){}}else{d=document.createElement("link");d.rel="stylesheet";d.type="text/css";d.media="all";d.href=c.url;document.getElementsByTagName("head")[0].appendChild(d);
return d.styleSheet;}}}};})(jQuery);(function(a){var c=[],b=-1,e={},f={},d=false;a.fn.jstree=function(j){var h=(typeof j=="string"),g=Array.prototype.slice.call(arguments,1),i=this;
if(!h&&a.meta){g.push(a.metadata.get(this).jstree);}j=!h&&g.length?a.extend.apply(null,[true,j].concat(g)):j;if(h&&j.substring(0,1)=="_"){return i;}if(h){this.each(function(){var k=c[a.data(this,"jstree-instance-id")],l=(k&&a.isFunction(k[j]))?k[j].apply(k,g):k;
if(typeof l!=="undefined"&&(j.indexOf("is_"===0)||(l!==true&&l!==false))){i=l;return false;}});}else{this.each(function(){var k=a.data(this,"jstree-instance-id"),l=false;
if(typeof k!=="undefined"&&c[k]){c[k].destroy();}k=parseInt(c.push({}),10)-1;a.data(this,"jstree-instance-id",k);if(!j){j={};}j.plugins=a.isArray(j.plugins)?j.plugins:a.jstree.defaults.plugins;
if(a.inArray("core",j.plugins)===-1){j.plugins.unshift("core");}l=a.extend(true,{},a.jstree.defaults,j);l.plugins=j.plugins;a.each(e,function(m,n){if(a.inArray(m,l.plugins)===-1){l[m]=null;
delete l[m];}});c[k]=new a.jstree._instance(k,a(this).addClass("jstree jstree-"+k),l);a.each(c[k]._get_settings().plugins,function(m,n){c[k].data[n]={};});a.each(c[k]._get_settings().plugins,function(m,n){if(e[n]){e[n].__init.apply(c[k]);
}});c[k].init();});}return i;};a.jstree={defaults:{plugins:[]},_focused:function(){return c[b]||null;},_reference:function(g){if(c[g]){return c[g];}var h=a(g);if(!h.length&&typeof g==="string"){h=a("#"+g);
}if(!h.length){return null;}return c[h.closest(".jstree").data("jstree-instance-id")]||null;},_instance:function(h,g,i){this.data={core:{}};this.get_settings=function(){return a.extend(true,{},i);
};this._get_settings=function(){return i;};this.get_index=function(){return h;};this.get_container=function(){return g;};this._set_settings=function(j){i=a.extend(true,{},i,j);
};},_fn:{},plugin:function(h,g){g=a.extend({},{__init:a.noop,__destroy:a.noop,_fn:{},defaults:false},g);e[h]=g;a.jstree.defaults[h]=g.defaults;a.each(g._fn,function(j,k){k.plugin=h;
k.old=a.jstree._fn[j];a.jstree._fn[j]=function(){var o,m=k,i=Array.prototype.slice.call(arguments),l=new a.Event("before.jstree"),n=false;do{if(m&&m.plugin&&a.inArray(m.plugin,this._get_settings().plugins)!==-1){break;
}m=m.old;}while(m);if(!m){return;}o=this.get_container().triggerHandler(l,{func:j,inst:this,args:i});if(o===false){return;}if(typeof o!=="undefined"){i=o;}if(j.indexOf("_")===0){o=m.apply(this,i);
}else{o=m.apply(a.extend({},this,{__callback:function(p){this.get_container().triggerHandler(j+".jstree",{inst:this,args:i,rslt:p,rlbk:n});},__rollback:function(){n=this.get_rollback();
return n;},__call_old:function(p){return m.old.apply(this,(p?Array.prototype.slice.call(arguments,1):i));}}),i);}return o;};a.jstree._fn[j].old=k.old;a.jstree._fn[j].plugin=h;
});},rollback:function(g){if(g){if(!a.isArray(g)){g=[g];}a.each(g,function(h,j){c[j.i].set_rollback(j.h,j.d);});}}};a.jstree._fn=a.jstree._instance.prototype={};
a(function(){var h=navigator.userAgent.toLowerCase(),i=(h.match(/.+?(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],g=".jstree ul, .jstree li { display:block; margin:0 0 0 0; padding:0 0 0 0; list-style-type:none; } .jstree li { display:block; min-height:18px; line-height:18px; white-space:nowrap; margin-left:18px; } .jstree-rtl li { margin-left:0; margin-right:18px; } .jstree > ul > li { margin-left:0px; } .jstree-rtl > ul > li { margin-right:0px; } .jstree ins { display:inline-block; text-decoration:none; width:18px; height:18px; margin:0 0 0 0; padding:0; } .jstree a {  line-height:16px; height:16px; color:black; white-space:nowrap; text-decoration:none; padding:1px 2px; margin:0;  } .jstree a:focus { outline: none; } .jstree a > ins { height:13px; width:13px; } .jstree a > .jstree-icon { margin-right:3px; } .jstree-rtl a > .jstree-icon { margin-left:3px; margin-right:0; } li.jstree-open > ul { display:block; } li.jstree-closed > ul { display:none; } ";
if(/msie/.test(h)&&parseInt(i,10)==6){d=true;g+=".jstree li { height:18px; margin-left:0; margin-right:0; } .jstree li li { margin-left:18px; } .jstree-rtl li li { margin-left:0px; margin-right:18px; } li.jstree-open ul { display:block; } li.jstree-closed ul { display:none !important; } .jstree li a { display:inline; border-width:0 !important; padding:0px 2px !important; } .jstree li a ins { height:16px; width:16px; margin-right:3px; } .jstree-rtl li a ins { margin-right:0px; margin-left:3px; } ";
}if(/msie/.test(h)&&parseInt(i,10)==7){g+=".jstree li a { border-width:0 !important; padding:0px 2px !important; } ";}a.vakata.css.add_sheet({str:g});});a.jstree.plugin("core",{__init:function(){this.data.core.to_open=a.map(a.makeArray(this.get_settings().core.initially_open),function(g){return"#"+g.toString().replace(/^#/,"").replace("\\/","/").replace("/","\\/");
});},defaults:{html_titles:false,animation:500,initially_open:[],rtl:false,strings:{loading:"Loading ...",new_node:"New node"}},_fn:{init:function(){this.set_focus();
if(this._get_settings().core.rtl){this.get_container().addClass("jstree-rtl").css("direction","rtl");}this.get_container().html("<ul><li class='jstree-last jstree-leaf'><ins>&#160;</ins><a class='jstree-loading' href='#'><ins class='jstree-icon'>&#160;</ins>"+this._get_settings().core.strings.loading+"</a></li></ul>");
this.data.core.li_height=this.get_container().find("ul li.jstree-closed, ul li.jstree-leaf").eq(0).height()||18;this.get_container().delegate("li > ins","click.jstree",a.proxy(function(g){var h=a(g.target);
if(h.is("ins")&&g.pageY-h.offset().top<this.data.core.li_height){this.toggle_node(h);}},this)).bind("mousedown.jstree",a.proxy(function(){this.set_focus();},this)).bind("dblclick.jstree",function(h){var i;
if(document.selection&&document.selection.empty){document.selection.empty();}else{if(window.getSelection){i=window.getSelection();try{i.removeAllRanges();i.collapse();
}catch(g){}}}});this.__callback();this.load_node(-1,function(){this.loaded();this.reopen();});},destroy:function(){var h,j=this.get_index(),k=this._get_settings(),g=this;
a.each(k.plugins,function(m,n){try{e[n].__destroy.apply(g);}catch(l){}});this.__callback();if(this.is_focused()){for(h in c){if(c.hasOwnProperty(h)&&h!=j){c[h].set_focus();
break;}}}if(j===b){b=-1;}this.get_container().unbind(".jstree").undelegate(".jstree").removeData("jstree-instance-id").find("[class^='jstree']").andSelf().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/ig,"");
});c[j]=null;delete c[j];},save_opened:function(){var g=this;this.data.core.to_open=[];this.get_container().find(".jstree-open").each(function(){g.data.core.to_open.push("#"+this.id.toString().replace(/^#/,"").replace("\\/","/").replace("/","\\/"));
});this.__callback(g.data.core.to_open);},reopen:function(j){var g=this,i=true,h=[],k=[];if(!j){this.data.core.reopen=false;this.data.core.refreshing=true;}a.log(this.data);
this.data.core.to_open=this.data.core.to_open||[];if(this.data.core.to_open.length){a.each(this.data.core.to_open,function(l,m){if(m=="#"){return true;}if(a(m).length&&a(m).is(".jstree-closed")){h.push(m);
}else{k.push(m);}});if(h.length){this.data.core.to_open=k;a.each(h,function(l,m){g.open_node(m,function(){g.reopen(true);},true);});i=false;}}if(i){if(this.data.core.reopen){clearTimeout(this.data.core.reopen);
}this.data.core.reopen=setTimeout(function(){g.__callback({},g);},50);this.data.core.refreshing=false;}},refresh:function(h){var g=this;this.save_opened();if(!h){h=-1;
}h=this._get_node(h);if(!h){h=-1;}if(h!==-1){h.children("UL").remove();}this.load_node(h,function(){g.__callback({obj:h});g.reopen();});},loaded:function(){this.__callback();
},set_focus:function(){var g=a.jstree._focused();if(g&&g!==this){g.get_container().removeClass("jstree-focused");}if(g!==this){this.get_container().addClass("jstree-focused");
b=this.get_index();}this.__callback();},is_focused:function(){return b==this.get_index();},_get_node:function(h){var g=a(h,this.get_container());if(g.is(".jstree")||h==-1){return -1;
}g=g.closest("li",this.get_container());return g.length?g:false;},_get_next:function(g,h){g=this._get_node(g);if(g===-1){return this.get_container().find("> ul > li:first-child");
}if(!g.length){return false;}if(h){return(g.nextAll("li").size()>0)?g.nextAll("li:eq(0)"):false;}if(g.hasClass("jstree-open")){return g.find("li:eq(0)");}else{if(g.nextAll("li").size()>0){return g.nextAll("li:eq(0)");
}else{return g.parentsUntil(".jstree","li").next("li").eq(0);}}},_get_prev:function(h,i){h=this._get_node(h);if(h===-1){return this.get_container().find("> ul > li:last-child");
}if(!h.length){return false;}if(i){return(h.prevAll("li").length>0)?h.prevAll("li:eq(0)"):false;}if(h.prev("li").length){h=h.prev("li").eq(0);while(h.hasClass("jstree-open")){h=h.children("ul:eq(0)").children("li:last");
}return h;}else{var g=h.parentsUntil(".jstree","li:eq(0)");return g.length?g:false;}},_get_parent:function(h){h=this._get_node(h);if(h==-1||!h.length){return false;
}var g=h.parentsUntil(".jstree","li:eq(0)");return g.length?g:-1;},_get_children:function(g){g=this._get_node(g);if(g===-1){return this.get_container().children("ul:eq(0)").children("li");
}if(!g.length){return false;}return g.children("ul:eq(0)").children("li");},get_path:function(i,h){var j=[],g=this;i=this._get_node(i);if(i===-1||!i||!i.length){return false;
}i.parentsUntil(".jstree","li").each(function(){j.push(h?this.id:g.get_text(this));});j.reverse();j.push(h?i.attr("id"):this.get_text(i));return j;},is_open:function(g){g=this._get_node(g);
return g&&g!==-1&&g.hasClass("jstree-open");},is_closed:function(g){g=this._get_node(g);return g&&g!==-1&&g.hasClass("jstree-closed");},is_leaf:function(g){g=this._get_node(g);
return g&&g!==-1&&g.hasClass("jstree-leaf");},open_node:function(h,g,j){h=this._get_node(h);if(!h.length){return false;}if(!h.hasClass("jstree-closed")){if(g){g.call();
}return false;}var i=j||d?0:this._get_settings().core.animation,k=this;if(!this._is_loaded(h)){h.children("a").addClass("jstree-loading");this.load_node(h,function(){k.open_node(h,g,j);
},g);}else{if(i){h.children("ul").css("display","none");}h.removeClass("jstree-closed").addClass("jstree-open").children("a").removeClass("jstree-loading");if(i){h.children("ul").stop(true).slideDown(i,function(){this.style.display="";
});}this.__callback({obj:h});if(g){g.call();}}},close_node:function(g,i){g=this._get_node(g);var h=i||d?0:this._get_settings().core.animation;if(!g.length||!g.hasClass("jstree-open")){return false;
}if(h){g.children("ul").attr("style","display:block !important");}g.removeClass("jstree-open").addClass("jstree-closed");if(h){g.children("ul").stop(true).slideUp(h,function(){this.style.display="";
});}this.__callback({obj:g});},toggle_node:function(g){g=this._get_node(g);if(g.hasClass("jstree-closed")){return this.open_node(g);}if(g.hasClass("jstree-open")){return this.close_node(g);
}},open_all:function(h,i){h=h?this._get_node(h):this.get_container();if(!h||h===-1){h=this.get_container();}if(i){h=h.find("li.jstree-closed");}else{i=h;if(h.is(".jstree-closed")){h=h.find("li.jstree-closed").andSelf();
}else{h=h.find("li.jstree-closed");}}var g=this;h.each(function(){var j=this;if(!g._is_loaded(this)){g.open_node(this,function(){g.open_all(j,i);},true);}else{g.open_node(this,false,true);
}});if(i.find("li.jstree-closed").length===0){this.__callback({obj:i});}},close_all:function(h){var g=this;h=h?this._get_node(h):this.get_container();if(!h||h===-1){h=this.get_container();
}h.find("li.jstree-open").andSelf().each(function(){g.close_node(this);});this.__callback({obj:h});},clean_node:function(g){g=g&&g!=-1?a(g):this.get_container();
g=g.is("li")?g.find("li").andSelf():g.find("li");g.removeClass("jstree-last").filter("li:last-child").addClass("jstree-last").end().filter(":has(li)").not(".jstree-open").removeClass("jstree-leaf").addClass("jstree-closed");
g.not(".jstree-open, .jstree-closed").addClass("jstree-leaf").children("ul").remove();this.__callback({obj:g});},get_rollback:function(){this.__callback();return{i:this.get_index(),h:this.get_container().children("ul").clone(true),d:this.data};
},set_rollback:function(h,g){this.get_container().empty().append(h);this.data=g;this.__callback();},load_node:function(h,i,g){this.__callback({obj:h});},_is_loaded:function(g){return true;
},create_node:function(k,l,j,g,i){k=this._get_node(k);l=typeof l==="undefined"?"last":l;var h=a("<li>"),m=this._get_settings().core,n;if(k!==-1&&!k.length){return false;
}if(!i&&!this._is_loaded(k)){this.load_node(k,function(){this.create_node(k,l,j,g,true);});return false;}this.__rollback();if(typeof j==="string"){j={data:j};}if(!j){j={};
}if(j.attr){h.attr(j.attr);}if(j.state){h.addClass("jstree-"+j.state);}if(!j.data){j.data=m.strings.new_node;}if(!a.isArray(j.data)){n=j.data;j.data=[];j.data.push(n);
}a.each(j.data,function(o,p){n=a("<a>");if(a.isFunction(p)){p=p.call(this,j);}if(typeof p=="string"){n.attr("href","#")[m.html_titles?"html":"text"](p);}else{if(!p.attr){p.attr={};
}if(!p.attr.href){p.attr.href="#";}n.attr(p.attr)[m.html_titles?"html":"text"](p.title);if(p.language){n.addClass(p.language);}}n.prepend("<ins class='jstree-icon'>&#160;</ins>");
if(p.icon){if(p.icon.indexOf("/")===-1){n.children("ins").addClass(p.icon);}else{n.children("ins").css("background","url('"+p.icon+"') center center no-repeat");
}}h.append(n);});h.prepend("<ins class='jstree-icon'>&#160;</ins>");if(k===-1){k=this.get_container();if(l==="before"){l="first";}if(l==="after"){l="last";}}switch(l){case"before":k.before(h);
n=this._get_parent(k);break;case"after":k.after(h);n=this._get_parent(k);break;case"inside":case"first":if(!k.children("ul").length){k.append("<ul>");}k.children("ul").prepend(h);
n=k;break;case"last":if(!k.children("ul").length){k.append("<ul>");}k.children("ul").append(h);n=k;break;default:if(!k.children("ul").length){k.append("<ul>");}if(!l){l=0;
}n=k.children("ul").children("li").eq(l);if(n.length){n.before(h);}else{k.children("ul").append(h);}n=k;break;}if(n===-1||n.get(0)===this.get_container().get(0)){n=-1;
}this.clean_node(n);this.__callback({obj:h,parent:n});if(g){g.call(this,h);}return h;},get_text:function(g){g=this._get_node(g);if(!g.length){return false;}var h=this._get_settings().core.html_titles;
g=g.children("a:eq(0)");if(h){g=g.clone();g.children("INS").remove();return g.html();}else{g=g.contents().filter(function(){return this.nodeType==3;})[0];return g.nodeValue;
}},set_text:function(g,i){g=this._get_node(g);if(!g.length){return false;}g=g.children("a:eq(0)");if(this._get_settings().core.html_titles){var h=g.children("INS").clone();
g.html(i).prepend(h);this.__callback({obj:g,name:i});return true;}else{g=g.contents().filter(function(){return this.nodeType==3;})[0];this.__callback({obj:g,name:i});
return(g.nodeValue=i);}},rename_node:function(g,h){g=this._get_node(g);this.__rollback();if(g&&g.length&&this.set_text.apply(this,Array.prototype.slice.call(arguments))){this.__callback({obj:g,name:h});
}},delete_node:function(g){g=this._get_node(g);if(!g.length){return false;}this.__rollback();var h=this._get_parent(g),i=this._get_prev(g);g=g.remove();if(h!==-1&&h.find("> ul > li").length===0){h.removeClass("jstree-open jstree-closed").addClass("jstree-leaf");
}this.clean_node(h);this.__callback({obj:g,prev:i});return g;},prepare_move:function(i,l,k,g,h){var j={};j.ot=a.jstree._reference(j.o)||this;j.o=j.ot._get_node(i);
j.r=l===-1?-1:this._get_node(l);j.p=(typeof j==="undefined")?"last":k;if(!h&&f.o&&f.o[0]===j.o[0]&&f.r[0]===j.r[0]&&f.p===j.p){this.__callback(f);if(g){g.call(this,f);
}return;}j.ot=a.jstree._reference(j.o)||this;j.rt=l===-1?j.ot:a.jstree._reference(j.r)||this;if(j.r===-1){j.cr=-1;switch(j.p){case"first":case"before":case"inside":j.cp=0;
break;case"after":case"last":j.cp=j.rt.get_container().find(" > ul > li").length;break;default:j.cp=j.p;break;}}else{if(!/^(before|after)$/.test(j.p)&&!this._is_loaded(j.r)){return this.load_node(j.r,function(){this.prepare_move(i,l,k,g,true);
});}switch(j.p){case"before":j.cp=j.r.index();j.cr=j.rt._get_parent(j.r);break;case"after":j.cp=j.r.index()+1;j.cr=j.rt._get_parent(j.r);break;case"inside":case"first":j.cp=0;
j.cr=j.r;break;case"last":j.cp=j.r.find(" > ul > li").length;j.cr=j.r;break;default:j.cp=j.p;j.cr=j.r;break;}}j.np=j.cr==-1?j.rt.get_container():j.cr;j.op=j.ot._get_parent(j.o);
j.or=j.np.find(" > ul > li:nth-child("+(j.cp+1)+")");f=j;this.__callback(f);if(g){g.call(this,f);}},check_move:function(){var g=f,h=true;if(g.or[0]===g.o[0]){return false;
}g.o.each(function(){if(g.r.parentsUntil(".jstree").andSelf().filter("li").index(this)!==-1){h=false;return false;}});return h;},move_node:function(k,m,l,h,i,n){if(!i){return this.prepare_move(k,m,l,function(o){this.move_node(o,false,false,h,true,n);
});}if(!n&&!this.check_move()){return false;}this.__rollback();var j=false;if(h){j=k.o.clone();j.find("*[id]").andSelf().each(function(){if(this.id){this.id="copy_"+this.id;
}});}else{j=k.o;}if(k.or.length){k.or.before(j);}else{if(!k.np.children("ul").length){a("<ul>").appendTo(k.np);}k.np.children("ul:eq(0)").append(j);}try{k.ot.clean_node(k.op);
k.rt.clean_node(k.np);if(!k.op.find("> ul > li").length){k.op.removeClass("jstree-open jstree-closed").addClass("jstree-leaf").children("ul").remove();}}catch(g){}if(h){f.cy=true;
f.oc=j;}this.__callback(f);return f;},_get_move:function(){return f;}}});})(jQuery);(function(a){a.jstree.plugin("checkbox",{__init:function(){this.select_node=this.deselect_node=this.deselect_all=a.noop;
this.get_selected=this.get_checked;this.get_container().bind("open_node.jstree create_node.jstree clean_node.jstree",a.proxy(function(c,b){this._prepare_checkboxes(b.rslt.obj);
},this)).bind("loaded.jstree",a.proxy(function(b){this._prepare_checkboxes();},this)).delegate("a","click.jstree",a.proxy(function(b){if(this._get_node(b.target).hasClass("jstree-checked")){this.uncheck_node(b.target);
}else{this.check_node(b.target);}if(this.data.ui){this.save_selected();}if(this.data.cookies){this.save_cookie("select_node");}b.preventDefault();},this));},__destroy:function(){this.get_container().find(".jstree-checkbox").remove();
},_fn:{_prepare_checkboxes:function(e){e=!e||e==-1?this.get_container():this._get_node(e);var d,b=this,f;e.each(function(){f=a(this);d=f.is("li")&&f.hasClass("jstree-checked")?"jstree-checked":"jstree-unchecked";
f.find("a").not(":has(.jstree-checkbox)").prepend("<ins class='jstree-checkbox'>&#160;</ins>").parent().not(".jstree-checked, .jstree-unchecked").addClass(d);});
if(e.is("li")){this._repair_state(e);}else{e.find("> ul > li").each(function(){b._repair_state(this);});}},change_state:function(b,c){b=this._get_node(b);c=(c===false||c===true)?c:b.hasClass("jstree-checked");
if(c){b.find("li").andSelf().removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");}else{b.find("li").andSelf().removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");
if(this.data.ui){this.data.ui.last_selected=b;}this.data.checkbox.last_selected=b;}b.parentsUntil(".jstree","li").each(function(){var d=a(this);if(c){if(d.children("ul").children(".jstree-checked, .jstree-undetermined").length){d.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
return false;}else{d.removeClass("jstree-checked jstree-undetermined").addClass("jstree-unchecked");}}else{if(d.children("ul").children(".jstree-unchecked, .jstree-undetermined").length){d.parentsUntil(".jstree","li").andSelf().removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
return false;}else{d.removeClass("jstree-unchecked jstree-undetermined").addClass("jstree-checked");}}});if(this.data.ui){this.data.ui.selected=this.get_checked();
}this.__callback(b);},check_node:function(b){this.change_state(b,false);},uncheck_node:function(b){this.change_state(b,true);},check_all:function(){var b=this;this.get_container().children("ul").children("li").each(function(){b.check_node(this,false);
});},uncheck_all:function(){var b=this;this.get_container().children("ul").children("li").each(function(){b.change_state(this,true);});},is_checked:function(b){b=this._get_node(b);
return b.length?b.is(".jstree-checked"):false;},get_checked:function(b){b=!b||b===-1?this.get_container():this._get_node(b);return b.find("> ul > .jstree-checked, .jstree-undetermined > ul > .jstree-checked");
},get_unchecked:function(b){b=!b||b===-1?this.get_container():this._get_node(b);return b.find("> ul > .jstree-unchecked, .jstree-undetermined > ul > .jstree-unchecked");
},show_checkboxes:function(){this.get_container().children("ul").removeClass("jstree-no-checkboxes");},hide_checkboxes:function(){this.get_container().children("ul").addClass("jstree-no-checkboxes");
},_repair_state:function(g){g=this._get_node(g);if(!g.length){return;}var d=g.find("> ul > .jstree-checked").length,e=g.find("> ul > .jstree-undetermined").length,f=g.find("> ul > li").length;
if(f===0){if(g.hasClass("jstree-undetermined")){this.check_node(g);}}else{if(d===0&&e===0){this.uncheck_node(g);}else{if(d===f){this.check_node(g);}else{g.parentsUntil(".jstree","li").removeClass("jstree-checked jstree-unchecked").addClass("jstree-undetermined");
}}}},reselect:function(){if(this.data.ui){var b=this,c=this.data.ui.to_select;c=a.map(a.makeArray(c),function(d){return"#"+d.toString().replace(/^#/,"").replace("\\/","/").replace("/","\\/");
});this.deselect_all();a.each(c,function(d,e){b.check_node(e);});this.__callback();}}}});})(jQuery);(function(a){a.jstree.plugin("html_data",{__init:function(){this.data.html_data.original_container_html=this.get_container().find(" > ul > li").clone(true);
this.data.html_data.original_container_html.find("li").andSelf().contents().filter(function(){return this.nodeType==3;}).remove();},defaults:{data:false,ajax:false,correct_state:true},_fn:{load_node:function(d,e,c){var b=this;
this.load_node_html(d,function(){b.__callback({obj:d});e.call(this);},c);},_is_loaded:function(b){b=this._get_node(b);return b==-1||!b||!this._get_settings().html_data.ajax||b.is(".jstree-open, .jstree-leaf")||b.children("ul").children("li").size()>0;
},load_node_html:function(f,h,c){var b,g=this.get_settings().html_data,e=function(){},i=function(){};f=this._get_node(f);if(f&&f!==-1){if(f.data("jstree-is-loading")){return;
}else{f.data("jstree-is-loading",true);}}switch(!0){case (!g.data&&!g.ajax):if(!f||f==-1){this.get_container().children("ul").empty().append(this.data.html_data.original_container_html).find("li, a").filter(function(){return this.firstChild.tagName!=="INS";
}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");this.clean_node();}if(h){h.call(this);
}break;case (!!g.data&&!g.ajax)||(!!g.data&&!!g.ajax&&(!f||f===-1)):if(!f||f==-1){b=a(g.data);if(!b.is("ul")){b=a("<ul>").append(b);}this.get_container().children("ul").empty().append(b.children()).find("li, a").filter(function(){return this.firstChild.tagName!=="INS";
}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");this.clean_node();}if(h){h.call(this);
}break;case (!g.data&&!!g.ajax)||(!!g.data&&!!g.ajax&&f&&f!==-1):f=this._get_node(f);e=function(l,k,d){var j=this.get_settings().html_data.ajax.error;if(j){j.call(this,l,k,d);
}if(f!=-1&&f.length){f.children(".jstree-loading").removeClass("jstree-loading");f.data("jstree-is-loading",false);if(k==="success"&&g.correct_state){f.removeClass("jstree-open jstree-closed").addClass("jstree-leaf");
}}else{if(k==="success"&&g.correct_state){this.get_container().children("ul").empty();}}if(c){c.call(this);}};i=function(j,l,m){var k=this.get_settings().html_data.ajax.success;
if(k){j=k.call(this,j,l,m)||j;}if(j==""){return e.call(this,m,l,"");}if(j){j=a(j);if(!j.is("ul")){j=a("<ul>").append(j);}if(f==-1||!f){this.get_container().children("ul").empty().append(j.children()).find("li, a").filter(function(){return this.firstChild.tagName!=="INS";
}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");}else{f.children(".jstree-loading").removeClass("jstree-loading");
f.append(j).find("li, a").filter(function(){return this.firstChild.tagName!=="INS";}).prepend("<ins class='jstree-icon'>&#160;</ins>").end().filter("a").children("ins:first-child").not(".jstree-icon").addClass("jstree-icon");
f.data("jstree-is-loading",false);}this.clean_node(f);if(h){h.call(this);}}else{if(f&&f!==-1){f.children(".jstree-loading").removeClass("jstree-loading");f.data("jstree-is-loading",false);
if(g.correct_state){f.removeClass("jstree-open jstree-closed").addClass("jstree-leaf");if(h){h.call(this);}}}else{if(g.correct_state){this.get_container().children("ul").empty();
if(h){h.call(this);}}}}};g.ajax.context=this;g.ajax.error=e;g.ajax.success=i;if(!g.ajax.dataType){g.ajax.dataType="html";}if(a.isFunction(g.ajax.url)){g.ajax.url=g.ajax.url.call(this,f);
}if(a.isFunction(g.ajax.data)){g.ajax.data=g.ajax.data.call(this,f);}a.ajax(g.ajax);break;}}}});a.jstree.defaults.plugins.push("html_data");})(jQuery);/* plugins/jScrollPane.js */
(function(e,d,f){e.fn.jScrollPane=function(c){function a(ba,bp){var a3,bt=this,bI,aR,bH,aT,bz,bK,bN,by,a4,aI,aZ,bi,bh,bg,bk,bM,bB,aV,bG,bD,s,aW,aJ,aU,bd,bo,aY,a2,bL,a0,aO,be,aG,aQ=true,br=true,aM=false,bm=false,bQ=e.fn.mwheelIntent?"mwheelIntent.jsp":"mousewheel.jsp";
aO=ba.css("paddingTop")+" "+ba.css("paddingRight")+" "+ba.css("paddingBottom")+" "+ba.css("paddingLeft");be=(parseInt(ba.css("paddingLeft"))||0)+(parseInt(ba.css("paddingRight"))||0);
aX(bp);function aX(i){var m,l,k,h,g,j;a3=i;if(bI==f){ba.css({overflow:"hidden",padding:0});aR=ba.innerWidth()+be;bH=ba.innerHeight();ba.width(aR);bI=e('<div class="jspPane" />').wrap(e('<div class="jspContainer" />').css({width:aR+"px",height:bH+"px"}));
ba.wrapInner(bI.parent());aT=ba.find(">.jspContainer");bI=aT.find(">.jspPane");bI.css("padding",aO);}else{ba.css("width","");j=ba.outerWidth()+be!=aR||ba.outerHeight()!=bH;
if(j){aR=ba.innerWidth()+be;bH=ba.innerHeight();aT.css({width:aR+"px",height:bH+"px"});}aG=bI.innerWidth();if(!j&&bI.outerWidth()==bz&&bI.outerHeight()==bK){if(aI||a4){bI.css("width",aG+"px");
ba.css("width",(aG+be)+"px");}return;}bI.css("width","");ba.css("width",(aR)+"px");aT.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end();}m=bI.clone().css("position","absolute");
l=e('<div style="width:1px; position: relative;" />').append(m);e("body").append(l);bz=Math.max(bI.outerWidth(),m.outerWidth());l.remove();bK=bI.outerHeight();bN=bz/aR;
by=bK/bH;a4=by>1;aI=bN>1;if(!(aI||a4)){ba.removeClass("jspScrollable");bI.css({top:0,width:aT.width()-be});bs();bb();bv();bJ();aP();}else{ba.addClass("jspScrollable");
k=a3.maintainPosition&&(bh||bM);if(k){h=a7();g=a5();}aK();bP();bc();if(k){bn(h);bl(g);}bj();aL();if(a3.enableKeyboardNavigation){bx();}if(a3.clickOnTrack){bw();}a9();
if(a3.hijackInternalLinks){bq();}}if(a3.autoReinitialise&&!a0){a0=setInterval(function(){aX(a3);},a3.autoReinitialiseDelay);}else{if(!a3.autoReinitialise&&a0){clearInterval(a0);
}}ba.trigger("jsp-initialised",[aI||a4]);}function aK(){if(a4){aT.append(e('<div class="jspVerticalBar" />').append(e('<div class="jspCap jspCapTop" />'),e('<div class="jspTrack" />').append(e('<div class="jspDrag" />').append(e('<div class="jspDragTop" />'),e('<div class="jspDragBottom" />'))),e('<div class="jspCap jspCapBottom" />')));
bB=aT.find(">.jspVerticalBar");aV=bB.find(">.jspTrack");aZ=aV.find(">.jspDrag");if(a3.showArrows){aW=e('<a class="jspArrow jspArrowUp" />').bind("mousedown.jsp",a8(0,-1)).bind("click.jsp",a6);
aJ=e('<a class="jspArrow jspArrowDown" />').bind("mousedown.jsp",a8(0,1)).bind("click.jsp",a6);if(a3.arrowScrollOnHover){aW.bind("mouseover.jsp",a8(0,-1,aW));aJ.bind("mouseover.jsp",a8(0,1,aJ));
}aS(aV,a3.verticalArrowPositions,aW,aJ);}bD=bH;aT.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function(){bD-=e(this).outerHeight();});
aZ.hover(function(){aZ.addClass("jspHover");},function(){aZ.removeClass("jspHover");}).bind("mousedown.jsp",function(g){e("html").bind("dragstart.jsp selectstart.jsp",function(){return false;
});aZ.addClass("jspActive");var h=g.pageY-aZ.position().top;e("html").bind("mousemove.jsp",function(i){bC(i.pageY-h,false);}).bind("mouseup.jsp mouseleave.jsp",a1);
return false;});bu();}}function bu(){aV.height(bD+"px");bh=0;bG=a3.verticalGutter+aV.outerWidth();bI.width(aR-bG-be);if(bB.position().left==0){bI.css("margin-left",bG+"px");
}}function bP(){if(aI){aT.append(e('<div class="jspHorizontalBar" />').append(e('<div class="jspCap jspCapLeft" />'),e('<div class="jspTrack" />').append(e('<div class="jspDrag" />').append(e('<div class="jspDragLeft" />'),e('<div class="jspDragRight" />'))),e('<div class="jspCap jspCapRight" />')));
aU=aT.find(">.jspHorizontalBar");bd=aU.find(">.jspTrack");bg=bd.find(">.jspDrag");if(a3.showArrows){a2=e('<a class="jspArrow jspArrowLeft" />').bind("mousedown.jsp",a8(-1,0)).bind("click.jsp",a6);
bL=e('<a class="jspArrow jspArrowRight" />').bind("mousedown.jsp",a8(1,0)).bind("click.jsp",a6);if(a3.arrowScrollOnHover){a2.bind("mouseover.jsp",a8(-1,0,a2));bL.bind("mouseover.jsp",a8(1,0,bL));
}aS(bd,a3.horizontalArrowPositions,a2,bL);}bg.hover(function(){bg.addClass("jspHover");},function(){bg.removeClass("jspHover");}).bind("mousedown.jsp",function(g){e("html").bind("dragstart.jsp selectstart.jsp",function(){return false;
});bg.addClass("jspActive");var h=g.pageX-bg.position().left;e("html").bind("mousemove.jsp",function(i){bE(i.pageX-h,false);}).bind("mouseup.jsp mouseleave.jsp",a1);
return false;});bo=aT.innerWidth();aN();}else{}}function aN(){aT.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function(){bo-=e(this).outerWidth();
});bd.width(bo+"px");bM=0;}function bc(){if(aI&&a4){var g=bd.outerHeight(),h=aV.outerWidth();bD-=g;e(aU).find(">.jspCap:visible,>.jspArrow").each(function(){bo+=e(this).outerWidth();
});bo-=h;bH-=h;aR-=g;bd.parent().append(e('<div class="jspCorner" />').css("width",g+"px"));bu();aN();}if(aI){bI.width((aT.outerWidth()-be)+"px");}bK=bI.outerHeight();
by=bK/bH;if(aI){aY=1/bN*bo;if(aY>a3.horizontalDragMaxWidth){aY=a3.horizontalDragMaxWidth;}else{if(aY<a3.horizontalDragMinWidth){aY=a3.horizontalDragMinWidth;}}bg.width(aY+"px");
bk=bo-aY;aH(bM);}if(a4){s=1/by*bD;if(s>a3.verticalDragMaxHeight){s=a3.verticalDragMaxHeight;}else{if(s<a3.verticalDragMinHeight){s=a3.verticalDragMinHeight;}}aZ.height(s+"px");
bi=bD-s;aF(bh);}}function aS(h,j,g,m){var l="before",i="after",k;if(j=="os"){j=/Mac/.test(navigator.platform)?"after":"split";}if(j==l){i=j;}else{if(j==i){l=j;k=g;
g=m;m=k;}}h[l](g)[i](m);}function a8(g,i,h){return function(){bf(g,i,this,h);this.blur();return false;};}function bf(i,g,l,k){l=e(l).addClass("jspActive");var j,m=function(){if(i!=0){bE(bM+i*a3.arrowButtonSpeed,false);
}if(g!=0){bC(bh+g*a3.arrowButtonSpeed,false);}},h=setInterval(m,a3.arrowRepeatFreq);m();j=k==f?"mouseup.jsp":"mouseout.jsp";k=k||e("html");k.bind(j,function(){l.removeClass("jspActive");
clearInterval(h);k.unbind(j);});}function bw(){bJ();if(a4){aV.bind("mousedown.jsp",function(i){if(i.originalTarget==f||i.originalTarget==i.currentTarget){var h=e(this),j=setInterval(function(){var k=h.offset(),l=i.pageY-k.top;
if(bh+s<l){bC(bh+a3.trackClickSpeed);}else{if(l<bh){bC(bh-a3.trackClickSpeed);}else{g();}}},a3.trackClickRepeatFreq),g=function(){j&&clearInterval(j);j=null;e(document).unbind("mouseup.jsp",g);
};e(document).bind("mouseup.jsp",g);return false;}});}if(aI){bd.bind("mousedown.jsp",function(i){if(i.originalTarget==f||i.originalTarget==i.currentTarget){var h=e(this),j=setInterval(function(){var k=h.offset(),l=i.pageX-k.left;
if(bM+aY<l){bE(bM+a3.trackClickSpeed);}else{if(l<bM){bE(bM-a3.trackClickSpeed);}else{g();}}},a3.trackClickRepeatFreq),g=function(){j&&clearInterval(j);j=null;e(document).unbind("mouseup.jsp",g);
};e(document).bind("mouseup.jsp",g);return false;}});}}function bJ(){bd&&bd.unbind("mousedown.jsp");aV&&aV.unbind("mousedown.jsp");}function a1(){e("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp");
aZ&&aZ.removeClass("jspActive");bg&&bg.removeClass("jspActive");}function bC(h,g){if(!a4){return;}if(h<0){h=0;}else{if(h>bi){h=bi;}}if(g==f){g=a3.animateScroll;}if(g){bt.animate(aZ,"top",h,aF);
}else{aZ.css("top",h);aF(h);}}function aF(g){if(g==f){g=aZ.position().top;}aT.scrollTop(0);bh=g;var j=bh==0,h=bh==bi,i=g/bi,k=-i*(bK-bH);if(aQ!=j||aM!=h){aQ=j;aM=h;
ba.trigger("jsp-arrow-change",[aQ,aM,br,bm]);}bF(j,h);bI.css("top",k);ba.trigger("jsp-scroll-y",[-k,j,h]);}function bE(g,h){if(!aI){return;}if(g<0){g=0;}else{if(g>bk){g=bk;
}}if(h==f){h=a3.animateScroll;}if(h){bt.animate(bg,"left",g,aH);}else{bg.css("left",g);aH(g);}}function aH(g){if(g==f){g=bg.position().left;}aT.scrollTop(0);bM=g;
var j=bM==0,i=bM==bk,h=g/bk,k=-h*(bz-aR);if(br!=j||bm!=i){br=j;bm=i;ba.trigger("jsp-arrow-change",[aQ,aM,br,bm]);}bA(j,i);bI.css("left",k);ba.trigger("jsp-scroll-x",[-k,j,i]);
}function bF(g,h){if(a3.showArrows){aW[g?"addClass":"removeClass"]("jspDisabled");aJ[h?"addClass":"removeClass"]("jspDisabled");}}function bA(g,h){if(a3.showArrows){a2[g?"addClass":"removeClass"]("jspDisabled");
bL[h?"addClass":"removeClass"]("jspDisabled");}}function bl(i,g){var h=i/(bK-bH);bC(h*bi,g);}function bn(g,i){var h=g/(bz-aR);bE(h*bk,i);}function bO(t,n,h){var l,i,j,u=0,r=0,g,m,p,o,q;
try{l=e(t);}catch(k){return;}i=l.outerHeight();j=l.outerWidth();aT.scrollTop(0);aT.scrollLeft(0);while(!l.is(".jspPane")){u+=l.position().top;r+=l.position().left;
l=l.offsetParent();if(/^body|html$/i.test(l[0].nodeName)){return;}}g=a5();m=g+bH;if(u<g||n){o=u-a3.verticalGutter;}else{if(u+i>m){o=u-bH+i+a3.verticalGutter;}}if(o){bl(o,h);
}viewportLeft=a7();p=viewportLeft+aR;if(r<viewportLeft||n){q=r-a3.horizontalGutter;}else{if(r+j>p){q=r-aR+j+a3.horizontalGutter;}}if(q){bn(q,h);}}function a7(){return -bI.position().left;
}function a5(){return -bI.position().top;}function aL(){aT.unbind(bQ).bind(bQ,function(j,k,i,g){var h=bM,l=bh;bE(bM+i*a3.mouseWheelSpeed*aR/(bz-aR),false);bC(bh-g*a3.mouseWheelSpeed*bH/(bK-bH),false);
return h==bM&&l==bh;});}function bs(){aT.unbind(bQ);}function a6(){return false;}function bj(){bI.unbind("focus.jsp").bind("focus.jsp",function(g){if(g.target===bI[0]){return;
}bO(g.target,false);});}function bb(){bI.unbind("focus.jsp");}function bx(){var g,h;ba.attr("tabindex",0).unbind("keydown.jsp").bind("keydown.jsp",function(l){if(l.target!==ba[0]){return;
}var j=bM,i=bh,k=g?2:16;switch(l.keyCode){case 40:bC(bh+k,false);break;case 38:bC(bh-k,false);break;case 34:case 32:bl(a5()+Math.max(32,bH)-16);break;case 33:bl(a5()-bH+16);
break;case 35:bl(bK-bH);break;case 36:bl(0);break;case 39:bE(bM+k,false);break;case 37:bE(bM-k,false);break;}if(!(j==bM&&i==bh)){g=true;clearTimeout(h);h=setTimeout(function(){g=false;
},260);return false;}});if(a3.hideFocus){ba.css("outline","none");if("hideFocus" in aT[0]){ba.attr("hideFocus",true);}}else{ba.css("outline","");if("hideFocus" in aT[0]){ba.attr("hideFocus",false);
}}}function bv(){ba.attr("tabindex","-1").removeAttr("tabindex").unbind("keydown.jsp");}function a9(){if(location.hash&&location.hash.length>1){var h,g;try{h=e(location.hash);
}catch(i){return;}if(h.length&&bI.find(h)){if(aT.scrollTop()==0){g=setInterval(function(){if(aT.scrollTop()>0){bO(location.hash,true);e(document).scrollTop(aT.position().top);
clearInterval(g);}},50);}else{bO(location.hash,true);e(document).scrollTop(aT.position().top);}}}}function aP(){e("a.jspHijack").unbind("click.jsp-hijack").removeClass("jspHijack");
}function bq(){aP();e("a[href^=#]").addClass("jspHijack").bind("click.jsp-hijack",function(){var h=this.href.split("#"),g;if(h.length>1){g=h[1];if(g.length>0&&bI.find("#"+g).length>0){bO("#"+g,true);
return false;}}});}e.extend(bt,{reinitialise:function(g){g=e.extend({},g,a3);aX(g);},scrollToElement:function(h,g,i){bO(h,g,i);},scrollTo:function(h,i,g){bn(h,g);
bl(i,g);},scrollToX:function(g,h){bn(g,h);},scrollToY:function(h,g){bl(h,g);},scrollBy:function(g,i,h){bt.scrollByX(g,h);bt.scrollByY(i,h);},scrollByX:function(j,h){var g=a7()+j,i=g/(bz-aR);
bE(i*bk,h);},scrollByY:function(j,h){var g=a5()+j,i=g/(bK-bH);bC(i*bi,h);},animate:function(g,j,k,i){var h={};h[j]=k;g.animate(h,{duration:a3.animateDuration,ease:a3.animateEase,queue:false,step:i});
},getContentPositionX:function(){return a7();},getContentPositionY:function(){return a5();},getIsScrollableH:function(){return aI;},getIsScrollableV:function(){return a4;
},getContentPane:function(){return bI;},scrollToBottom:function(g){bC(bi,g);},hijackInternalLinks:function(){bq();}});}c=e.extend({},e.fn.jScrollPane.defaults,c);
var b;this.each(function(){var i=e(this),j=i.data("jsp");if(j){j.reinitialise(c);}else{j=new a(i,c);i.data("jsp",j);}b=b?b.add(i):i;});return b;};e.fn.jScrollPane.defaults={showArrows:false,maintainPosition:true,clickOnTrack:true,autoReinitialise:false,autoReinitialiseDelay:500,verticalDragMinHeight:0,verticalDragMaxHeight:99999,horizontalDragMinWidth:0,horizontalDragMaxWidth:99999,animateScroll:false,animateDuration:300,animateEase:"linear",hijackInternalLinks:false,verticalGutter:4,horizontalGutter:4,mouseWheelSpeed:30,arrowButtonSpeed:30,arrowRepeatFreq:100,arrowScrollOnHover:false,trackClickSpeed:30,trackClickRepeatFreq:100,verticalArrowPositions:"split",horizontalArrowPositions:"split",enableKeyboardNavigation:true,hideFocus:false};
})(jQuery,this);/* plugins/autocomplete.js */
jQuery.autocomplete=function(r,A){var x=this;var a=$(r).attr("autocomplete","off");if(A.inputClass){a.addClass(A.inputClass);}var F=document.createElement("div");
var b=$(F);b.hide().addClass(A.resultsClass).css("position","absolute").css("z-index","99999");if(A.width>0){b.css("width",A.width);}$("body").append(F);r.autocompleter=x;
var M=null;var C="";var c=-1;var f={};var t=false;var n=false;var u=null;function m(){f={};f.data={};f.length=0;}m();if(A.data!=null){var J="",L={},G=[];if(typeof A.url!="string"){A.cacheLength=1;
}for(var q=0;q<A.data.length;q++){G=((typeof A.data[q]=="string")?[A.data[q]]:A.data[q]);if(G[0].length>0){J=G[0].substring(0,1).toLowerCase();if(!L[J]){L[J]=[];
}L[J].push(G);}}for(var s in L){A.cacheLength++;d(s,L[s]);}}a.keydown(function(i){u=i.keyCode;switch(i.keyCode){case 38:i.preventDefault();y(-1);break;case 40:i.preventDefault();
y(1);break;case 9:case 13:if(H()){a.get(0).blur();i.preventDefault();}break;default:c=-1;if(M){clearTimeout(M);}M=setTimeout(function(){z();},A.delay);break;}}).focus(function(){n=true;
}).blur(function(){n=false;o();});p();function z(){if(u==46||(u>8&&u<32)){return b.hide();}var i=a.val();if(i==C){return;}C=i;if(i.length>=A.minChars){a.addClass(A.loadingClass);
E(i);}else{a.removeClass(A.loadingClass);b.hide();}}function y(k){var i=$("li",F);if(!i){return;}c+=k;if(c<0){c=0;}else{if(c>=i.size()){c=i.size()-1;}}i.removeClass("ac-box-hover");
$(i[c]).addClass("ac-box-hover");}function H(){var k=$("li.ac-box-hover",F)[0];if(!k){var i=$("li",F);if(A.selectOnly){if(i.length==1){k=i[0];}}else{if(A.selectFirst){k=i[0];
}}}if(k){I(k);return true;}else{return false;}}function I(i){if(!i){i=document.createElement("li");i.extra=[];i.selectValue="";}var k=$.trim(i.selectValue?i.selectValue:i.innerHTML);
r.lastSelected=k;C=k;b.html("");a.val(k);p();if(A.onItemSelect){setTimeout(function(){A.onItemSelect(i);},1);}}function g(O,i){var k=a.get(0);if(k.createTextRange){var N=k.createTextRange();
N.collapse(true);N.moveStart("character",O);N.moveEnd("character",i);N.select();}else{if(k.setSelectionRange){k.setSelectionRange(O,i);}else{if(k.selectionStart){k.selectionStart=O;
k.selectionEnd=i;}}}k.focus();}function e(i){if(i.length>0){var k=i[0].name;if(u!=8){a.val(a.val()+k.substring(C.length));g(C.length,k.length);}}}function K(){var k=j(r);
var i=(A.width>0)?A.width:a.width();b.css({width:parseInt(i)+"px",top:(k.y+r.offsetHeight)+"px",left:k.x+"px"}).show();}function o(){if(M){clearTimeout(M);}M=setTimeout(p,200);
}function p(){if(M){clearTimeout(M);}a.removeClass(A.loadingClass);if(b.is(":visible")){b.hide();}if(A.mustMatch){var i=a.val();if(i!=r.lastSelected){I(null);}}}function D(k,i){if(i){a.removeClass(A.loadingClass);
F.innerHTML="";if(!n||i.length==0){return p();}if($.browser.msie){}F.appendChild(h(i.result));if(A.autoFill&&(a.val().toLowerCase()==k.toLowerCase())){e(i);}K();
}else{p();}}function B(k){if(!k){return null;}var O=[];var P=k.result;for(var N=0;N<P.length;N++){O[O.length]=P[N];}return O;}function h(k){var R=document.createElement("ul");
var P=k.length;if((A.maxItemsToShow>0)&&(A.maxItemsToShow<P)){P=A.maxItemsToShow;}for(var N=0;N<P;N++){var Q=k[N];if(!Q){continue;}var O=A.buildRow(Q);R.appendChild(O);
$(O).hover(function(){$("li",R).removeClass("ac-box-hover");$(this).addClass("ac-box-hover");c=$("li",R).indexOf($(this).get(0));},function(){$(this).removeClass("ac-box-hover");
}).click(function(i){i.preventDefault();i.stopPropagation();I(this);});}return R;}function E(k){if(!A.matchCase){k=k.toLowerCase();}var i=A.cacheLength?v(k):null;
if(i){D(k,i);}else{if((typeof A.url=="string")&&(A.url.length>0)){var i={q:k,command:A.command};$.json(i.command,{data:i,success:function(N){i=B(N);D(k,N);}});}else{a.removeClass(A.loadingClass);
}}}function v(Q){if(!Q){return null;}if(f.data[Q]){return f.data[Q];}if(A.matchSubset){for(var O=Q.length-1;O>=A.minChars;O--){var R=Q.substr(0,O);var k=f.data[R];
if(k){var N=[];for(var P=0;P<k.length;P++){var S=k[P];var T=S[0];if(w(T,Q)){N[N.length]=S;}}return N;}}}return null;}function w(N,O){if(!A.matchCase){N=N.toLowerCase();
}var k=N.indexOf(O);if(k==-1){return false;}return k==0||A.matchContains;}this.flushCache=function(){m();};this.setExtraParams=function(i){A.extraParams=i;};this.findValue=function(){var k=a.val();
if(!A.matchCase){k=k.toLowerCase();}var i=A.cacheLength?v(k):null;if(i){l(k,i);}else{if((typeof A.url=="string")&&(A.url.length>0)){var i={q:k,command:A.command};
$.json(i.command,{data:i,success:function(){d(k,i);l(k,i);}});}else{l(k,null);}}};function l(Q,k){if(k){a.removeClass(A.loadingClass);}var P=(k)?k.length:0;var O=null;
for(var N=0;N<P;N++){var R=k[N];if(R[0].toLowerCase()==Q.toLowerCase()){O=document.createElement("li");O.innerHTML=R[0];O.selectValue=R[0];}}if(A.onFindValue){setTimeout(function(){A.onFindValue(O);
},1);}}function d(k,i){if(!i||!k||!A.cacheLength){return;}if(!f.length||f.length>A.cacheLength){m();f.length++;}else{if(!f[k]){f.length++;}}f.data[k]=i;}function j(N){var i=N.offsetLeft||0;
var k=N.offsetTop||0;while(N=N.offsetParent){i+=N.offsetLeft;k+=N.offsetTop;}return{x:i,y:k};}};jQuery.fn.autocomplete=function(c,b,a){b=b||{};b.url=c;b.data=((typeof a=="object")&&(a.constructor==Array))?a:null;
b.inputClass=b.inputClass||"ac-box";b.resultsClass=b.resultsClass||"ac-box-results";b.lineSeparator=b.lineSeparator||"\n";b.cellSeparator=b.cellSeparator||"|";b.minChars=b.minChars||1;
b.delay=b.delay||400;b.matchCase=b.matchCase||0;b.matchSubset=b.matchSubset||1;b.matchContains=b.matchContains||0;b.cacheLength=b.cacheLength||1;b.mustMatch=b.mustMatch||0;
b.extraParams=b.extraParams||{};b.loadingClass=b.loadingClass||"ac-box-loading";b.selectFirst=b.selectFirst||false;b.selectOnly=b.selectOnly||false;b.maxItemsToShow=b.maxItemsToShow||-1;
b.autoFill=b.autoFill||false;b.width=parseInt(b.width,10)||0;this.each(function(){var d=this;new jQuery.autocomplete(d,b);});return this;};jQuery.fn.autocompleteArray=function(a,b){return this.autocomplete(null,b,a);
};jQuery.fn.indexOf=function(a){for(var b=0;b<this.length;b++){if(this[b]==a){return b;}}return -1;};/* homepage/homepagefunc.js */
function addToFavoriteGeneral(c,e){var a=navigator.userAgent.toLowerCase();var b=navigator.appName.toLowerCase();var d=a.indexOf("msie");if(d!=-1){window.external.addfavorite(c,"לוח דרושים, חיפוש עבודה חינם - JobCity");
}}function TitleFavorite(c,h){var g="לשמירת העמוד בסימניה [Ctrl + D] ";var j="לשמירת העמוד בסימניה [Ctrl + T]";var a=navigator.userAgent.toLowerCase();var b=navigator.appName.toLowerCase();
var f=b.indexOf("netscape");var i=b.indexOf("opera");var d=b.indexOf("mozila");var e=a.indexOf("msie");if(e!=-1){h.title="הקלק לשמירת האתר במועדפים";}else{if(f!=-1){h.title=g;
h.href="";}else{if(i!=-1){h.title=j;h.href="";}else{if(d!=-1){h.title=g;h.href="";}}}}}/* Homepage/TabsDisplay.js */
$(function(){$("ul.tabs li").click(function(h){if($(this).attr("id")!="liAdvrTab"&&$(this).attr("id")!="liAdvrTab2"){$("ul.tabs li").removeClass("active");$(this).addClass("active");
$(".tab_content").hide();var g="tab"+$(this).find("a").attr("rel");$(g).fadeIn();$$(g).show();return false;}});var d="http://www.maka.co.il/landingPlace.aspx?p=worldwide";
$$("liAdvrTab").click(function(g){window.open(d);});var f="http://www.pelephone.co.il/Jobs/3G/jobs/AvailableJobs/.aspx?cat=155&area=-1&&utm_campaign=drushim_2012&utm_medium=ads_special&utm_source=jobcity&utm_content=hp/kaftor_biladi_memutag/0/CT&utm_term=na";
var b="http://www.gorni.co.il/hot/campaigns/Drushim/?mn=jobcity";var c="http://www.jobcity.co.il/Company/CompanyLandingpage.aspx?comp=87713";var a="http://ad-emea.doubleclick.net/clk;252687265;76749559;i";
var e="http://www.orange.co.il/he-il/jobs/main/jobs/?utm_source=jobcity_minisite&utm_medium=banner&utm_campaign=pp";$$("liAdvrTab2").click(function(g){window.open(e);
});});
