(function($){$.dimensions={version:"1.2"};$.each(["Height","Width"],function(i,name){$.fn["inner"+name]=function(){if(!this[0])return;var torl=name=="Height"?"Top":"Left",borr=name=="Height"?"Bottom":"Right";return this.is(":visible")?this[0]["client"+name]:num(this,name.toLowerCase())+num(this,"padding"+torl)+num(this,"padding"+borr)};$.fn["outer"+name]=function(options){if(!this[0])return;var torl=name=="Height"?"Top":"Left",borr=name=="Height"?"Bottom":"Right";options=$.extend({margin:false},options||{});var val=this.is(":visible")?this[0]["offset"+name]:num(this,name.toLowerCase())+num(this,"border"+torl+"Width")+num(this,"border"+borr+"Width")+num(this,"padding"+torl)+num(this,"padding"+borr);return val+(options.margin?num(this,"margin"+torl)+num(this,"margin"+borr):0)}});$.each(["Left","Top"],function(i,name){$.fn["scroll"+name]=function(val){return!this[0]?void 0:val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(name=="Left"?val:$(window).scrollLeft(),name=="Top"?val:$(window).scrollTop()):(this["scroll"+name]=val)}):this[0]==window||this[0]==document?self[name=="Left"?"pageXOffset":"pageYOffset"]||$.boxModel&&document.documentElement["scroll"+name]||document.body["scroll"+name]:this[0]["scroll"+name]}});$.fn.extend({position:function(){var left=0,top=0,elem=this[0],offset,parentOffset,offsetParent,results;if(elem){offsetParent=this.offsetParent();offset=this.offset();parentOffset=offsetParent.offset();offset.top-=num(elem,"marginTop");offset.left-=num(elem,"marginLeft");parentOffset.top+=num(offsetParent,"borderTopWidth");parentOffset.left+=num(offsetParent,"borderLeftWidth");results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left}}return results},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&$.css(offsetParent,"position")=="static"))offsetParent=offsetParent.offsetParent;return $(offsetParent)}});function num(el,prop){return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0}})(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($){$.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();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(){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(){menuClasses=[c.menuClass];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;$.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);jQuery.tableDnD={currentTable:null,dragObject:null,mouseOffset:null,oldY:0,build:function(a){this.each(function(){this.tableDnDConfig=jQuery.extend({onDragStyle:null,onDropStyle:null,onDragClass:"tDnD_whileDrag",onDrop:null,onDragStart:null,scrollAmount:5,serializeRegexp:/[^\-]*$/,serializeParamName:null,dragHandle:null},a||{});jQuery.tableDnD.makeDraggable(this)});jQuery(document).bind("mousemove",jQuery.tableDnD.mousemove).bind("mouseup",jQuery.tableDnD.mouseup);return this},makeDraggable:function(c){var b=c.tableDnDConfig;if(c.tableDnDConfig.dragHandle){var a=jQuery("td."+c.tableDnDConfig.dragHandle,c);a.each(function(){jQuery(this).mousedown(function(e){jQuery.tableDnD.dragObject=this.parentNode;jQuery.tableDnD.currentTable=c;jQuery.tableDnD.mouseOffset=jQuery.tableDnD.getMouseOffset(this,e);if(b.onDragStart)b.onDragStart(c,this);return false})})}else{var d=jQuery("tr",c);d.each(function(){var e=jQuery(this);!e.hasClass("nodrag")&&e.mousedown(function(f){if(f.target.tagName=="TD"){jQuery.tableDnD.dragObject=this;jQuery.tableDnD.currentTable=c;jQuery.tableDnD.mouseOffset=jQuery.tableDnD.getMouseOffset(this,f);if(b.onDragStart)b.onDragStart(c,this);return false}}).css("cursor","move")})}},updateTables:function(){this.each(function(){this.tableDnDConfig&&jQuery.tableDnD.makeDraggable(this)})},mouseCoords:function(a){return a.pageX||a.pageY?{x:a.pageX,y:a.pageY}:{x:a.clientX+document.body.scrollLeft-document.body.clientLeft,y:a.clientY+document.body.scrollTop-document.body.clientTop}},getMouseOffset:function(d,c){c=c||window.event;var b=this.getPosition(d),a=this.mouseCoords(c);return{x:a.x-b.x,y:a.y-b.y}},getPosition:function(c){var b=0,a=0;if(c.offsetHeight==0)c=c.firstChild;while(c.offsetParent){b+=c.offsetLeft;a+=c.offsetTop;c=c.offsetParent}b+=c.offsetLeft;a+=c.offsetTop;return{x:b,y:a}},mousemove:function(g){if(jQuery.tableDnD.dragObject==null)return;var d=jQuery(jQuery.tableDnD.dragObject),b=jQuery.tableDnD.currentTable.tableDnDConfig,i=jQuery.tableDnD.mouseCoords(g),f=i.y-jQuery.tableDnD.mouseOffset.y,c=window.pageYOffset;if(document.all)if(typeof document.compatMode!="undefined"&&document.compatMode!="BackCompat")c=document.documentElement.scrollTop;else if(typeof document.body!="undefined")c=document.body.scrollTop;if(i.y-c<b.scrollAmount)window.scrollBy(0,-b.scrollAmount);else{var a=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight;a-(i.y-c)<b.scrollAmount&&window.scrollBy(0,b.scrollAmount)}if(f!=jQuery.tableDnD.oldY){var e=f>jQuery.tableDnD.oldY;jQuery.tableDnD.oldY=f;if(b.onDragClass)d.addClass(b.onDragClass);else d.css(b.onDragStyle);var h=jQuery.tableDnD.findDropTargetRow(d,f);if(h)if(e&&jQuery.tableDnD.dragObject!=h)jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject,h.nextSibling);else!e&&jQuery.tableDnD.dragObject!=h&&jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject,h)}return false},findDropTargetRow:function(f,g){for(var j=jQuery.tableDnD.currentTable.rows,e=0;e<j.length;e++){var h=j[e],b=this.getPosition(h).y,a=parseInt(h.offsetHeight)/2;if(h.offsetHeight==0){b=this.getPosition(h.firstChild).y;a=parseInt(h.firstChild.offsetHeight)/2}if(g>b-a&&g<b+a){if(h==f)return null;var c=jQuery.tableDnD.currentTable.tableDnDConfig;if(c.onAllowDrop)return c.onAllowDrop(f,h)?h:null;else{var d=jQuery(h).hasClass("nodrop");return!d?h:null}return h}}return null},mouseup:function(){if(jQuery.tableDnD.currentTable&&jQuery.tableDnD.dragObject){var b=jQuery.tableDnD.dragObject,a=jQuery.tableDnD.currentTable.tableDnDConfig;if(a.onDragClass)jQuery(b).removeClass(a.onDragClass);else jQuery(b).css(a.onDropStyle);jQuery.tableDnD.dragObject=null;if(a.onDrop)a.onDrop(jQuery.tableDnD.currentTable,b);jQuery.tableDnD.currentTable=null}},serialize:function(){return jQuery.tableDnD.currentTable?jQuery.tableDnD.serializeTable(jQuery.tableDnD.currentTable):"Error: No Table id set, you need to set an id on your table and every row"},serializeTable:function(d){for(var a="",c=d.id,e=d.rows,b=0;b<e.length;b++){if(a.length>0)a+="&";var f=e[b].id;if(f&&f&&d.tableDnDConfig&&d.tableDnDConfig.serializeRegexp)f=f.match(d.tableDnDConfig.serializeRegexp)[0];a+=c+"[]="+f}return a},serializeTables:function(){var a="";this.each(function(){a+=jQuery.tableDnD.serializeTable(this)});return a}};jQuery.fn.extend({tableDnD:jQuery.tableDnD.build,tableDnDUpdate:jQuery.tableDnD.updateTables,tableDnDSerialize:jQuery.tableDnD.serializeTables});(function($){if(/1\.(0|1|2)\.(0|1|2)/.test($.fn.jquery)||/^1.1/.test($.fn.jquery)){alert("blockUI requires jQuery v1.2.3 or later!  You are using v"+$.fn.jquery);return}$.fn._fadeIn=$.fn.fadeIn;var noOp=function(){},mode=document.documentMode||0,setExpr=$.browser.msie&&($.browser.version<8&&!mode||mode<8),ie6=$.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!mode;$.blockUI=function(opts){install(window,opts)};$.unblockUI=function(opts){remove(window,opts)};$.growlUI=function(title,message,timeout,onClose){var $m=$('<div class="growlUI"></div>');title&&$m.append("<h1>"+title+"</h1>");message&&$m.append("<h2>"+message+"</h2>");if(timeout==undefined)timeout=3e3;$.blockUI({message:$m,fadeIn:700,fadeOut:1e3,centerY:false,timeout:timeout,showOverlay:false,onUnblock:onClose,css:$.blockUI.defaults.growlCSS})};$.fn.block=function(opts){return this.unblock({fadeOut:0}).each(function(){if($.css(this,"position")=="static")this.style.position="relative";if($.browser.msie)this.style.zoom=1;install(this,opts)})};$.fn.unblock=function(opts){return this.each(function(){remove(this,opts)})};$.blockUI.version=2.33;$.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:true,theme:false,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:false,baseZ:1e3,centerX:true,centerY:true,allowBodyStretch:true,bindEvents:true,constrainTabKey:true,fadeIn:200,fadeOut:400,timeout:0,showOverlay:true,focusInput:true,applyPlatformOpacityRules:true,onBlock:null,onUnblock:null,quirksmodeOffsetHack:4};var pageBlock=null,pageBlockEls=[];function install(el,opts){var full=el==window,msg=opts&&opts.message!==undefined?opts.message:undefined;opts=$.extend({},$.blockUI.defaults,opts||{});opts.overlayCSS=$.extend({},$.blockUI.defaults.overlayCSS,opts.overlayCSS||{});var css=$.extend({},$.blockUI.defaults.css,opts.css||{}),themedCSS=$.extend({},$.blockUI.defaults.themedCSS,opts.themedCSS||{});msg=msg===undefined?opts.message:msg;full&&pageBlock&&remove(window,{fadeOut:0});if(msg&&typeof msg!="string"&&(msg.parentNode||msg.jquery)){var node=msg.jquery?msg[0]:msg,data={};$(el).data("blockUI.history",data);data.el=node;data.parent=node.parentNode;data.display=node.style.display;data.position=node.style.position;data.parent&&data.parent.removeChild(node)}var z=opts.baseZ,lyr1=$.browser.msie||opts.forceIframe?$('<iframe class="blockUI" style="z-index:'+z+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+opts.iframeSrc+'"></iframe>'):$('<div class="blockUI" style="display:none"></div>'),lyr2=$('<div class="blockUI blockOverlay" style="z-index:'+z+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),lyr3,s;if(opts.theme&&full)s='<div class="blockUI blockMsg blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+z+';display:none;position:fixed"><div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(opts.title||"&nbsp;")+'</div><div class="ui-widget-content ui-dialog-content"></div></div>';else if(opts.theme)s='<div class="blockUI blockMsg blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+z+';display:none;position:absolute"><div class="ui-widget-header ui-dialog-titlebar blockTitle">'+(opts.title||"&nbsp;")+'</div><div class="ui-widget-content ui-dialog-content"></div></div>';else if(full)s='<div class="blockUI blockMsg blockPage" style="z-index:'+z+';display:none;position:fixed"></div>';else s='<div class="blockUI blockMsg blockElement" style="z-index:'+z+';display:none;position:absolute"></div>';lyr3=$(s);if(msg)if(opts.theme){lyr3.css(themedCSS);lyr3.addClass("ui-widget-content")}else lyr3.css(css);(!opts.applyPlatformOpacityRules||!($.browser.mozilla&&/Linux/.test(navigator.platform)))&&lyr2.css(opts.overlayCSS);lyr2.css("position",full?"fixed":"absolute");($.browser.msie||opts.forceIframe)&&lyr1.css("opacity",0);var layers=[lyr1,lyr2,lyr3],$par=full?$("body"):$(el);$.each(layers,function(){this.appendTo($par)});opts.theme&&opts.draggable&&$.fn.draggable&&lyr3.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var expr=setExpr&&(!$.boxModel||$("object,embed",full?null:el).length>0);if(ie6||expr){full&&opts.allowBodyStretch&&$.boxModel&&$("html,body").css("height","100%");if((ie6||!$.boxModel)&&!full)var t=sz(el,"borderTopWidth"),l=sz(el,"borderLeftWidth"),fixT=t?"(0 - "+t+")":0,fixL=l?"(0 - "+l+")":0;$.each([lyr1,lyr2,lyr3],function(i,o){var s=o[0].style;s.position="absolute";if(i<2){full?s.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+opts.quirksmodeOffsetHack+') + "px"'):s.setExpression("height",'this.parentNode.offsetHeight + "px"');full?s.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):s.setExpression("width",'this.parentNode.offsetWidth + "px"');fixL&&s.setExpression("left",fixL);fixT&&s.setExpression("top",fixT)}else if(opts.centerY){full&&s.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');s.marginTop=0}else if(!opts.centerY&&full){var top=opts.css&&opts.css.top?parseInt(opts.css.top):0,expression="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+top+') + "px"';s.setExpression("top",expression)}})}if(msg){if(opts.theme)lyr3.find(".ui-widget-content").append(msg);else lyr3.append(msg);(msg.jquery||msg.nodeType)&&$(msg).show()}($.browser.msie||opts.forceIframe)&&opts.showOverlay&&lyr1.show();if(opts.fadeIn){var cb=opts.onBlock?opts.onBlock:noOp,cb1=opts.showOverlay&&!msg?cb:noOp,cb2=msg?cb:noOp;opts.showOverlay&&lyr2._fadeIn(opts.fadeIn,cb1);msg&&lyr3._fadeIn(opts.fadeIn,cb2)}else{opts.showOverlay&&lyr2.show();msg&&lyr3.show();opts.onBlock&&opts.onBlock()}bind(1,el,opts);if(full){pageBlock=lyr3[0];pageBlockEls=$(":input:enabled:visible",pageBlock);opts.focusInput&&setTimeout(focus,20)}else center(lyr3[0],opts.centerX,opts.centerY);if(opts.timeout){var to=setTimeout(function(){full?$.unblockUI(opts):$(el).unblock(opts)},opts.timeout);$(el).data("blockUI.timeout",to)}}function remove(el,opts){var full=el==window,$el=$(el),data=$el.data("blockUI.history"),to=$el.data("blockUI.timeout");if(to){clearTimeout(to);$el.removeData("blockUI.timeout")}opts=$.extend({},$.blockUI.defaults,opts||{});bind(0,el,opts);var els;if(full)els=$("body").children().filter(".blockUI").add("body > .blockUI");else els=$(".blockUI",el);if(full)pageBlock=pageBlockEls=null;if(opts.fadeOut){els.fadeOut(opts.fadeOut);setTimeout(function(){reset(els,data,opts,el)},opts.fadeOut)}else reset(els,data,opts,el)}function reset(els,data,opts,el){els.each(function(){this.parentNode&&this.parentNode.removeChild(this)});if(data&&data.el){data.el.style.display=data.display;data.el.style.position=data.position;data.parent&&data.parent.appendChild(data.el);$(el).removeData("blockUI.history")}if(typeof opts.onUnblock=="function")opts.onUnblock(el,opts)}function bind(b,el,opts){var full=el==window,$el=$(el);if(!b&&(full&&!pageBlock||!full&&!$el.data("blockUI.isBlocked")))return;!full&&$el.data("blockUI.isBlocked",b);if(!opts.bindEvents||b&&!opts.showOverlay)return;var events="mousedown mouseup keydown keypress";b?$(document).bind(events,opts,handler):$(document).unbind(events,handler)}function handler(e){if(e.keyCode&&e.keyCode==9)if(pageBlock&&e.data.constrainTabKey){var els=pageBlockEls,fwd=!e.shiftKey&&e.target==els[els.length-1],back=e.shiftKey&&e.target==els[0];if(fwd||back){setTimeout(function(){focus(back)},10);return false}}return $(e.target).parents("div.blockMsg").length>0?true:$(e.target).parents().children().filter("div.blockUI").length==0}function focus(back){if(!pageBlockEls)return;var e=pageBlockEls[back===true?pageBlockEls.length-1:0];e&&e.focus()}function center(el,x,y){var p=el.parentNode,s=el.style,l=(p.offsetWidth-el.offsetWidth)/2-sz(p,"borderLeftWidth"),t=(p.offsetHeight-el.offsetHeight)/2-sz(p,"borderTopWidth");if(x)s.left=l>0?l+"px":"0";if(y)s.top=t>0?t+"px":"0"}function sz(el,p){return parseInt($.css(el,p))||0}})(jQuery);(function($){$.fn.visualize=function(options,container){return $(this).each(function(){var o=$.extend({type:"bar",width:$(this).width(),height:$(this).height(),appendTitle:true,title:null,appendKey:true,colors:colorCodeColorOrder(this),textColors:[],parseDirection:"x",pieMargin:20,pieLabelPos:"inside",lineWeight:4,barGroupMargin:10,barMargin:1},options);o.width=parseInt(o.width,10);o.height=parseInt(o.height,10);var self=$(this);function scrapeTable(){var colors=o.colors,textColors=o.textColors,tableData={dataGroups:function(){var dataGroups=[];if(o.parseDirection=="x")self.find("tr:gt(0)").each(function(i){dataGroups[i]={};dataGroups[i].points=[];dataGroups[i].color=colors[i];if(textColors[i])dataGroups[i].textColor=textColors[i];$(this).find("td").each(function(){dataGroups[i].points.push(parseInt($(this).text(),10))})});else for(var cols=self.find("tr:eq(1) td").size(),i=0;i<cols;i++){dataGroups[i]={};dataGroups[i].points=[];dataGroups[i].color=colors[i];if(textColors[i])dataGroups[i].textColor=textColors[i];self.find("tr:gt(0)").each(function(){dataGroups[i].points.push($(this).find("td").eq(i).text()*1)})}return dataGroups},allData:function(){var allData=[];$(this.dataGroups()).each(function(){allData.push(this.points)});return allData},dataSum:function(){var dataSum=0,allData=this.allData().join(",").split(",");$(allData).each(function(){dataSum+=parseInt(this,10)});return dataSum},topValue:function(){var topValue=0,allData=this.allData().join(",").split(",");$(allData).each(function(){if(parseInt(this,10)>topValue)topValue=parseInt(this,10)});return topValue},bottomValue:function(){var bottomValue=this.topValue(),allData=this.allData().join(",").split(",");$(allData).each(function(){if(this<bottomValue)bottomValue=parseInt(this,10)});return bottomValue},memberTotals:function(){var memberTotals=[],dataGroups=this.dataGroups();$(dataGroups).each(function(l){var count=0;$(dataGroups[l].points).each(function(m){count+=dataGroups[l].points[m]});memberTotals.push(count)});return memberTotals},yTotals:function(){for(var yTotals=[],dataGroups=this.dataGroups(),loopLength=this.xLabels().length,i=0;i<loopLength;i++){yTotals[i]=[];var thisTotal=0;$(dataGroups).each(function(){yTotals[i].push(this.points[i])});yTotals[i].join(",").split(",");$(yTotals[i]).each(function(){thisTotal+=parseInt(this)});yTotals[i]=thisTotal}return yTotals},topYtotal:function(){var topYtotal=0,yTotals=this.yTotals().join(",").split(",");$(yTotals).each(function(){if(parseInt(this,10)>topYtotal)topYtotal=parseInt(this,10)});return topYtotal},totalYRange:function(){return this.topValue()+Math.abs(this.bottomValue())},xLabels:function(){var xLabels=[];if(o.parseDirection=="x")self.find("tr:eq(0) th").each(function(){xLabels.push($(this).html())});else self.find("tr:gt(0) th").each(function(){xLabels.push($(this).html())});return xLabels},yLabels:function(){var yLabels=[],chartHeight=o.height,numLabels=Math.round(chartHeight/30),loopInterval=Math.round(this.totalYRange()/Math.floor(numLabels));loopInterval=Math.max(loopInterval,1);for(var j=this.bottomValue();j<=topValue;j+=loopInterval)yLabels.push(j);if(yLabels[yLabels.length-1]!=this.topValue()){yLabels.pop();yLabels.push(this.topValue())}return yLabels}};return tableData}var createChart={pie:function(){canvasContain.addClass("visualize-pie");o.pieLabelPos=="outside"&&canvasContain.addClass("visualize-pie-outside");var centerx=Math.round(canvas.width()/2),centery=Math.round(canvas.height()/2),radius=centery-o.pieMargin,counter=0,toRad=function(integer){return Math.PI/180*integer},labels=$('<ul class="visualize-labels"></ul>').insertAfter(canvas);$.each(memberTotals,function(i){if(memberTotals[i]<=0)return;var fraction=this<0?0:this/dataSum;ctx.beginPath();ctx.moveTo(centerx,centery);ctx.arc(centerx,centery,radius,counter*Math.PI*2-Math.PI*.5,(counter+fraction)*Math.PI*2-Math.PI*.5,false);ctx.lineTo(centerx,centery);ctx.closePath();ctx.fillStyle=dataGroups[i].color;ctx.fill();var sliceMiddle=counter+fraction/2,distance=o.pieLabelPos=="inside"?radius/1.5:radius+radius/5,labelx=Math.round(centerx+Math.sin(sliceMiddle*Math.PI*2)*distance),labely=Math.round(centery-Math.cos(sliceMiddle*Math.PI*2)*distance),leftRight=labelx>centerx?"right":"left",topBottom=labely>centery?"bottom":"top",labeltext=$('<span class="visualize-label">'+Math.round(fraction*100)+"%</span>").css(leftRight,0).css(topBottom,0),label=$('<li class="visualize-label-pos"></li>').appendTo(labels).css({left:labelx,top:labely}).append(labeltext);labeltext.css("font-size",radius/8).css("margin-"+leftRight,-labeltext.width()/2).css("margin-"+topBottom,-labeltext.outerHeight()/2);dataGroups[i].textColor&&labeltext.css("color",dataGroups[i].textColor);counter+=fraction})},line:function(area){if(area)canvasContain.addClass("visualize-area");else canvasContain.addClass("visualize-line");var xInterval=canvas.width()/(xLabels.length-1),xlabelsUL=$('<ul class="visualize-labels-x"></ul>').width(canvas.width()).height(canvas.height()).insertBefore(canvas);$.each(xLabels,function(i){var thisLi=$("<li><span>"+this+"</span></li>").prepend('<span class="line" />').css("left",xInterval*i).appendTo(xlabelsUL),label=thisLi.find("span:not(.line)"),leftOffset=label.width()/-2;if(i==0)leftOffset=0;else if(i==xLabels.length-1)leftOffset=-label.width();label.css("margin-left",leftOffset).addClass("label")});var yScale=canvas.height()/totalYRange,liBottom=canvas.height()/(yLabels.length-1),ylabelsUL=$('<ul class="visualize-labels-y"></ul>').width(canvas.width()).height(canvas.height()).insertBefore(canvas);$.each(yLabels,function(i){var thisLi=$("<li><span>"+this+"</span></li>").prepend('<span class="line"  />').css("bottom",liBottom*i).prependTo(ylabelsUL),label=thisLi.find("span:not(.line)"),topOffset=label.height()/-2;if(i==0)topOffset=-label.height();else if(i==yLabels.length-1)topOffset=0;label.css("margin-top",topOffset).addClass("label")});ctx.translate(0,zeroLoc);$.each(dataGroups,function(){ctx.beginPath();ctx.lineWidth=o.lineWeight;ctx.lineJoin="round";var points=this.points,integer=0;ctx.moveTo(0,-(points[0]*yScale));$.each(points,function(){ctx.lineTo(integer,-(this*yScale));integer+=xInterval});ctx.strokeStyle=this.color;ctx.stroke();if(area){ctx.lineTo(integer,0);ctx.lineTo(0,0);ctx.closePath();ctx.fillStyle=this.color;ctx.globalAlpha=.3;ctx.fill();ctx.globalAlpha=1}else ctx.closePath()})},area:function(){createChart.line(true)},bar:function(){var horizontal=o.barDirection=="horizontal";canvasContain.addClass("visualize-bar");var bottomLabels=horizontal?yLabels:xLabels,xInterval=canvas.width()/(bottomLabels.length-(horizontal?1:0)),xlabelsUL=$('<ul class="visualize-labels-x"></ul>').width(canvas.width()).height(canvas.height()).insertBefore(canvas);$.each(bottomLabels,function(i){var thisLi=$('<li><span class="label">'+this+"</span></li>").prepend('<span class="line" />').css("left",xInterval*i).width(xInterval).appendTo(xlabelsUL);if(horizontal){var label=thisLi.find("span.label");label.css("margin-left",-label.width()/2)}});leftLabels=horizontal?xLabels:yLabels;var liBottom=canvas.height()/(leftLabels.length-(horizontal?0:1)),ylabelsUL=$('<ul class="visualize-labels-y"></ul>').width(canvas.width()).height(canvas.height()).insertBefore(canvas);$.each(leftLabels,function(i){var thisLi=$("<li><span>"+this+"</span></li>").prependTo(ylabelsUL),label=thisLi.find("span:not(.line)").addClass("label");if(horizontal){label.css({"min-height":liBottom,"max-height":liBottom+1,"vertical-align":"middle"});thisLi.css({top:liBottom*i,"min-height":liBottom});r=label[0].getClientRects()[0];if(r.bottom-r.top==liBottom)label.css("line-height",parseInt(liBottom)+"px");else label.css("overflow","hidden")}else{thisLi.css("bottom",liBottom*i).prepend('<span class="line" />');label.css("margin-top",-label.height()/2)}});if(horizontal)ctx.rotate(Math.PI/2);else ctx.translate(0,zeroLoc);if(totalYRange<=0)return;for(var yScale=(horizontal?canvas.width():canvas.height())/totalYRange,barWidth=horizontal?canvas.height()/xLabels.length:canvas.width()/bottomLabels.length,linewidth=(barWidth-o.barGroupMargin*2)/dataGroups.length,h=0;h<dataGroups.length;h++){ctx.beginPath();var strokeWidth=linewidth-o.barMargin*2;ctx.lineWidth=strokeWidth;for(var points=dataGroups[h].points,integer=0,i=0;i<points.length;i++){if(points[i]!=0){var xVal=integer-o.barGroupMargin+h*linewidth+linewidth/2;xVal+=o.barGroupMargin*2;ctx.moveTo(xVal,0);ctx.lineTo(xVal,Math.round(-points[i]*yScale))}integer+=barWidth}ctx.strokeStyle=dataGroups[h].color;ctx.stroke();ctx.closePath()}}},canvasNode=document.createElement("canvas"),canvas=$(canvasNode).attr({height:o.height,width:o.width}),canvasContain=(container||$('<div class="visualize" role="presentation" />')).height(o.height).width(o.width).append(canvas),tableData=scrapeTable(),dataGroups=tableData.dataGroups(),allData=tableData.allData(),dataSum=tableData.dataSum(),topValue=tableData.topValue(),bottomValue=tableData.bottomValue(),memberTotals=tableData.memberTotals(),totalYRange=tableData.totalYRange(),zeroLoc=o.height*(topValue/totalYRange),xLabels=tableData.xLabels(),yLabels=tableData.yLabels();if(o.appendTitle||o.appendKey)var infoContain=$('<div class="visualize-info"></div>').appendTo(canvasContain);if(o.appendTitle){var title=o.title||self.find("caption").text();$('<div class="visualize-title">'+title+"</div>").appendTo(infoContain)}if(o.appendKey){var newKey=$('<ul class="visualize-key"></ul>'),selector=o.parseDirection=="x"?"tr:gt(0) th":"tr:eq(0) th";self.find(selector).each(function(i){$('<li><span class="visualize-key-color" style="background: '+dataGroups[i].color+'"></span><span class="visualize-key-label">'+$(this).text()+'&nbsp;<span class="visualize-key-value">'+memberTotals[i]+"%</span></span></li>").appendTo(newKey)});newKey.appendTo(infoContain)}!container&&canvasContain.insertAfter(this);typeof G_vmlCanvasManager!="undefined"&&G_vmlCanvasManager.initElement(canvas[0]);var ctx=canvas[0].getContext("2d");createChart[o.type]();$(".visualize-line li:first-child span.line, .visualize-line li:last-child span.line, .visualize-area li:first-child span.line, .visualize-area li:last-child span.line, .visualize-bar li:first-child span.line,.visualize-bar .visualize-labels-y li:last-child span.line").css("border","none");!container&&canvasContain.bind("visualizeRefresh",function(){self.visualize(o,$(this).empty())})}).next()}})(jQuery);(function($){var map=[];$.Watermark={ShowAll:function(){for(var i=0;i<map.length;i++)if(map[i].obj.val()==""){map[i].obj.val(map[i].text);map[i].obj.css("color",map[i].WatermarkColor)}else map[i].obj.css("color",map[i].DefaultColor)},HideAll:function(){for(var i=0;i<map.length;i++)map[i].obj.val()==map[i].text&&map[i].obj.val("")}};$.fn.Watermark=function(text,color){if(!color)color="#aaa";return this.each(function(){var input=$(this),defaultColor=input.css("color");map[map.length]={text:text,obj:input,DefaultColor:defaultColor,WatermarkColor:color};function clearMessage(){input.val()==text&&input.val("");input.css("color",defaultColor)}function insertMessage(){if(input.val().length==0||input.val()==text){input.val(text);input.css("color",color)}else input.css("color",defaultColor)}input.focus(clearMessage);input.blur(insertMessage);input.change(insertMessage);insertMessage()})}})(jQuery);(function($){$.fn.jCarouselLite=function(o){o=$.extend({btnPrev:null,btnNext:null,btnGo:null,mouseWheel:false,auto:null,speed:200,easing:null,vertical:false,circular:true,visible:3,start:0,scroll:1,colNum:1,beforeStart:null,afterEnd:null,pageSize:1},o||{});$(o.btnPrev).unbind("click");$(o.btnNext).unbind("click");return this.each(function(){var running=false,animCss=o.vertical?"top":"left",sizeCss=o.vertical?"height":"width",div=$(this),ul=$("ul",div),tLi=$("li",ul),tl=tLi.size(),v=o.visible;if(o.circular){ul.prepend(tLi.slice(tl-v-1+1).clone()).append(tLi.slice(0,v).clone());o.start+=v}var li=$("li",ul),itemLength=li.size(),curr=div.attr("currIdx")?parseInt(div.attr("currIdx")):o.start;div.css("visibility","visible");li.css({overflow:"hidden","float":o.vertical?"none":"left"});ul.css({margin:"0",padding:"0",position:"relative","list-style-type":"none","z-index":"1"});div.css({overflow:"hidden",position:"relative","z-index":"2",left:"0px"});var liSize=o.vertical?height(li):width(li),ulSize=liSize*Math.round(itemLength/o.colNum),divSize=liSize*v;li.css({width:li.width(),height:li.height()});ul.css(sizeCss,ulSize+"px").css(animCss,-(curr*liSize));var pos=ul.offset();div.css(sizeCss,divSize+"px");o.btnPrev&&$(o.btnPrev).click(function(){return go(curr-o.scroll)});o.btnNext&&$(o.btnNext).click(function(){return go(curr+o.scroll)});o.btnGo&&$.each(o.btnGo,function(i,val){$(val).click(function(){return go(o.circular?o.visible+i:i)})});o.mouseWheel&&div.mousewheel&&div.mousewheel(function(e,d){return d>0?go(curr-o.scroll):go(curr+o.scroll)});o.auto&&setInterval(function(){go(curr+o.scroll)},o.auto+o.speed);function vis(){return li.slice(curr).slice(0,v)}function go(to){if(!running){o.beforeStart&&o.beforeStart.call(this,vis());if(o.circular)if(to<=o.start-v-1){ul.css(animCss,-((itemLength-v*2)*liSize)+"px");curr=to==o.start-v-1?itemLength-v*2-1:itemLength-v*2-o.scroll}else if(to>=itemLength-v+1){ul.css(animCss,-(v*liSize)+"px");curr=to==itemLength-v+1?v+1:v+o.scroll}else curr=to;else if(to<0||to>Math.round((itemLength-v)/o.colNum)||itemLength<=o.pageSize)return false;else curr=to;running=true;ul.animate(animCss=="left"?{left:-(curr*liSize)}:{top:-(curr*liSize)},o.speed,o.easing,function(){o.afterEnd&&o.afterEnd.call(this,vis());running=false});if(!o.circular){$(o.btnPrev+","+o.btnNext).removeClass("disabled");$(curr-o.scroll<0&&o.btnPrev||curr+o.scroll>Math.round((itemLength-v)/o.colNum)&&o.btnNext||[]).addClass("disabled")}}div.attr("currIdx",curr);return false}if(!o.circular){$(o.btnNext).removeClass("disabled");(curr+o.scroll>Math.round((itemLength-v)/o.colNum)||itemLength<=o.pageSize)&&$(o.btnNext).addClass("disabled")}})};function css(el,prop){return parseInt($.css(el[0],prop))||0}function width(el){return el[0].offsetWidth+css(el,"marginLeft")+css(el,"marginRight")}function height(el){return el[0].offsetHeight+css(el,"marginTop")+css(el,"marginBottom")}})(jQuery);(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var d=a.length;d;)this.addEventListener(a[--d],b,false);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var d=a.length;d;)this.removeEventListener(a[--d],b,false);else this.onmousewheel=null}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(f){var d=[].slice.call(arguments,1),g=0,e=true;f=c.event.fix(f||window.event);f.type="mousewheel";if(f.wheelDelta)g=f.wheelDelta/120;if(f.detail)g=-f.detail/3;d.unshift(f,g);return c.event.handle.apply(this,d)}})(jQuery);(function($){$.fn.expander=function(options){var opts=$.extend({},$.fn.expander.defaults,options),delayedCollapse;return this.each(function(){var $this=$(this),o=$.meta?$.extend({},opts,$this.data()):opts,cleanedTag,startTags,endTags,allText=$this.html(),startText=allText.slice(0,o.slicePoint).replace(/\w+$/,"");startTags=startText.match(/<\w[^>]*>/g);if(startTags)startText=allText.slice(0,o.slicePoint+startTags.join("").length).replace(/\w+$/,"");if(startText.lastIndexOf("<")>startText.lastIndexOf(">"))startText=startText.slice(0,startText.lastIndexOf("<"));var endText=allText.slice(startText.length);if(!$("span.details",this).length){if(endText.replace(/\s+$/,"").split(" ").length<o.widow)return;if(endText.indexOf("</")>-1){endTags=endText.match(/<(\/)?[^>]*>/g);for(var i=0;i<endTags.length;i++)if(endTags[i].indexOf("</")>-1){for(var startTag,startTagExists=false,j=0;j<i;j++){startTag=endTags[j].slice(0,endTags[j].indexOf(" ")).replace(/(\w)$/,"$1>");if(startTag==rSlash(endTags[i]))startTagExists=true}if(!startTagExists){startText=startText+endTags[i];for(var matched=false,s=startTags.length-1;s>=0;s--)if(startTags[s].slice(0,startTags[s].indexOf(" ")).replace(/(\w)$/,"$1>")==rSlash(endTags[i])&&matched==false){cleanedTag=cleanedTag?startTags[s]+cleanedTag:startTags[s];matched=true}}}endText=cleanedTag&&cleanedTag+endText||endText}$this.html([startText,'<span class="read-more">',o.expandPrefix,'<a href="#">',o.expandText,"</a>","</span>",'<span class="details">',endText,"</span>"].join(""))}var $thisDetails=$("span.details",this),$readMore=$("span.read-more",this);$thisDetails.hide();$readMore.find("a").click(function(){$readMore.hide();if(o.expandEffect==="show"&&!o.expandSpeed){o.beforeExpand($this);$thisDetails.show();o.afterExpand($this);delayCollapse(o,$thisDetails)}else{o.beforeExpand($this);$thisDetails[o.expandEffect](o.expandSpeed,function(){$thisDetails.css({zoom:""});o.afterExpand($this);delayCollapse(o,$thisDetails)})}return false});if(o.userCollapse){$this.find("span.details").append('<span class="re-collapse">'+o.userCollapsePrefix+'<a href="#">'+o.userCollapseText+"</a></span>");$this.find("span.re-collapse a").click(function(){clearTimeout(delayedCollapse);var $detailsCollapsed=$(this).parents("span.details");reCollapse($detailsCollapsed);o.onCollapse($this,true);return false})}});function reCollapse(el){el.hide().prev("span.read-more").show()}function delayCollapse(option,$collapseEl){if(option.collapseTimer)delayedCollapse=setTimeout(function(){reCollapse($collapseEl);option.onCollapse($collapseEl.parent(),false)},option.collapseTimer)}function rSlash(rString){return rString.replace(/\//,"")}};$.fn.expander.defaults={slicePoint:100,widow:4,expandText:"read more",expandPrefix:"&hellip; ",collapseTimer:0,expandEffect:"fadeIn",expandSpeed:"",userCollapse:true,userCollapseText:"[collapse expanded text]",userCollapsePrefix:" ",beforeExpand:function(){},afterExpand:function(){},onCollapse:function(){}}})(jQuery);(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&/6.0/.test(navigator.userAgent)){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(){$("> iframe.bgiframe",this).length==0&&this.insertBefore(document.createElement(html),this.firstChild)})}return this}})(jQuery)