// remap jQuery to $ - stick plugins in here and sift the dirt
(function($){

// Cookie plugin @author Klaus Hartl/klaus.hartl@stilbuero.de
jQuery.cookie=function(d,c,a){if("undefined"!=typeof c){a=a||{};if(null===c)c="",a.expires=-1;var b="";if(a.expires&&("number"==typeof a.expires||a.expires.toUTCString))"number"==typeof a.expires?(b=new Date,b.setTime(b.getTime()+864E5*a.expires)):b=a.expires,b="; expires="+b.toUTCString();var e=a.path?"; path="+a.path:"",f=a.domain?"; domain="+a.domain:"",a=a.secure?"; secure":"";document.cookie=[d,"=",encodeURIComponent(c),b,e,f,a].join("")}else{c=null;if(document.cookie&&""!=document.cookie){a= document.cookie.split(";");for(b=0;b<a.length;b++)if(e=jQuery.trim(a[b]),e.substring(0,d.length+1)==d+"="){c=decodeURIComponent(e.substring(d.length+1));break}}return c}};

// table sorter and zebra stripes
(function($){$.extend({tablesorter:new function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'.',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}var rows=table.tBodies[0].rows;if(table.tBodies[0].rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter);}else if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter);}if(!p){p=detectParserForColumn(table,cells[i]);}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n";}list.push(p);}}if(table.config.debug){log(parsersDebug);}return list;};function detectParserForColumn(table,node){var l=parsers.length;for(var i=1;i<l;i++){if(parsers[i].is($.trim(getElementText(table.config,node)),table,node)){return parsers[i];}}return parsers[0];}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i];}}return false;}function buildCache(table){if(table.config.debug){var cacheTime=new Date();}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=table.tBodies[0].rows[i],cols=[];cache.row.push($(c));for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c.cells[j]),table,c.cells[j]));}cols.push(i);cache.normalized.push(cols);cols=null;};if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}return cache;};function getElementText(config,node){if(!node)return"";var t="";if(config.textExtraction=="simple"){if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){t=node.childNodes[0].innerHTML;}else{t=node.innerHTML;}}else{if(typeof(config.textExtraction)=="function"){t=config.textExtraction(node);}else{t=$(node).text();}}return t;}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){rows.push(r[n[i][checkCell]]);if(!table.config.appender){var o=r[n[i][checkCell]];var l=o.length;for(var j=0;j<l;j++){tableBody[0].appendChild(o[j]);}}}if(table.config.appender){table.config.appender(table,rows);}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime);}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd");},0);};function buildHeaders(table){if(table.config.debug){var time=new Date();}var meta=($.metadata)?true:false,tableHeadersRows=[];for(var i=0;i<table.tHead.rows.length;i++){tableHeadersRows[i]=0;};$tableHeaders=$("thead th",table);$tableHeaders.each(function(index){this.count=0;this.column=index;this.order=formatSortingOrder(table.config.sortInitialOrder);if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(!this.sortDisabled){$(this).addClass(table.config.cssHeader);}table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}return $tableHeaders;};function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table);}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i];}}};function formatSortingOrder(v){if(typeof(v)!="Number"){i=(v.toLowerCase()=="desc")?1:0;}else{i=(v==(0||1))?v:0;}return i;}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true;}}return false;}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this);}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]]);}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$('<colgroup>');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('<col>').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++;}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date();}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(getCachedSortType(table.config.parsers,c)=="text")?((order==0)?"sortText":"sortTextDesc"):((order==0)?"sortNumeric":"sortNumericDesc");var e="e"+i;dynamicExp+="var "+e+" = "+s+"(a["+c+"],b["+c+"]); ";dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { ";}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; ";}dynamicExp+="return 0; ";dynamicExp+="}; ";eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}return cache;};function sortText(a,b){return((a<b)?-1:((a>b)?1:0));};function sortTextDesc(a,b){return((b<a)?-1:((b>a)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){$this.trigger("sortStart");var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){var $cell=$(this);var i=this.column;this.order=this.count++%2;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j]);}}}config.sortList.push([i,this.order]);}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2;}}}else{config.sortList.push([i,this.order]);}};setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache));},1);return false;}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false;}});$this.bind("update",function(){this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);}).bind("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache));}).bind("appendCache",function(){appendToTable(this,cache);}).bind("applyWidgetId",function(e,id){getWidgetById(id).format(this);}).bind("applyWidgets",function(){applyWidget(this);});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist;}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false;}}if(a){parsers.push(parser);};};this.addWidget=function(widget){widgets.push(widget);};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i;};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i;};this.isDigit=function(s,config){var DECIMAL='\\'+config.decimal;var exp='/(^[+]?0('+DECIMAL+'0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)'+DECIMAL+'(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*'+DECIMAL+'0+$)/';return RegExp(exp).test($.trim(s));};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild)this.removeChild(this.firstChild);}empty.apply(table.tBodies[0]);}else{table.tBodies[0].innerHTML="";}};}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true;},format:function(s){return $.trim(s.toLowerCase());},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c);},format:function(s){return $.tablesorter.formatFloat(s);},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[�$�?.]/.test(s);},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item;}else{r+=item;}}return $.tablesorter.formatFloat(r);},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/$/.test(s);},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0");},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%$/.test($.trim(s));},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2");}else if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");}else if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");}return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime());},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false;},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?'sortValue':c.parserMetadataName;return $(cell).metadata()[p];},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date();}$("tr:visible",table.tBodies[0]).filter(':even').removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]).end().filter(':odd').removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]);if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery);

