$(function(){function a(){var a,c;if(c=$("#messages li").get(0))c=$(c).remove(),j=$('<div class="popup_message"/>').appendTo("body"),$("<span/>").appendTo(j).html(c.html()).addClass(c.attr("class")),j.fadeOut(0).fadeIn(),a=setTimeout(e,2E3),j.click(function(){clearTimeout(a);e()})}function e(){j.animate({top:"1%",opacity:0},{complete:function(){j.remove();a()}})}var j;a()});
jQuery.preloadCssImages=function(a){function e(){clearTimeout(m);if(f&&f.length&&f[c]){c++;if(a.statusTextEl){var b=f[c]?"Now Loading: <span>"+f[c].split("/")[f[c].split("/").length-1]:"Loading complete";jQuery(a.statusTextEl).html('<span class="numLoaded">'+c+'</span> of <span class="numTotal">'+f.length+'</span> loaded (<span class="percentLoaded">'+(c/f.length*100).toFixed(0)+'%</span>) <span class="currentImg">'+b+"</span></span>")}a.statusBarEl&&(b=jQuery(a.statusBarEl).width(),jQuery(a.statusBarEl).css("background-position",
-(b-(b*c/f.length).toFixed(0))+"px 50%"));j()}}function j(){if(f&&f.length&&f[c]){var b=new Image;b.src=f[c];b.complete?e():jQuery(b).bind("error load onreadystatechange",e);m=setTimeout(e,a.errorDelay)}}function o(b,c){for(var e=!1,n=[],m=[],k,g=b.length;g--;){var i="";c&&c[g]?k=c[g]:(k=(b[g].href?b[g].href:"window.location.href").split("/"),k.pop(),(k=k.join("/"))&&(k+="/"));if(b[g].cssRules||b[g].rules){l=b[g].cssRules?b[g].cssRules:b[g].rules;for(var h=l.length;h--;)if(l[h].style&&l[h].style.cssText){var d=
l[h].style.cssText;d.toLowerCase().indexOf("url")!=-1&&(i+=d)}else l[h].styleSheet&&(n.push(l[h].styleSheet),e=!0)}if(i=i.match(/[^\("]+\.(gif|jpg|jpeg|png)/g))for(h=i.length;h--;)d=i[h].charAt(0)=="/"||i[h].match("://")?i[h]:k+i[h],jQuery.inArray(d,f)==-1&&f.push(d);if(!e&&b[g].imports&&b[g].imports.length){i=0;for(h=b[g].imports.length;i<h;i++)d=b[g].imports[i].href,d=d.split("/"),d.pop(),(d=d.join("/"))&&(d+="/"),d=d.charAt(0)=="/"||d.match("://")?d:k+d,m.push(d),n.push(b[g].imports[i])}}if(n.length)return o(n,
m),!1;for(e=a.simultaneousCacheLoading;e--;)setTimeout(j,e)}var a=jQuery.extend({statusTextEl:null,statusBarEl:null,errorDelay:999,simultaneousCacheLoading:2},a),c=0,f=[],l,m;o(document.styleSheets);return f};$.preloadCssImages();(function(){function a(){$("textarea").height($("textarea").parents(".fields").prev(".fields").height()-$("textarea").parents(".fields").height()+$("textarea").height())}$(window).resize(a);$(a)})();
$("a[data-track]").live("click",function(){var a=this.href,e=location.protocol+"//"+location.host;a.substring(0,e.length)==e&&_gaq.push(["_trackPageview",a.substring(e.length)])});$(function(){$("a[title]").each(function(a){$(a).attr("data-tooltip","xxx")})});

