/* Copyright (c) 2006 Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 *
 * $LastChangedDate: 2007-12-20 09:02:08 -0600 (Thu, 20 Dec 2007) $
 * $Rev: 4265 $
 *
 * Version: 3.0
 * 
 * Requires: $ 1.2.2+
 */
(function(a){a.event.special.mousewheel={setup:function(){var b=a.event.special.mousewheel.handler;if(a.browser.mozilla){a(this).bind("mousemove.mousewheel",function(c){a.data(this,"mwcursorposdata",{pageX:c.pageX,pageY:c.pageY,clientX:c.clientX,clientY:c.clientY})})}if(this.addEventListener){this.addEventListener((a.browser.mozilla?"DOMMouseScroll":"mousewheel"),b,false)}else{this.onmousewheel=b}},teardown:function(){var b=a.event.special.mousewheel.handler;a(this).unbind("mousemove.mousewheel");if(this.removeEventListener){this.removeEventListener((a.browser.mozilla?"DOMMouseScroll":"mousewheel"),b,false)}else{this.onmousewheel=function(){}}a.removeData(this,"mwcursorposdata")},handler:function(d){var b=Array.prototype.slice.call(arguments,1);d=a.event.fix(d||window.event);a.extend(d,a.data(this,"mwcursorposdata")||{});var e=0,c=true;if(d.wheelDelta){e=d.wheelDelta/120}if(d.detail){e=-d.detail/3}d.data=d.data||{};d.type="mousewheel";b.unshift(e);b.unshift(d);return a.event.handle.apply(this,b)}};a.fn.extend({mousewheel:function(b){return b?this.bind("mousewheel",b):this.trigger("mousewheel")},unmousewheel:function(b){return this.unbind("mousewheel",b)}})})(jQuery);
/**
 * @projectDescription Monitor Font Size Changes with jQuery
 *
 * @version 1.0
 * @author Dave Cardwell
 *
 * jQuery-Em - $Revision: 24 $ ($Date: 2007-08-19 11:24:56 +0100 (Sun, 19 Aug 2007) $)
 * http://davecardwell.co.uk/javascript/jquery/plugins/jquery-em/
 *
 * Copyright ©2007 Dave Cardwell <http://davecardwell.co.uk/>
 *
 * Released under the MIT licence:
 * http://www.opensource.org/licenses/mit-license.php
 */
jQuery(function(b){var a="emchange";b.em=b.extend({version:"1.0",delay:200,element:b("<div />").css({left:"-100em",position:"absolute",width:"100em"}).prependTo("body")[0],action:function(){var c=b.em.element.offsetWidth/100;if(c!=b.em.current){b.em.previous=b.em.current;b.em.current=c;b.event.trigger(a,[b.em.current,b.em.previous])}}},b.em);b.fn[a]=function(c){return c?this.bind(a,c):this.trigger(a)};b.em.current=b.em.element.offsetWidth/100;b.em.iid=setInterval(b.em.action,b.em.delay)});
/* Copyright (c) 2006 Kelvin Luck (kelvin AT kelvinluck DOT com || http://www.kelvinluck.com)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 * 
 * See http://kelvinluck.com/assets/jquery/jScrollPane/
 * $Id$
 */

/**
 * Replace the vertical scroll bars on any matched elements with a fancy
 * styleable (via CSS) version. With JS disabled the elements will
 * gracefully degrade to the browsers own implementation of overflow:auto.
 * If the mousewheel plugin has been included on the page then the scrollable areas will also
 * respond to the mouse wheel.
 *
 * @example jQuery(".scroll-pane").jScrollPane();
 *
 * @name jScrollPane
 * @type jQuery
 * @param Object	settings	hash with options, described below.
 *								scrollbarWidth	-	The width of the generated scrollbar in pixels
 *								scrollbarMargin	-	The amount of space to leave on the side of the scrollbar in pixels
 *								wheelSpeed		-	The speed the pane will scroll in response to the mouse wheel in pixels
 *								showArrows		-	Whether to display arrows for the user to scroll with
 *								arrowSize		-	The height of the arrow buttons if showArrows=true
 *								animateTo		-	Whether to animate when calling scrollTo and scrollBy
 *								dragMinHeight	-	The minimum height to allow the drag bar to be
 *								dragMaxHeight	-	The maximum height to allow the drag bar to be
 *								animateInterval	-	The interval in milliseconds to update an animating scrollPane (default 100)
 *								animateStep		-	The amount to divide the remaining scroll distance by when animating (default 3)
 *								maintainPosition-	Whether you want the contents of the scroll pane to maintain it's position when you re-initialise it - so it doesn't scroll as you add more content (default true)
 *								tabIndex		-	The tabindex for this jScrollPane to control when it is tabbed to when navigating via keyboard (default 0)
 *								enableKeyboardNavigation - Whether to allow keyboard scrolling of this jScrollPane when it is focused (default true)
 *								animateToInternalLinks - Whether the move to an internal link (e.g. when it's focused by tabbing or by a hash change in the URL) should be animated or instant (default false)
 *								scrollbarOnLeft	-	Display the scrollbar on the left side?  (needs stylesheet changes, see examples.html)
 *								reinitialiseOnImageLoad - Whether the jScrollPane should automatically re-initialise itself when any contained images are loaded (default false)
 * @return jQuery
 * @cat Plugins/jScrollPane
 * @author Kelvin Luck (kelvin AT kelvinluck DOT com || http://www.kelvinluck.com)
 */
