//http://www.featureblend.com/license.txt
var FlashDetect=new function(){var self=this;self.installed=false;self.raw="";self.major=-1;self.minor=-1;self.revision=-1;self.revisionStr="";var activeXDetectRules=[{"name":"ShockwaveFlash.ShockwaveFlash.7","version":function(obj){return getActiveXVersion(obj);}},{"name":"ShockwaveFlash.ShockwaveFlash.6","version":function(obj){var version="6,0,21";try{obj.AllowScriptAccess="always";version=getActiveXVersion(obj);}catch(err){}
return version;}},{"name":"ShockwaveFlash.ShockwaveFlash","version":function(obj){return getActiveXVersion(obj);}}];var getActiveXVersion=function(activeXObj){var version=-1;try{version=activeXObj.GetVariable("$version");}catch(err){}
return version;};var getActiveXObject=function(name){var obj=-1;try{obj=new ActiveXObject(name);}catch(err){obj={activeXError:true};}
return obj;};var parseActiveXVersion=function(str){var versionArray=str.split(",");return{"raw":str,"major":parseInt(versionArray[0].split(" ")[1],10),"minor":parseInt(versionArray[1],10),"revision":parseInt(versionArray[2],10),"revisionStr":versionArray[2]};};var parseStandardVersion=function(str){var descParts=str.split(/ +/);var majorMinor=descParts[2].split(/\./);var revisionStr=descParts[3];return{"raw":str,"major":parseInt(majorMinor[0],10),"minor":parseInt(majorMinor[1],10),"revisionStr":revisionStr,"revision":parseRevisionStrToInt(revisionStr)};};var parseRevisionStrToInt=function(str){return parseInt(str.replace(/[a-zA-Z]/g,""),10)||self.revision;};self.majorAtLeast=function(version){return self.major>=version;};self.minorAtLeast=function(version){return self.minor>=version;};self.revisionAtLeast=function(version){return self.revision>=version;};self.versionAtLeast=function(major){var properties=[self.major,self.minor,self.revision];var len=Math.min(properties.length,arguments.length);for(i=0;i<len;i++){if(properties[i]>=arguments[i]){if(i+1<len&&properties[i]==arguments[i]){continue;}else{return true;}}else{return false;}}};self.FlashDetect=function(){if(navigator.plugins&&navigator.plugins.length>0){var type='application/x-shockwave-flash';var mimeTypes=navigator.mimeTypes;if(mimeTypes&&mimeTypes[type]&&mimeTypes[type].enabledPlugin&&mimeTypes[type].enabledPlugin.description){var version=mimeTypes[type].enabledPlugin.description;var versionObj=parseStandardVersion(version);self.raw=versionObj.raw;self.major=versionObj.major;self.minor=versionObj.minor;self.revisionStr=versionObj.revisionStr;self.revision=versionObj.revision;self.installed=true;}}else if(navigator.appVersion.indexOf("Mac")==-1&&window.execScript){var version=-1;for(var i=0;i<activeXDetectRules.length&&version==-1;i++){var obj=getActiveXObject(activeXDetectRules[i].name);if(!obj.activeXError){self.installed=true;version=activeXDetectRules[i].version(obj);if(version!=-1){var versionObj=parseActiveXVersion(version);self.raw=versionObj.raw;self.major=versionObj.major;self.minor=versionObj.minor;self.revision=versionObj.revision;self.revisionStr=versionObj.revisionStr;}}}}}();};FlashDetect.JS_RELEASE="1.0.4";
var ZeroClipboard={version:"1.0.7",clients:{},moviePath:"ZeroClipboard.swf",nextId:1,$:function(a){if(typeof(a)=="string"){a=document.getElementById(a)}if(!a.addClass){a.hide=function(){this.style.display="none"};a.show=function(){this.style.display=""};a.addClass=function(b){this.removeClass(b);this.className+=" "+b};a.removeClass=function(e){var b=this.className.split(/\s+/);var c=-1;for(var d=0;d<b.length;d++){if(b[d]==e){c=d;d=b.length}}if(c>-1){b.splice(c,1);this.className=b.join(" ")}return this};a.hasClass=function(b){return !!this.className.match(new RegExp("\\s*"+b+"\\s*"))}}return a},setMoviePath:function(a){this.moviePath=a},dispatch:function(d,c,a){var b=this.clients[d];if(b){b.receiveEvent(c,a)}},register:function(b,a){this.clients[b]=a},getDOMObjectPosition:function(b,c){var a={left:0,top:0,width:b.width?b.width:b.offsetWidth,height:b.height?b.height:b.offsetHeight};while(b&&(b!=c)){a.left+=b.offsetLeft;a.top+=b.offsetTop;b=b.offsetParent}return a},Client:function(a){this.handlers={};this.id=ZeroClipboard.nextId++;this.movieId="ZeroClipboardMovie_"+this.id;ZeroClipboard.register(this.id,this);if(a){this.glue(a)}}};ZeroClipboard.Client.prototype={id:0,ready:false,movie:null,clipText:"",handCursorEnabled:true,cssEffects:true,handlers:null,glue:function(c,a,e){this.domElement=ZeroClipboard.$(c);var f=99;if(this.domElement.style.zIndex){f=parseInt(this.domElement.style.zIndex,10)+1}if(typeof(a)=="string"){a=ZeroClipboard.$(a)}else{if(typeof(a)=="undefined"){a=document.getElementsByTagName("body")[0]}}var b=ZeroClipboard.getDOMObjectPosition(this.domElement,a);this.div=document.createElement("div");var d=this.div.style;d.position="absolute";d.left=""+b.left+"px";d.top=""+b.top+"px";d.width=""+b.width+"px";d.height=""+b.height+"px";d.zIndex=f;if(typeof(e)=="object"){for(addedStyle in e){d[addedStyle]=e[addedStyle]}}a.appendChild(this.div);this.div.innerHTML=this.getHTML(b.width,b.height)},getHTML:function(e,b){var c="";var a="id="+this.id+"&width="+e+"&height="+b;if(navigator.userAgent.match(/MSIE/)){var d=location.href.match(/^https/i)?"https://":"http://";c+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+d+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+e+'" height="'+b+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+a+'"/><param name="wmode" value="transparent"/></object>'}else{c+='<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+e+'" height="'+b+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+a+'" wmode="transparent" />'}return c},hide:function(){if(this.div){this.div.style.left="-2000px"}},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide();this.div.innerHTML="";var a=document.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(b){}this.domElement=null;this.div=null}},reposition:function(b){if(b){this.domElement=ZeroClipboard.$(b);if(!this.domElement){this.hide()}}if(this.domElement&&this.div){var a=ZeroClipboard.getDOMObjectPosition(this.domElement);var c=this.div.style;c.left=""+a.left+"px";c.top=""+a.top+"px"}},setText:function(a){this.clipText=a;if(this.ready){this.movie.setText(a)}},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");if(!this.handlers[a]){this.handlers[a]=[]}this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a;if(this.ready){this.movie.setHandCursor(a)}},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(b,a){b=b.toString().toLowerCase().replace(/^on/,"");switch(b){case"load":this.movie=document.getElementById(this.movieId);if(!this.movie){var f=this;setTimeout(function(){f.receiveEvent("load",null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){var f=this;setTimeout(function(){f.receiveEvent("load",null)},100);this.ready=true;return}this.ready=true;this.movie.setText(this.clipText);this.movie.setHandCursor(this.handCursorEnabled);break;case"mouseover":if(this.domElement&&this.cssEffects){this.domElement.addClass("hover");if(this.recoverActive){this.domElement.addClass("active")}}break;case"mouseout":if(this.domElement&&this.cssEffects){this.recoverActive=false;if(this.domElement.hasClass("active")){this.domElement.removeClass("active");this.recoverActive=true}this.domElement.removeClass("hover")}break;case"mousedown":if(this.domElement&&this.cssEffects){this.domElement.addClass("active")}break;case"mouseup":if(this.domElement&&this.cssEffects){this.domElement.removeClass("active");this.recoverActive=false}break}if(this.handlers[b]){for(var d=0,e=this.handlers[b].length;d<e;d++){var c=this.handlers[b][d];if(typeof(c)=="function"){c(this,a)}else{if((typeof(c)=="object")&&(c.length==2)){c[0][c[1]](this,a)}else{if(typeof(c)=="string"){window[c](this,a)}}}}}}};
/*
 * jNotify jQuery Plug-in
 *
 * Copyright 2010 Giva, Inc. (http://www.givainc.com/labs/) 
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * 	http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Date: 2010-09-30
 * Rev:  1.1.00
 */
(function(B){B.jnotify=function(K,M,L){return new C(K,M,L)};B.jnotify.version="1.1.00";var J,D=[],E=0,H=false,I=false,G,F,A={type:"",delay:2000,sticky:false,closeLabel:"&times;",showClose:true,fadeSpeed:1000,slideSpeed:250,classContainer:"jnotify-container",classNotification:"jnotify-notification",classBackground:"jnotify-background",classClose:"jnotify-close",classMessage:"jnotify-message",init:null,create:null,beforeRemove:null,remove:null,transition:null};B.jnotify.setup=function(K){A=B.extend({},A,K)};B.jnotify.play=function(M,N){if(H&&(M!==true)||(D.length==0)){return }H=true;var L=D.shift();F=L;var K=(arguments.length>=2)?parseInt(N,10):L.options.delay;G=setTimeout(function(){G=0;L.remove(function(){if(D.length==0){H=false}else{if(!I){B.jnotify.play(true)}}})},K)};B.jnotify.pause=function(){clearTimeout(G);if(G){D.unshift(F)}I=H=true};B.jnotify.resume=function(){I=false;B.jnotify.play(true,0)};function C(P,N){var M=this,K=typeof N;if(K=="number"){N=B.extend({},A,{delay:N})}else{if(K=="boolean"){N=B.extend({},A,{sticky:true})}else{if(K=="string"){N=B.extend({},A,{type:N,delay:((arguments.length>2)&&(typeof arguments[2]=="number"))?arguments[2]:A.delay,sticky:((arguments.length>2)&&(typeof arguments[2]=="boolean"))?arguments[2]:A.sticky})}else{N=B.extend({},A,N)}}}this.options=N;if(!J){J=B('<div class="'+A.classContainer+'" />').appendTo("body");if(B.isFunction(N.init)){N.init.apply(M,[J])}}function O(S){var R='<div class="'+N.classNotification+(N.type.length?(" "+N.classNotification+"-"+N.type):"")+'"><div class="'+N.classBackground+'"></div>'+(N.sticky&&N.showClose?('<a class="'+N.classClose+'">'+N.closeLabel+"</a>"):"")+'<div class="'+N.classMessage+'"><div>'+S+"</div></div></div>";E++;var Q=B(R);if(N.sticky){Q.find("a."+N.classClose).bind("click.jnotify",function(){M.remove()})}if(B.isFunction(N.create)){N.create.apply(M,[Q])}return Q.appendTo(J)}this.remove=function(U){var Q=L.find("."+N.classMessage),S=Q.parent();var R=E--;if(B.isFunction(N.beforeRemove)){N.beforeRemove.apply(M,[Q])}function T(){S.remove();if(B.isFunction(U)){U.apply(M,[Q])}if(B.isFunction(N.remove)){N.remove.apply(M,[Q])}}if(B.isFunction(N.transition)){N.transition.apply(M,[S,Q,R,T,N])}else{Q.fadeTo(N.fadeSpeed,0.01,function(){if(R<=1){T()}else{S.slideUp(N.slideSpeed,T)}});if(E<=0){S.fadeOut(N.fadeSpeed)}}};var L=O(P);if(!N.sticky){D.push(this);B.jnotify.play()}return this}})(jQuery);
(function(a){a.fn.popupWindow=function(b){return this.each(function(){a(this).click(function(){a.fn.popupWindow.defaultSettings={centerBrowser:0,centerScreen:0,height:500,left:0,location:0,menubar:0,resizable:0,scrollbars:0,status:0,width:500,windowName:null,windowURL:null,top:0,toolbar:0};settings=a.extend({},a.fn.popupWindow.defaultSettings,b||{});var e="height="+settings.height+",width="+settings.width+",toolbar="+settings.toolbar+",scrollbars="+settings.scrollbars+",status="+settings.status+",resizable="+settings.resizable+",location="+settings.location+",menuBar="+settings.menubar;settings.windowName=this.name||settings.windowName;settings.windowURL=this.href||settings.windowURL;var d,c;if(settings.centerBrowser){if(a.browser.msie){d=(window.screenTop-120)+((((document.documentElement.clientHeight+120)/2)-(settings.height/2)));c=window.screenLeft+((((document.body.offsetWidth+20)/2)-(settings.width/2)))}else{d=window.screenY+(((window.outerHeight/2)-(settings.height/2)));c=window.screenX+(((window.outerWidth/2)-(settings.width/2)))}window.open(settings.windowURL,settings.windowName,e+",left="+c+",top="+d).focus()}else{if(settings.centerScreen){d=(screen.height-settings.height)/2;c=(screen.width-settings.width)/2;window.open(settings.windowURL,settings.windowName,e+",left="+c+",top="+d).focus()}else{window.open(settings.windowURL,settings.windowName,e+",left="+settings.left+",top="+settings.top).focus()}}return false})})}})(jQuery);
(function(a){a.fn.lazyload=function(c){var d={threshold:0,failurelimit:0,event:"scroll",effect:"show",container:window};if(c){a.extend(d,c)}var b=this;if("scroll"==d.event){a(d.container).bind("scroll",function(f){var e=0;b.each(function(){if(a.abovethetop(this,d)||a.leftofbegin(this,d)){}else{if(!a.belowthefold(this,d)&&!a.rightoffold(this,d)){a(this).trigger("appear")}else{if(e++>d.failurelimit){return false}}}});var g=a.grep(b,function(h){return !h.loaded});b=a(g)})}this.each(function(){var e=this;if(undefined==a(e).attr("original")){a(e).attr("original",a(e).attr("src"))}if("scroll"!=d.event||undefined==a(e).attr("src")||d.placeholder==a(e).attr("src")||(a.abovethetop(e,d)||a.leftofbegin(e,d)||a.belowthefold(e,d)||a.rightoffold(e,d))){if(d.placeholder){a(e).attr("src",d.placeholder)}else{a(e).removeAttr("src")}e.loaded=false}else{e.loaded=true}a(e).one("appear",function(){if(!this.loaded){a("<img />").bind("load",function(){a(e).hide().attr("src",a(e).attr("original"))[d.effect](d.effectspeed);e.loaded=true}).attr("src",a(e).attr("original"))}});if("scroll"!=d.event){a(e).bind(d.event,function(f){if(!e.loaded){a(e).trigger("appear")}})}});a(d.container).trigger(d.event);return this};a.belowthefold=function(b,d){if(d.container===undefined||d.container===window){var c=a(window).height()+a(window).scrollTop()}else{var c=a(d.container).offset().top+a(d.container).height()}return c<=a(b).offset().top-d.threshold};a.rightoffold=function(b,d){if(d.container===undefined||d.container===window){var c=a(window).width()+a(window).scrollLeft()}else{var c=a(d.container).offset().left+a(d.container).width()}return c<=a(b).offset().left-d.threshold};a.abovethetop=function(b,d){if(d.container===undefined||d.container===window){var c=a(window).scrollTop()}else{var c=a(d.container).offset().top}return c>=a(b).offset().top+d.threshold+a(b).height()};a.leftofbegin=function(b,d){if(d.container===undefined||d.container===window){var c=a(window).scrollLeft()}else{var c=a(d.container).offset().left}return c>=a(b).offset().left+d.threshold+a(b).width()};a.extend(a.expr[":"],{"below-the-fold":"$.belowthefold(a, {threshold : 0, container: window})","above-the-fold":"!$.belowthefold(a, {threshold : 0, container: window})","right-of-fold":"$.rightoffold(a, {threshold : 0, container: window})","left-of-fold":"!$.rightoffold(a, {threshold : 0, container: window})"})})(jQuery);
(function(a){a.fn.autoGrowInput=function(b){b=a.extend({maxWidth:1000,minWidth:0,comfortZone:70},b);this.filter("input:text").each(function(){var e=b.minWidth||a(this).width(),g="",d=a(this),f=a("<tester/>").css({position:"absolute",top:-9999,left:-9999,width:"auto",fontSize:d.css("fontSize"),fontFamily:d.css("fontFamily"),fontWeight:d.css("fontWeight"),letterSpacing:d.css("letterSpacing"),whiteSpace:"nowrap"}),c=function(){if(g===(g=d.val())){return}var i=g.replace(/&/g,"&amp;").replace(/\s/g,"&nbsp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");f.html(i);var l=f.width(),k=(l+b.comfortZone)>=e?l+b.comfortZone:e,h=d.width(),j=(k<h&&k>=e)||(k>e&&k<b.maxWidth);if(j){d.width(k)}};f.insertAfter(d);a(this).bind("keyup keydown blur update",c);c()});return this}})(jQuery);
(function(a){a.fn.tagedit=function(j){j=a.extend(true,{autocompleteURL:null,deletedPostfix:"-d",addedPostfix:"-a",additionalListClass:"",allowEdit:true,allowDelete:true,allowAdd:true,direction:"ltr",animSpeed:500,autocompleteOptions:{select:function(k,l){a(this).val(l.item.value).trigger("transformToTag",[l.item.id]);return false}},breakKeyCodes:[13,44],checkNewEntriesCaseSensitive:false,texts:{removeLinkTitle:"Remove from list.",saveEditLinkTitle:"Save changes.",deleteLinkTitle:"Delete this tag from database.",deleteConfirmation:"Are you sure to delete this entry?",deletedElementTitle:"This Element will be deleted.",breakEditLinkTitle:"Cancel"}},j||{});if(this.length==0){return}if(j.autocompleteURL){j.autocompleteOptions.source=j.autocompleteURL}var d=this.attr("dir");if(d&&d.length>0){j.direction=this.attr("dir")}var f=this;var c=new RegExp("^(.*)\\[([0-9]*?("+j.deletedPostfix+"|"+j.addedPostfix+")?)?]$","i");var b=f.eq(0).attr("name").match(c);if(b&&b.length==4){b=b[1]}else{alert("elementname dows not match the expected format (regexp: "+c+")");return}g();function g(){var k='<ul class="tagedit-list '+j.additionalListClass+'">';f.each(function(){var m=a(this).attr("name").match(c);if(m&&m.length==4&&(j.deleteEmptyItems==false||a(this).val().length>0)){if(m[1].length>0){var n=typeof m[2]!="undefined"?m[2]:"";k+='<li class="tagedit-listelement tagedit-listelement-old">';k+='<span dir="'+j.direction+'">'+a(this).val()+"</span>";k+='<input type="hidden" name="'+b+"["+n+']" value="'+a(this).val()+'" />';k+='<a class="tagedit-close" title="'+j.texts.removeLinkTitle+'">x</a>';k+="</li>"}}});f.last().after(k);var l=f.last().next();f.remove();f=l;if(j.deletedPostfix.length>0){f.find('input[name$="'+j.deletedPostfix+']"]').each(function(){i(a(this).parent())})}k='<li class="tagedit-listelement tagedit-listelement-new">';k+='<input type="text" name="'+b+'[]" value="" id="tagedit-input" disabled="disabled" class="tagedit-input-disabled" dir="'+j.direction+'"/>';k+="</li>";k+="</ul>";f.append(k).find("#tagedit-input").each(function(){a(this).autoGrowInput({comfortZone:15,minWidth:15,maxWidth:20000});a(this).bind("transformToTag",function(n,o){var r=(typeof o!="undefined"&&o.length>0);var m=r==true?false:true;var p=h(a(this).val(),m);if(p[0]===true||(p[0]===false&&typeof p[1]=="string")){if(r==false&&typeof p[1]=="string"){r=true;o=p[1]}if(j.allowAdd==true||r){k='<li class="tagedit-listelement tagedit-listelement-old">';k+='<span dir="'+j.direction+'">'+a(this).val()+"</span>";var q=r?b+"["+o+j.addedPostfix+"]":b+"[]";k+='<input type="hidden" name="'+q+'" value="'+a(this).val()+'" />';k+='<a class="tagedit-close" title="'+j.texts.removeLinkTitle+'">x</a>';k+="</li>";a(this).parent().before(k)}}a(this).val("");if(j.autocompleteOptions.source){a(this).autocomplete("close")}}).keydown(function(o){var m=o.keyCode>0?o.keyCode:o.which;switch(m){case 8:if(a(this).val().length==0){var n=f.find("li.tagedit-listelement-old").last();n.fadeOut(j.animSpeed,function(){n.remove()});o.preventDefault();return false}break;case 9:if(a(this).val().length>0&&a("ul.ui-autocomplete #ui-active-menuitem").length==0){a(this).trigger("transformToTag");o.preventDefault();return false}break}return true}).keypress(function(n){var m=n.keyCode>0?n.keyCode:n.which;if(a.inArray(m,j.breakKeyCodes)>-1){if(a(this).val().length>0&&a("ul.ui-autocomplete #ui-active-menuitem").length==0){a(this).trigger("transformToTag")}n.preventDefault();return false}return true}).bind("paste",function(m){var n=a(this);if(m.type=="paste"){setTimeout(function(){n.trigger("transformToTag")},1)}}).blur(function(){if(a(this).val().length==0){a(this).attr("disabled","disabled").addClass("tagedit-input-disabled")}else{var m=a(this);a(this).data("blurtimer",window.setTimeout(function(){m.val("")},500))}}).focus(function(){window.clearTimeout(a(this).data("blurtimer"))});if(j.autocompleteOptions.source!=false){a(this).autocomplete(j.autocompleteOptions)}}).end().click(function(m){switch(m.target.tagName){case"A":a(m.target).parent().fadeOut(j.animSpeed,function(){a(m.target).parent().remove()});break;case"INPUT":case"SPAN":case"LI":if(a(m.target).hasClass("tagedit-listelement-deleted")==false&&a(m.target).parent("li").hasClass("tagedit-listelement-deleted")==false){return e(m)}default:a(this).find("#tagedit-input").removeAttr("disabled").removeClass("tagedit-input-disabled").focus()}return false})}function e(m){if(j.allowEdit==false){return}var l=m.target.tagName=="SPAN"?a(m.target).parent():a(m.target);var k=null;l.bind("finishEdit",function(p,o){window.clearTimeout(k);var q=a(this).find(":text");if(q.val().length>0&&(typeof o=="undefined"||o===false)&&h(q.val(),true)){a(this).find(":hidden").val(q.val());a(this).find("span").html(q.val())}q.remove();a(this).find("a.tagedit-save, a.tagedit-break, a.tagedit-delete, tester").remove();a(this).removeClass("tagedit-listelement-edit").unbind("finishEdit");return false});var n=l.find(":hidden");html='<input type="text" name="tmpinput" autocomplete="off" value="'+n.val()+'" class="tagedit-edit-input" dir="'+j.direction+'"/>';html+='<a class="tagedit-save" title="'+j.texts.saveEditLinkTitle+'">o</a>';html+='<a class="tagedit-break" title="'+j.texts.breakEditLinkTitle+'">x</a>';if(j.allowDelete==true&&l.find(":hidden").length>0&&typeof l.find(":hidden").attr("name").match(c)[3]!="undefined"){html+='<a class="tagedit-delete" title="'+j.texts.deleteLinkTitle+'">d</a>'}n.after(html);l.addClass("tagedit-listelement-edit").find("a.tagedit-save").click(function(){a(this).parent().trigger("finishEdit");return false}).end().find("a.tagedit-break").click(function(){a(this).parent().trigger("finishEdit",[true]);return false}).end().find("a.tagedit-delete").click(function(){window.clearTimeout(k);if(confirm(j.texts.deleteConfirmation)){i(a(this).parent())}else{a(this).parent().find(":text").trigger("finishEdit",[true])}return false}).end().find(":text").focus().autoGrowInput({comfortZone:10,minWidth:15,maxWidth:20000}).keypress(function(o){switch(o.keyCode){case 13:o.preventDefault();a(this).parent().trigger("finishEdit");return false}return true}).blur(function(){var o=a(this);k=window.setTimeout(function(){o.parent().trigger("finishEdit",[true])},500)})}function i(k){k.trigger("finishEdit",[true]).addClass("tagedit-listelement-deleted").attr("title",j.deletedElementTitle);k.find(":hidden").each(function(){var m=new RegExp("("+j.addedPostfix+"|"+j.deletedPostfix+")?]");var l=a(this).attr("name").replace(m,j.deletedPostfix+"]");a(this).attr("name",l)})}function h(s,m){m=typeof m=="undefined"?false:m;var k=null;var n=j.checkNewEntriesCaseSensitive==true?s:s.toLowerCase();var p=true;f.find("li.tagedit-listelement-old input:hidden").each(function(){var t=j.checkNewEntriesCaseSensitive==true?a(this).val():a(this).val().toLowerCase();if(t==n){p=false}});if(p==true&&m==true&&j.autocompleteOptions.source!=false){var r=[];if(a.isArray(j.autocompleteOptions.source)){r=j.autocompleteOptions.source}else{if(a.isFunction(j.autocompleteOptions.source)){j.autocompleteOptions.source({term:s},function(t){r=t})}else{if(typeof j.autocompleteOptions.source==="string"){var l=j.autocompleteOptions.source;if(l.match(/\?/)){l+="&"}else{l+="?"}l+="term="+s;a.ajax({async:false,url:l,dataType:"json",complete:function(u,t){r=a.parseJSON(u.responseText)}})}}}for(var o=0;o<r.length;o++){var q=j.checkNewEntriesCaseSensitive==true?r[o].label:r[o].label.toLowerCase();if(q==n){p=false;k=r[o].id;break}}}return new Array(p,k)}}})(jQuery);
/*
 * jQuery Form Plugin
 * version: 2.80 (25-MAY-2011)
 * @requires jQuery v1.3.2 or later
 *
 * Examples and documentation at: http://malsup.com/jquery/form/
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
(function(a){a.fn.ajaxSubmit=function(p){if(!this.length){b("ajaxSubmit: skipping submit process - no element selected");return this}if(typeof p=="function"){p={success:p}}var e=this.attr("action");var s=(typeof e==="string")?a.trim(e):"";s=s||window.location.href||"";if(s){s=(s.match(/^([^#]+)/)||[])[1]}p=a.extend(true,{url:s,success:a.ajaxSettings.success,type:this[0].getAttribute("method")||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},p);var u={};this.trigger("form-pre-serialize",[this,p,u]);if(u.veto){b("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(p.beforeSerialize&&p.beforeSerialize(this,p)===false){b("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var m,t,d=this.formToArray(p.semantic);if(p.data){p.extraData=p.data;for(m in p.data){if(p.data[m] instanceof Array){for(var i in p.data[m]){d.push({name:m,value:p.data[m][i]})}}else{t=p.data[m];t=a.isFunction(t)?t():t;d.push({name:m,value:t})}}}if(p.beforeSubmit&&p.beforeSubmit(d,this,p)===false){b("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[d,this,p,u]);if(u.veto){b("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var r=a.param(d);if(p.type.toUpperCase()=="GET"){p.url+=(p.url.indexOf("?")>=0?"&":"?")+r;p.data=null}else{p.data=r}var c=this,f=[];if(p.resetForm){f.push(function(){c.resetForm()})}if(p.clearForm){f.push(function(){c.clearForm()})}if(!p.dataType&&p.target){var o=p.success||function(){};f.push(function(k){var n=p.replaceTarget?"replaceWith":"html";a(p.target)[n](k).each(o,arguments)})}else{if(p.success){f.push(p.success)}}p.success=function(n,w,x){var k=p.context||p;for(var q=0,v=f.length;q<v;q++){f[q].apply(k,[n,w,x||c,c])}};var g=a("input:file",this).length>0;var j="multipart/form-data";var l=(c.attr("enctype")==j||c.attr("encoding")==j);if(p.iframe!==false&&(g||p.iframe||l)){if(p.closeKeepAlive){a.get(p.closeKeepAlive,function(){h(d)})}else{h(d)}}else{a.ajax(p)}this.trigger("form-submit-notify",[this,p]);return this;function h(q){var B=c[0],E,J,C,F,k,G,O,K,H,L,M;if(q){for(E=0;E<q.length;E++){a(B[q[E].name]).attr("disabled",false)}}if(a(":input[name=submit],:input[id=submit]",B).length){alert('Error: Form elements must not have name or id of "submit".');return}J=a.extend(true,{},a.ajaxSettings,p);J.context=J.context||J;F="jqFormIO"+(new Date().getTime());if(J.iframeTarget){k=a(J.iframeTarget);H=k.attr("name");if(H==null){k.attr("name",F)}else{F=H}}else{k=a('<iframe name="'+F+'" src="'+J.iframeSrc+'" />');k.css({position:"absolute",top:"-1000px",left:"-1000px"})}G=k[0];O={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(P){var n=(P==="timeout"?"timeout":"aborted");b("aborting upload... "+n);this.aborted=1;k.attr("src",J.iframeSrc);O.error=n;J.error&&J.error.call(J.context,O,n,n);C&&a.event.trigger("ajaxError",[O,J,n]);J.complete&&J.complete.call(J.context,O,n)}};C=J.global;if(C&&!a.active++){a.event.trigger("ajaxStart")}if(C){a.event.trigger("ajaxSend",[O,J])}if(J.beforeSend&&J.beforeSend.call(J.context,O,J)===false){if(J.global){a.active--}return}if(O.aborted){return}K=B.clk;if(K){H=K.name;if(H&&!K.disabled){J.extraData=J.extraData||{};J.extraData[H]=K.value;if(K.type=="image"){J.extraData[H+".x"]=B.clk_x;J.extraData[H+".y"]=B.clk_y}}}function A(){var S=c.attr("target"),P=c.attr("action");B.setAttribute("target",F);if(B.getAttribute("method")!="POST"){B.setAttribute("method","POST")}if(B.getAttribute("action")!=J.url){B.setAttribute("action",J.url)}if(!J.skipEncodingOverride){c.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(J.timeout){M=setTimeout(function(){L=true;w(true)},J.timeout)}var Q=[];try{if(J.extraData){for(var R in J.extraData){Q.push(a('<input type="hidden" name="'+R+'" value="'+J.extraData[R]+'" />').appendTo(B)[0])}}if(!J.iframeTarget){k.appendTo("body");G.attachEvent?G.attachEvent("onload",w):G.addEventListener("load",w,false)}B.submit()}finally{B.setAttribute("action",P);if(S){B.setAttribute("target",S)}else{c.removeAttr("target")}a(Q).remove()}}if(J.forceSync){A()}else{setTimeout(A,10)}var x,y,z=50,v;function w(S){if(O.aborted||v){return}if(S===true&&O){O.abort("timeout");return}var P=G.contentWindow?G.contentWindow.document:G.contentDocument?G.contentDocument:G.document;if(!P||P.location.href==J.iframeSrc){if(!L){return}}G.detachEvent?G.detachEvent("onload",w):G.removeEventListener("load",w,false);var X="success",T;try{if(L){throw"timeout"}var U=J.dataType=="xml"||P.XMLDocument||a.isXMLDoc(P);b("isXml="+U);if(!U&&window.opera&&(P.body==null||P.body.innerHTML=="")){if(--z){b("requeing onLoad callback, DOM not available");setTimeout(w,250);return}}var Q=P.body?P.body:P.documentElement;O.responseText=Q?Q.innerHTML:null;O.responseXML=P.XMLDocument?P.XMLDocument:P;if(U){J.dataType="xml"}O.getResponseHeader=function(Z){var aa={"content-type":J.dataType};return aa[Z]};if(Q){O.status=Number(Q.getAttribute("status"))||O.status;O.statusText=Q.getAttribute("statusText")||O.statusText}var R=J.dataType||"";var W=/(json|script|text)/.test(R.toLowerCase());if(W||J.textarea){var Y=P.getElementsByTagName("textarea")[0];if(Y){O.responseText=Y.value;O.status=Number(Y.getAttribute("status"))||O.status;O.statusText=Y.getAttribute("statusText")||O.statusText}else{if(W){var V=P.getElementsByTagName("pre")[0];var n=P.getElementsByTagName("body")[0];if(V){O.responseText=V.textContent?V.textContent:V.innerHTML}else{if(n){O.responseText=n.innerHTML}}}}}else{if(J.dataType=="xml"&&!O.responseXML&&O.responseText!=null){O.responseXML=N(O.responseText)}}try{x=D(O,J.dataType,J)}catch(S){X="parsererror";O.error=T=(S||X)}}catch(S){b("error caught",S);X="error";O.error=T=(S||X)}if(O.aborted){b("upload aborted");X=null}if(O.status){X=(O.status>=200&&O.status<300||O.status===304)?"success":"error"}if(X==="success"){J.success&&J.success.call(J.context,x,"success",O);C&&a.event.trigger("ajaxSuccess",[O,J])}else{if(X){if(T==undefined){T=O.statusText}J.error&&J.error.call(J.context,O,X,T);C&&a.event.trigger("ajaxError",[O,J,T])}}C&&a.event.trigger("ajaxComplete",[O,J]);if(C&&!--a.active){a.event.trigger("ajaxStop")}J.complete&&J.complete.call(J.context,O,X);v=true;if(J.timeout){clearTimeout(M)}setTimeout(function(){if(!J.iframeTarget){k.remove()}O.responseXML=null},100)}var N=a.parseXML||function(P,n){if(window.ActiveXObject){n=new ActiveXObject("Microsoft.XMLDOM");n.async="false";n.loadXML(P)}else{n=(new DOMParser()).parseFromString(P,"text/xml")}return(n&&n.documentElement&&n.documentElement.nodeName!="parsererror")?n:null};var I=a.parseJSON||function(n){return window["eval"]("("+n+")")};var D=function(S,R,Q){var n=S.getResponseHeader("content-type")||"",T=R==="xml"||!R&&n.indexOf("xml")>=0,P=T?S.responseXML:S.responseText;if(T&&P.documentElement.nodeName==="parsererror"){a.error&&a.error("parsererror")}if(Q&&Q.dataFilter){P=Q.dataFilter(P,R)}if(typeof P==="string"){if(R==="json"||!R&&n.indexOf("json")>=0){P=I(P)}else{if(R==="script"||!R&&n.indexOf("javascript")>=0){a.globalEval(P)}}}return P}}};a.fn.ajaxForm=function(d){if(this.length===0){var c={s:this.selector,c:this.context};if(!a.isReady&&c.s){b("DOM not ready, queuing ajaxForm");a(function(){a(c.s,c.c).ajaxForm(d)});return this}b("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)"));return this}return this.ajaxFormUnbind().bind("submit.form-plugin",function(f){if(!f.isDefaultPrevented()){f.preventDefault();a(this).ajaxSubmit(d)}}).bind("click.form-plugin",function(g){var k=g.target;var f=a(k);if(!(f.is(":submit,input:image"))){var j=f.closest(":submit");if(j.length==0){return}k=j[0]}var h=this;h.clk=k;if(k.type=="image"){if(g.offsetX!=undefined){h.clk_x=g.offsetX;h.clk_y=g.offsetY}else{if(typeof a.fn.offset=="function"){var i=f.offset();h.clk_x=g.pageX-i.left;h.clk_y=g.pageY-i.top}else{h.clk_x=g.pageX-k.offsetLeft;h.clk_y=g.pageY-k.offsetTop}}}setTimeout(function(){h.clk=h.clk_x=h.clk_y=null},100)})};a.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};a.fn.formToArray=function(q){var d=[];if(this.length===0){return d}var g=this[0];var f=q?g.getElementsByTagName("*"):g.elements;if(!f){return d}var h,l,p,r,e,o,m;for(h=0,o=f.length;h<o;h++){e=f[h];p=e.name;if(!p){continue}if(q&&g.clk&&e.type=="image"){if(!e.disabled&&g.clk==e){d.push({name:p,value:a(e).val()});d.push({name:p+".x",value:g.clk_x},{name:p+".y",value:g.clk_y})}continue}r=a.fieldValue(e,true);if(r&&r.constructor==Array){for(l=0,m=r.length;l<m;l++){d.push({name:p,value:r[l]})}}else{if(r!==null&&typeof r!="undefined"){d.push({name:p,value:r})}}}if(!q&&g.clk){var c=a(g.clk),k=c[0];p=k.name;if(p&&!k.disabled&&k.type=="image"){d.push({name:p,value:c.val()});d.push({name:p+".x",value:g.clk_x},{name:p+".y",value:g.clk_y})}}return d};a.fn.formSerialize=function(c){return a.param(this.formToArray(c))};a.fn.fieldSerialize=function(d){var c=[];this.each(function(){var g=this.name;if(!g){return}var h=a.fieldValue(this,d);if(h&&h.constructor==Array){for(var e=0,f=h.length;e<f;e++){c.push({name:g,value:h[e]})}}else{if(h!==null&&typeof h!="undefined"){c.push({name:this.name,value:h})}}});return a.param(c)};a.fn.fieldValue=function(f){for(var h=[],d=0,e=this.length;d<e;d++){var c=this[d];var g=a.fieldValue(c,f);if(g===null||typeof g=="undefined"||(g.constructor==Array&&!g.length)){continue}g.constructor==Array?a.merge(h,g):h.push(g)}return h};a.fieldValue=function(d,m){var h=d.name,o=d.type,p=d.tagName.toLowerCase();if(m===undefined){m=true}if(m&&(!h||d.disabled||o=="reset"||o=="button"||(o=="checkbox"||o=="radio")&&!d.checked||(o=="submit"||o=="image")&&d.form&&d.form.clk!=d||p=="select"&&d.selectedIndex==-1)){return null}if(p=="select"){var f=d.selectedIndex;if(f<0){return null}var c=[],l=d.options;var j=(o=="select-one");var g=(j?f+1:l.length);for(var e=(j?f:0);e<g;e++){var k=l[e];if(k.selected){var q=k.value;if(!q){q=(k.attributes&&k.attributes.value&&!(k.attributes.value.specified))?k.text:k.value}if(j){return q}c.push(q)}}return c}return a(d).val()};a.fn.clearForm=function(){return this.each(function(){a("input,select,textarea",this).clearFields()})};a.fn.clearFields=a.fn.clearInputs=function(){return this.each(function(){var c=this.type,d=this.tagName.toLowerCase();if(c=="text"||c=="password"||d=="textarea"){this.value=""}else{if(c=="checkbox"||c=="radio"){this.checked=false}else{if(d=="select"){this.selectedIndex=-1}}}})};a.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};a.fn.enable=function(c){if(c===undefined){c=true}return this.each(function(){this.disabled=!c})};a.fn.selected=function(c){if(c===undefined){c=true}return this.each(function(){var e=this.type;if(e=="checkbox"||e=="radio"){this.checked=c}else{if(this.tagName.toLowerCase()=="option"){var d=a(this).parent("select");if(c&&d[0]&&d[0].type=="select-one"){d.find("option").selected(false)}this.selected=c}}})};function b(){var c="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log){window.console.log(c)}else{if(window.opera&&window.opera.postError){window.opera.postError(c)}}}})(jQuery);
/*
	Watermark v3.1.3 (March 22, 2011) plugin for jQuery
	http://jquery-watermark.googlecode.com/
	Copyright (c) 2009-2011 Todd Northrop
	http://www.speednet.biz/
	Dual licensed under the MIT or GPL Version 2 licenses.
*/
(function(a,h,y){var w="function",v="password",j="maxLength",n="type",b="",c=true,u="placeholder",i=false,t="watermark",g=t,f="watermarkClass",q="watermarkFocus",l="watermarkSubmit",o="watermarkMaxLength",e="watermarkPassword",d="watermarkText",k=/\r/g,s="input:data("+g+"),textarea:data("+g+")",m="input:text,input:password,input[type=search],input:not([type]),textarea",p=["Page_ClientValidate"],r=i,x=u in document.createElement("input");a.watermark=a.watermark||{version:"3.1.3",runOnce:c,options:{className:t,useNative:c,hideBeforeUnload:c},hide:function(b){a(b).filter(s).each(function(){a.watermark._hide(a(this))})},_hide:function(a,r){var p=a[0],q=(p.value||b).replace(k,b),l=a.data(d)||b,m=a.data(o)||0,i=a.data(f);if(l.length&&q==l){p.value=b;if(a.data(e))if((a.attr(n)||b)==="text"){var g=a.data(e)||[],c=a.parent()||[];if(g.length&&c.length){c[0].removeChild(a[0]);c[0].appendChild(g[0]);a=g}}if(m){a.attr(j,m);a.removeData(o)}if(r){a.attr("autocomplete","off");h.setTimeout(function(){a.select()},1)}}i&&a.removeClass(i)},show:function(b){a(b).filter(s).each(function(){a.watermark._show(a(this))})},_show:function(g){var p=g[0],u=(p.value||b).replace(k,b),h=g.data(d)||b,s=g.attr(n)||b,t=g.data(f);if((u.length==0||u==h)&&!g.data(q)){r=c;if(g.data(e))if(s===v){var m=g.data(e)||[],l=g.parent()||[];if(m.length&&l.length){l[0].removeChild(g[0]);l[0].appendChild(m[0]);g=m;g.attr(j,h.length);p=g[0]}}if(s==="text"||s==="search"){var i=g.attr(j)||0;if(i>0&&h.length>i){g.data(o,i);g.attr(j,h.length)}}t&&g.addClass(t);p.value=h}else a.watermark._hide(g)},hideAll:function(){if(r){a.watermark.hide(m);r=i}},showAll:function(){a.watermark.show(m)}};a.fn.watermark=a.fn.watermark||function(p,o){var t="string";if(!this.length)return this;var s=i,r=typeof p===t;if(r)p=p.replace(k,b);if(typeof o==="object"){s=typeof o.className===t;o=a.extend({},a.watermark.options,o)}else if(typeof o===t){s=c;o=a.extend({},a.watermark.options,{className:o})}else o=a.watermark.options;if(typeof o.useNative!==w)o.useNative=o.useNative?function(){return c}:function(){return i};return this.each(function(){var B="dragleave",A="dragenter",z=this,i=a(z);if(!i.is(m))return;if(i.data(g)){if(r||s){a.watermark._hide(i);r&&i.data(d,p);s&&i.data(f,o.className)}}else{if(x&&o.useNative.call(z,i)&&(i.attr("tagName")||b)!=="TEXTAREA"){r&&i.attr(u,p);return}i.data(d,r?p:b);i.data(f,o.className);i.data(g,1);if((i.attr(n)||b)===v){var C=i.wrap("<span>").parent(),t=a(C.html().replace(/type=["']?password["']?/i,'type="text"'));t.data(d,i.data(d));t.data(f,i.data(f));t.data(g,1);t.attr(j,p.length);t.focus(function(){a.watermark._hide(t,c)}).bind(A,function(){a.watermark._hide(t)}).bind("dragend",function(){h.setTimeout(function(){t.blur()},1)});i.blur(function(){a.watermark._show(i)}).bind(B,function(){a.watermark._show(i)});t.data(e,i);i.data(e,t)}else i.focus(function(){i.data(q,1);a.watermark._hide(i,c)}).blur(function(){i.data(q,0);a.watermark._show(i)}).bind(A,function(){a.watermark._hide(i)}).bind(B,function(){a.watermark._show(i)}).bind("dragend",function(){h.setTimeout(function(){a.watermark._show(i)},1)}).bind("drop",function(e){var c=i[0],a=e.originalEvent.dataTransfer.getData("Text");if((c.value||b).replace(k,b).replace(a,b)===i.data(d))c.value=a;i.focus()});if(z.form){var w=z.form,y=a(w);if(!y.data(l)){y.submit(a.watermark.hideAll);if(w.submit){y.data(l,w.submit);w.submit=function(c,b){return function(){var d=b.data(l);a.watermark.hideAll();if(d.apply)d.apply(c,Array.prototype.slice.call(arguments));else d()}}(w,y)}else{y.data(l,1);w.submit=function(b){return function(){a.watermark.hideAll();delete b.submit;b.submit()}}(w)}}}}a.watermark._show(i)})};if(a.watermark.runOnce){a.watermark.runOnce=i;a.extend(a.expr[":"],{data:function(c,d,b){return!!a.data(c,b[3])}});(function(c){a.fn.val=function(){var e=this;if(!e.length)return arguments.length?e:y;if(!arguments.length)if(e.data(g)){var f=(e[0].value||b).replace(k,b);return f===(e.data(d)||b)?b:f}else return c.apply(e,arguments);else{c.apply(e,arguments);a.watermark.show(e);return e}}})(a.fn.val);p.length&&a(function(){for(var b,c,d=p.length-1;d>=0;d--){b=p[d];c=h[b];if(typeof c===w)h[b]=function(b){return function(){a.watermark.hideAll();return b.apply(null,Array.prototype.slice.call(arguments))}}(c)}});a(h).bind("beforeunload",function(){a.watermark.options.hideBeforeUnload&&a.watermark.hideAll()})}})(jQuery,window);
(function(a){a.fn.hoverIntent=function(i,j){var b={sensitivity:7,interval:100,timeout:0};b=a.extend(b,j?{over:i,out:j}:i);var d,e,l,m;var n=function(f){d=f.pageX;e=f.pageY};var c=function(f,g){g.hoverIntent_t=clearTimeout(g.hoverIntent_t);if((Math.abs(l-d)+Math.abs(m-e))<b.sensitivity){a(g).unbind("mousemove",n);g.hoverIntent_s=1;return b.over.apply(g,[f])}else{l=d;m=e;g.hoverIntent_t=setTimeout(function(){c(f,g)},b.interval)}};var h=function(f,g){g.hoverIntent_t=clearTimeout(g.hoverIntent_t);g.hoverIntent_s=0;return b.out.apply(g,[f])};var k=function(f){var q=(f.type=="mouseover"?f.fromElement:f.toElement)||f.relatedTarget;while(q&&q!=this){try{q=q.parentNode}catch(f){q=this}}if(q==this){return false}var g=jQuery.extend({},f);var o=this;if(o.hoverIntent_t){o.hoverIntent_t=clearTimeout(o.hoverIntent_t)}if(f.type=="mouseover"){l=g.pageX;m=g.pageY;a(o).bind("mousemove",n);if(o.hoverIntent_s!=1){o.hoverIntent_t=setTimeout(function(){c(g,o)},b.interval)}}else{a(o).unbind("mousemove",n);if(o.hoverIntent_s==1){o.hoverIntent_t=setTimeout(function(){h(g,o)},b.timeout)}}};return this.mouseover(k).mouseout(k)}})(jQuery);
(function(a){function b(d){if(d.attr("title")||typeof(d.attr("original-title"))!="string"){d.attr("original-title",d.attr("title")||"").removeAttr("title")}}function c(d,e){this.$element=a(d);this.options=e;this.enabled=true;b(this.$element)}c.prototype={show:function(){var i=this.getTitle();if(i&&this.enabled){var d=this.tip();d.find(".tipsy-inner")[this.options.html?"html":"text"](i);d[0].className="tipsy";d.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).appendTo(document.body);var h=a.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight});var f=d[0].offsetWidth,e=d[0].offsetHeight;var g=(typeof this.options.gravity=="function")?this.options.gravity.call(this.$element[0]):this.options.gravity;var j;switch(g.charAt(0)){case"n":j={top:h.top+h.height+this.options.offset,left:h.left+h.width/2-f/2};break;case"s":j={top:h.top-e-this.options.offset,left:h.left+h.width/2-f/2};break;case"e":j={top:h.top+h.height/2-e/2,left:h.left-f-this.options.offset};break;case"w":j={top:h.top+h.height/2-e/2,left:h.left+h.width+this.options.offset};break}if(g.length==2){if(g.charAt(1)=="w"){j.left=h.left+h.width/2-15}else{j.left=h.left+h.width/2-f+15}}d.css(j).addClass("tipsy-"+g);if(this.options.fade){d.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity})}else{d.css({visibility:"visible",opacity:this.options.opacity})}}},hide:function(){if(this.options.fade){this.tip().stop().fadeOut(function(){a(this).remove()})}else{this.tip().remove()}},getTitle:function(){var f,d=this.$element,e=this.options;b(d);var f,e=this.options;if(typeof e.title=="string"){f=d.attr(e.title=="title"?"original-title":e.title)}else{if(typeof e.title=="function"){f=e.title.call(d[0])}}f=(""+f).replace(/(^\s*|\s*$)/,"");return f||e.fallback},tip:function(){if(!this.$tip){this.$tip=a('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>')}return this.$tip},validate:function(){if(!this.$element[0].parentNode){this.hide();this.$element=null;this.options=null}},enable:function(){this.enabled=true},disable:function(){this.enabled=false},toggleEnabled:function(){this.enabled=!this.enabled}};a.fn.tipsy=function(j){if(j===true){return this.data("tipsy")}else{if(typeof j=="string"){return this.data("tipsy")[j]()}}j=a.extend({},a.fn.tipsy.defaults,j);function h(k){var l=a.data(k,"tipsy");if(!l){l=new c(k,a.fn.tipsy.elementOptions(k,j));a.data(k,"tipsy",l)}return l}function e(){var k=h(this);k.hoverState="in";if(j.delayIn==0){k.show()}else{setTimeout(function(){if(k.hoverState=="in"){k.show()}},j.delayIn)}}function i(){var k=h(this);k.hoverState="out";if(j.delayOut==0){k.hide()}else{setTimeout(function(){if(k.hoverState=="out"){k.hide()}},j.delayOut)}}if(!j.live){this.each(function(){h(this)})}if(j.trigger!="manual"){var d=j.live?"live":"bind",f=j.trigger=="hover"?"mouseenter":"focus",g=j.trigger=="hover"?"mouseleave":"blur";this[d](f,e)[d](g,i)}return this};a.fn.tipsy.defaults={delayIn:0,delayOut:0,fade:false,fallback:"",gravity:"n",html:false,live:false,offset:0,opacity:0.8,title:"title",trigger:"hover"};a.fn.tipsy.elementOptions=function(d,e){return a.metadata?a.extend({},e,a(d).metadata()):e};a.fn.tipsy.autoNS=function(){return a(this).offset().top>(a(document).scrollTop()+a(window).height()/2)?"s":"n"};a.fn.tipsy.autoWE=function(){return a(this).offset().left>(a(document).scrollLeft()+a(window).width()/2)?"e":"w"}})(jQuery);
(function(a){a.fn.tipsyHoverCard=function(g){var h=a.extend({},a.fn.tipsyHoverCard.defaults,g);this.tipsy(h);function b(m){if(m.data("timeoutId")){clearTimeout(m.data("timeoutId"))}m.data("timeoutId",null)}function i(m){b(m);var n=m.tipsy(true).options;var o=setTimeout(function(){a(m).tipsy("hide")},n.hideDelay);m.data("timeoutId",o)}function j(m){b(m);m.tipsy("show");var n=m.tipsy("tip");n.addClass("tipsy-hovercard");n.data("tipsyAnchor",m);n.hover(k,l);m.data("visible",true)}function e(m){i(m);m.data("visible",false)}function d(){var m=a(this);var o=m.attr("data-url");if(o&&!m.data("ajax-success")){a.ajax({url:o,dataType:"html",success:function(p){m.data("ajax-success",true);m.attr("title",p);if(m.data("visible")){j(m)}},error:function(){m.attr("title","Error loading "+o);if(m.data("visible")){j(m)}},failure:function(){m.attr("title","Failed to load "+o);if(m.data("visible")){j(m)}}})}var n=m.attr("data-selector");if(n){m.attr("title",a(n).html())}j(m)}function f(){e(a(this))}function k(){var m=a(this).data("tipsyAnchor");b(m)}function l(){var m=a(this).data("tipsyAnchor");i(m)}if(a.fn.hoverIntent&&h.hoverIntent){var c=a.extend({over:d,out:function(){}},h.hoverIntentConfig);this.hoverIntent(c).mouseleave(f)}else{this.hover(d,f)}return this};a.fn.tipsyHoverCard.defaults={gravity:"n",trigger:"manual",fallback:"...",html:true,hideDelay:300,opacity:1,hoverIntent:true,hoverIntentConfig:{sensitivity:3,interval:300,timeout:0}}})(jQuery);