// jquery easing
jQuery.easing.jswing=jQuery.easing.swing; jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,a,c,b,d){return jQuery.easing[jQuery.easing.def](e,a,c,b,d)},easeInQuad:function(e,a,c,b,d){return b*(a/=d)*a+c},easeOutQuad:function(e,a,c,b,d){return-b*(a/=d)*(a-2)+c},easeInOutQuad:function(e,a,c,b,d){return 1>(a/=d/2)?b/2*a*a+c:-b/2*(--a*(a-2)-1)+c},easeInCubic:function(e,a,c,b,d){return b*(a/=d)*a*a+c},easeOutCubic:function(e,a,c,b,d){return b*((a=a/d-1)*a*a+1)+c},easeInOutCubic:function(e,a,c,b,d){return 1>(a/=d/2)?b/2*a*a*a+c: b/2*((a-=2)*a*a+2)+c},easeInQuart:function(e,a,c,b,d){return b*(a/=d)*a*a*a+c},easeOutQuart:function(e,a,c,b,d){return-b*((a=a/d-1)*a*a*a-1)+c},easeInOutQuart:function(e,a,c,b,d){return 1>(a/=d/2)?b/2*a*a*a*a+c:-b/2*((a-=2)*a*a*a-2)+c},easeInQuint:function(e,a,c,b,d){return b*(a/=d)*a*a*a*a+c},easeOutQuint:function(e,a,c,b,d){return b*((a=a/d-1)*a*a*a*a+1)+c},easeInOutQuint:function(e,a,c,b,d){return 1>(a/=d/2)?b/2*a*a*a*a*a+c:b/2*((a-=2)*a*a*a*a+2)+c},easeInSine:function(e,a,c,b,d){return-b*Math.cos(a/ d*(Math.PI/2))+b+c},easeOutSine:function(e,a,c,b,d){return b*Math.sin(a/d*(Math.PI/2))+c},easeInOutSine:function(e,a,c,b,d){return-b/2*(Math.cos(Math.PI*a/d)-1)+c},easeInExpo:function(e,a,c,b,d){return 0==a?c:b*Math.pow(2,10*(a/d-1))+c},easeOutExpo:function(e,a,c,b,d){return a==d?c+b:b*(-Math.pow(2,-10*a/d)+1)+c},easeInOutExpo:function(e,a,c,b,d){return 0==a?c:a==d?c+b:1>(a/=d/2)?b/2*Math.pow(2,10*(a-1))+c:b/2*(-Math.pow(2,-10*--a)+2)+c},easeInCirc:function(e,a,c,b,d){return-b*(Math.sqrt(1-(a/=d)* a)-1)+c},easeOutCirc:function(e,a,c,b,d){return b*Math.sqrt(1-(a=a/d-1)*a)+c},easeInOutCirc:function(e,a,c,b,d){return 1>(a/=d/2)?-b/2*(Math.sqrt(1-a*a)-1)+c:b/2*(Math.sqrt(1-(a-=2)*a)+1)+c},easeInElastic:function(e,a,c,b,d){var e=1.70158,f=0,g=b;if(0==a)return c;if(1==(a/=d))return c+b;f||(f=0.3*d);g<Math.abs(b)?(g=b,e=f/4):e=f/(2*Math.PI)*Math.asin(b/g);return-(g*Math.pow(2,10*(a-=1))*Math.sin((a*d-e)*2*Math.PI/f))+c},easeOutElastic:function(e,a,c,b,d){var e=1.70158,f=0,g=b;if(0==a)return c;if(1== (a/=d))return c+b;f||(f=0.3*d);g<Math.abs(b)?(g=b,e=f/4):e=f/(2*Math.PI)*Math.asin(b/g);return g*Math.pow(2,-10*a)*Math.sin((a*d-e)*2*Math.PI/f)+b+c},easeInOutElastic:function(e,a,c,b,d){var e=1.70158,f=0,g=b;if(0==a)return c;if(2==(a/=d/2))return c+b;f||(f=d*0.3*1.5);g<Math.abs(b)?(g=b,e=f/4):e=f/(2*Math.PI)*Math.asin(b/g);return 1>a?-0.5*g*Math.pow(2,10*(a-=1))*Math.sin((a*d-e)*2*Math.PI/f)+c:0.5*g*Math.pow(2,-10*(a-=1))*Math.sin((a*d-e)*2*Math.PI/f)+b+c},easeInBack:function(e,a,c,b,d,f){void 0== f&&(f=1.70158);return b*(a/=d)*a*((f+1)*a-f)+c},easeOutBack:function(e,a,c,b,d,f){void 0==f&&(f=1.70158);return b*((a=a/d-1)*a*((f+1)*a+f)+1)+c},easeInOutBack:function(e,a,c,b,d,f){void 0==f&&(f=1.70158);return 1>(a/=d/2)?b/2*a*a*(((f*=1.525)+1)*a-f)+c:b/2*((a-=2)*a*(((f*=1.525)+1)*a+f)+2)+c},easeInBounce:function(e,a,c,b,d){return b-jQuery.easing.easeOutBounce(e,d-a,0,b,d)+c},easeOutBounce:function(e,a,c,b,d){return(a/=d)<1/2.75?b*7.5625*a*a+c:a<2/2.75?b*(7.5625*(a-=1.5/2.75)*a+0.75)+c:a<2.5/2.75? b*(7.5625*(a-=2.25/2.75)*a+0.9375)+c:b*(7.5625*(a-=2.625/2.75)*a+0.984375)+c},easeInOutBounce:function(e,a,c,b,d){return a<d/2?0.5*jQuery.easing.easeInBounce(e,2*a,0,b,d)+c:0.5*jQuery.easing.easeOutBounce(e,2*a-d,0,b,d)+0.5*b+c}});

