(function($){$.extend({metadata:{defaults:{type:'class',name:'metadata',cre:/({.*})/,single:'metadata'},setType:function(type,name){this.defaults.type=type;this.defaults.name=name},get:function(elem,opts){var settings=$.extend({},this.defaults,opts);if(!settings.single.length)settings.single='metadata';var data=$.data(elem,settings.single);if(data)return data;data="{}";if(settings.type=="class"){var m=settings.cre.exec(elem.className);if(m)data=m[1]}else if(settings.type=="elem"){if(!elem.getElementsByTagName)return;var e=elem.getElementsByTagName(settings.name);if(e.length)data=$.trim(e[0].innerHTML)}else if(elem.getAttribute!=undefined){var attr=elem.getAttribute(settings.name);if(attr)data=attr};if(data.indexOf('{')<0)data="{"+data+"}";data=eval("("+data+")");$.data(elem,settings.single,data);return data}}});$.fn.metadata=function(opts){return $.metadata.get(this[0],opts)}})(jQuery);
(function(F){var B,C,J,M,L,I,G,E,H,A,K;B=document.namespaces;has_canvas=!!document.createElement("canvas").getContext;if(!(has_canvas||B)){F.fn.maphilight=function(){return this};return }if(has_canvas){G=function(P,O,N){if(O<=1){P.style.opacity=O;window.setTimeout(G,10,P,O+0.1,10)}};E=function(N){return Math.max(0,Math.min(parseInt(N,16),255))};H=function(N,O){return"rgba("+E(N.substr(0,2))+","+E(N.substr(2,2))+","+E(N.substr(4,2))+","+O+")"};C=function(N){var O=F('<canvas style="width:'+N.width+"px;height:"+N.height+'px;"></canvas>').get(0);O.getContext("2d").clearRect(0,0,O.width,O.height);return O};J=function(Q,N,T,P,O){var S,R=Q.getContext("2d");R.beginPath();if(N=="rect"){R.rect(T[0],T[1],T[2]-T[0],T[3]-T[1])}else{if(N=="poly"){R.moveTo(T[0],T[1]);for(S=2;S<T.length;S+=2){R.lineTo(T[S],T[S+1])}}else{if(N=="circ"){R.arc(T[0],T[1],T[2],0,Math.PI*2,false)}}}R.closePath();if(P.fill){R.fillStyle=H(P.fillColor,P.fillOpacity);R.fill()}if(P.stroke){R.strokeStyle=H(P.strokeColor,P.strokeOpacity);R.lineWidth=P.strokeWidth;R.stroke()}if(P.fade){G(Q,0)}};M=function(N){N.getContext("2d").clearRect(0,0,N.width,N.height)}}else{C=function(N){return F('<var style="zoom:1;overflow:hidden;display:block;width:'+N.width+"px;height:"+N.height+'px;"></var>').get(0)};J=function(O,R,S,V,N){var T,U,P,Q;T='<v:fill color="#'+V.fillColor+'" opacity="'+(V.fill?V.fillOpacity:0)+'" />';U=(V.stroke?'strokeweight="'+V.strokeWidth+'" stroked="t" strokecolor="#'+V.strokeColor+'"':'stroked="f"');P='<v:stroke opacity="'+V.strokeOpacity+'"/>';if(R=="rect"){Q=F('<v:rect name="'+N+'" filled="t" '+U+' style="zoom:1;margin:0;padding:0;display:block;position:absolute;left:'+S[0]+"px;top:"+S[1]+"px;width:"+(S[2]-S[0])+"px;height:"+(S[3]-S[1])+'px;"></v:rect>')}else{if(R=="poly"){Q=F('<v:shape name="'+N+'" filled="t" '+U+' coordorigin="0,0" coordsize="'+O.width+","+O.height+'" path="m '+S[0]+","+S[1]+" l "+S.join(",")+' x e" style="zoom:1;margin:0;padding:0;display:block;position:absolute;top:0px;left:0px;width:'+O.width+"px;height:"+O.height+'px;"></v:shape>')}else{if(R=="circ"){Q=F('<v:oval name="'+N+'" filled="t" '+U+' style="zoom:1;margin:0;padding:0;display:block;position:absolute;left:'+(S[0]-S[2])+"px;top:"+(S[1]-S[2])+"px;width:"+(S[2]*2)+"px;height:"+(S[2]*2)+'px;"></v:oval>')}}}Q.get(0).innerHTML=T+P;F(O).append(Q)};M=function(N){F(N).find("[name=highlighted]").remove()}}L=function(O){var N,P=O.getAttribute("coords").split(",");for(N=0;N<P.length;N++){P[N]=parseFloat(P[N])}return[O.getAttribute("shape").toLowerCase().substr(0,4),P]};K=function(P,O){var N=F(P);return F.extend({},O,F.metadata?N.metadata():false,N.data("maphilight"))};A=function(N){if(!N.complete){return false}if(typeof N.naturalWidth!="undefined"&&N.naturalWidth==0){return false}return true};I={position:"absolute",left:0,top:0,padding:0,border:0};var D=false;F.fn.maphilight=function(P){P=F.extend({},F.fn.maphilight.defaults,P);if(F.browser.msie&&!D){document.namespaces.add("v","urn:schemas-microsoft-com:vml");var O=document.createStyleSheet();var N=["shape","rect","oval","circ","fill","stroke","imagedata","group","textbox"];F.each(N,function(){O.addRule("v\\:"+this,"behavior: url(#default#VML); antialias:true")});D=true}return this.each(function(){var V,S,Z,R,U,W,Y,T,X;V=F(this);if(!A(this)){return window.setTimeout(function(){V.maphilight(P)},200)}Z=F.extend({},P,F.metadata?V.metadata():false,V.data("maphilight"));X=V.get(0).getAttribute("usemap");R=F('map[name="'+X.substr(1)+'"]');if(!(V.is("img")&&X&&R.size()>0)){return }if(V.hasClass("maphilighted")){var Q=V.parent();V.insertBefore(Q);Q.remove();F(R).unbind(".maphilight").find("area[coords]").unbind(".maphilight")}S=F("<div></div>").css({display:"block",background:"url("+this.src+")",position:"relative",padding:0,width:this.width,height:this.height});if(Z.wrapClass){if(Z.wrapClass===true){S.addClass(F(this).attr("class"))}else{S.addClass(Z.wrapClass)}}V.before(S).css("opacity",0).css(I).remove();if(F.browser.msie){V.css("filter","Alpha(opacity=0)")}S.append(V);U=C(this);F(U).css(I);U.height=this.height;U.width=this.width;Y=function(c){var a,b;b=K(this,Z);if(!b.neverOn&&!b.alwaysOn){a=L(this);J(U,a[0],a[1],b,"highlighted");if(b.groupBy&&F(this).attr(b.groupBy)){var d=this;R.find("area["+b.groupBy+"="+F(this).attr(b.groupBy)+"]").each(function(){if(this!=d){var f=K(this,Z);if(!f.neverOn&&!f.alwaysOn){var e=L(this);J(U,e[0],e[1],f,"highlighted")}}})}F(U).append("<v:rect></v:rect>")}};F(R).bind("alwaysOn.maphilight",function(){if(W){M(W)}if(!has_canvas){F(U).empty()}F(R).find("area[coords]").each(function(){var a,b;b=K(this,Z);if(b.alwaysOn){if(!W&&has_canvas){W=C(V.get());F(W).css(I);W.width=V.width();W.height=V.height();V.before(W)}a=L(this);if(has_canvas){J(W,a[0],a[1],b,"")}else{J(U,a[0],a[1],b,"")}}})});F(R).trigger("alwaysOn.maphilight").find("area[coords]").bind("mouseover.maphilight",Y).bind("mouseout.maphilight",function(a){M(U)});V.before(U);V.addClass("maphilighted")})};F.fn.maphilight.defaults={fill:true,fillColor:"000000",fillOpacity:0.2,stroke:true,strokeColor:"ff0000",strokeOpacity:1,strokeWidth:1,fade:true,alwaysOn:false,neverOn:false,groupBy:false,wrapClass:true}})(jQuery);
;
(function($){var pasteEventName=($.browser.msie?'paste':'input')+".mask",iPhone=(window.orientation!=undefined);$.mask={definitions:{'9':"[0-9]",a:"[A-Za-z]",'*':"[A-Za-z0-9]"}};$.fn.extend({caret:function(begin,end){if(this.length==0)return;if(typeof begin=='number'){end=(typeof end=='number')?end:begin;return this.each(function(){if(this.setSelectionRange){this.focus();this.setSelectionRange(begin,end)}else if(this.createTextRange){var range=this.createTextRange();range.collapse(true);range.moveEnd('character',end);range.moveStart('character',begin);range.select()}})}else{if(this[0].setSelectionRange){begin=this[0].selectionStart;end=this[0].selectionEnd}else if(document.selection&&document.selection.createRange){var range=document.selection.createRange();begin=0-range.duplicate().moveStart('character',-100000);end=begin+range.text.length};return{begin:begin,end:end}}},unmask:function(){return this.trigger("unmask")},mask:function(mask,settings){if(!mask&&this.length>0){var input=$(this[0]),tests=input.data("tests");return $.map(input.data("buffer"),function(c,i){return tests[i]?c:null}).join('')};settings=$.extend({placeholder:"_",completed:null},settings);var defs=$.mask.definitions,tests=[],partialPosition=mask.length,firstNonMaskPos=null,len=mask.length;$.each(mask.split(""),function(i,c){if(c=='?'){len--;partialPosition=i}else if(defs[c]){tests.push(new RegExp(defs[c]));if(firstNonMaskPos==null)firstNonMaskPos=tests.length-1}else tests.push(null)});return this.each(function(){var input=$(this),buffer=$.map(mask.split(""),function(c,i){if(c!='?')return defs[c]?settings.placeholder:c}),ignore=false,focusText=input.val();input.data("buffer",buffer).data("tests",tests)
function seekNext(pos){while(++pos<=len&&!tests[pos]);return pos}
function shiftL(pos){while(!tests[pos]&&--pos>=0);for(var i=pos;i<len;i++)if(tests[i]){buffer[i]=settings.placeholder;var j=seekNext(i);if(j<len&&tests[i].test(buffer[j])){buffer[i]=buffer[j]}else break};writeBuffer();input.caret(Math.max(firstNonMaskPos,pos))}
function shiftR(pos){for(var i=pos,c=settings.placeholder;i<len;i++)if(tests[i]){var j=seekNext(i),t=buffer[i];buffer[i]=c;if(j<len&&tests[j].test(t)){c=t}else break}}
function keydownEvent(e){var pos=$(this).caret(),k=e.keyCode;ignore=(k<16||(k>16&&k<32)||(k>32&&k<41));if((pos.begin-pos.end)!=0&&(!ignore||k==8||k==46))clearBuffer(pos.begin,pos.end);if(k==8||k==46||(iPhone&&k==127)){shiftL(pos.begin+(k==46?0:-1));return false}else if(k==27){input.val(focusText);input.caret(0,checkVal());return false}}
function keypressEvent(e){if(ignore){ignore=false;return(e.keyCode==8)?false:null};e=e||window.event;var k=e.charCode||e.keyCode||e.which,pos=$(this).caret();if(e.ctrlKey||e.altKey||e.metaKey){return true}else if((k>=32&&k<=125)||k>186){var p=seekNext(pos.begin-1);if(p<len){var c=String.fromCharCode(k);if(tests[p].test(c)){shiftR(p);buffer[p]=c;writeBuffer();var next=seekNext(p);$(this).caret(next);if(settings.completed&&next==len)settings.completed.call(input)}}};return false}
function clearBuffer(start,end){for(var i=start;i<end&&i<len;i++)if(tests[i])buffer[i]=settings.placeholder}
function writeBuffer(){return input.val(buffer.join('')).val()}
function checkVal(allow){var test=input.val(),lastMatch=-1;for(var i=0,pos=0;i<len;i++)if(tests[i]){buffer[i]=settings.placeholder;while(pos++<test.length){var c=test.charAt(pos-1);if(tests[i].test(c)){buffer[i]=c;lastMatch=i;break}};if(pos>test.length)break}else if(buffer[i]==test[pos]&&i!=partialPosition){pos++;lastMatch=i};if(!allow&&lastMatch+1<partialPosition){input.val("");clearBuffer(0,len)}else if(allow||lastMatch+1>=partialPosition){writeBuffer();if(!allow)input.val(input.val().substring(0,lastMatch+1))};return(partialPosition?i:firstNonMaskPos)};if(!input.attr("readonly"))input.one("unmask",function(){input.unbind(".mask").removeData("buffer").removeData("tests")}).bind("focus.mask",function(){focusText=input.val();var pos=checkVal();writeBuffer();setTimeout(function(){if(pos==mask.length){input.caret(0,pos)}else input.caret(pos)},0)}).bind("blur.mask",function(){checkVal();if(input.val()!=focusText)input.change()}).bind("keydown.mask",keydownEvent).bind("keypress.mask",keypressEvent).bind(pasteEventName,function(){setTimeout(function(){input.caret(checkVal(true))},0)});checkVal()})}})})(jQuery);
(function($){$.fn.superfish=function(op){var sf=$.fn.superfish,c=sf.c,$arrow=$(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),over=function(){var $$=$(this),menu=getMenu($$);clearTimeout(menu.sfTimer);$$.showSuperfishUl().siblings().hideSuperfishUl()},out=function(){var $$=$(this),menu=getMenu($$),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=($.inArray($$[0],o.$path)>-1);$$.hideSuperfishUl();if(o.$path.length&&$$.parents(['li.',o.hoverClass].join('')).length<1)over.call(o.$path)},o.delay)},getMenu=function($menu){var menu=$menu.parents(['ul.',c.menuClass,':first'].join(''))[0];sf.op=sf.o[menu.serial];return menu},addArrow=function($a){$a.addClass(c.anchorClass).append($arrow.clone())};return this.each(function(){var s=this.serial=sf.o.length,o=$.extend({},sf.defaults,op);o.$path=$('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){$(this).addClass([o.hoverClass,c.bcClass].join(' ')).filter('li:has(ul)').removeClass(o.pathClass)});sf.o[s]=sf.op=o;$('li:has(ul)',this)[($.fn.hoverIntent&&!o.disableHI)?'hoverIntent':'hover'](over,out).each(function(){if(o.autoArrows)addArrow($('>a:first-child',this))}).not('.'+c.bcClass).hideSuperfishUl();var $a=$('a',this);$a.each(function(i){var $li=$a.eq(i).parents('li');$a.eq(i).focus(function(){over.call($li)}).blur(function(){out.call($li)})});o.onInit.call(this)}).each(function(){var menuClasses=[c.menuClass];if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version<7))menuClasses.push(c.shadowClass);$(this).addClass(menuClasses.join(' '))})};var sf=$.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if($.browser.msie&&$.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined)this.toggleClass(sf.c.shadowClass+'-off')};sf.c={bcClass:'sf-breadcrumb',menuClass:'sf-js-enabled',anchorClass:'sf-with-ul',arrowClass:'sf-sub-indicator',shadowClass:'sf-shadow'};sf.defaults={hoverClass:'sfHover',pathClass:'overideThisToUse',pathLevels:1,delay:800,animation:{opacity:'show'},speed:'normal',autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.$path:'';o.retainPath=false;var $ul=$(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass).find('>ul').hide().css('visibility','hidden');o.onHide.call($ul);return this},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+'-off',$ul=this.addClass(o.hoverClass).find('>ul:hidden').css('visibility','visible');sf.IE7fix.call($ul);o.onBeforeShow.call($ul);$ul.animate(o.animation,o.speed,function(){sf.IE7fix.call($ul);o.onShow.call($ul)});return this}})})(jQuery);
(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&parseInt($.browser.version)<=6){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';"/>';return this.each(function(){if($('> iframe.bgiframe',this).length==0)this.insertBefore(document.createElement(html),this.firstChild)})};return this};if(!$.browser.version)$.browser.version=navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1]})(jQuery);
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY,track=function(ev){cX=ev.pageX;cY=ev.pageY},compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}},delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev])},handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this)try{p=p.parentNode}catch(e){p=this};if(p==this)return false;var ev=jQuery.extend({},e),ob=this;if(ob.hoverIntent_t)ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1)ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1)ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}};return this.mouseover(handleHover).mouseout(handleHover)}})(jQuery);
(function($){$(document).ready(function(){$('ul.nice-menu').superfish({hoverClass:'over',autoArrows:false,dropShadows:false,delay:Drupal.settings.nice_menus_options.delay,speed:Drupal.settings.nice_menus_options.speed}).find('ul').bgIframe({opacity:false});$('ul.nice-menu ul').css('display','none')})})(jQuery);
(function($){Drupal.Panels={};Drupal.Panels.autoAttach=function(){if($.browser.msie){$("div.panel-pane").hover(function(){$('div.panel-hide',this).addClass("panel-hide-hover");return true},function(){$('div.panel-hide',this).removeClass("panel-hide-hover");return true});$("div.admin-links").hover(function(){$(this).addClass("admin-links-hover");return true},function(){$(this).removeClass("admin-links-hover");return true})}};$(Drupal.Panels.autoAttach)})(jQuery);
(function($){Drupal.behaviors.cronCheck=function(context){if(Drupal.settings.cron.runNext||false)$('body:not(.cron-check-processed)',context).addClass('cron-check-processed').each(function(){if(Math.round(new Date().getTime()/1000.0)>=Drupal.settings.cron.runNext)$.get(Drupal.settings.cron.basePath+'/run-cron-check')})}})(jQuery);

