(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(b,j,y){var p="function",k="password",d="maxLength",g="type",a="",c=true,o="placeholder",e=false,w="watermark",l=w,i="watermarkClass",t="watermarkFocus",n="watermarkSubmit",r="watermarkMaxLength",h="watermarkPassword",f="watermarkText",m=/\r/g,v=":data("+l+")",q=":text,:password,:search,textarea",s=["Page_ClientValidate"],u=e,x=o in document.createElement("input");b.watermark=b.watermark||{version:"3.1.1",runOnce:c,options:{className:w,useNative:c,hideBeforeUnload:c},hide:function(a){b(a).filter(v).each(function(){b.watermark._hide(b(this))})},_hide:function(b,q){var o=b[0],p=(o.value||a).replace(m,a),l=b.data(f)||a,n=b.data(r)||0,k=b.data(i);if(l.length&&p==l){o.value=a;if(b.data(h))if((b.attr(g)||a)==="text"){var e=b.data(h)||[],c=b.parent()||[];if(e.length&&c.length){c[0].removeChild(b[0]);c[0].appendChild(e[0]);b=e}}if(n){b.attr(d,n);b.removeData(r)}if(q){b.attr("autocomplete","off");j.setTimeout(function(){b.select()},1)}}k&&b.removeClass(k)},show:function(a){b(a).filter(v).each(function(){b.watermark._show(b(this))})},_show:function(e){var p=e[0],v=(p.value||a).replace(m,a),j=e.data(f)||a,q=e.attr(g)||a,s=e.data(i);if((v.length==0||v==j)&&!e.data(t)){u=c;if(e.data(h))if(q===k){var o=e.data(h)||[],n=e.parent()||[];if(o.length&&n.length){n[0].removeChild(e[0]);n[0].appendChild(o[0]);e=o;e.attr(d,j.length);p=e[0]}}if(q==="text"||q==="search"){var l=e.attr(d)||0;if(l>0&&j.length>l){e.data(r,l);e.attr(d,j.length)}}s&&e.addClass(s);p.value=j}else b.watermark._hide(e)},hideAll:function(){if(u){b.watermark.hide(q);u=e}},showAll:function(){b.watermark.show(q)}};b.fn.watermark=b.fn.watermark||function(s,r){var u="string";if(!this.length)return this;var w=e,v=typeof s===u;if(v)s=s.replace(m,a);if(typeof r==="object"){w=typeof r.className===u;r=b.extend({},b.watermark.options,r)}else if(typeof r===u){w=c;r=b.extend({},b.watermark.options,{className:r})}else r=b.watermark.options;if(typeof r.useNative!==p)r.useNative=r.useNative?function(){return c}:function(){return e};return this.each(function(){var z="dragleave",y="dragenter",B=this,e=b(B);if(!e.is(q))return;if(e.data(l)){if(v||w){b.watermark._hide(e);v&&e.data(f,s);w&&e.data(i,r.className)}}else{if(x&&r.useNative.call(B,e)&&(e.attr("tagName")||a)!=="TEXTAREA"){v&&e.attr(o,s);return}e.data(f,v?s:a);e.data(i,r.className);e.data(l,1);if((e.attr(g)||a)===k){var C=e.wrap("<span>").parent(),p=b(C.html().replace(/type=["']?password["']?/i,'type="text"'));p.data(f,e.data(f));p.data(i,e.data(i));p.data(l,1);p.attr(d,s.length);p.focus(function(){b.watermark._hide(p,c)}).bind(y,function(){b.watermark._hide(p)}).bind("dragend",function(){j.setTimeout(function(){p.blur()},1)});e.blur(function(){b.watermark._show(e)}).bind(z,function(){b.watermark._show(e)});p.data(h,e);e.data(h,p)}else e.focus(function(){e.data(t,1);b.watermark._hide(e,c)}).blur(function(){e.data(t,0);b.watermark._show(e)}).bind(y,function(){b.watermark._hide(e)}).bind(z,function(){b.watermark._show(e)}).bind("dragend",function(){j.setTimeout(function(){b.watermark._show(e)},1)}).bind("drop",function(d){var c=e[0],b=d.originalEvent.dataTransfer.getData("Text");if((c.value||a).replace(m,a).replace(b,a)===e.data(f))c.value=b;e.focus()});if(B.form){var u=B.form,A=b(u);if(!A.data(n)){A.submit(b.watermark.hideAll);if(u.submit){A.data(n,u.submit);u.submit=function(c,a){return function(){var d=a.data(n);b.watermark.hideAll();if(d.apply)d.apply(c,Array.prototype.slice.call(arguments));else d()}}(u,A)}else{A.data(n,1);u.submit=function(a){return function(){b.watermark.hideAll();delete a.submit;a.submit()}}(u)}}}}b.watermark._show(e)})};if(b.watermark.runOnce){b.watermark.runOnce=e;b.extend(b.expr[":"],{search:function(b){return"search"===(b.type||a)},data:function(c,d,a){return!!b.data(c,a[3])}});(function(c){b.fn.val=function(){var d=this;if(!d.length)return arguments.length?d:y;if(!arguments.length)if(d.data(l)){var e=(d[0].value||a).replace(m,a);return e===(d.data(f)||a)?a:e}else return c.apply(d,arguments);else{c.apply(d,arguments);b.watermark.show(d);return d}}})(b.fn.val);s.length&&b(function(){for(var a,c,d=s.length-1;d>=0;d--){a=s[d];c=j[a];if(typeof c===p)j[a]=function(a){return function(){b.watermark.hideAll();return a.apply(null,Array.prototype.slice.call(arguments))}}(c)}});b(j).bind("beforeunload",function(){b.watermark.options.hideBeforeUnload&&b.watermark.hideAll()})}})(jQuery,window);(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 siteDirection=$("html").attr("dir"),li=$("li",ul),itemLength=li.size(),curr=div.attr("currIdx")?parseInt(div.attr("currIdx")):o.start;div.css("visibility","visible");if(siteDirection=="rtl")li.css({overflow:"hidden","float":o.vertical?"none":"right"});else 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;if(siteDirection=="rtl")ul.animate(animCss=="left"?{left:+(curr*liSize)}:{top:-(curr*liSize)},o.speed,o.easing,function(){o.afterEnd&&o.afterEnd.call(this,vis());running=false});else 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(c){c.fn.NobleCount=function(i,h){var j,g=false;if(typeof i=="string"){j=c.extend({},c.fn.NobleCount.settings,h);if(typeof h!="undefined")g=typeof h.max_chars=="number"?true:false;return this.each(function(){var k=c(this);f(k,i,j,g)})}return this};c.fn.NobleCount.settings={on_negative:null,on_positive:null,on_update:null,max_chars:140,block_negative:false,cloak:false,in_dom:false};function f(g,m,n,h){var l=n.max_chars,j=c(m);if(!h){var k=j.text(),i=/^[1-9]\d*$/.test(k);if(i)l=k}b(g,j,n,l,true);c(g).keydown(function(o){b(g,j,n,l,false);if(a(o,g,n,l)==false)return false});c(g).keyup(function(o){b(g,j,n,l,false);if(a(o,g,n,l)==false)return false})}function a(k,g,l,j){if(l.block_negative){var h=k.which,i;if(typeof document.selection!="undefined")i=document.selection.createRange().text.length>0;else i=g[0].selectionStart!=g[0].selectionEnd;if(!(e(g,j)<1&&(h>47||h==32||h==0||h==13)&&!k.ctrlKey&&!k.altKey&&!i)==false)return false}return true}function e(g,h){return h-c(g).val().length}function b(g,i,l,j,h){var k=e(g,j);if(k<0)d(l.on_negative,l.on_positive,g,i,l,k);else d(l.on_positive,l.on_negative,g,i,l,k);if(l.cloak)l.in_dom&&i.attr("data-noblecount",k);else i.text(k);if(!h&&jQuery.isFunction(l.on_update))l.on_update(g,i,l,k)}function d(i,g,h,j,l,k){if(i!=null)if(typeof i=="string")j.addClass(i);else jQuery.isFunction(i)&&i(h,j,l,k);if(g!=null)typeof g=="string"&&j.removeClass(g)}})(jQuery);(function($){jQuery.fn.autobox=function(options){var settings=$.extend({defaultClass:"default",filledClass:"filled"},options);return this.each(function(){var textInput=$(this),defaultVal=textInput.val();textInput.addClass(settings.defaultClass);if(textInput.attr("type")=="password"){var newInput=$('<input type="text" class="'+settings.defaultClass+'"value="'+textInput.val()+'" />');newInput.css({position:"absolute","z-index":10,top:textInput.position().top+"px",left:textInput.position().left+"px"});$(window).resize(function(){newInput.css({top:textInput.position().top+"px",left:textInput.position().left+"px"})});newInput.bind("focus",function(){var $this=$(this);$this.hide();textInput.show();textInput.css({visibility:"visible"});textInput.focus()});textInput.before(newInput)}textInput.bind("focus",function(){var $this=$(this);$this.removeClass(settings.defaultClass);$this.addClass(settings.filledClass);$this.val()==defaultVal&&$this.val("")});textInput.bind("blur",function(){var $this=$(this);if($this.val()==""){$this.val(defaultVal);$this.addClass(settings.defaultClass);$this.removeClass(settings.filledClass);$this.attr("type")=="password"&&newInput.show()}else $this.addClass(settings.filledClass)})})}})(jQuery);(function($){$.fn.spop=function(options){var opts=$.extend({},$.fn.spop.defaults,options);function debug(text,type){if(window.console&&window.console.log&&opts.debug)if(type=="info"&&window.console.info)window.console.info(text);else if(type=="warn"&&window.console.warn)window.console.warn(text);else window.console.log(text)}return this.each(function(){$(this).addClass("spop-active");var $self=$(this),img=$(opts.imgObjList),a=$(opts.imgObjList),tot=img.length,photoList=$(opts.photoList),singleImageMode=tot==1?true:false,enlarged=false,cur=opts.curIndex||0,eclass="spop-expanded",lclass="spop-loading",sclass="spop-single-image",ppyPlaceholder=$('<div class="spop-placeholder"></div>'),ppyStageWrap=$('<div class="spop-stagewrap"></div>'),ppyCaptionWrap=$('<div class="spop-captionwrap"></div>'),ppyOuter=$self.find(".spop-outer"),ppyStage=$self.find(".spop-stage"),ppyNav=$self.find(".spop-nav"),ppyPrev=$self.find(".spop-prev"),ppyNext=$self.find(".spop-next"),ppySwitchCompact=$self.find(".spop-switch-compact").addClass("spop-hidden"),ppyCaption=$self.find(".spop-caption"),ppyText=$self.find(".spop-text"),ppyCounter=$self.find(".spop-counter"),ppyCurrent=$self.find(".spop-current"),ppyTotal=$self.find(".spop-total"),cssSelf={position:"absolute",width:"auto",height:"auto",margin:0,top:0,left:opts.direction=="right"?0:"auto",right:opts.direction=="left"?0:"auto"},cssStage={height:ppyStage.height(),width:ppyStage.width()},cssCaption={height:ppyCaption.height()},cssPlaceholder={height:opts.caption=="hover"||false?ppyOuter.outerHeight():$self.outerHeight(),width:opts.caption=="hover"||false?ppyOuter.outerWidth():$self.outerWidth(),"float":$self.css("float"),marginTop:$self.css("margin-top"),marginRight:$self.css("margin-right"),marginBottom:$self.css("margin-bottom"),marginLeft:$self.css("margin-left")},cap=opts.capList;if(!ppyStage.length||!ppyNav.length||!ppyOuter.length)debug("$.fn.spop: Incorrect HTML structure","warn");else if(tot===0)debug("$.fn.spop: No images found","warn");else{singleImageMode?debug("$.fn.spop -> SingleImageMode started"):debug("$.fn.spop -> "+tot+" thumbnails found.");init()}function showThumb(i,transition){transition=transition||false;i=i||cur;var cssStageImage={backgroundImage:"url("+img[i].src+")"},cssTemp={height:"+=0"};if(enlarged){hideCaption();ppyStage.fadeTo(opts.duration/2,0).animate(cssStage,{queue:false,duration:opts.duration,easing:opts.easing,complete:function(){enlarged=false;debug("$.fn.showThumb: Entering COMPACT MODE","info");$self.removeClass(eclass);$self.css("z-index","1");ppySwitchCompact.addClass("spop-hidden");showThumb();$(this).fadeTo(opts.duration/2,1)}})}else{if(transition){ppyStageWrap.addClass(lclass);ppyStage.fadeTo(opts.duration/2,0);var thumbPreloader=new Image;thumbPreloader.onload=function(){debug("$.fn.spop.showThumb: Thumbnail "+i+" loaded","info");ppyStageWrap.removeClass(lclass);ppyStage.animate(cssTemp,1,"linear",function(){ppyStage.css(cssStageImage);$(this).fadeTo(opts.duration/2,1);if(opts.caption=="hover")showCaption(cap[i]);else opts.caption=="permanent"&&updateCaption(cap[i]);updateCounter()});thumbPreloader.onload=function(){}};thumbPreloader.src=img[i].src}else{ppyStage.css(cssStageImage);updateCounter();showCaption(cap[i],true)}var preloader=new Image;preloader.onload=function(){debug("$.fn.spop.showThumb: Image "+i+" loaded","info");preloader.onload=function(){}};preloader.src=a[i].href}}function showImage(i){i=i||cur;cap[i]=$j("#"+photoList[i].commentAndLikeDivID).html()+photoList[i].photoCaption;ppyStageWrap.addClass(lclass);ppyStage.fadeTo(opts.duration/2,0);var allPpy=$("."+eclass);allPpy.css("z-index",opts.zindex-1);$self.css("z-index",opts.zindex);var preloader=new Image;preloader.onload=function(){ppyStageWrap.removeClass(lclass);var cssStageTo={};if(opts.minW!=null||opts.minH!=null){var imgSize=imgSizeControl(preloader);cssStageTo={width:imgSize[0],height:imgSize[1]}}else cssStageTo={width:preloader.width,height:preloader.height};var cssStageIm={backgroundImage:"url("+a[i]+")",backgroundPosition:"left top"};hideCaption();ppyStage.animate(cssStageTo,{queue:false,duration:opts.duration,easing:opts.easing,complete:function(){opts.navigation=="hover"&&showNav();enlarged=true;debug("$.fn.spop.showImage: Entering ENLARGED MODE","info");$self.addClass(eclass);ppySwitchCompact.removeClass("spop-hidden");updateCounter();$(this).css(cssStageIm).fadeTo(opts.duration/2,1);showCaption(cap[i]);preloadNeighbours()}})};preloader.src=a[i]}function imgSizeControl(obj){var horSize,verSize;obj.width<=opts.minW?(horSize=opts.minW):(horSize=obj.width);obj.height<=opts.minH?(verSize=opts.minH):(verSize=obj.height);return[horSize,verSize]}function updateCounter(i){i=i||cur;ppyTotal.text(tot);ppyCurrent.text(i+1);debug("$.fn.spop.updateCounter: Displaying image "+(i+1)+" of "+tot)}function preloadNeighbours(i){i=i||cur;var preloaderNext=new Image,preloaderPrev=new Image,neighbour=i;if(neighbour<tot-1)neighbour++;else neighbour=0;preloaderNext.src=a[neighbour];neighbour=i;if(neighbour<=0)neighbour=tot-1;else neighbour--;preloaderPrev.src=a[neighbour]}function showNav(){ppyNav.stop().fadeTo(150,opts.opacity)}function hideNav(){ppyNav.stop().fadeTo(150,0)}function updateCaption(caption){opts.caption&&ppyText.html(caption)}function showCaption(caption,force){if(caption&&opts.caption){updateCaption(caption);debug("$.fn.spop.showCaption -> ppyCaptionWrap.outerHeight(true): "+ppyCaptionWrap.outerHeight(true));var cssTempCaption={visibility:"visible"};ppyCaption.css(cssTempCaption);if(opts.caption==="permanent"&&!enlarged)ppyCaption.css(cssCaption);else ppyCaption.animate({height:ppyText.outerHeight(true)},{queue:false,duration:90,easing:opts.easing})}else!caption&&!force&&hideCaption()}function hideCaption(){var cssTempCaption={visibility:"hidden",overflow:"hidden"};ppyCaption.animate({height:"0px"},{queue:false,duration:90,easing:opts.easing,complete:function(){ppyCaption.css(cssTempCaption)}})}function previous(e){if(cur<=0)cur=tot-1;else cur--;if(enlarged)showImage(cur);else showThumb(cur,true);e.stopPropagation();return cur}function next(e){if(cur<tot-1)cur++;else cur=0;if(enlarged)showImage(cur);else showThumb(cur,true);e.stopPropagation();return cur}function init(){$self.css(cssSelf);if(!$self.is(".initialized")){ppyStageWrap=ppyStage.wrap(ppyStageWrap).parent();ppyCaptionWrap=ppyCaption.wrapInner(ppyCaptionWrap).children().eq(0)}if(opts.enlarge==true)showImage();else showThumb();$("body").one("click",function(){showThumb(cur);$self.addClass("initialized")});$self.click(function(e){e.stopPropagation()});if(opts.navigation=="hover"){hideNav();$self.hover(function(){showNav()},function(){hideNav()});ppyNav.hover(function(){showNav()},function(){hideNav()})}if(!singleImageMode){ppyPrev.click(previous);ppyNext.click(next);ppyStage.css({cursor:"pointer"}).click(next)}else{$self.addClass(sclass);ppyPrev.remove();ppyNext.remove();ppyCounter.remove()}if(opts.caption=="hover"){hideCaption();$self.hover(function(){showCaption(cap[cur])},function(){hideCaption(true)})}ppySwitchCompact.click(function(){showThumb(cur);$self.addClass("initialized");return false})}})};$.fn.spop.defaults={caption:"hover",debug:false,direction:"right",duration:240,easing:"swing",navigation:"hover",opacity:.8,zindex:1e5,imbObjList:null,capList:null,curIndex:null,enlarge:false,minW:null,maxW:null,minH:null,maxH:null}})(jQuery);(function($){$.cluetip={version:"1.0.6"};var $cluetip,$cluetipInner,$cluetipOuter,$cluetipTitle,$cluetipArrows,$cluetipWait,$dropShadow,imgCount;$.fn.cluetip=function(js,options){if(typeof js=="object"){options=js;js=null}return js=="destroy"?this.removeData("thisInfo").unbind(".cluetip"):this.each(function(index){var link=this,$this=$(this),opts=$.extend(true,{},$.fn.cluetip.defaults,options||{},$.metadata?$this.metadata():$.meta?$this.data():{}),cluetipContents=false,cluezIndex=+opts.cluezIndex;$this.data("thisInfo",{title:link.title,zIndex:cluezIndex});var isActive=false,closeOnDelay=0;if(!$("#cluetip").length){$(['<div id="cluetip">','<div id="cluetip-outer">','<h3 id="cluetip-title"></h3>','<div id="cluetip-inner"></div>',"</div>",'<div id="cluetip-extra"></div>','<div id="cluetip-arrows" class="cluetip-arrows"></div>',"</div>"].join(""))[insertionType](insertionElement).hide();$cluetip=$("#cluetip").css({position:"absolute"});$cluetipOuter=$("#cluetip-outer").css({position:"relative",zIndex:cluezIndex});$cluetipInner=$("#cluetip-inner");$cluetipTitle=$("#cluetip-title");$cluetipArrows=$("#cluetip-arrows");$cluetipWait=$('<div id="cluetip-waitimage"></div>').css({position:"absolute"}).insertBefore($cluetip).hide()}var dropShadowSteps=opts.dropShadow?+opts.dropShadowSteps:0;if(!$dropShadow){$dropShadow=$([]);for(var i=0;i<dropShadowSteps;i++)$dropShadow=$dropShadow.add($("<div></div>").css({zIndex:cluezIndex-1,opacity:.1,top:1+i,left:1+i}));$dropShadow.css({position:"absolute",backgroundColor:"#000"}).prependTo($cluetip)}var tipAttribute=$this.attr(opts.attribute),ctClass=opts.cluetipClass;if(!tipAttribute&&!opts.splitTitle&&!js)return true;if(opts.local&&opts.localPrefix)tipAttribute=opts.localPrefix+tipAttribute;opts.local&&opts.hideLocal&&$(tipAttribute+":first").hide();var tOffset=parseInt(opts.topOffset,10),lOffset=parseInt(opts.leftOffset,10),tipHeight,wHeight,defHeight=isNaN(parseInt(opts.height,10))?"auto":/\D/g.test(opts.height)?opts.height:opts.height+"px",sTop,linkTop,posY,tipY,mouseY,baseline,tipInnerWidth=parseInt(opts.width,10)||275,tipWidth=tipInnerWidth+(parseInt($cluetip.css("paddingLeft"),10)||0)+(parseInt($cluetip.css("paddingRight"),10)||0)+dropShadowSteps,linkWidth=this.offsetWidth,linkLeft,posX,tipX,mouseX,winWidth,tipParts,tipTitle=opts.attribute!="title"?$this.attr(opts.titleAttribute):"";if(opts.splitTitle){if(tipTitle==undefined)tipTitle="";tipParts=tipTitle.split(opts.splitTitle);tipTitle=tipParts.shift()}if(opts.escapeTitle)tipTitle=tipTitle.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<");var localContent;function returnFalse(){return false}var activate=function(event){if(!opts.onActivate($this))return false;isActive=true;$cluetip.removeClass().css({width:tipInnerWidth});tipAttribute==$this.attr("href")&&$this.css("cursor",opts.cursor);opts.hoverClass&&$this.addClass(opts.hoverClass);linkTop=posY=$this.offset().top;linkLeft=$this.offset().left;mouseX=event.pageX;mouseY=event.pageY;if(link.tagName.toLowerCase()!="area"){sTop=$(document).scrollTop();winWidth=$(window).width()}if(opts.positionBy=="fixed"){posX=linkWidth+linkLeft+lOffset;$cluetip.css({left:posX})}else{posX=linkWidth>linkLeft&&linkLeft>tipWidth||linkLeft+linkWidth+tipWidth+lOffset>winWidth?linkLeft-tipWidth-lOffset:linkWidth+linkLeft+lOffset;if(link.tagName.toLowerCase()=="area"||opts.positionBy=="mouse"||linkWidth+tipWidth>winWidth)if(mouseX+20+tipWidth>winWidth){$cluetip.addClass(" cluetip-"+ctClass);posX=mouseX-tipWidth-lOffset>=0?mouseX-tipWidth-lOffset-parseInt($cluetip.css("marginLeft"),10)+parseInt($cluetipInner.css("marginRight"),10):mouseX-tipWidth/2}else posX=mouseX+lOffset;var pY=posX<0?event.pageY+tOffset:event.pageY;$cluetip.css({left:posX>0&&opts.positionBy!="bottomTop"?posX:mouseX+tipWidth/2>winWidth?winWidth/2-tipWidth/2:Math.max(mouseX-tipWidth/2,0),zIndex:$this.data("thisInfo").zIndex});$cluetipArrows.css({zIndex:$this.data("thisInfo").zIndex+1})}wHeight=$(window).height();if(js){if(typeof js=="function")js=js.call(link);$cluetipInner.html(js);cluetipShow(pY)}else if(tipParts){var tpl=tipParts.length;$cluetipInner.html(tpl?tipParts[0]:"");if(tpl>1)for(var i=1;i<tpl;i++)$cluetipInner.append('<div class="split-body">'+tipParts[i]+"</div>");cluetipShow(pY)}else if(!opts.local&&tipAttribute.indexOf("#")!==0)if(/\.(jpe?g|tiff?|gif|png)$/i.test(tipAttribute)){$cluetipInner.html('<img src="'+tipAttribute+'" alt="'+tipTitle+'" />');cluetipShow(pY)}else if(cluetipContents&&opts.ajaxCache){$cluetipInner.html(cluetipContents);cluetipShow(pY)}else{var optionBeforeSend=opts.ajaxSettings.beforeSend,optionError=opts.ajaxSettings.error,optionSuccess=opts.ajaxSettings.success,optionComplete=opts.ajaxSettings.complete,ajaxSettings={cache:false,url:tipAttribute,beforeSend:function(xhr){optionBeforeSend&&optionBeforeSend.call(link,xhr,$cluetip,$cluetipInner);$cluetipOuter.children().empty();opts.waitImage&&$cluetipWait.css({top:mouseY+20,left:mouseX+20,zIndex:$this.data("thisInfo").zIndex-1}).show()},error:function(xhr,textStatus){if(isActive)if(optionError)optionError.call(link,xhr,textStatus,$cluetip,$cluetipInner);else $cluetipInner.html("<i>sorry, the contents could not be loaded</i>")},success:function(data,textStatus){cluetipContents=opts.ajaxProcess.call(link,data);if(isActive){optionSuccess&&optionSuccess.call(link,data,textStatus,$cluetip,$cluetipInner);$cluetipInner.html(cluetipContents)}},complete:function(xhr,textStatus){optionComplete&&optionComplete.call(link,xhr,textStatus,$cluetip,$cluetipInner);var imgs=$cluetipInner[0].getElementsByTagName("img");imgCount=imgs.length;for(var i=0,l=imgs.length;i<l;i++)if(imgs[i].complete)imgCount--;if(imgCount&&!$.browser.opera)$(imgs).bind("load error",function(){imgCount--;if(imgCount<1){$cluetipWait.hide();isActive&&cluetipShow(pY)}});else{$cluetipWait.hide();isActive&&cluetipShow(pY)}}},ajaxMergedSettings=$.extend(true,{},opts.ajaxSettings,ajaxSettings);$.ajax(ajaxMergedSettings)}else if(opts.local){var $localContent=$(tipAttribute+(/#\S+$/.test(tipAttribute)?"":":eq("+index+")")).clone(true).show();$cluetipInner.html($localContent);cluetipShow(pY)}},cluetipShow=function(bpY){$cluetip.addClass("cluetip-"+ctClass);if(opts.truncate){var $truncloaded=$cluetipInner.text().slice(0,opts.truncate)+"...";$cluetipInner.html($truncloaded)}tipTitle?$cluetipTitle.show().html(tipTitle):opts.showTitle?$cluetipTitle.show().html(" "):$cluetipTitle.hide();if(opts.sticky){var $closeLink=$('<div id="cluetip-close"><a href="#">'+opts.closeText+"</a></div>");opts.closePosition=="bottom"?$closeLink.appendTo($cluetipInner):opts.closePosition=="title"?$closeLink.prependTo($cluetipTitle):$closeLink.prependTo($cluetipInner);$closeLink.bind("click.cluetip",function(){cluetipClose();return false});if(opts.mouseOutClose)$cluetip.bind("mouseleave.cluetip",function(){cluetipClose()});else $cluetip.unbind("mouseleave.cluetip")}var direction="";$cluetipOuter.css({zIndex:$this.data("thisInfo").zIndex,overflow:defHeight=="auto"?"visible":"auto",height:defHeight});tipHeight=defHeight=="auto"?Math.max($cluetip.outerHeight(),$cluetip.height()):parseInt(defHeight,10);tipY=posY;baseline=sTop+wHeight;if(opts.positionBy=="fixed")tipY=posY-opts.dropShadowSteps+tOffset;else if(posX<mouseX&&Math.max(posX,0)+tipWidth>mouseX||opts.positionBy=="bottomTop")if(posY+tipHeight+tOffset>baseline&&mouseY-sTop>tipHeight+tOffset){tipY=mouseY-tipHeight-tOffset;direction="top"}else{tipY=mouseY+tOffset;direction="bottom"}else if(posY+tipHeight+tOffset>baseline)tipY=tipHeight>=wHeight?sTop:baseline-tipHeight-tOffset;else if($this.css("display")=="block"||link.tagName.toLowerCase()=="area"||opts.positionBy=="mouse")tipY=bpY-tOffset;else tipY=posY-opts.dropShadowSteps;if(direction=="")posX<linkLeft?(direction="left"):(direction="right");$cluetip.css({top:tipY+"px"}).removeClass().addClass("clue-"+direction+"-"+ctClass).addClass(" cluetip-"+ctClass);if(opts.arrows){var bgY=posY-tipY-opts.dropShadowSteps;$cluetipArrows.css({top:/(left|right)/.test(direction)&&posX>=0&&bgY>0?bgY+"px":/(left|right)/.test(direction)?0:""}).show()}else $cluetipArrows.hide();$dropShadow.hide();$cluetip.hide()[opts.fx.open](opts.fx.openSpeed||0);opts.dropShadow&&$dropShadow.css({height:tipHeight,width:tipInnerWidth,zIndex:$this.data("thisInfo").zIndex-1}).show();$.fn.bgiframe&&$cluetip.bgiframe();if(opts.delayedClose>0)closeOnDelay=setTimeout(cluetipClose,opts.delayedClose);opts.onShow.call(link,$cluetip,$cluetipInner)},inactivate=function(){isActive=false;$cluetipWait.hide();if(!opts.sticky||/click|toggle/.test(opts.activation)){cluetipClose();clearTimeout(closeOnDelay)}opts.hoverClass&&$this.removeClass(opts.hoverClass)},cluetipClose=function(){$cluetipOuter.parent().hide().removeClass();opts.onHide.call(link,$cluetip,$cluetipInner);$this.removeClass("cluetip-clicked");tipTitle&&$this.attr(opts.titleAttribute,tipTitle);$this.css("cursor","");opts.arrows&&$cluetipArrows.css({top:""})};$(document).bind("hideCluetip",function(){cluetipClose()});if(/click|toggle/.test(opts.activation))$this.bind("click.cluetip",function(event){if($cluetip.is(":hidden")||!$this.is(".cluetip-clicked")){activate(event);$(".cluetip-clicked").removeClass("cluetip-clicked");$this.addClass("cluetip-clicked")}else inactivate(event);this.blur();return false});else if(opts.activation=="focus"){$this.bind("focus.cluetip",function(event){activate(event)});$this.bind("blur.cluetip",function(event){inactivate(event)})}else{$this[opts.clickThrough?"unbind":"bind"]("click",returnFalse);var mouseTracks=function(evt){if(opts.tracking==true){var trackX=posX-evt.pageX,trackY=tipY?tipY-evt.pageY:posY-evt.pageY;$this.bind("mousemove.cluetip",function(evt){$cluetip.css({left:evt.pageX+trackX,top:evt.pageY+trackY})})}};if($.fn.hoverIntent&&opts.hoverIntent)$this.hoverIntent({sensitivity:opts.hoverIntent.sensitivity,interval:opts.hoverIntent.interval,over:function(event){activate(event);mouseTracks(event)},timeout:opts.hoverIntent.timeout,out:function(event){inactivate(event);$this.unbind("mousemove.cluetip")}});else $this.bind("mouseenter.cluetip",function(event){activate(event);mouseTracks(event)}).bind("mouseleave.cluetip",function(event){inactivate(event);$this.unbind("mousemove.cluetip")});$this.bind("mouseover.cluetip",function(){$this.attr("title","")}).bind("mouseleave.cluetip",function(){$this.attr("title",$this.data("thisInfo").title)})}})};$.fn.cluetip.defaults={width:275,height:"auto",cluezIndex:97,positionBy:"auto",topOffset:15,leftOffset:15,local:false,localPrefix:null,hideLocal:true,attribute:"rel",titleAttribute:"title",splitTitle:"",escapeTitle:false,showTitle:true,cluetipClass:"default",hoverClass:"",waitImage:true,cursor:"help",arrows:false,dropShadow:true,dropShadowSteps:6,sticky:false,mouseOutClose:false,activation:"hover",clickThrough:false,tracking:false,delayedClose:0,closePosition:"top",closeText:"Close",truncate:0,fx:{open:"show",openSpeed:""},hoverIntent:{sensitivity:3,interval:50,timeout:0},onActivate:function(){return true},onShow:function(){},onHide:function(){},ajaxCache:true,ajaxProcess:function(data){data=data.replace(/<(script|style|title)[^<]+<\/(script|style|title)>/gm,"").replace(/<(link|meta)[^>]+>/g,"");return data},ajaxSettings:{dataType:"html"},debug:false};var insertionType="appendTo",insertionElement="body";$.cluetip.setup=function(options){if(options&&options.insertionType&&options.insertionType.match(/appendTo|prependTo|insertBefore|insertAfter/))insertionType=options.insertionType;if(options&&options.insertionElement)insertionElement=options.insertionElement}})(jQuery);jQuery.iFisheye={build:function(options){return this.each(function(){var el=this;el.fisheyeCfg={items:jQuery(options.items,this),container:jQuery(options.container,this),pos:jQuery.iUtil.getPosition(this),itemWidth:options.itemWidth,itemsText:options.itemsText,proximity:options.proximity,valign:options.valign,halign:options.halign,maxWidth:options.maxWidth,margin:options.margin};jQuery.iFisheye.positionContainer(el,0);jQuery(window).bind("resize",function(){el.fisheyeCfg.pos=jQuery.iUtil.getPosition(el);jQuery.iFisheye.positionContainer(el,0);jQuery.iFisheye.positionItems(el)});jQuery.iFisheye.positionItems(el);jQuery(document).bind("mousemove",function(e){var pointer=jQuery.iUtil.getPointer(e),toAdd=0;if(el.fisheyeCfg.halign&&el.fisheyeCfg.halign=="center")var posx=pointer.x-el.fisheyeCfg.pos.x-(el.offsetWidth-el.fisheyeCfg.itemWidth*el.fisheyeCfg.items.size())/2-el.fisheyeCfg.itemWidth/2;else if(el.fisheyeCfg.halign&&el.fisheyeCfg.halign=="right")var posx=pointer.x-el.fisheyeCfg.pos.x-el.offsetWidth+el.fisheyeCfg.itemWidth*el.fisheyeCfg.items.size();else var posx=pointer.x-el.fisheyeCfg.pos.x;var posy=Math.pow(pointer.y-el.fisheyeCfg.pos.y-el.offsetHeight/2,2);el.fisheyeCfg.items.each(function(nr){distance=Math.sqrt(Math.pow(posx-nr*el.fisheyeCfg.itemWidth,2)+posy);distance-=el.fisheyeCfg.itemWidth/2;distance=distance<0?0:distance;distance=distance>el.fisheyeCfg.proximity?el.fisheyeCfg.proximity:distance;distance=el.fisheyeCfg.proximity-distance;extraWidth=el.fisheyeCfg.maxWidth*distance/el.fisheyeCfg.proximity;this.style.width=el.fisheyeCfg.itemWidth+extraWidth+"px";this.style.left=el.fisheyeCfg.itemWidth*nr+toAdd+el.fisheyeCfg.margin+"px";toAdd+=extraWidth});jQuery.iFisheye.positionContainer(el,toAdd)})})},positionContainer:function(el,toAdd){if(el.fisheyeCfg.halign)if(el.fisheyeCfg.halign=="center")el.fisheyeCfg.container.get(0).style.left=(el.offsetWidth-el.fisheyeCfg.itemWidth*el.fisheyeCfg.items.size())/2-toAdd/2+"px";else if(el.fisheyeCfg.halign=="left")el.fisheyeCfg.container.get(0).style.left=-toAdd/el.fisheyeCfg.items.size()+"px";else if(el.fisheyeCfg.halign=="right")el.fisheyeCfg.container.get(0).style.left=el.offsetWidth-el.fisheyeCfg.itemWidth*el.fisheyeCfg.items.size()-toAdd/2+"px";el.fisheyeCfg.container.get(0).style.width=el.fisheyeCfg.itemWidth*el.fisheyeCfg.items.size()+toAdd+"px"},positionItems:function(el){el.fisheyeCfg.items.each(function(nr){this.style.width=el.fisheyeCfg.itemWidth+"px";this.style.left=el.fisheyeCfg.itemWidth*nr+"px"})}};jQuery.fn.Fisheye=jQuery.iFisheye.build;jQuery.iUtil={getPosition:function(e){var x=0,y=0,es=e.style,restoreStyles=false;if(jQuery(e).css("display")=="none"){var oldVisibility=es.visibility,oldPosition=es.position;restoreStyles=true;es.visibility="hidden";es.display="block";es.position="absolute"}var el=e;while(el){x+=el.offsetLeft+(el.currentStyle&&!jQuery.browser.opera?parseInt(el.currentStyle.borderLeftWidth)||0:0);y+=el.offsetTop+(el.currentStyle&&!jQuery.browser.opera?parseInt(el.currentStyle.borderTopWidth)||0:0);el=el.offsetParent}el=e;while(el&&el.tagName&&el.tagName.toLowerCase()!="body"){x-=el.scrollLeft||0;y-=el.scrollTop||0;el=el.parentNode}if(restoreStyles==true){es.display="none";es.position=oldPosition;es.visibility=oldVisibility}return{x:x,y:y}},getPositionLite:function(el){var x=0,y=0;while(el){x+=el.offsetLeft||0;y+=el.offsetTop||0;el=el.offsetParent}return{x:x,y:y}},getSize:function(e){var w=jQuery.css(e,"width"),h=jQuery.css(e,"height"),wb=0,hb=0,es=e.style;if(jQuery(e).css("display")!="none"){wb=e.offsetWidth;hb=e.offsetHeight}else{var oldVisibility=es.visibility,oldPosition=es.position;es.visibility="hidden";es.display="block";es.position="absolute";wb=e.offsetWidth;hb=e.offsetHeight;es.display="none";es.position=oldPosition;es.visibility=oldVisibility}return{w:w,h:h,wb:wb,hb:hb}},getSizeLite:function(el){return{wb:el.offsetWidth||0,hb:el.offsetHeight||0}},getClient:function(e){var h,w,de;if(e){w=e.clientWidth;h=e.clientHeight}else{de=document.documentElement;w=window.innerWidth||self.innerWidth||de&&de.clientWidth||document.body.clientWidth;h=window.innerHeight||self.innerHeight||de&&de.clientHeight||document.body.clientHeight}return{w:w,h:h}},getScroll:function(e){var t=0,l=0,w=0,h=0,iw=0,ih=0;if(e&&e.nodeName.toLowerCase()!="body"){t=e.scrollTop;l=e.scrollLeft;w=e.scrollWidth;h=e.scrollHeight;iw=0;ih=0}else{if(document.documentElement){t=document.documentElement.scrollTop;l=document.documentElement.scrollLeft;w=document.documentElement.scrollWidth;h=document.documentElement.scrollHeight}else if(document.body){t=document.body.scrollTop;l=document.body.scrollLeft;w=document.body.scrollWidth;h=document.body.scrollHeight}iw=self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth||0;ih=self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0}return{t:t,l:l,w:w,h:h,iw:iw,ih:ih}},getMargins:function(e,toInteger){var el=jQuery(e),t=el.css("marginTop")||"",r=el.css("marginRight")||"",b=el.css("marginBottom")||"",l=el.css("marginLeft")||"";return toInteger?{t:parseInt(t)||0,r:parseInt(r)||0,b:parseInt(b)||0,l:parseInt(l)}:{t:t,r:r,b:b,l:l}},getPadding:function(e,toInteger){var el=jQuery(e),t=el.css("paddingTop")||"",r=el.css("paddingRight")||"",b=el.css("paddingBottom")||"",l=el.css("paddingLeft")||"";return toInteger?{t:parseInt(t)||0,r:parseInt(r)||0,b:parseInt(b)||0,l:parseInt(l)}:{t:t,r:r,b:b,l:l}},getBorder:function(e,toInteger){var el=jQuery(e),t=el.css("borderTopWidth")||"",r=el.css("borderRightWidth")||"",b=el.css("borderBottomWidth")||"",l=el.css("borderLeftWidth")||"";return toInteger?{t:parseInt(t)||0,r:parseInt(r)||0,b:parseInt(b)||0,l:parseInt(l)||0}:{t:t,r:r,b:b,l:l}},getPointer:function(event){var x=event.pageX||event.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)||0,y=event.pageY||event.clientY+(document.documentElement.scrollTop||document.body.scrollTop)||0;return{x:x,y:y}},traverseDOM:function(nodeEl,func){func(nodeEl);nodeEl=nodeEl.firstChild;while(nodeEl){jQuery.iUtil.traverseDOM(nodeEl,func);nodeEl=nodeEl.nextSibling}},purgeEvents:function(nodeEl){jQuery.iUtil.traverseDOM(nodeEl,function(el){for(var attr in el)if(typeof el[attr]==="function")el[attr]=null})},centerEl:function(el,axis){var clientScroll=jQuery.iUtil.getScroll(),windowSize=jQuery.iUtil.getSize(el);(!axis||axis=="vertically")&&jQuery(el).css({top:clientScroll.t+(Math.max(clientScroll.h,clientScroll.ih)-clientScroll.t-windowSize.hb)/2+"px"});(!axis||axis=="horizontally")&&jQuery(el).css({left:clientScroll.l+(Math.max(clientScroll.w,clientScroll.iw)-clientScroll.l-windowSize.wb)/2+"px"})},fixPNG:function(el,emptyGIF){var images=jQuery('img[@src*="png"]',el||document),png;images.each(function(){png=this.src;this.src=emptyGIF;this.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+png+"')"})}};[].indexOf||(Array.prototype.indexOf=function(v,n){n=n==null?0:n;for(var m=this.length,i=n;i<m;i++)if(this[i]==v)return i;return-1});(function($){$.fn.TextAreaExpander=function(minHeight,maxHeight){var hCheck=!($.browser.msie||$.browser.opera);function ResizeTextarea(e){e=e.target||e;var vlen=e.value.length,ewidth=e.offsetWidth;if(vlen!=e.valLength||ewidth!=e.boxWidth){if(hCheck&&(vlen<e.valLength||ewidth!=e.boxWidth))e.style.height="0px";var h=Math.max(e.expandMin,Math.min(e.scrollHeight,e.expandMax));e.style.overflow=e.scrollHeight>h?"auto":"hidden";e.style.height=h+"px";e.valLength=vlen;e.boxWidth=ewidth}return true}this.each(function(){if(this.nodeName.toLowerCase()!="textarea")return;var p=this.className.match(/expand(\d+)\-*(\d+)*/i);this.expandMin=minHeight||(p?parseInt("0"+p[1],10):0);this.expandMax=maxHeight||(p?parseInt("0"+p[2],10):99999);ResizeTextarea(this);if(!this.Initialized){this.Initialized=true;$(this).css("padding-top",0).css("padding-bottom",0);$(this).bind("keyup",ResizeTextarea).bind("focus",ResizeTextarea)}});return this}})(jQuery)