//slides
(function(A){A.fn.slides=function(B){B=A.extend({},A.fn.slides.option,B);return this.each(function(){A("."+B.container,A(this)).children().wrapAll('<div class="slides_control"/>');var V=A(this),J=A(".slides_control",V),Z=J.children().size(),Q=J.children().outerWidth(),M=J.children().outerHeight(),D=B.start-1,L=B.effect.indexOf(",")<0?B.effect:B.effect.replace(" ","").split(",")[0],S=B.effect.indexOf(",")<0?L:B.effect.replace(" ","").split(",")[1],O=0,N=0,C=0,P=0,U,H,I,X,W,T,K,F;function E(c,b,a){if(!H&&U){H=true;B.animationStart(P+1);switch(c){case"next":N=P;O=P+1;O=Z===O?0:O;X=Q*2;c=-Q*2;P=O;break;case"prev":N=P;O=P-1;O=O===-1?Z-1:O;X=0;c=0;P=O;break;case"pagination":O=parseInt(a,10);N=A("."+B.paginationClass+" li."+B.currentClass+" a",V).attr("href").match("[^#/]+$");if(O>N){X=Q*2;c=-Q*2;}else{X=0;c=0;}P=O;break;}if(b==="fade"){if(B.crossfade){J.children(":eq("+O+")",V).css({zIndex:10}).fadeIn(B.fadeSpeed,B.fadeEasing,function(){if(B.autoHeight){J.animate({height:J.children(":eq("+O+")",V).outerHeight()},B.autoHeightSpeed,function(){J.children(":eq("+N+")",V).css({display:"none",zIndex:0});J.children(":eq("+O+")",V).css({zIndex:0});B.animationComplete(O+1);H=false;});}else{J.children(":eq("+N+")",V).css({display:"none",zIndex:0});J.children(":eq("+O+")",V).css({zIndex:0});B.animationComplete(O+1);H=false;}});}else{J.children(":eq("+N+")",V).fadeOut(B.fadeSpeed,B.fadeEasing,function(){if(B.autoHeight){J.animate({height:J.children(":eq("+O+")",V).outerHeight()},B.autoHeightSpeed,function(){J.children(":eq("+O+")",V).fadeIn(B.fadeSpeed,B.fadeEasing);});}else{J.children(":eq("+O+")",V).fadeIn(B.fadeSpeed,B.fadeEasing,function(){if(A.browser.msie){A(this).get(0).style.removeAttribute("filter");}});}B.animationComplete(O+1);H=false;});}}else{J.children(":eq("+O+")").css({left:X,display:"block"});if(B.autoHeight){J.animate({left:c,height:J.children(":eq("+O+")").outerHeight()},B.slideSpeed,B.slideEasing,function(){J.css({left:-Q});J.children(":eq("+O+")").css({left:Q,zIndex:5});J.children(":eq("+N+")").css({left:Q,display:"none",zIndex:0});B.animationComplete(O+1);H=false;});}else{J.animate({left:c},B.slideSpeed,B.slideEasing,function(){J.css({left:-Q});J.children(":eq("+O+")").css({left:Q,zIndex:5});J.children(":eq("+N+")").css({left:Q,display:"none",zIndex:0});B.animationComplete(O+1);H=false;});}}if(B.pagination){A("."+B.paginationClass+" li."+B.currentClass,V).removeClass(B.currentClass);A("."+B.paginationClass+" li:eq("+O+")",V).addClass(B.currentClass);}}}function R(){clearInterval(V.data("interval"));}function G(){if(B.pause){clearTimeout(V.data("pause"));clearInterval(V.data("interval"));K=setTimeout(function(){clearTimeout(V.data("pause"));F=setInterval(function(){E("next",L);},B.play);V.data("interval",F);},B.pause);V.data("pause",K);}else{R();}}if(Z<2){return ;}if(D<0){D=0;}if(D>Z){D=Z-1;}if(B.start){P=D;}if(B.randomize){J.randomize();}A("."+B.container,V).css({overflow:"hidden",position:"relative"});J.children().css({position:"absolute",top:0,left:J.children().outerWidth(),zIndex:0,display:"none"});J.css({position:"relative",width:(Q*3),height:M,left:-Q});A("."+B.container,V).css({display:"block"});if(B.autoHeight){J.children().css({height:"auto"});J.animate({height:J.children(":eq("+D+")").outerHeight()},B.autoHeightSpeed);}if(B.preload&&false&&J.find("img:eq("+D+")").length){A("."+B.container,V).css({background:"url("+B.preloadImage+") no-repeat 50% 50%"});var Y=J.find("img:eq("+D+")").attr("src");if(A("img",V).parent().attr("class")!="slides_control"){T=J.children(":eq(0)")[0].tagName.toLowerCase();}else{T=J.find("img:eq("+D+")");}J.find("img:eq("+D+")").attr("src",Y).load(function(){J.find(T+":eq("+D+")").fadeIn(B.fadeSpeed,B.fadeEasing,function(){A(this).css({zIndex:5});A("."+B.container,V).css({background:""});U=true;B.slidesLoaded();});});}else{J.children(":eq("+D+")").fadeIn(B.fadeSpeed,B.fadeEasing,function(){U=true;B.slidesLoaded();});}if(B.bigTarget){J.children().css({cursor:"pointer"});J.children().click(function(){E("next",L);return false;});}if(B.hoverPause&&B.play){J.bind("mouseover",function(){R();});J.bind("mouseleave",function(){G();});}if(B.generateNextPrev){A("."+B.container,V).after('<a href="#" class="'+B.prev+'">Prev</a>');A("."+B.prev,V).after('<a href="#" class="'+B.next+'">Next</a>');}A("."+B.next,V).click(function(a){a.preventDefault();if(B.play){G();}E("next",L);});A("."+B.prev,V).click(function(a){a.preventDefault();if(B.play){G();}E("prev",L);});if(B.generatePagination){if(B.prependPagination){V.prepend("<ul class="+B.paginationClass+"></ul>");}else{V.append("<ul class="+B.paginationClass+"></ul>");}J.children().each(function(){A("."+B.paginationClass,V).append('<li><a href="#'+C+'">'+(C+1)+"</a></li>");C++;});}else{A("."+B.paginationClass+" li a",V).each(function(){A(this).attr("href","#"+C);C++;});}A("."+B.paginationClass+" li:eq("+D+")",V).addClass(B.currentClass);A("."+B.paginationClass+" li a",V).click(function(){if(B.play){G();}I=A(this).attr("href").match("[^#/]+$");if(P!=I){E("pagination",S,I);}return false;});A("a.link",V).click(function(){if(B.play){G();}I=A(this).attr("href").match("[^#/]+$")-1;if(P!=I){E("pagination",S,I);}return false;});if(B.play){F=setInterval(function(){E("next",L);},B.play);V.data("interval",F);}});};A.fn.slides.option={preload:false,preloadImage:"/img/loading.gif",container:"slides_container",generateNextPrev:false,next:"next",prev:"prev",pagination:true,generatePagination:true,prependPagination:false,paginationClass:"pagination",currentClass:"current",fadeSpeed:350,fadeEasing:"",slideSpeed:350,slideEasing:"",start:1,effect:"slide",crossfade:false,randomize:false,play:0,pause:0,hoverPause:false,autoHeight:false,autoHeightSpeed:350,bigTarget:false,animationStart:function(){},animationComplete:function(){},slidesLoaded:function(){}};A.fn.randomize=function(C){function B(){return(Math.round(Math.random())-0.5);}return(A(this).each(function(){var F=A(this);var E=F.children();var D=E.length;if(D>1){E.hide();var G=[];for(i=0;i<D;i++){G[G.length]=i;}G=G.sort(B);A.each(G,function(I,H){var K=E.eq(H);var J=K.clone(true);J.show().appendTo(F);if(C!==undefined){C(K,J);}K.remove();});}}));};})(jQuery);

//dates
Date.dayNames="Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(",");Date.abbrDayNames="Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",");Date.monthNames="January,February,March,April,May,June,July,August,September,October,November,December".split(",");Date.abbrMonthNames="Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(",");Date.firstDayOfWeek=1;Date.format="dd/mm/yyyy";Date.fullYearStart="20"; (function(){function b(a,b){Date.prototype[a]||(Date.prototype[a]=b)}b("isLeapYear",function(){var a=this.getFullYear();return 0==a%4&&0!=a%100||0==a%400});b("isWeekend",function(){return 0==this.getDay()||6==this.getDay()});b("isWeekDay",function(){return!this.isWeekend()});b("getDaysInMonth",function(){return[31,this.isLeapYear()?29:28,31,30,31,30,31,31,30,31,30,31][this.getMonth()]});b("getDayName",function(a){return a?Date.abbrDayNames[this.getDay()]:Date.dayNames[this.getDay()]});b("getMonthName", function(a){return a?Date.abbrMonthNames[this.getMonth()]:Date.monthNames[this.getMonth()]});b("getDayOfYear",function(){var a=new Date("1/1/"+this.getFullYear());return Math.floor((this.getTime()-a.getTime())/864E5)});b("getWeekOfYear",function(){return Math.ceil(this.getDayOfYear()/7)});b("setDayOfYear",function(a){this.setMonth(0);this.setDate(a);return this});b("addYears",function(a){this.setFullYear(this.getFullYear()+a);return this});b("addMonths",function(a){var b=this.getDate();this.setMonth(this.getMonth()+ a);b>this.getDate()&&this.addDays(-this.getDate());return this});b("addDays",function(a){this.setTime(this.getTime()+864E5*a);return this});b("addHours",function(a){this.setHours(this.getHours()+a);return this});b("addMinutes",function(a){this.setMinutes(this.getMinutes()+a);return this});b("addSeconds",function(a){this.setSeconds(this.getSeconds()+a);return this});b("zeroTime",function(){this.setMilliseconds(0);this.setSeconds(0);this.setMinutes(0);this.setHours(0);return this});b("asString",function(a){a= a||Date.format;a=1<a.split("mm").length?a.split("mmmm").join(this.getMonthName(!1)).split("mmm").join(this.getMonthName(!0)).split("mm").join(h(this.getMonth()+1)):a.split("m").join(this.getMonth()+1);return a=a.split("yyyy").join(this.getFullYear()).split("yy").join((this.getFullYear()+"").substring(2)).split("dd").join(h(this.getDate())).split("d").join(this.getDate())});Date.fromString=function(a){var b=Date.format,d=new Date("01/01/1970");if(""==a)return d;for(var a=a.toLowerCase(),c="",g=[], e=/(dd?d?|mm?m?|yy?yy?)+([^(m|d|y)])?/g,f;null!=(f=e.exec(b));){switch(f[1]){case "d":case "dd":case "m":case "mm":case "yy":case "yyyy":c+="(\\d+\\d?\\d?\\d?)+";g.push(f[1].substr(0,1));break;case "mmm":c+="([a-z]{3})",g.push("M")}f[2]&&(c+=f[2])}a=a.match(RegExp(c));for(b=0;b<g.length;b++)switch(c=a[b+1],g[b]){case "d":d.setDate(c);break;case "m":d.setMonth(Number(c)-1);break;case "M":for(e=0;e<Date.abbrMonthNames.length&&!(Date.abbrMonthNames[e].toLowerCase()==c);e++);d.setMonth(e);break;case "y":d.setYear(c)}return d}; var h=function(a){a="0"+a;return a.substring(a.length-2)}})();
			