(function(a){a.jScrollPane={active:[]};a.fn.jScrollPane=function(c){c=a.extend({},a.fn.jScrollPane.defaults,c);var b=function(){return false};return this.each(function(){var t=a(this);t.css("overflow","hidden");var E=this;if(a(this).parent().is(".jScrollPaneContainer")){var al=c.maintainPosition?t.position().top:0;var q=a(this).parent();var L=q.innerWidth();var am=q.outerHeight();var r=am;a(">.jScrollPaneTrack, >.jScrollArrowUp, >.jScrollArrowDown",q).remove();t.css({top:0})}else{var al=0;this.originalPadding=t.css("paddingTop")+" "+t.css("paddingRight")+" "+t.css("paddingBottom")+" "+t.css("paddingLeft");this.originalSidePaddingTotal=(parseInt(t.css("paddingLeft"))||0)+(parseInt(t.css("paddingRight"))||0);var L=t.innerWidth();var am=t.innerHeight();var r=am;var j=a("<div></div>").attr({className:"jScrollPaneContainer"}).css({height:am+"px",width:L+"px"});if(c.enableKeyboardNavigation){j.attr("tabindex",c.tabIndex)}t.wrap(j);a(document).bind("emchange",function(an,ao,p){t.jScrollPane(c)})}if(c.reinitialiseOnImageLoad){var s=a.data(E,"jScrollPaneImagesToLoad")||a("img",t);var i=[];if(s.length){s.each(function(p,an){a(this).bind("load readystatechange",function(){if(a.inArray(p,i)==-1){i.push(an);s=a.grep(s,function(aq,ap){return aq!=an});a.data(E,"jScrollPaneImagesToLoad",s);var ao=a.extend(c,{reinitialiseOnImageLoad:false});t.jScrollPane(ao)}}).each(function(ao,ap){if(this.complete||this.complete===undefined){this.src=this.src}})})}}var X=this.originalSidePaddingTotal;var ah=L-c.scrollbarWidth-c.scrollbarMargin-X;var U={height:"auto",width:ah+"px"};if(c.scrollbarOnLeft){U.paddingLeft=c.scrollbarMargin+c.scrollbarWidth+"px"}else{U.paddingRight=c.scrollbarMargin+"px"}t.css(U);var V=t.outerHeight();var R=am/V;if(R<0.99){var j=t.parent();j.append(a("<div></div>").attr({className:"jScrollPaneTrack"}).css({width:c.scrollbarWidth+"px"}).append(a("<div></div>").attr({className:"jScrollPaneDrag"}).css({width:c.scrollbarWidth+"px"}).append(a("<div></div>").attr({className:"jScrollPaneDragTop"}).css({width:c.scrollbarWidth+"px"}),a("<div></div>").attr({className:"jScrollPaneDragBottom"}).css({width:c.scrollbarWidth+"px"}))));var ai=a(">.jScrollPaneTrack",j);var u=a(">.jScrollPaneTrack .jScrollPaneDrag",j);var ak;var g=[];var Z;var S=function(){if(Z>4||Z%4==0){ag(ad+ak*I)}Z++};if(c.enableKeyboardNavigation){j.bind("keydown.jscrollpane",function(p){switch(p.keyCode){case 38:ak=-1;Z=0;S();g[g.length]=setInterval(S,100);return false;case 40:ak=1;Z=0;S();g[g.length]=setInterval(S,100);return false;case 33:case 34:return false;default:}}).bind("keyup.jscrollpane",function(an){if(an.keyCode==38||an.keyCode==40){for(var p=0;p<g.length;p++){clearInterval(g[p])}return false}})}if(c.showArrows){var P;var y;var o=function(p){a("html").unbind("mouseup",o);P.removeClass("jScrollActiveArrowButton");clearInterval(y)};var G=function(){a("html").bind("mouseup",o);P.addClass("jScrollActiveArrowButton");Z=0;S();y=setInterval(S,100)};j.append(a("<a></a>").attr({href:"javascript:;",className:"jScrollArrowUp",tabindex:-1}).css({width:c.scrollbarWidth+"px"}).html("Scroll up").bind("mousedown",function(){P=a(this);ak=-1;G();this.blur();return false}).bind("click",b),a("<a></a>").attr({href:"javascript:;",className:"jScrollArrowDown",tabindex:-1}).css({width:c.scrollbarWidth+"px"}).html("Scroll down").bind("mousedown",function(){P=a(this);ak=1;G();this.blur();return false}).bind("click",b));var v=a(">.jScrollArrowUp",j);var m=a(">.jScrollArrowDown",j);if(c.arrowSize){r=am-c.arrowSize-c.arrowSize;ai.css({height:r+"px",top:c.arrowSize+"px"})}else{var aa=v.height();c.arrowSize=aa;r=am-aa-m.height();ai.css({height:r+"px",top:aa+"px"})}}var ae=a(this).css({position:"absolute",overflow:"visible"});var d;var F;var I;var ad=0;var C=R*am/2;var H=function(an,ap){var ao=ap=="X"?"Left":"Top";return an["page"+ap]||(an["client"+ap]+(document.documentElement["scroll"+ao]||document.body["scroll"+ao]))||0};var O=function(){return false};var ac=function(){W();d=u.offset(false);d.top-=ad;F=r-u[0].offsetHeight;I=2*c.wheelSpeed*F/V};var e=function(p){ac();C=H(p,"Y")-ad-d.top;a("html").bind("mouseup",z).bind("mousemove",Q);if(a.browser.msie){a("html").bind("dragstart",O).bind("selectstart",O)}return false};var z=function(){a("html").unbind("mouseup",z).unbind("mousemove",Q);C=R*am/2;if(a.browser.msie){a("html").unbind("dragstart",O).unbind("selectstart",O)}};var ag=function(an){an=an<0?0:(an>F?F:an);ad=an;u.css({top:an+"px"});var ao=an/F;t.data("jScrollPanePosition",(am-V)*-ao);ae.css({top:((am-V)*ao)+"px"});t.trigger("scroll");if(c.showArrows){v[an==0?"addClass":"removeClass"]("disabled");m[an==F?"addClass":"removeClass"]("disabled")}};var Q=function(p){ag(H(p,"Y")-d.top-C)};var Y=Math.max(Math.min(R*(am-c.arrowSize*2),c.dragMaxHeight),c.dragMinHeight);u.css({height:Y+"px"}).bind("mousedown",e);var T;var w;var l;var ab=function(){if(w>8||w%4==0){ag((ad-((ad-l)/2)))}w++};var aj=function(){clearInterval(T);a("html").unbind("mouseup",aj).unbind("mousemove",N)};var N=function(p){l=H(p,"Y")-d.top-C};var A=function(p){ac();N(p);w=0;a("html").bind("mouseup",aj).bind("mousemove",N);T=setInterval(ab,100);ab();return false};ai.bind("mousedown",A);j.bind("mousewheel",function(an,ap){ap=ap||(an.wheelDelta?an.wheelDelta/120:(an.detail)?-an.detail/3:0);ac();W();var ao=ad;ag(ad-ap*I);var p=ao!=ad;return !p});var f;var D;function J(){var p=(f-ad)/c.animateStep;if(p>1||p<-1){ag(ad+p)}else{ag(f);W()}}var W=function(){if(D){clearInterval(D);delete f}};var af=function(ap,p){if(typeof ap=="string"){$e=a(ap,t);if(!$e.length){return}ap=$e.offset().top-t.offset().top}j.scrollTop(0);W();var ao=V-am;ap=ap>ao?ao:ap;t.data("jScrollPaneMaxScroll",ao);var an=ap/ao*F;if(p||!c.animateTo){ag(an)}else{f=an;D=setInterval(J,c.animateInterval)}};t[0].scrollTo=af;t[0].scrollBy=function(an){var p=-parseInt(ae.css("top"))||0;af(p+an)};ac();af(-al,true);a("*",this).bind("focus",function(aq){var ap=a(this);var at=0;while(ap[0]!=t[0]){at+=ap.position().top;ap=ap.offsetParent()}var p=-parseInt(ae.css("top"))||0;var ar=p+am;var ao=at>p&&at<ar;if(!ao){var an=at-c.scrollbarMargin;if(at>p){an+=a(this).height()+15+c.scrollbarMargin-am}af(an)}});if(location.hash){setTimeout(function(){af(location.hash)},a.browser.safari?100:0)}a(document).bind("click",function(an){$target=a(an.target);if($target.is("a")){var p=$target.attr("href");if(p&&p.substr(0,1)=="#"&&p.length>1){setTimeout(function(){af(p,!c.animateToInternalLinks)},a.browser.safari?100:0)}}});function B(p){a(document).bind("mousemove.jScrollPaneDragging",x);a(document).bind("mouseup.jScrollPaneDragging",n)}var M;var h;function K(){direction=M<0?-1:1;t[0].scrollBy(M/2)}function k(){if(h){clearInterval(h);h=undefined}}function x(ao){var ap=t.parent().offset().top;var p=ap+am;var an=H(ao,"Y");M=an<ap?an-ap:(an>p?an-p:0);if(M==0){k()}else{if(!h){h=setInterval(K,100)}}}function n(p){a(document).unbind("mousemove.jScrollPaneDragging").unbind("mouseup.jScrollPaneDragging");k()}j.bind("mousedown.jScrollPane",B);a.jScrollPane.active.push(t[0])}else{t.css({height:am+"px",width:L-this.originalSidePaddingTotal+"px",padding:this.originalPadding});t[0].scrollTo=t[0].scrollBy=function(){};t.parent().unbind("mousewheel").unbind("mousedown.jScrollPane").unbind("keydown.jscrollpane").unbind("keyup.jscrollpane")}})};a.fn.jScrollPaneRemove=function(){a(this).each(function(){$this=a(this);var b=$this.parent();if(b.is(".jScrollPaneContainer")){$this.css({top:"",height:"",width:"",padding:"",overflow:"",position:""});b.after($this).remove()}})};a.fn.jScrollPane.defaults={scrollbarWidth:10,scrollbarMargin:5,wheelSpeed:18,showArrows:false,arrowSize:0,animateTo:false,dragMinHeight:1,dragMaxHeight:99999,animateInterval:100,animateStep:3,maintainPosition:true,scrollbarOnLeft:false,reinitialiseOnImageLoad:false,tabIndex:0,enableKeyboardNavigation:true,animateToInternalLinks:false};a(window).bind("unload",function(){var c=a.jScrollPane.active;for(var b=0;b<c.length;b++){c[b].scrollTo=c[b].scrollBy=null}})})(jQuery);
/*
 * jQuery UI @VERSION
 *
 * Copyright (c) 2008 Paul Bakaus (ui.jquery.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI
 *
 * $Date: 2008-05-04 16:52:15 +0200 (So, 04 Mai 2008) $
 * $Rev: 5419 $
 */