// date picker Copyright (c) 2008 Kelvin Luck (http://www.kelvinluck.com/)
(function(b){function k(a){this.ele=a;this.button=this.horizontalOffset=this.verticalOffset=this.horizontalPosition=this.verticalPosition=this.numSelected=this.numSelectable=this.selectMultiple=this.rememberViewedMonth=this.displayClose=this.closeOnSelect=this.showYearNavigation=this.endDate=this.startDate=this.displayedYear=this.displayedMonth=null;this.renderCallback=[];this.selectedDates={};this.inline=null;this.context="#dp-popup";this.settings={}}b.fn.extend({renderCalendar:function(a){a=b.extend({}, b.fn.datePicker.defaults,a);if(a.showHeader!=b.dpConst.SHOW_HEADER_NONE)for(var c=b(document.createElement("tr")),d=Date.firstDayOfWeek;d<Date.firstDayOfWeek+7;d++){var e=d%7,f=Date.dayNames[e];c.append(jQuery(document.createElement("th")).attr({scope:"col",abbr:f,title:f,"class":0==e||6==e?"weekend":"weekday"}).html(a.showHeader==b.dpConst.SHOW_HEADER_SHORT?f.substr(0,1):f))}var h=b(document.createElement("table")).attr({cellspacing:2}).addClass("jCalendar").append(a.showHeader!=b.dpConst.SHOW_HEADER_NONE? b(document.createElement("thead")).append(c):document.createElement("thead")),c=b(document.createElement("tbody")),e=(new Date).zeroTime();e.setHours(12);var f=void 0==a.month?e.getMonth():a.month,g=a.year||e.getFullYear(),i=new Date(g,f,1,12,0,0),d=Date.firstDayOfWeek-i.getDay()+1;1<d&&(d-=7);var m=Math.ceil((-1*d+1+i.getDaysInMonth())/7);i.addDays(d-1);for(var k=function(c){return function(){if(a.hoverClass){var e=b(this);a.selectWeek?c&&!e.is(".disabled")&&e.parent().addClass("activeWeekHover"): e.addClass(a.hoverClass)}}},n=function(){if(a.hoverClass){var c=b(this);c.removeClass(a.hoverClass);c.parent().removeClass("activeWeekHover")}},o=0;o++<m;){for(var l=jQuery(document.createElement("tr")),p=a.dpController?i>a.dpController.startDate:!1,d=0;7>d;d++){var j=i.getMonth()==f,j=b(document.createElement("td")).text(i.getDate()+"").addClass((j?"current-month ":"other-month ")+(i.isWeekend()?"weekend ":"weekday ")+(j&&i.getTime()==e.getTime()?"today ":"")).data("datePickerDate",i.asString()).hover(k(p), n);l.append(j);a.renderCallback&&a.renderCallback(j,i,f,g);i=new Date(i.getFullYear(),i.getMonth(),i.getDate()+1,12,0,0)}c.append(l)}h.append(c);return this.each(function(){b(this).empty().append(h)})},datePicker:function(a){if(!b.event._dpCache)b.event._dpCache=[];a=b.extend({},b.fn.datePicker.defaults,a);return this.each(function(){var c=b(this),d=!0;if(!this._dpId)this._dpId=b.event.guid++,b.event._dpCache[this._dpId]=new k(this),d=!1;if(a.inline)a.createButton=!1,a.displayClose=!1,a.closeOnSelect= !1,c.empty();var e=b.event._dpCache[this._dpId];e.init(a);if(!d&&a.createButton)e.button=b('<a href="#" class="dp-choose-date" title="'+b.dpText.TEXT_CHOOSE_DATE+'">'+b.dpText.TEXT_CHOOSE_DATE+"</a>").bind("click",function(){c.dpDisplay(this);this.blur();return!1}),c.after(e.button);!d&&c.is(":text")&&(c.bind("dateSelected",function(a,b){this.value=b.asString()}).bind("change",function(){if(""==this.value)e.clearSelected();else{var a=Date.fromString(this.value);a&&e.setSelected(a,!0,!0)}}),a.clickInput&& c.bind("click",function(){c.trigger("change");c.dpDisplay()}),d=Date.fromString(this.value),""!=this.value&&d&&e.setSelected(d,!0,!0));c.addClass("dp-applied")})},dpSetDisabled:function(a){return g.call(this,"setDisabled",a)},dpSetStartDate:function(a){return g.call(this,"setStartDate",a)},dpSetEndDate:function(a){return g.call(this,"setEndDate",a)},dpGetSelected:function(){var a=this[0]._dpId?b.event._dpCache[this[0]._dpId]:!1;return a?a.getSelected():null},dpSetSelected:function(a,b,d,e){void 0== b&&(b=!0);void 0==d&&(d=!0);void 0==e&&(e=!0);return g.call(this,"setSelected",Date.fromString(a),b,d,e)},dpSetDisplayedMonth:function(a,b){return g.call(this,"setDisplayedMonth",Number(a),Number(b),!0)},dpDisplay:function(a){return g.call(this,"display",a)},dpSetRenderCallback:function(a){return g.call(this,"setRenderCallback",a)},dpSetPosition:function(a,b){return g.call(this,"setPosition",a,b)},dpSetOffset:function(a,b){return g.call(this,"setOffset",a,b)},dpClose:function(){return g.call(this, "_closeCalendar",!1,this[0])},_dpDestroy:function(){}});var g=function(a,c,d,e,f){return this.each(function(){var h=this._dpId?b.event._dpCache[this._dpId]:!1;if(h)h[a](c,d,e,f)})};b.extend(k.prototype,{init:function(a){this.setStartDate(a.startDate);this.setEndDate(a.endDate);this.setDisplayedMonth(Number(a.month),Number(a.year));this.setRenderCallback(a.renderCallback);this.showYearNavigation=a.showYearNavigation;this.closeOnSelect=a.closeOnSelect;this.displayClose=a.displayClose;this.rememberViewedMonth= a.rememberViewedMonth;this.numSelectable=(this.selectMultiple=a.selectMultiple)?a.numSelectable:1;this.numSelected=0;this.verticalPosition=a.verticalPosition;this.horizontalPosition=a.horizontalPosition;this.hoverClass=a.hoverClass;this.setOffset(a.verticalOffset,a.horizontalOffset);this.inline=a.inline;this.settings=a;if(this.inline)this.context=this.ele,this.display()},setStartDate:function(a){if(a)this.startDate=Date.fromString(a);if(!this.startDate)this.startDate=(new Date).zeroTime();this.setDisplayedMonth(this.displayedMonth, this.displayedYear)},setEndDate:function(a){if(a)this.endDate=Date.fromString(a);if(!this.endDate)this.endDate=new Date("12/31/2999");if(this.endDate.getTime()<this.startDate.getTime())this.endDate=this.startDate;this.setDisplayedMonth(this.displayedMonth,this.displayedYear)},setPosition:function(a,b){this.verticalPosition=a;this.horizontalPosition=b},setOffset:function(a,b){this.verticalOffset=parseInt(a)||0;this.horizontalOffset=parseInt(b)||0},setDisabled:function(a){$e=b(this.ele);$e[a?"addClass": "removeClass"]("dp-disabled");this.button&&($but=b(this.button),$but[a?"addClass":"removeClass"]("dp-disabled"),$but.attr("title",a?"":b.dpText.TEXT_CHOOSE_DATE));$e.is(":text")&&$e.attr("disabled",a?"disabled":"")},setDisplayedMonth:function(a,c,d){if(!(void 0==this.startDate||void 0==this.endDate)){var e=new Date(this.startDate.getTime());e.setDate(1);var f=new Date(this.endDate.getTime());f.setDate(1);!a&&!c||isNaN(a)&&isNaN(c)?(a=(new Date).zeroTime(),a.setDate(1)):a=isNaN(a)?new Date(c,this.displayedMonth, 1):isNaN(c)?new Date(this.displayedYear,a,1):new Date(c,a,1);a.getTime()<e.getTime()?a=e:a.getTime()>f.getTime()&&(a=f);e=this.displayedMonth;f=this.displayedYear;this.displayedMonth=a.getMonth();this.displayedYear=a.getFullYear();if(d&&(this.displayedMonth!=e||this.displayedYear!=f))this._rerenderCalendar(),b(this.ele).trigger("dpMonthChanged",[this.displayedMonth,this.displayedYear])}},setSelected:function(a,c,d,e){if(!(a<this.startDate||a>this.endDate)){var f=this.settings;if(f.selectWeek&&(a= a.addDays(-(a.getDay()-Date.firstDayOfWeek+7)%7),a<this.startDate))return;if(c!=this.isSelected(a)){if(!1==this.selectMultiple)this.clearSelected();else if(c&&this.numSelected==this.numSelectable)return;d&&(this.displayedMonth!=a.getMonth()||this.displayedYear!=a.getFullYear())&&this.setDisplayedMonth(a.getMonth(),a.getFullYear(),!0);this.selectedDates[a.asString()]=c;this.numSelected+=c?1:-1;var d="td."+(a.getMonth()==this.displayedMonth?"current-month":"other-month"),h;b(d,this.context).each(function(){if(b(this).data("datePickerDate")== a.asString()){h=b(this);if(f.selectWeek)h.parent()[c?"addClass":"removeClass"]("selectedWeek");h[c?"addClass":"removeClass"]("selected")}});b("td",this.context).not(".selected")[this.selectMultiple&&this.numSelected==this.numSelectable?"addClass":"removeClass"]("unselectable");e&&(f=this.isSelected(a),$e=b(this.ele),e=Date.fromString(a.asString()),$e.trigger("dateSelected",[e,h,f]),$e.trigger("change"))}}},isSelected:function(a){return this.selectedDates[a.asString()]},getSelected:function(){var a= [];for(s in this.selectedDates)!0==this.selectedDates[s]&&a.push(Date.fromString(s));return a},clearSelected:function(){this.selectedDates={};this.numSelected=0;b("td.selected",this.context).removeClass("selected").parent().removeClass("selectedWeek")},display:function(a){if(!b(this.ele).is(".dp-disabled")){var a=a||this.ele,c=this,a=b(a),d=a.offset(),e,f,h;c.inline?(e=b(this.ele),f={id:"calendar-"+this.ele._dpId,"class":"dp-popup dp-popup-inline"},b(".dp-popup",e).remove(),h={}):(e=b("body"),f={id:"dp-popup", "class":"dp-popup"},h={top:d.top+c.verticalOffset,left:d.left+c.horizontalOffset},this._checkMouse=function(a){for(var a=a.target,e=b("#dp-popup")[0];;){if(a==e)return!0;if(a==document)return c._closeCalendar(),!1;a=b(a).parent()[0]}},c._closeCalendar(!0),b(document).bind("keydown.datepicker",function(a){27==a.keyCode&&c._closeCalendar()}));if(!c.rememberViewedMonth){var g=this.getSelected()[0];g&&(g=new Date(g),this.setDisplayedMonth(g.getMonth(),g.getFullYear(),!1))}e.append(b("<div></div>").attr(f).css(h).append(b("<h2></h2>"), b('<div class="dp-nav-prev"></div>').append(b('<a class="dp-nav-prev-year" href="#" title="'+b.dpText.TEXT_PREV_YEAR+'">&lt;&lt;</a>').bind("click",function(){return c._displayNewMonth.call(c,this,0,-1)}),b('<a class="dp-nav-prev-month" href="#" title="'+b.dpText.TEXT_PREV_MONTH+'">&lt;</a>').bind("click",function(){return c._displayNewMonth.call(c,this,-1,0)})),b('<div class="dp-nav-next"></div>').append(b('<a class="dp-nav-next-year" href="#" title="'+b.dpText.TEXT_NEXT_YEAR+'">&gt;&gt;</a>').bind("click", function(){return c._displayNewMonth.call(c,this,0,1)}),b('<a class="dp-nav-next-month" href="#" title="'+b.dpText.TEXT_NEXT_MONTH+'">&gt;</a>').bind("click",function(){return c._displayNewMonth.call(c,this,1,0)})),b('<div class="dp-calendar"></div>')).bgIframe());e=this.inline?b(".dp-popup",this.context):b("#dp-popup");!1==this.showYearNavigation&&b(".dp-nav-prev-year, .dp-nav-next-year",c.context).css("display","none");this.displayClose&&e.append(b('<a href="#" id="dp-close">'+b.dpText.TEXT_CLOSE+ "</a>").bind("click",function(){c._closeCalendar();return!1}));c._renderCalendar();b(this.ele).trigger("dpDisplayed",e);c.inline||(this.verticalPosition==b.dpConst.POS_BOTTOM&&e.css("top",d.top+a.height()-e.height()+c.verticalOffset),this.horizontalPosition==b.dpConst.POS_RIGHT&&e.css("left",d.left+a.width()-e.width()+c.horizontalOffset),b(document).bind("mousedown.datepicker",this._checkMouse))}},setRenderCallback:function(a){if(null!=a)a&&"function"==typeof a&&(a=[a]),this.renderCallback=this.renderCallback.concat(a)}, cellRender:function(a,c){var d=this.dpController,e=new Date(c.getTime());a.bind("click",function(){var a=b(this);a.is(".disabled")||(d.setSelected(e,!a.is(".selected")||!d.selectMultiple,!1,!0),d.closeOnSelect&&d._closeCalendar(),b.browser.msie||b(d.ele).trigger("focus",[b.dpConst.DP_INTERNAL_FOCUS]))});d.isSelected(e)?(a.addClass("selected"),d.settings.selectWeek&&a.parent().addClass("selectedWeek")):d.selectMultiple&&d.numSelected==d.numSelectable&&a.addClass("unselectable")},_applyRenderCallbacks:function(){var a= this;b("td",this.context).each(function(){for(var c=0;c<a.renderCallback.length;c++)$td=b(this),a.renderCallback[c].apply(this,[$td,Date.fromString($td.data("datePickerDate")),a.displayedMonth,a.displayedYear])})},_displayNewMonth:function(a,c,d){b(a).is(".disabled")||this.setDisplayedMonth(this.displayedMonth+c,this.displayedYear+d,!0);a.blur();return!1},_rerenderCalendar:function(){this._clearCalendar();this._renderCalendar()},_renderCalendar:function(){b("h2",this.context).html((new Date(this.displayedYear, this.displayedMonth,1)).asString(b.dpText.HEADER_FORMAT));b(".dp-calendar",this.context).renderCalendar(b.extend({},this.settings,{month:this.displayedMonth,year:this.displayedYear,renderCallback:this.cellRender,dpController:this,hoverClass:this.hoverClass}));if(this.displayedYear==this.startDate.getFullYear()&&this.displayedMonth==this.startDate.getMonth()){b(".dp-nav-prev-year",this.context).addClass("disabled");b(".dp-nav-prev-month",this.context).addClass("disabled");b(".dp-calendar td.other-month", this.context).each(function(){var a=b(this);20<Number(a.text())&&a.addClass("disabled")});var a=this.startDate.getDate();b(".dp-calendar td.current-month",this.context).each(function(){var c=b(this);Number(c.text())<a&&c.addClass("disabled")})}else if(b(".dp-nav-prev-year",this.context).removeClass("disabled"),b(".dp-nav-prev-month",this.context).removeClass("disabled"),a=this.startDate.getDate(),20<a){var c=this.startDate.getTime(),d=new Date(c);d.addMonths(1);this.displayedYear==d.getFullYear()&& this.displayedMonth==d.getMonth()&&b(".dp-calendar td.other-month",this.context).each(function(){var a=b(this);Date.fromString(a.data("datePickerDate")).getTime()<c&&a.addClass("disabled")})}this.displayedYear==this.endDate.getFullYear()&&this.displayedMonth==this.endDate.getMonth()?(b(".dp-nav-next-year",this.context).addClass("disabled"),b(".dp-nav-next-month",this.context).addClass("disabled"),b(".dp-calendar td.other-month",this.context).each(function(){var a=b(this);14>Number(a.text())&&a.addClass("disabled")}), a=this.endDate.getDate(),b(".dp-calendar td.current-month",this.context).each(function(){var c=b(this);Number(c.text())>a&&c.addClass("disabled")})):(b(".dp-nav-next-year",this.context).removeClass("disabled"),b(".dp-nav-next-month",this.context).removeClass("disabled"),a=this.endDate.getDate(),13>a&&(d=new Date(this.endDate.getTime()),d.addMonths(-1),this.displayedYear==d.getFullYear()&&this.displayedMonth==d.getMonth()&&b(".dp-calendar td.other-month",this.context).each(function(){var c=b(this), d=Number(c.text());13>d&&d>a&&c.addClass("disabled")})));this._applyRenderCallbacks()},_closeCalendar:function(a,c){if(!c||c==this.ele)b(document).unbind("mousedown.datepicker"),b(document).unbind("keydown.datepicker"),this._clearCalendar(),b("#dp-popup a").unbind(),b("#dp-popup").empty().remove(),a||b(this.ele).trigger("dpClosed",[this.getSelected()])},_clearCalendar:function(){b(".dp-calendar td",this.context).unbind();b(".dp-calendar",this.context).empty()}});b.dpConst={SHOW_HEADER_NONE:0,SHOW_HEADER_SHORT:1, SHOW_HEADER_LONG:2,POS_TOP:0,POS_BOTTOM:1,POS_LEFT:0,POS_RIGHT:1,DP_INTERNAL_FOCUS:"dpInternalFocusTrigger"};b.dpText={TEXT_PREV_YEAR:"Previous year",TEXT_PREV_MONTH:"Previous month",TEXT_NEXT_YEAR:"Next year",TEXT_NEXT_MONTH:"Next month",TEXT_CLOSE:"Close",TEXT_CHOOSE_DATE:"Choose date",HEADER_FORMAT:"mmmm yyyy"};b.dpVersion="$Id: jquery.datePicker.js 84 2009-08-05 17:54:35Z kelvin.luck@gmail.com $";b.fn.datePicker.defaults={month:void 0,year:void 0,showHeader:b.dpConst.SHOW_HEADER_SHORT,startDate:void 0, endDate:void 0,inline:!1,renderCallback:null,createButton:!0,showYearNavigation:!0,closeOnSelect:!0,displayClose:!1,selectMultiple:!1,numSelectable:Number.MAX_VALUE,clickInput:!1,rememberViewedMonth:!0,selectWeek:!1,verticalPosition:b.dpConst.POS_TOP,horizontalPosition:b.dpConst.POS_LEFT,verticalOffset:0,horizontalOffset:0,hoverClass:"dp-hover"};if(void 0==b.fn.bgIframe)b.fn.bgIframe=function(){return this};b(window).bind("unload",function(){var a=b.event._dpCache||[],c;for(c in a)b(a[c].ele)._dpDestroy()})})(jQuery);

// jQuery.ScrollTo - Easy element scrolling using jQuery.
// Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);

// ColorBox v1.3.17.2 - a full featured, light-weight, customizable lightbox based on jQuery 1.3+
// Copyright (c) 2011 Jack Moore - jack@colorpowered.com
// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
(function(a,b,c){function bc(b){if(!U){P=b,_(),y=a(P),Q=0,K.rel!=="nofollow"&&(y=a("."+g).filter(function(){var b=a.data(this,e).rel||this.rel;return b===K.rel}),Q=y.index(P),Q===-1&&(y=y.add(P),Q=y.length-1));if(!S){S=T=!0,r.show();if(K.returnFocus)try{P.blur(),a(P).one(l,function(){try{this.focus()}catch(a){}})}catch(c){}q.css({opacity:+K.opacity,cursor:K.overlayClose?"pointer":"auto"}).show(),K.w=Z(K.initialWidth,"x"),K.h=Z(K.initialHeight,"y"),X.position(),o&&z.bind("resize."+p+" scroll."+p,function(){q.css({width:z.width(),height:z.height(),top:z.scrollTop(),left:z.scrollLeft()})}).trigger("resize."+p),ba(h,K.onOpen),J.add(D).hide(),I.html(K.close).show()}X.load(!0)}}function bb(){var a,b=f+"Slideshow_",c="click."+f,d,e,g;K.slideshow&&y[1]?(d=function(){F.text(K.slideshowStop).unbind(c).bind(j,function(){if(Q<y.length-1||K.loop)a=setTimeout(X.next,K.slideshowSpeed)}).bind(i,function(){clearTimeout(a)}).one(c+" "+k,e),r.removeClass(b+"off").addClass(b+"on"),a=setTimeout(X.next,K.slideshowSpeed)},e=function(){clearTimeout(a),F.text(K.slideshowStart).unbind([j,i,k,c].join(" ")).one(c,d),r.removeClass(b+"on").addClass(b+"off")},K.slideshowAuto?d():e()):r.removeClass(b+"off "+b+"on")}function ba(b,c){c&&c.call(P),a.event.trigger(b)}function _(b){K=a.extend({},a.data(P,e));for(b in K)a.isFunction(K[b])&&b.substring(0,2)!=="on"&&(K[b]=K[b].call(P));K.rel=K.rel||P.rel||"nofollow",K.href=K.href||a(P).attr("href"),K.title=K.title||P.title,typeof K.href=="string"&&(K.href=a.trim(K.href))}function $(a){return K.photo||/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i.test(a)}function Z(a,b){return Math.round((/%/.test(a)?(b==="x"?z.width():z.height())/100:1)*parseInt(a,10))}function Y(c,d,e){e=b.createElement("div"),c&&(e.id=f+c),e.style.cssText=d||"";return a(e)}var d={transition:"elastic",speed:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,current:"image {current} of {total}",previous:"previous",next:"next",close:"",open:!1,returnFocus:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:!1},e="colorbox",f="cbox",g=f+"Element",h=f+"_open",i=f+"_load",j=f+"_complete",k=f+"_cleanup",l=f+"_closed",m=f+"_purge",n=a.browser.msie&&!a.support.opacity,o=n&&a.browser.version<7,p=f+"_IE6",q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X;X=a.fn[e]=a[e]=function(b,c){var f=this;b=b||{};if(!f[0]){if(f.selector)return f;f=a("<a/>"),b.open=!0}c&&(b.onComplete=c),f.each(function(){a.data(this,e,a.extend({},a.data(this,e)||d,b)),a(this).addClass(g)}),(a.isFunction(b.open)&&b.open.call(f)||b.open)&&bc(f[0]);return f},X.init=function(){z=a(c),r=Y().attr({id:e,"class":n?f+(o?"IE6":"IE"):""}),q=Y("Overlay",o?"position:absolute":"").hide(),s=Y("Wrapper"),t=Y("Content").append(A=Y("LoadedContent","width:0; height:0; overflow:hidden"),C=Y("LoadingOverlay").add(Y("LoadingGraphic")),D=Y("Title"),E=Y("Current"),G=Y("Next"),H=Y("Previous"),F=Y("Slideshow").bind(h,bb),I=Y("Close")),s.append(Y().append(Y("TopLeft"),u=Y("TopCenter"),Y("TopRight")),Y(!1,"clear:left").append(v=Y("MiddleLeft"),t,w=Y("MiddleRight")),Y(!1,"clear:left").append(Y("BottomLeft"),x=Y("BottomCenter"),Y("BottomRight"))).children().children().css({"float":"left"}),B=Y(!1,"position:absolute; width:9999px; visibility:hidden; display:none"),a("body").prepend(q,r.append(s,B)),t.children().hover(function(){a(this).addClass("hover")},function(){a(this).removeClass("hover")}).addClass("hover"),L=u.height()+x.height()+t.outerHeight(!0)-t.height(),M=v.width()+w.width()+t.outerWidth(!0)-t.width(),N=A.outerHeight(!0),O=A.outerWidth(!0),r.css({"padding-bottom":L,"padding-right":M}).hide(),G.click(function(){X.next()}),H.click(function(){X.prev()}),I.click(function(){X.close()}),J=G.add(H).add(E).add(F),t.children().removeClass("hover"),q.click(function(){K.overlayClose&&X.close()}),a(b).bind("keydown."+f,function(a){var b=a.keyCode;S&&K.escKey&&b===27&&(a.preventDefault(),X.close()),S&&K.arrowKey&&y[1]&&(b===37?(a.preventDefault(),H.click()):b===39&&(a.preventDefault(),G.click()))})},X.remove=function(){r.add(q).remove(),a("."+g).removeData(e).removeClass(g)},X.position=function(a,c){function g(a){u[0].style.width=x[0].style.width=t[0].style.width=a.style.width,C[0].style.height=C[1].style.height=t[0].style.height=v[0].style.height=w[0].style.height=a.style.height}var d=0,e=0;z.unbind("resize."+f),r.hide(),K.fixed&&!o?r.css({position:"fixed"}):(d=z.scrollTop(),e=z.scrollLeft(),r.css({position:"absolute"})),K.right!==!1?e+=Math.max(z.width()-K.w-O-M-Z(K.right,"x"),0):K.left!==!1?e+=Z(K.left,"x"):e+=Math.round(Math.max(z.width()-K.w-O-M,0)/2),K.bottom!==!1?d+=Math.max(b.documentElement.clientHeight-K.h-N-L-Z(K.bottom,"y"),0):K.top!==!1?d+=Z(K.top,"y"):d+=Math.round(Math.max(b.documentElement.clientHeight-K.h-N-L,0)/2),r.show(),a=r.width()===K.w+O&&r.height()===K.h+N?0:a||0,s[0].style.width=s[0].style.height="9999px",r.dequeue().animate({width:K.w+O,height:K.h+N,top:d,left:e},{duration:a,complete:function(){g(this),T=!1,s[0].style.width=K.w+O+M+"px",s[0].style.height=K.h+N+L+"px",c&&c(),setTimeout(function(){z.bind("resize."+f,X.position)},1)},step:function(){g(this)}})},X.resize=function(a){if(S){a=a||{},a.width&&(K.w=Z(a.width,"x")-O-M),a.innerWidth&&(K.w=Z(a.innerWidth,"x")),A.css({width:K.w}),a.height&&(K.h=Z(a.height,"y")-N-L),a.innerHeight&&(K.h=Z(a.innerHeight,"y"));if(!a.innerHeight&&!a.height){var b=A.wrapInner("<div style='overflow:auto'></div>").children();K.h=b.height(),b.replaceWith(b.children())}A.css({height:K.h}),X.position(K.transition==="none"?0:K.speed)}},X.prep=function(b){function h(){K.h=K.h||A.height(),K.h=K.mh&&K.mh<K.h?K.mh:K.h;return K.h}function g(){K.w=K.w||A.width(),K.w=K.mw&&K.mw<K.w?K.mw:K.w;return K.w}if(!!S){var c,d=K.transition==="none"?0:K.speed;A.remove(),A=Y("LoadedContent").append(b),A.hide().appendTo(B.show()).css({width:g(),overflow:K.scrolling?"auto":"hidden"}).css({height:h()}).prependTo(t),B.hide(),a(R).css({"float":"none"}),o&&a("select").not(r.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(k,function(){this.style.visibility="inherit"}),c=function(){function o(){n&&r[0].style.removeAttribute("filter")}var b,c,g,h,i=y.length,k,l;!S||(l=function(){clearTimeout(W),C.hide(),ba(j,K.onComplete)},n&&R&&A.fadeIn(100),D.html(K.title).add(A).show(),i>1?(typeof K.current=="string"&&E.html(K.current.replace("{current}",Q+1).replace("{total}",i)).show(),G[K.loop||Q<i-1?"show":"hide"]().html(K.next),H[K.loop||Q?"show":"hide"]().html(K.previous),b=Q?y[Q-1]:y[i-1],g=Q<i-1?y[Q+1]:y[0],K.slideshow&&F.show(),K.preloading&&(h=a.data(g,e).href||g.href,c=a.data(b,e).href||b.href,h=a.isFunction(h)?h.call(g):h,c=a.isFunction(c)?c.call(b):c,$(h)&&(a("<img/>")[0].src=h),$(c)&&(a("<img/>")[0].src=c))):J.hide(),K.iframe?(k=a("<iframe/>").addClass(f+"Iframe")[0],K.fastIframe?l():a(k).one("load",l),k.name=f+ +(new Date),k.src=K.href,K.scrolling||(k.scrolling="no"),n&&(k.frameBorder=0,k.allowTransparency="true"),a(k).appendTo(A).one(m,function(){k.src="//about:blank"})):l(),K.transition==="fade"?r.fadeTo(d,1,o):o())},K.transition==="fade"?r.fadeTo(d,0,function(){X.position(0,c)}):X.position(d,c)}},X.load=function(b){var c,d,e=X.prep;T=!0,R=!1,P=y[Q],b||_(),ba(m),ba(i,K.onLoad),K.h=K.height?Z(K.height,"y")-N-L:K.innerHeight&&Z(K.innerHeight,"y"),K.w=K.width?Z(K.width,"x")-O-M:K.innerWidth&&Z(K.innerWidth,"x"),K.mw=K.w,K.mh=K.h,K.maxWidth&&(K.mw=Z(K.maxWidth,"x")-O-M,K.mw=K.w&&K.w<K.mw?K.w:K.mw),K.maxHeight&&(K.mh=Z(K.maxHeight,"y")-N-L,K.mh=K.h&&K.h<K.mh?K.h:K.mh),c=K.href,W=setTimeout(function(){C.show()},100),K.inline?(Y().hide().insertBefore(a(c)[0]).one(m,function(){a(this).replaceWith(A.children())}),e(a(c))):K.iframe?e(" "):K.html?e(K.html):$(c)?(a(R=new Image).addClass(f+"Photo").error(function(){K.title=!1,e(Y("Error").text("This image could not be loaded"))}).load(function(){var a;R.onload=null,K.scalePhotos&&(d=function(){R.height-=R.height*a,R.width-=R.width*a},K.mw&&R.width>K.mw&&(a=(R.width-K.mw)/R.width,d()),K.mh&&R.height>K.mh&&(a=(R.height-K.mh)/R.height,d())),K.h&&(R.style.marginTop=Math.max(K.h-R.height,0)/2+"px"),y[1]&&(Q<y.length-1||K.loop)&&(R.style.cursor="pointer",R.onclick=function(){X.next()}),n&&(R.style.msInterpolationMode="bicubic"),setTimeout(function(){e(R)},1)}),setTimeout(function(){R.src=c},1)):c&&B.load(c,K.data,function(b,c,d){e(c==="error"?Y("Error").text("Request unsuccessful: "+d.statusText):a(this).contents())})},X.next=function(){!T&&y[1]&&(Q<y.length-1||K.loop)&&(Q=Q<y.length-1?Q+1:0,X.load())},X.prev=function(){!T&&y[1]&&(Q||K.loop)&&(Q=Q?Q-1:y.length-1,X.load())},X.close=function(){S&&!U&&(U=!0,S=!1,ba(k,K.onCleanup),z.unbind("."+f+" ."+p),q.fadeTo(200,0),r.stop().fadeTo(300,0,function(){r.add(q).css({opacity:1,cursor:"auto"}).hide(),ba(m),A.remove(),setTimeout(function(){U=!1,ba(l,K.onClosed)},1)}))},X.element=function(){return a(P)},X.settings=d,V=function(a){a.button!==0&&typeof a.button!="undefined"||a.ctrlKey||a.shiftKey||a.altKey||(a.preventDefault(),bc(this))},a.fn.delegate?a(b).delegate("."+g,"click",V):a("."+g).live("click",V),a(X.init)})(jQuery,document,this);
/*
	Equalizer v1.0.1 minified using Google Closure Compiler
	Original by Chris Coyier: http://css-tricks.com/equal-height-blocks-in-rows/
	from an idea by Stephen Akins: http://stephenakins.blogspot.com/2011/01/uniform-div-heights-for-liquid-css-p.html
	with ideas from Mike Avello: https://github.com/madmike1029/matchHeights
	converted into a plugin with some improvements by Rob Garrison: https://github.com/Mottie
*/
(function(b){b.fn.equalizer=function(e){var a={};b("body").data("Equalizer",a);a.$el=b(this);a.options=b.extend({},b.equalizerDefaults,e);a.init=function(){a.options.min=parseInt(a.options.min,10)||0;a.options.max=parseInt(a.options.max,10)||0;a.hasMax=a.options.max===0?!1:!0;a.hasMin=a.options.min===0?!1:!0;a.curRowTop=0;a.useHeight=/^o/.test(a.options.useHeight)?"outerHeight":/^i/.test(a.options.useHeight)?"innerHeight":"height";a.options.resizeable&&(a.$el.wrapInner('<span class="equalizer-inner" style="display:block;margin:0;padding:0;" />'), b(window).resize(function(){clearTimeout(a.throttle);a.throttle=setTimeout(function(){a.equalz()},100)}));a.equalz()};a.equalz=function(){a.curMax=a.options.min;a.$el.removeClass(a.options.overflow).each(function(){var c=b(this),d=a.options.resizeable?c.find("span.equalizer-inner"):c;a.curTop=c.offset().top;if(a.curRowTop!==a.curTop){if(a.hasMax&&a.curMax>a.options.max)a.curMax=a.options.max,a.curRows.addClass(a.options.overflow);a.curRows&&a.curRows.height(a.curMax);a.curMax=d[a.useHeight]();a.curMax= a.hasMin?Math.max(a.options.min,a.curMax):a.curMax;a.curRowTop=a.curTop;a.curRows=c}else a.curMax=Math.max(a.curMax,d[a.useHeight]()),a.curMax=a.hasMax&&a.curMax>a.options.max?a.options.max:a.hasMin&&a.curMax<a.options.min?a.options.min:a.curMax,a.curRows=a.curRows.add(c);a.curRows&&(a.curRows.height(a.curMax),a.hasMax&&a.curMax>=a.options.max&&a.curRows.addClass(a.options.overflow))})};a.init();return this};b.equalizerDefaults={useHeight:"height",resizeable:!0,min:0,max:0,overflow:"overflowed"}})(jQuery);

//Placeholder plugin for jQuery
//Copyright 2010, Daniel Stocks (http://webcloud.se)
//Released under the MIT, BSD, and GPL Licenses.
(function(b){function d(a){this.input=a;a.attr("type")=="password"&&this.handlePassword();b(a[0].form).submit(function(){if(a.hasClass("placeholder")&&a[0].value==a.attr("placeholder"))a[0].value=""})}d.prototype={show:function(a){if(this.input[0].value===""||a&&this.valueIsPlaceholder()){if(this.isPassword)try{this.input[0].setAttribute("type","text")}catch(b){this.input.before(this.fakePassword.show()).hide()}this.input.addClass("placeholder");this.input[0].value=this.input.attr("placeholder")}},
hide:function(){if(this.valueIsPlaceholder()&&this.input.hasClass("placeholder")&&(this.input.removeClass("placeholder"),this.input[0].value="",this.isPassword)){try{this.input[0].setAttribute("type","password")}catch(a){}this.input.show();this.input[0].focus()}},valueIsPlaceholder:function(){return this.input[0].value==this.input.attr("placeholder")},handlePassword:function(){var a=this.input;a.attr("realType","password");this.isPassword=!0;if(b.browser.msie&&a[0].outerHTML){var c=b(a[0].outerHTML.replace(/type=(['"])?password\1/gi,
"type=$1text$1"));this.fakePassword=c.val(a.attr("placeholder")).addClass("placeholder").focus(function(){a.trigger("focus");b(this).hide()});b(a[0].form).submit(function(){c.remove();a.show()})}}};var e=!!("placeholder"in document.createElement("input"));b.fn.placeholder=function(){return e?this:this.each(function(){var a=b(this),c=new d(a);c.show(!0);a.focus(function(){c.hide()});a.blur(function(){c.show(!1)});b.browser.msie&&(b(window).load(function(){a.val()&&a.removeClass("placeholder");c.show(!0)}),
a.focus(function(){if(this.value==""){var a=this.createTextRange();a.collapse(!0);a.moveStart("character",0);a.select()}}))})}})(jQuery);



})(this.jQuery);



window.log = function(){
  log.history = log.history || [];   // store logs to an array for reference
  log.history.push(arguments);
  if(this.console){
    console.log( Array.prototype.slice.call(arguments) );
  }
};