(function(c){c.ui={plugin:{add:function(f,g,j){var h=c.ui[f].prototype;for(var e in j){h.plugins[e]=h.plugins[e]||[];h.plugins[e].push([g,j[e]])}},call:function(e,g,f){var j=e.plugins[g];if(!j){return}for(var h=0;h<j.length;h++){if(e.options[j[h][0]]){j[h][1].apply(e.element,f)}}}},cssCache:{},css:function(f){if(c.ui.cssCache[f]){return c.ui.cssCache[f]}var g=c('<div class="ui-resizable-gen">').addClass(f).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");c.ui.cssCache[f]=!!((!(/auto|default/).test(g.css("cursor"))||(/^[1-9]/).test(g.css("height"))||(/^[1-9]/).test(g.css("width"))||!(/none/).test(g.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(g.css("backgroundColor"))));try{c("body").get(0).removeChild(g.get(0))}catch(h){}return c.ui.cssCache[f]},disableSelection:function(f){f.unselectable="on";f.onselectstart=function(){return false};if(f.style){f.style.MozUserSelect="none"}},enableSelection:function(f){f.unselectable="off";f.onselectstart=function(){return true};if(f.style){f.style.MozUserSelect=""}},hasScroll:function(i,g){var f=/top/.test(g||"top")?"scrollTop":"scrollLeft",h=false;if(i[f]>0){return true}i[f]=1;h=i[f]>0?true:false;i[f]=0;return h}};var b=c.fn.remove;c.fn.remove=function(){c("*",this).add(this).trigger("remove");return b.apply(this,arguments)};function a(f,g,h){var e=c[f][g].getter||[];e=(typeof e=="string"?e.split(/,?\s+/):e);return(c.inArray(h,e)!=-1)}var d={init:function(){},destroy:function(){},getData:function(g,f){return this.options[f]},setData:function(h,f,g){this.options[f]=g},enable:function(){this.setData(null,"disabled",false)},disable:function(){this.setData(null,"disabled",true)}};c.widget=function(f,e){var g=f.split(".")[0];f=f.split(".")[1];c.fn[f]=function(k,l){var i=(typeof k=="string"),j=arguments;if(i&&a(g,f,k)){var h=c.data(this[0],f);return(h?h[k](l):undefined)}return this.each(function(){var m=c.data(this,f);if(!m){c.data(this,f,new c[g][f](this,k))}else{if(i){m[k].apply(m,c.makeArray(j).slice(1))}}})};c[g][f]=function(j,i){var h=this;this.options=c.extend({},c[g][f].defaults,i);this.element=c(j).bind("setData."+f,function(m,k,l){return h.setData(m,k,l)}).bind("getData."+f,function(l,k){return h.getData(l,k)}).bind("remove",function(){return h.destroy()});this.init()};c[g][f].prototype=c.extend({},d,e)};c.widget("ui.mouse",{init:function(){var e=this;this.element.bind("mousedown.mouse",function(){return e.click.apply(e,arguments)}).bind("mouseup.mouse",function(){(e.timer&&clearInterval(e.timer))}).bind("click.mouse",function(){if(e.initialized){e.initialized=false;return false}});if(c.browser.msie){this.unselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}},destroy:function(){this.element.unbind(".mouse").removeData("mouse");(c.browser.msie&&this.element.attr("unselectable",this.unselectable))},trigger:function(){return this.click.apply(this,arguments)},click:function(h){if(h.which!=1||c.inArray(h.target.nodeName.toLowerCase(),this.options.dragPrevention||[])!=-1||(this.options.condition&&!this.options.condition.apply(this.options.executor||this,[h,this.element]))){return true}var g=this;this.initialized=false;var f=function(){g._MP={left:h.pageX,top:h.pageY};c(document).bind("mouseup.mouse",function(){return g.stop.apply(g,arguments)});c(document).bind("mousemove.mouse",function(){return g.drag.apply(g,arguments)});if(!g.initalized&&Math.abs(g._MP.left-h.pageX)>=g.options.distance||Math.abs(g._MP.top-h.pageY)>=g.options.distance){(g.options.start&&g.options.start.call(g.options.executor||g,h,g.element));(g.options.drag&&g.options.drag.call(g.options.executor||g,h,this.element));g.initialized=true}};if(this.options.delay){if(this.timer){clearInterval(this.timer)}this.timer=setTimeout(f,this.options.delay)}else{f()}return false},stop:function(f){if(!this.initialized){return c(document).unbind("mouseup.mouse").unbind("mousemove.mouse")}(this.options.stop&&this.options.stop.call(this.options.executor||this,f,this.element));c(document).unbind("mouseup.mouse").unbind("mousemove.mouse");return false},drag:function(f){var g=this.options;if(c.browser.msie&&!f.button){return this.stop.call(this,f)}if(!this.initialized&&(Math.abs(this._MP.left-f.pageX)>=g.distance||Math.abs(this._MP.top-f.pageY)>=g.distance)){(g.start&&g.start.call(g.executor||this,f,this.element));this.initialized=true}else{if(!this.initialized){return false}}(g.drag&&g.drag.call(this.options.executor||this,f,this.element));return false}})})(jQuery);
/*
 * jQuery UI Tabs
 *
 * Copyright (c) 2007, 2008 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Tabs
 *
 * Depends:
 *	ui.core.js
 *
 * Revision: $Id: ui.tabs.js 5452 2008-05-05 16:42:08Z rdworth $
 */
(function(a){a.widget("ui.tabs",{init:function(){var b=this;this.options.event+=".tabs";a(this.element).bind("setData.tabs",function(d,c,e){if((/^selected/).test(c)){b.select(e)}else{b.options[c]=e;b.tabify()}}).bind("getData.tabs",function(d,c){return b.options[c]});this.tabify(true)},length:function(){return this.$tabs.length},tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+a.data(b)},ui:function(c,b){return{instance:this,options:this.options,tab:c,panel:b}},tabify:function(p){this.$lis=a("li:has(a[href])",this.element);this.$tabs=this.$lis.map(function(){return a("a",this)[0]});this.$panels=a([]);var q=this,d=this.options;this.$tabs.each(function(r,o){if(o.hash&&o.hash.replace("#","")){q.$panels=q.$panels.add(o.hash)}else{if(a(o).attr("href")!="#"){a.data(o,"href.tabs",o.href);a.data(o,"load.tabs",o.href);var t=q.tabId(o);o.href="#"+t;var s=a("#"+t);if(!s.length){s=a(d.panelTemplate).attr("id",t).addClass(d.panelClass).insertAfter(q.$panels[r-1]||q.element);s.data("destroy.tabs",true)}q.$panels=q.$panels.add(s)}else{d.disabled.push(r+1)}}});if(p){a(this.element).hasClass(d.navClass)||a(this.element).addClass(d.navClass);this.$panels.each(function(){var i=a(this);i.hasClass(d.panelClass)||i.addClass(d.panelClass)});this.$tabs.each(function(t,o){if(location.hash){if(o.hash==location.hash){d.selected=t;if(a.browser.msie||a.browser.opera){var s=a(location.hash),u=s.attr("id");s.attr("id","");setTimeout(function(){s.attr("id",u)},500)}scrollTo(0,0);return false}}else{if(d.cookie){var r=parseInt(a.cookie("ui-tabs"+a.data(q.element)),10);if(r&&q.$tabs[r]){d.selected=r;return false}}else{if(q.$lis.eq(t).hasClass(d.selectedClass)){d.selected=t;return false}}}});this.$panels.addClass(d.hideClass);this.$lis.removeClass(d.selectedClass);if(d.selected!==null){this.$panels.eq(d.selected).show().removeClass(d.hideClass);this.$lis.eq(d.selected).addClass(d.selectedClass);var k=function(){a(q.element).triggerHandler("tabsshow",[q.ui(q.$tabs[d.selected],q.$panels[d.selected])],d.show)};if(a.data(this.$tabs[d.selected],"load.tabs")){this.load(d.selected,k)}else{k()}}d.disabled=a.unique(d.disabled.concat(a.map(this.$lis.filter("."+d.disabledClass),function(r,o){return q.$lis.index(r)}))).sort();a(window).bind("unload",function(){q.$tabs.unbind(".tabs");q.$lis=q.$tabs=q.$panels=null})}for(var g=0,n;n=this.$lis[g];g++){a(n)[a.inArray(g,d.disabled)!=-1&&!a(n).hasClass(d.selectedClass)?"addClass":"removeClass"](d.disabledClass)}if(d.cache===false){this.$tabs.removeData("cache.tabs")}var c,j,b={"min-width":0,duration:1},e="normal";if(d.fx&&d.fx.constructor==Array){c=d.fx[0]||b,j=d.fx[1]||b}else{c=j=d.fx||b}var h={display:"",overflow:"",height:""};if(!a.browser.msie){h.opacity=""}function m(o,i,r){i.animate(c,c.duration||e,function(){i.addClass(d.hideClass).css(h);if(a.browser.msie&&c.opacity){i[0].style.filter=""}if(r){l(o,r,i)}})}function l(o,r,i){if(j===b){r.css("display","block")}r.animate(j,j.duration||e,function(){r.removeClass(d.hideClass).css(h);if(a.browser.msie&&j.opacity){r[0].style.filter=""}a(q.element).triggerHandler("tabsshow",[q.ui(o,r[0])],d.show)})}function f(o,s,i,r){s.addClass(d.selectedClass).siblings().removeClass(d.selectedClass);m(o,i,r)}this.$tabs.unbind(".tabs").bind(d.event,function(){var s=a(this).parents("li:eq(0)"),i=q.$panels.filter(":visible"),r=a(this.hash);if((s.hasClass(d.selectedClass)&&!d.unselect)||s.hasClass(d.disabledClass)||a(this).hasClass(d.loadingClass)||a(q.element).triggerHandler("tabsselect",[q.ui(this,r[0])],d.select)===false){this.blur();return false}q.options.selected=q.$tabs.index(this);if(d.unselect){if(s.hasClass(d.selectedClass)){q.options.selected=null;s.removeClass(d.selectedClass);q.$panels.stop();m(this,i);this.blur();return false}else{if(!i.length){q.$panels.stop();var o=this;q.load(q.$tabs.index(this),function(){s.addClass(d.selectedClass).addClass(d.unselectClass);l(o,r)});this.blur();return false}}}if(d.cookie){a.cookie("ui-tabs"+a.data(q.element),q.options.selected,d.cookie)}q.$panels.stop();if(r.length){var o=this;q.load(q.$tabs.index(this),i.length?function(){f(o,s,i,r)}:function(){s.addClass(d.selectedClass);l(o,r)})}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(a.browser.msie){this.blur()}return false});if(!(/^click/).test(d.event)){this.$tabs.bind("click.tabs",function(){return false})}},add:function(e,d,c){if(c==undefined){c=this.$tabs.length}var g=this.options;var i=a(g.tabTemplate.replace(/#\{href\}/,e).replace(/#\{label\}/,d));i.data("destroy.tabs",true);var h=e.indexOf("#")==0?e.replace("#",""):this.tabId(a("a:first-child",i)[0]);var f=a("#"+h);if(!f.length){f=a(g.panelTemplate).attr("id",h).addClass(g.panelClass).addClass(g.hideClass);f.data("destroy.tabs",true)}if(c>=this.$lis.length){i.appendTo(this.element);f.appendTo(this.element[0].parentNode)}else{i.insertBefore(this.$lis[c]);f.insertBefore(this.$panels[c])}g.disabled=a.map(g.disabled,function(k,j){return k>=c?++k:k});this.tabify();if(this.$tabs.length==1){i.addClass(g.selectedClass);f.removeClass(g.hideClass);var b=a.data(this.$tabs[0],"load.tabs");if(b){this.load(c,b)}}a(this.element).triggerHandler("tabsadd",[this.ui(this.$tabs[c],this.$panels[c])],g.add)},remove:function(b){var d=this.options,e=this.$lis.eq(b).remove(),c=this.$panels.eq(b).remove();if(e.hasClass(d.selectedClass)&&this.$tabs.length>1){this.select(b+(b+1<this.$tabs.length?1:-1))}d.disabled=a.map(a.grep(d.disabled,function(g,f){return g!=b}),function(g,f){return g>=b?--g:g});this.tabify();a(this.element).triggerHandler("tabsremove",[this.ui(e.find("a")[0],c[0])],d.remove)},enable:function(b){var c=this.options;if(a.inArray(b,c.disabled)==-1){return}var d=this.$lis.eq(b).removeClass(c.disabledClass);if(a.browser.safari){d.css("display","inline-block");setTimeout(function(){d.css("display","block")},0)}c.disabled=a.grep(c.disabled,function(f,e){return f!=b});a(this.element).triggerHandler("tabsenable",[this.ui(this.$tabs[b],this.$panels[b])],c.enable)},disable:function(c){var b=this,d=this.options;if(c!=d.selected){this.$lis.eq(c).addClass(d.disabledClass);d.disabled.push(c);d.disabled.sort();a(this.element).triggerHandler("tabsdisable",[this.ui(this.$tabs[c],this.$panels[c])],d.disable)}},select:function(b){if(typeof b=="string"){b=this.$tabs.index(this.$tabs.filter("[href$="+b+"]")[0])}this.$tabs.eq(b).trigger(this.options.event)},load:function(f,k){var l=this,c=this.options,d=this.$tabs.eq(f),j=d[0],g=k==undefined||k===false,b=d.data("load.tabs");k=k||function(){};if(!b||(a.data(j,"cache.tabs")&&!g)){k();return}if(c.spinner){var h=a("span",j);h.data("label.tabs",h.html()).html("<em>"+c.spinner+"</em>")}var i=function(){l.$tabs.filter("."+c.loadingClass).each(function(){a(this).removeClass(c.loadingClass);if(c.spinner){var m=a("span",this);m.html(m.data("label.tabs")).removeData("label.tabs")}});l.xhr=null};var e=a.extend({},c.ajaxOptions,{url:b,success:function(n,m){a(j.hash).html(n);i();if(c.cache){a.data(j,"cache.tabs",true)}a(l.element).triggerHandler("tabsload",[l.ui(l.$tabs[f],l.$panels[f])],c.load);c.ajaxOptions.success&&c.ajaxOptions.success(n,m);k()}});if(this.xhr){this.xhr.abort();i()}d.addClass(c.loadingClass);setTimeout(function(){l.xhr=a.ajax(e)},0)},url:function(c,b){this.$tabs.eq(c).removeData("cache.tabs").data("load.tabs",b)},destroy:function(){var b=this.options;a(this.element).unbind(".tabs").removeClass(b.navClass).removeData("tabs");this.$tabs.each(function(){var c=a.data(this,"href.tabs");if(c){this.href=c}var d=a(this).unbind(".tabs");a.each(["href","load","cache"],function(e,f){d.removeData(f+".tabs")})});this.$lis.add(this.$panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove()}else{a(this).removeClass([b.selectedClass,b.unselectClass,b.disabledClass,b.panelClass,b.hideClass].join(" "))}})}});a.ui.tabs.defaults={selected:0,unselect:false,event:"click",disabled:[],cookie:null,spinner:"Loading&#8230;",cache:false,idPrefix:"ui-tabs-",ajaxOptions:{},fx:null,tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>',panelTemplate:"<div></div>",navClass:"ui-tabs-nav",selectedClass:"ui-tabs-selected",unselectClass:"ui-tabs-unselect",disabledClass:"ui-tabs-disabled",panelClass:"ui-tabs-panel",hideClass:"ui-tabs-hide",loadingClass:"ui-tabs-loading"};a.ui.tabs.getter="length";a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(c,f){f=f||false;var b=this,e=this.options.selected;function g(){b.rotation=setInterval(function(){e=++e<b.$tabs.length?e:0;b.select(e)},c)}function d(h){if(!h||h.clientX){clearInterval(b.rotation)}}if(c){g();if(!f){this.$tabs.bind(this.options.event,d)}else{this.$tabs.bind(this.options.event,function(){d();e=b.options.selected;g()})}}else{d();this.$tabs.unbind(this.options.event,d)}}})})(jQuery);
/*
 * jQuery Corners 0.3
 * Copyright (c) 2008 David Turnbull, Steven Wittens
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 */
jQuery.fn.corners=function(C){var N="rounded_by_jQuery_corners";var V=B(C);var F=false;try{F=(document.body.style.WebkitBorderRadius!==undefined);var Y=navigator.userAgent.indexOf("Chrome");if(Y>=0){F=false}}catch(E){}var W=false;try{W=(document.body.style.MozBorderRadius!==undefined);var Y=navigator.userAgent.indexOf("Firefox");if(Y>=0&&parseInt(navigator.userAgent.substring(Y+8))<3){W=false}}catch(E){}return this.each(function(b,h){$e=jQuery(h);if($e.hasClass(N)){return }$e.addClass(N);var a=/{(.*)}/.exec(h.className);var c=a?B(a[1],V):V;var j=h.nodeName.toLowerCase();if(j=="input"){h=O(h)}if(F&&c.webkit){K(h,c)}else{if(W&&c.mozilla&&(c.sizex==c.sizey)){M(h,c)}else{var d=D(h.parentNode);var f=D(h);switch(j){case"a":case"input":Z(h,c,d,f);break;default:R(h,c,d,f);break}}}});function K(d,c){var a=""+c.sizex+"px "+c.sizey+"px";var b=jQuery(d);if(c.tl){b.css("WebkitBorderTopLeftRadius",a)}if(c.tr){b.css("WebkitBorderTopRightRadius",a)}if(c.bl){b.css("WebkitBorderBottomLeftRadius",a)}if(c.br){b.css("WebkitBorderBottomRightRadius",a)}}function M(d,c){var a=""+c.sizex+"px";var b=jQuery(d);if(c.tl){b.css("-moz-border-radius-topleft",a)}if(c.tr){b.css("-moz-border-radius-topright",a)}if(c.bl){b.css("-moz-border-radius-bottomleft",a)}if(c.br){b.css("-moz-border-radius-bottomright",a)}}function Z(k,n,l,a){var m=S("table");var i=S("tbody");m.appendChild(i);var j=S("tr");var d=S("td","top");j.appendChild(d);var h=S("tr");var c=T(k,n,S("td"));h.appendChild(c);var f=S("tr");var b=S("td","bottom");f.appendChild(b);if(n.tl||n.tr){i.appendChild(j);X(d,n,l,a,true)}i.appendChild(h);if(n.bl||n.br){i.appendChild(f);X(b,n,l,a,false)}k.appendChild(m);if(jQuery.browser.msie){m.onclick=Q}k.style.overflow="hidden"}function Q(){if(!this.parentNode.onclick){this.parentNode.click()}}function O(c){var b=document.createElement("a");b.id=c.id;b.className=c.className;if(c.onclick){b.href="javascript:";b.onclick=c.onclick}else{jQuery(c).parent("form").each(function(){b.href=this.action});b.onclick=I}var a=document.createTextNode(c.value);b.appendChild(a);c.parentNode.replaceChild(b,c);return b}function I(){jQuery(this).parent("form").each(function(){this.submit()});return false}function R(d,a,b,c){var f=T(d,a,document.createElement("div"));d.appendChild(f);if(a.tl||a.tr){X(d,a,b,c,true)}if(a.bl||a.br){X(d,a,b,c,false)}}function T(j,i,k){var b=jQuery(j);var l;while(l=j.firstChild){k.appendChild(l)}if(j.style.height){var f=parseInt(b.css("height"));k.style.height=f+"px";f+=parseInt(b.css("padding-top"))+parseInt(b.css("padding-bottom"));j.style.height=f+"px"}if(j.style.width){var a=parseInt(b.css("width"));k.style.width=a+"px";a+=parseInt(b.css("padding-left"))+parseInt(b.css("padding-right"));j.style.width=a+"px"}k.style.paddingLeft=b.css("padding-left");k.style.paddingRight=b.css("padding-right");if(i.tl||i.tr){k.style.paddingTop=U(j,i,b.css("padding-top"),true)}else{k.style.paddingTop=b.css("padding-top")}if(i.bl||i.br){k.style.paddingBottom=U(j,i,b.css("padding-bottom"),false)}else{k.style.paddingBottom=b.css("padding-bottom")}j.style.padding=0;return k}function U(f,a,d,c){if(d.indexOf("px")<0){try{console.error("%s padding not in pixels",(c?"top":"bottom"),f)}catch(b){}d=a.sizey+"px"}d=parseInt(d);if(d-a.sizey<0){try{console.error("%s padding is %ipx for %ipx corner:",(c?"top":"bottom"),d,a.sizey,f)}catch(b){}d=a.sizey}return d-a.sizey+"px"}function S(b,a){var c=document.createElement(b);c.style.border="none";c.style.borderCollapse="collapse";c.style.borderSpacing=0;c.style.padding=0;c.style.margin=0;if(a){c.style.verticalAlign=a}return c}function D(b){try{var d=jQuery.css(b,"background-color");if(d.match(/^(transparent|rgba\(0,\s*0,\s*0,\s*0\))$/i)&&b.parentNode){return D(b.parentNode)}if(d==null){return"#ffffff"}if(d.indexOf("rgb")>-1){d=A(d)}if(d.length==4){d=L(d)}return d}catch(a){return"#ffffff"}}function L(a){return"#"+a.substring(1,2)+a.substring(1,2)+a.substring(2,3)+a.substring(2,3)+a.substring(3,4)+a.substring(3,4)}function A(h){var a=255;var d="";var b;var e=/([0-9]+)[, ]+([0-9]+)[, ]+([0-9]+)/;var f=e.exec(h);for(b=1;b<4;b++){d+=("0"+parseInt(f[b]).toString(16)).slice(-2)}return"#"+d}function B(b,d){var b=b||"";var c={sizex:5,sizey:5,tl:false,tr:false,bl:false,br:false,webkit:true,mozilla:true,transparent:false};if(d){c.sizex=d.sizex;c.sizey=d.sizey;c.webkit=d.webkit;c.transparent=d.transparent;c.mozilla=d.mozilla}var a=false;var e=false;jQuery.each(b.split(" "),function(f,j){j=j.toLowerCase();var h=parseInt(j);if(h>0&&j==h+"px"){c.sizey=h;if(!a){c.sizex=h}a=true}else{switch(j){case"no-native":c.webkit=c.mozilla=false;break;case"webkit":c.webkit=true;break;case"no-webkit":c.webkit=false;break;case"mozilla":c.mozilla=true;break;case"no-mozilla":c.mozilla=false;break;case"anti-alias":c.transparent=false;break;case"transparent":c.transparent=true;break;case"top":e=c.tl=c.tr=true;break;case"right":e=c.tr=c.br=true;break;case"bottom":e=c.bl=c.br=true;break;case"left":e=c.tl=c.bl=true;break;case"top-left":e=c.tl=true;break;case"top-right":e=c.tr=true;break;case"bottom-left":e=c.bl=true;break;case"bottom-right":e=c.br=true;break}}});if(!e){if(!d){c.tl=c.tr=c.bl=c.br=true}else{c.tl=d.tl;c.tr=d.tr;c.bl=d.bl;c.br=d.br}}return c}function P(f,d,h){var e=Array(parseInt("0x"+f.substring(1,3)),parseInt("0x"+f.substring(3,5)),parseInt("0x"+f.substring(5,7)));var c=Array(parseInt("0x"+d.substring(1,3)),parseInt("0x"+d.substring(3,5)),parseInt("0x"+d.substring(5,7)));r="0"+Math.round(e[0]+(c[0]-e[0])*h).toString(16);g="0"+Math.round(e[1]+(c[1]-e[1])*h).toString(16);d="0"+Math.round(e[2]+(c[2]-e[2])*h).toString(16);return"#"+r.substring(r.length-2)+g.substring(g.length-2)+d.substring(d.length-2)}function X(f,a,b,d,c){if(a.transparent){G(f,a,b,c)}else{J(f,a,b,d,c)}}function J(k,z,p,a,n){var h,f;var l=document.createElement("div");l.style.fontSize="1px";l.style.backgroundColor=p;var b=0;for(h=1;h<=z.sizey;h++){var u,t,q;arc=Math.sqrt(1-Math.pow(1-h/z.sizey,2))*z.sizex;var c=z.sizex-Math.ceil(arc);var w=Math.floor(b);var v=z.sizex-c-w;var o=document.createElement("div");var m=l;o.style.margin="0px "+c+"px";o.style.height="1px";o.style.overflow="hidden";for(f=1;f<=v;f++){if(f==1){if(f==v){u=((arc+b)*0.5)-w}else{t=Math.sqrt(1-Math.pow(1-(c+1)/z.sizex,2))*z.sizey;u=(t-(z.sizey-h))*(arc-w-v+1)*0.5}}else{if(f==v){t=Math.sqrt(1-Math.pow((z.sizex-c-f+1)/z.sizex,2))*z.sizey;u=1-(1-(t-(z.sizey-h)))*(1-(b-w))*0.5}else{q=Math.sqrt(1-Math.pow((z.sizex-c-f)/z.sizex,2))*z.sizey;t=Math.sqrt(1-Math.pow((z.sizex-c-f+1)/z.sizex,2))*z.sizey;u=((t+q)*0.5)-(z.sizey-h)}}H(z,o,m,n,P(p,a,u));m=o;var o=m.cloneNode(false);o.style.margin="0px 1px"}H(z,o,m,n,a);b=arc}if(n){k.insertBefore(l,k.firstChild)}else{k.appendChild(l)}}function H(c,a,e,d,b){if(d&&!c.tl){a.style.marginLeft=0}if(d&&!c.tr){a.style.marginRight=0}if(!d&&!c.bl){a.style.marginLeft=0}if(!d&&!c.br){a.style.marginRight=0}a.style.backgroundColor=b;if(d){e.appendChild(a)}else{e.insertBefore(a,e.firstChild)}}function G(c,o,l,h){var f=document.createElement("div");f.style.fontSize="1px";var a=document.createElement("div");a.style.overflow="hidden";a.style.height="1px";a.style.borderColor=l;a.style.borderStyle="none solid";var m=o.sizex-1;var j=o.sizey-1;if(!j){j=1}for(var b=0;b<o.sizey;b++){var n=m-Math.floor(Math.sqrt(1-Math.pow(1-b/j,2))*m);if(b==2&&o.sizex==6&&o.sizey==6){n=2}var k=a.cloneNode(false);k.style.borderWidth="0 "+n+"px";if(h){k.style.borderWidth="0 "+(o.tr?n:0)+"px 0 "+(o.tl?n:0)+"px"}else{k.style.borderWidth="0 "+(o.br?n:0)+"px 0 "+(o.bl?n:0)+"px"}h?f.appendChild(k):f.insertBefore(k,f.firstChild)}if(h){c.insertBefore(f,c.firstChild)}else{c.appendChild(f)}}};
/*
 * jquery.bltcheckbox
 * The MIT License
 * Copyright (c) 2009 Troy Whiteley
 */
 (function(a){a.bltCheckboxSettings={restricted:false,checkedClass:"checked",onChecked:function(b){},onUnchecked:function(b){},onChange:function(b){}};a.fn.bltCheckbox=function(b){var d=a.extend({},a.bltCheckboxSettings,b||{});var c=this;var e=0;return this.each(function(){a("input",this).attr(d.checkedClass,false);a(this).click(function(){if(a(this).hasClass(d.checkedClass)){a(this).removeClass(d.checkedClass);a("input",this).attr(d.checkedClass,false);if(e>0){e--}var f=new Object();f.unCheckedItem=a("input",this).attr("id");d.onUnchecked(f)}else{if(d.restricted===true){c.each(function(){if(a(this).hasClass(d.checkedClass)){a(this).removeClass(d.checkedClass);if(e>0){e--}var g=new Object();g.changedItem=a("input",this).attr("id");d.onChange(g)}})}a(this).addClass(d.checkedClass);a("input",this).attr(d.checkedClass,true);e++;var f=new Object();f.checkedItem=a("input",this).attr("id");d.onChecked(f)}})})}})(jQuery);