/*!
 * jCarousel - Riding carousels with jQuery
 *   http://sorgalla.com/jcarousel/
 *
 * Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * Built on top of the jQuery library
 *   http://jquery.com
 *
 * Inspired by the "Carousel Component" by Bill Scott
 *   http://billwscott.com/carousel/
 */

(function($){$.fn.jcarousel=function(o){if(typeof o=='string'){var instance=$(this).data('jcarousel'),args=Array.prototype.slice.call(arguments,1);return instance[o].apply(instance,args);}else
return this.each(function(){$(this).data('jcarousel',new $jc(this,o));});};var defaults={vertical:false,start:1,offset:1,size:null,scroll:3,visible:null,animation:'normal',easing:'swing',auto:0,wrap:null,initCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,buttonNextHTML:'<div></div>',buttonPrevHTML:'<div></div>',buttonNextEvent:'click',buttonPrevEvent:'click',buttonNextCallback:null,buttonPrevCallback:null};$.jcarousel=function(e,o){this.options=$.extend({},defaults,o||{});this.locked=false;this.container=null;this.clip=null;this.list=null;this.buttonNext=null;this.buttonPrev=null;this.wh=!this.options.vertical?'width':'height';this.lt=!this.options.vertical?'left':'top';var skin='',split=e.className.split(' ');for(var i=0;i<split.length;i++){if(split[i].indexOf('jcarousel-skin')!=-1){$(e).removeClass(split[i]);skin=split[i];break;}}if(e.nodeName=='UL'||e.nodeName=='OL'){this.list=$(e);this.container=this.list.parent();if(this.container.hasClass('jcarousel-clip')){if(!this.container.parent().hasClass('jcarousel-container'))this.container=this.container.wrap('<div></div>');this.container=this.container.parent();}else if(!this.container.hasClass('jcarousel-container'))this.container=this.list.wrap('<div></div>').parent();}else{this.container=$(e);this.list=this.container.find('ul,ol').eq(0);}if(skin!=''&&this.container.parent()[0].className.indexOf('jcarousel-skin')==-1)this.container.wrap('<div class=" '+skin+'"></div>');this.clip=this.list.parent();if(!this.clip.length||!this.clip.hasClass('jcarousel-clip'))this.clip=this.list.wrap('<div></div>').parent();this.buttonNext=$('.jcarousel-next',this.container);if(this.buttonNext.size()==0&&this.options.buttonNextHTML!=null)this.buttonNext=this.clip.after(this.options.buttonNextHTML).next();this.buttonNext.addClass(this.className('jcarousel-next'));this.buttonPrev=$('.jcarousel-prev',this.container);if(this.buttonPrev.size()==0&&this.options.buttonPrevHTML!=null)this.buttonPrev=this.clip.after(this.options.buttonPrevHTML).next();this.buttonPrev.addClass(this.className('jcarousel-prev'));this.clip.addClass(this.className('jcarousel-clip')).css({overflow:'hidden',position:'relative'});this.list.addClass(this.className('jcarousel-list')).css({overflow:'hidden',position:'relative',top:0,left:0,margin:0,padding:0});this.container.addClass(this.className('jcarousel-container')).css({position:'relative'});var di=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;var li=this.list.children('li');var self=this;if(li.size()>0){var wh=0,i=this.options.offset;li.each(function(){self.format(this,i++);wh+=self.dimension(this,di);});this.list.css(this.wh,wh+'px');if(!o||o.size===undefined)this.options.size=li.size();}this.container.css('display','block');this.buttonNext.css('display','block');this.buttonPrev.css('display','block');this.funcNext=function(){self.next();};this.funcPrev=function(){self.prev();};this.funcResize=function(){self.reload();};if(this.options.initCallback!=null)this.options.initCallback(this,'init');if($.browser.safari){this.buttons(false,false);$(window).bind('load.jcarousel',function(){self.setup();});}else
this.setup();};var $jc=$.jcarousel;$jc.fn=$jc.prototype={jcarousel:'0.2.4'};$jc.fn.extend=$jc.extend=$.extend;$jc.fn.extend({setup:function(){this.first=null;this.last=null;this.prevFirst=null;this.prevLast=null;this.animating=false;this.timer=null;this.tail=null;this.inTail=false;if(this.locked)return;this.list.css(this.lt,this.pos(this.options.offset)+'px');var p=this.pos(this.options.start);this.prevFirst=this.prevLast=null;this.animate(p,false);$(window).unbind('resize.jcarousel',this.funcResize).bind('resize.jcarousel',this.funcResize);},reset:function(){this.list.empty();this.list.css(this.lt,'0px');this.list.css(this.wh,'10px');if(this.options.initCallback!=null)this.options.initCallback(this,'reset');this.setup();},reload:function(){if(this.tail!=null&&this.inTail)this.list.css(this.lt,$jc.intval(this.list.css(this.lt))+this.tail);this.tail=null;this.inTail=false;if(this.options.reloadCallback!=null)this.options.reloadCallback(this);if(this.options.visible!=null){var self=this;var di=Math.ceil(this.clipping()/this.options.visible),wh=0,lt=0;$('li',this.list).each(function(i){wh+=self.dimension(this,di);if(i+1<self.first)lt=wh;});this.list.css(this.wh,wh+'px');this.list.css(this.lt,-lt+'px');}this.scroll(this.first,false);},lock:function(){this.locked=true;this.buttons();},unlock:function(){this.locked=false;this.buttons();},size:function(s){if(s!=undefined){this.options.size=s;if(!this.locked)this.buttons();}return this.options.size;},has:function(i,i2){if(i2==undefined||!i2)i2=i;if(this.options.size!==null&&i2>this.options.size)i2=this.options.size;for(var j=i;j<=i2;j++){var e=this.get(j);if(!e.length||e.hasClass('jcarousel-item-placeholder'))return false;}return true;},get:function(i){return $('.jcarousel-item-'+i,this.list);},add:function(i,s){var e=this.get(i),old=0,add=0;if(e.length==0){var c,e=this.create(i),j=$jc.intval(i);while(c=this.get(--j)){if(j<=0||c.length){j<=0?this.list.prepend(e):c.after(e);break;}}}else
old=this.dimension(e);e.removeClass(this.className('jcarousel-item-placeholder'));typeof s=='string'?e.html(s):e.empty().append(s);var di=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;var wh=this.dimension(e,di)-old;if(i>0&&i<this.first)this.list.css(this.lt,$jc.intval(this.list.css(this.lt))-wh+'px');this.list.css(this.wh,$jc.intval(this.list.css(this.wh))+wh+'px');return e;},remove:function(i){var e=this.get(i);if(!e.length||(i>=this.first&&i<=this.last))return;var d=this.dimension(e);if(i<this.first)this.list.css(this.lt,$jc.intval(this.list.css(this.lt))+d+'px');e.remove();this.list.css(this.wh,$jc.intval(this.list.css(this.wh))-d+'px');},next:function(){this.stopAuto();if(this.tail!=null&&!this.inTail)this.scrollTail(false);else
this.scroll(((this.options.wrap=='both'||this.options.wrap=='last')&&this.options.size!=null&&this.last==this.options.size)?1:this.first+this.options.scroll);},prev:function(){this.stopAuto();if(this.tail!=null&&this.inTail)this.scrollTail(true);else
this.scroll(((this.options.wrap=='both'||this.options.wrap=='first')&&this.options.size!=null&&this.first==1)?this.options.size:this.first-this.options.scroll);},scrollTail:function(b){if(this.locked||this.animating||!this.tail)return;var pos=$jc.intval(this.list.css(this.lt));!b?pos-=this.tail:pos+=this.tail;this.inTail=!b;this.prevFirst=this.first;this.prevLast=this.last;this.animate(pos);},scroll:function(i,a){if(this.locked||this.animating)return;this.animate(this.pos(i),a);},pos:function(i){var pos=$jc.intval(this.list.css(this.lt));if(this.locked||this.animating)return pos;if(this.options.wrap!='circular')i=i<1?1:(this.options.size&&i>this.options.size?this.options.size:i);var back=this.first>i;var f=this.options.wrap!='circular'&&this.first<=1?1:this.first;var c=back?this.get(f):this.get(this.last);var j=back?f:f-1;var e=null,l=0,p=false,d=0,g;while(back?--j>=i:++j<i){e=this.get(j);p=!e.length;if(e.length==0){e=this.create(j).addClass(this.className('jcarousel-item-placeholder'));c[back?'before':'after'](e);if(this.first!=null&&this.options.wrap=='circular'&&this.options.size!==null&&(j<=0||j>this.options.size)){g=this.get(this.index(j));if(g.length)this.add(j,g.children().clone(true));}}c=e;d=this.dimension(e);if(p)l+=d;if(this.first!=null&&(this.options.wrap=='circular'||(j>=1&&(this.options.size==null||j<=this.options.size))))pos=back?pos+d:pos-d;}var clipping=this.clipping();var cache=[];var visible=0,j=i,v=0;var c=this.get(i-1);while(++visible){e=this.get(j);p=!e.length;if(e.length==0){e=this.create(j).addClass(this.className('jcarousel-item-placeholder'));c.length==0?this.list.prepend(e):c[back?'before':'after'](e);if(this.first!=null&&this.options.wrap=='circular'&&this.options.size!==null&&(j<=0||j>this.options.size)){g=this.get(this.index(j));if(g.length)this.add(j,g.find('>*').clone(true));}}c=e;var d=this.dimension(e);if(d==0){throw('jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...');return 0;}if(this.options.wrap!='circular'&&this.options.size!==null&&j>this.options.size)cache.push(e);else if(p)l+=d;v+=d;if(v>=clipping)break;j++;}for(var x=0;x<cache.length;x++)cache[x].remove();if(l>0){this.list.css(this.wh,this.dimension(this.list)+l+'px');if(back){pos-=l;this.list.css(this.lt,$jc.intval(this.list.css(this.lt))-l+'px');}}var last=i+visible-1;if(this.options.wrap!='circular'&&this.options.size&&last>this.options.size)last=this.options.size;if(j>last){visible=0,j=last,v=0;while(++visible){var e=this.get(j--);if(!e.length)break;v+=this.dimension(e);if(v>=clipping)break;}}var first=last-visible+1;if(this.options.wrap!='circular'&&first<1)first=1;if(this.inTail&&back){pos+=this.tail;this.inTail=false;}this.tail=null;if(this.options.wrap!='circular'&&last==this.options.size&&(last-visible+1)>=1){var m=$jc.margin(this.get(last),!this.options.vertical?'marginRight':'marginBottom');if((v-m)>clipping)this.tail=v-clipping-m;}while(i-->first)pos+=this.dimension(this.get(i));this.prevFirst=this.first;this.prevLast=this.last;this.first=first;this.last=last;return pos;},animate:function(p,a){if(this.locked||this.animating)return;this.animating=true;var self=this;var scrolled=function(){self.animating=false;if(p==0)self.list.css(self.lt,0);if(self.options.wrap=='circular'||self.options.wrap=='both'||self.options.wrap=='last'||self.options.size==null||self.last<self.options.size)self.startAuto();self.buttons();self.notify('onAfterAnimation');};this.notify('onBeforeAnimation');if(!this.options.animation||a==false){this.list.css(this.lt,p+'px');scrolled();}else{var o=!this.options.vertical?{'left':p}:{'top':p};this.list.animate(o,this.options.animation,this.options.easing,scrolled);}},startAuto:function(s){if(s!=undefined)this.options.auto=s;if(this.options.auto==0)return this.stopAuto();if(this.timer!=null)return;var self=this;this.timer=setTimeout(function(){self.next();},this.options.auto*1000);},stopAuto:function(){if(this.timer==null)return;clearTimeout(this.timer);this.timer=null;},buttons:function(n,p){if(n==undefined||n==null){var n=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!='first')||this.options.size==null||this.last<this.options.size);if(!this.locked&&(!this.options.wrap||this.options.wrap=='first')&&this.options.size!=null&&this.last>=this.options.size)n=this.tail!=null&&!this.inTail;}if(p==undefined||p==null){var p=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!='last')||this.first>1);if(!this.locked&&(!this.options.wrap||this.options.wrap=='last')&&this.options.size!=null&&this.first==1)p=this.tail!=null&&this.inTail;}var self=this;this.buttonNext[n?'bind':'unbind'](this.options.buttonNextEvent+'.jcarousel',this.funcNext)[n?'removeClass':'addClass'](this.className('jcarousel-next-disabled')).attr('disabled',n?false:true);this.buttonPrev[p?'bind':'unbind'](this.options.buttonPrevEvent+'.jcarousel',this.funcPrev)[p?'removeClass':'addClass'](this.className('jcarousel-prev-disabled')).attr('disabled',p?false:true);if(this.buttonNext.length>0&&(this.buttonNext[0].jcarouselstate==undefined||this.buttonNext[0].jcarouselstate!=n)&&this.options.buttonNextCallback!=null){this.buttonNext.each(function(){self.options.buttonNextCallback(self,this,n);});this.buttonNext[0].jcarouselstate=n;}if(this.buttonPrev.length>0&&(this.buttonPrev[0].jcarouselstate==undefined||this.buttonPrev[0].jcarouselstate!=p)&&this.options.buttonPrevCallback!=null){this.buttonPrev.each(function(){self.options.buttonPrevCallback(self,this,p);});this.buttonPrev[0].jcarouselstate=p;}},notify:function(evt){var state=this.prevFirst==null?'init':(this.prevFirst<this.first?'next':'prev');this.callback('itemLoadCallback',evt,state);if(this.prevFirst!==this.first){this.callback('itemFirstInCallback',evt,state,this.first);this.callback('itemFirstOutCallback',evt,state,this.prevFirst);}if(this.prevLast!==this.last){this.callback('itemLastInCallback',evt,state,this.last);this.callback('itemLastOutCallback',evt,state,this.prevLast);}this.callback('itemVisibleInCallback',evt,state,this.first,this.last,this.prevFirst,this.prevLast);this.callback('itemVisibleOutCallback',evt,state,this.prevFirst,this.prevLast,this.first,this.last);},callback:function(cb,evt,state,i1,i2,i3,i4){if(this.options[cb]==undefined||(typeof this.options[cb]!='object'&&evt!='onAfterAnimation'))return;var callback=typeof this.options[cb]=='object'?this.options[cb][evt]:this.options[cb];if(!$.isFunction(callback))return;var self=this;if(i1===undefined)callback(self,state,evt);else if(i2===undefined)this.get(i1).each(function(){callback(self,this,i1,state,evt);});else{for(var i=i1;i<=i2;i++)if(i!==null&&!(i>=i3&&i<=i4))this.get(i).each(function(){callback(self,this,i,state,evt);});}},create:function(i){return this.format('<li></li>',i);},format:function(e,i){var $e=$(e).addClass(this.className('jcarousel-item')).addClass(this.className('jcarousel-item-'+i)).css({'float':'left','list-style':'none'});$e.attr('jcarouselindex',i);return $e;},className:function(c){return c+' '+c+(!this.options.vertical?'-horizontal':'-vertical');},dimension:function(e,d){var el=e.jquery!=undefined?e[0]:e;var old=!this.options.vertical?el.offsetWidth+$jc.margin(el,'marginLeft')+$jc.margin(el,'marginRight'):el.offsetHeight+$jc.margin(el,'marginTop')+$jc.margin(el,'marginBottom');if(d==undefined||old==d)return old;var w=!this.options.vertical?d-$jc.margin(el,'marginLeft')-$jc.margin(el,'marginRight'):d-$jc.margin(el,'marginTop')-$jc.margin(el,'marginBottom');$(el).css(this.wh,w+'px');return this.dimension(el);},clipping:function(){return!this.options.vertical?this.clip[0].offsetWidth-$jc.intval(this.clip.css('borderLeftWidth'))-$jc.intval(this.clip.css('borderRightWidth')):this.clip[0].offsetHeight-$jc.intval(this.clip.css('borderTopWidth'))-$jc.intval(this.clip.css('borderBottomWidth'));},index:function(i,s){if(s==undefined)s=this.options.size;return Math.round((((i-1)/s)-Math.floor((i-1)/s))*s)+1;}});$jc.extend({defaults:function(d){return $.extend(defaults,d||{});},margin:function(e,p){if(!e)return 0;var el=e.jquery!=undefined?e[0]:e;if(p=='marginRight'&&$.browser.safari){var old={'display':'block','float':'none','width':'auto'},oWidth,oWidth2;$.swap(el,old,function(){oWidth=el.offsetWidth;});old['marginRight']=0;$.swap(el,old,function(){oWidth2=el.offsetWidth;});return oWidth2-oWidth;}return $jc.intval($.css(el,p));},intval:function(v){v=parseInt(v);return isNaN(v)?0:v;}});})(jQuery);



/* 
 * jQuery SWFObject v1.1.1 MIT/GPL @jon_neal
 * http://jquery.thewikies.com/swfobject
 */
(function(f,h,i){function k(a,c){var b=(a[0]||0)-(c[0]||0);return b>0||!b&&a.length>0&&k(a.slice(1),c.slice(1))}function l(a){if(typeof a!=g)return a;var c=[],b="";for(var d in a){b=typeof a[d]==g?l(a[d]):[d,m?encodeURI(a[d]):a[d]].join("=");c.push(b)}return c.join("&")}function n(a){var c=[];for(var b in a)a[b]&&c.push([b,'="',a[b],'"'].join(""));return c.join(" ")}function o(a){var c=[];for(var b in a)c.push(['<param name="',b,'" value="',l(a[b]),'" />'].join(""));return c.join("")}var g="object",m=true;try{var j=i.description||function(){return(new i("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}()}catch(p){j="Unavailable"}var e=j.match(/\d+/g)||[0];f[h]={available:e[0]>0,activeX:i&&!i.name,version:{original:j,array:e,string:e.join("."),major:parseInt(e[0],10)||0,minor:parseInt(e[1],10)||0,release:parseInt(e[2],10)||0},hasVersion:function(a){a=/string|number/.test(typeof a)?a.toString().split("."):/object/.test(typeof a)?[a.major,a.minor]:a||[0,0];return k(e,a)},encodeParams:true,expressInstall:"expressInstall.swf",expressInstallIsActive:false,create:function(a){if(!a.swf||this.expressInstallIsActive||!this.available&&!a.hasVersionFail)return false;if(!this.hasVersion(a.hasVersion||1)){this.expressInstallIsActive=true;if(typeof a.hasVersionFail=="function")if(!a.hasVersionFail.apply(a))return false;a={swf:a.expressInstall||this.expressInstall,height:137,width:214,flashvars:{MMredirectURL:location.href,MMplayerType:this.activeX?"ActiveX":"PlugIn",MMdoctitle:document.title.slice(0,47)+" - Flash Player Installation"}}}attrs={data:a.swf,type:"application/x-shockwave-flash",id:a.id||"flash_"+Math.floor(Math.random()*999999999),width:a.width||320,height:a.height||180,style:a.style||""};m=typeof a.useEncode!=="undefined"?a.useEncode:this.encodeParams;a.movie=a.swf;a.wmode=a.wmode||"opaque";delete a.fallback;delete a.hasVersion;delete a.hasVersionFail;delete a.height;delete a.id;delete a.swf;delete a.useEncode;delete a.width;var c=document.createElement("div");c.innerHTML=["<object ",n(attrs),">",o(a),"</object>"].join("");return c.firstChild}};f.fn[h]=function(a){var c=this.find(g).andSelf().filter(g);/string|object/.test(typeof a)&&this.each(function(){var b=f(this),d;a=typeof a==g?a:{swf:a};a.fallback=this;if(d=f[h].create(a)){b.children().remove();b.html(d)}});typeof a=="function"&&c.each(function(){var b=this;b.jsInteractionTimeoutMs=b.jsInteractionTimeoutMs||0;if(b.jsInteractionTimeoutMs<660)b.clientWidth||b.clientHeight?a.call(b):setTimeout(function(){f(b)[h](a)},b.jsInteractionTimeoutMs+66)});return c}})(jQuery,"flash",navigator.plugins["Shockwave Flash"]||window.ActiveXObject);


/*
 * BGI frame 
 * Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * $LastChangedDate: 2007-07-22 01:45:56 +0200 (Son, 22 Jul 2007) $
 * $Rev: 2447 $
 *
 * Version 2.1.1
 */
(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&/6.0/.test(navigator.userAgent)){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if($('> iframe.bgiframe',this).length==0)this.insertBefore(document.createElement(html),this.firstChild);});}return this;};})(jQuery);

/*
 * jQuery Autocomplete plugin 1.1
 *
 * Copyright (c) 2009 Jörn Zaefferer
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 *
 * Revision: $Id: jquery.autocomplete.js 15 2009-08-22 10:30:27Z joern.zaefferer $
 */ /*;(function($){$.fn.extend({autocomplete:function(urlOrData,options){var isUrl=typeof urlOrData=="string";options=$.extend({},$.Autocompleter.defaults,{url:isUrl?urlOrData:null,data:isUrl?null:urlOrData,delay:isUrl?$.Autocompleter.defaults.delay:10,max:options&&!options.scroll?10:150},options);options.highlight=options.highlight||function(value){return value;};options.formatMatch=options.formatMatch||options.formatItem;return this.each(function(){new $.Autocompleter(this,options);});},result:function(handler){return this.bind("result",handler);},search:function(handler){return this.trigger("search",[handler]);},flushCache:function(){return this.trigger("flushCache");},setOptions:function(options){return this.trigger("setOptions",[options]);},unautocomplete:function(){return this.trigger("unautocomplete");}});$.Autocompleter=function(input,options){var KEY={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var $input=$(input).attr("autocomplete","off").addClass(options.inputClass);var timeout;var previousValue="";var cache=$.Autocompleter.Cache(options);var hasFocus=0;var lastKeyPressCode;var config={mouseDownOnSelect:false};var select=$.Autocompleter.Select(options,input,selectCurrent,config);var blockSubmit;$.browser.opera&&$(input.form).bind("submit.autocomplete",function(){if(blockSubmit){blockSubmit=false;return false;}});$input.bind(($.browser.opera?"keypress":"keydown")+".autocomplete",function(event){hasFocus=1;lastKeyPressCode=event.keyCode;switch(event.keyCode){case KEY.UP:event.preventDefault();if(select.visible()){select.prev();}else{onChange(0,true);}break;case KEY.DOWN:event.preventDefault();if(select.visible()){select.next();}else{onChange(0,true);}break;case KEY.PAGEUP:event.preventDefault();if(select.visible()){select.pageUp();}else{onChange(0,true);}break;case KEY.PAGEDOWN:event.preventDefault();if(select.visible()){select.pageDown();}else{onChange(0,true);}break;case options.multiple&&$.trim(options.multipleSeparator)==","&&KEY.COMMA:case KEY.TAB:case KEY.RETURN:if(selectCurrent()){event.preventDefault();blockSubmit=true;return false;}break;case KEY.ESC:select.hide();break;default:clearTimeout(timeout);timeout=setTimeout(onChange,options.delay);break;}}).focus(function(){hasFocus++;}).blur(function(){hasFocus=0;if(!config.mouseDownOnSelect){hideResults();}}).click(function(){if(hasFocus++>1&&!select.visible()){onChange(0,true);}}).bind("search",function(){var fn=(arguments.length>1)?arguments[1]:null;function findValueCallback(q,data){var result;if(data&&data.length){for(var i=0;i<data.length;i++){if(data[i].result.toLowerCase()==q.toLowerCase()){result=data[i];break;}}}if(typeof fn=="function")fn(result);else $input.trigger("result",result&&[result.data,result.value]);}$.each(trimWords($input.val()),function(i,value){request(value,findValueCallback,findValueCallback);});}).bind("flushCache",function(){cache.flush();}).bind("setOptions",function(){$.extend(options,arguments[1]);if("data"in arguments[1])cache.populate();}).bind("unautocomplete",function(){select.unbind();$input.unbind();$(input.form).unbind(".autocomplete");});function selectCurrent(){var selected=select.selected();if(!selected)return false;var v=selected.result;previousValue=v;if(options.multiple){var words=trimWords($input.val());if(words.length>1){var seperator=options.multipleSeparator.length;var cursorAt=$(input).selection().start;var wordAt,progress=0;$.each(words,function(i,word){progress+=word.length;if(cursorAt<=progress){wordAt=i;return false;}progress+=seperator;});words[wordAt]=v;v=words.join(options.multipleSeparator);}v+=options.multipleSeparator;}$input.val(v);hideResultsNow();$input.trigger("result",[selected.data,selected.value]);return true;}function onChange(crap,skipPrevCheck){if(lastKeyPressCode==KEY.DEL){select.hide();return;}var currentValue=$input.val();if(!skipPrevCheck&&currentValue==previousValue)return;previousValue=currentValue;currentValue=lastWord(currentValue);if(currentValue.length>=options.minChars){$input.addClass(options.loadingClass);if(!options.matchCase)currentValue=currentValue.toLowerCase();request(currentValue,receiveData,hideResultsNow);}else{stopLoading();select.hide();}};function trimWords(value){if(!value)return[""];if(!options.multiple)return[$.trim(value)];return $.map(value.split(options.multipleSeparator),function(word){return $.trim(value).length?$.trim(word):null;});}function lastWord(value){if(!options.multiple)return value;var words=trimWords(value);if(words.length==1)return words[0];var cursorAt=$(input).selection().start;if(cursorAt==value.length){words=trimWords(value)}else{words=trimWords(value.replace(value.substring(cursorAt),""));}return words[words.length-1];}function autoFill(q,sValue){if(options.autoFill&&(lastWord($input.val()).toLowerCase()==q.toLowerCase())&&lastKeyPressCode!=KEY.BACKSPACE){$input.val($input.val()+sValue.substring(lastWord(previousValue).length));$(input).selection(previousValue.length,previousValue.length+sValue.length);}};function hideResults(){clearTimeout(timeout);timeout=setTimeout(hideResultsNow,200);};function hideResultsNow(){var wasVisible=select.visible();select.hide();clearTimeout(timeout);stopLoading();if(options.mustMatch){$input.search(function(result){if(!result){if(options.multiple){var words=trimWords($input.val()).slice(0,-1);$input.val(words.join(options.multipleSeparator)+(words.length?options.multipleSeparator:""));}else{$input.val("");$input.trigger("result",null);}}});}};function receiveData(q,data){if(data&&data.length&&hasFocus){stopLoading();select.display(data,q);autoFill(q,data[0].value);select.show();}else{hideResultsNow();}};function request(term,success,failure){if(!options.matchCase)term=term.toLowerCase();var data=cache.load(term);if(data&&data.length){success(term,data);}else if((typeof options.url=="string")&&(options.url.length>0)){var extraParams={timestamp:+new Date()};$.each(options.extraParams,function(key,param){extraParams[key]=typeof param=="function"?param():param;});$.ajax({mode:"abort",port:"autocomplete"+input.name,dataType:options.dataType,url:options.url,data:$.extend({q:lastWord(term),limit:options.max},extraParams),success:function(data){var parsed=options.parse&&options.parse(data)||parse(data);cache.add(term,parsed);success(term,parsed);}});}else{select.emptyList();failure(term);}};function parse(data){var parsed=[];var rows=data.split("\n");for(var i=0;i<rows.length;i++){var row=$.trim(rows[i]);if(row){row=row.split("|");parsed[parsed.length]={data:row,value:row[0],result:options.formatResult&&options.formatResult(row,row[0])||row[0]};}}return parsed;};function stopLoading(){$input.removeClass(options.loadingClass);};};$.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(row){return row[0];},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(value,term){return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>");},scroll:true,scrollHeight:180};$.Autocompleter.Cache=function(options){var data={};var length=0;function matchSubset(s,sub){if(!options.matchCase)s=s.toLowerCase();var i=s.indexOf(sub);if(options.matchContains=="word"){i=s.toLowerCase().search("\\b"+sub.toLowerCase());}if(i==-1)return false;return i==0||options.matchContains;};function add(q,value){if(length>options.cacheLength){flush();}if(!data[q]){length++;}data[q]=value;}function populate(){if(!options.data)return false;var stMatchSets={},nullData=0;if(!options.url)options.cacheLength=1;stMatchSets[""]=[];for(var i=0,ol=options.data.length;i<ol;i++){var rawValue=options.data[i];rawValue=(typeof rawValue=="string")?[rawValue]:rawValue;var value=options.formatMatch(rawValue,i+1,options.data.length);if(value===false)continue;var firstChar=value.charAt(0).toLowerCase();if(!stMatchSets[firstChar])stMatchSets[firstChar]=[];var row={value:value,data:rawValue,result:options.formatResult&&options.formatResult(rawValue)||value};stMatchSets[firstChar].push(row);if(nullData++<options.max){stMatchSets[""].push(row);}};$.each(stMatchSets,function(i,value){options.cacheLength++;add(i,value);});}setTimeout(populate,25);function flush(){data={};length=0;}return{flush:flush,add:add,populate:populate,load:function(q){if(!options.cacheLength||!length)return null;if(!options.url&&options.matchContains){var csub=[];for(var k in data){if(k.length>0){var c=data[k];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub.push(x);}});}}return csub;}else
if(data[q]){return data[q];}else
if(options.matchSubset){for(var i=q.length-1;i>=options.minChars;i--){var c=data[q.substr(0,i)];if(c){var csub=[];$.each(c,function(i,x){if(matchSubset(x.value,q)){csub[csub.length]=x;}});return csub;}}}return null;}};};$.Autocompleter.Select=function(options,input,select,config){var CLASSES={ACTIVE:"ac_over"};var listItems,active=-1,data,term="",needsInit=true,element,list;function init(){if(!needsInit)return;element=$("<div/>").hide().addClass(options.resultsClass).css("position","absolute").appendTo(document.body);list=$("<ul/>").appendTo(element).mouseover(function(event){if(target(event).nodeName&&target(event).nodeName.toUpperCase()=='LI'){active=$("li",list).removeClass(CLASSES.ACTIVE).index(target(event));$(target(event)).addClass(CLASSES.ACTIVE);}}).click(function(event){$(target(event)).addClass(CLASSES.ACTIVE);select();input.focus();return false;}).mousedown(function(){config.mouseDownOnSelect=true;}).mouseup(function(){config.mouseDownOnSelect=false;});if(options.width>0)element.css("width",options.width);needsInit=false;}function target(event){var element=event.target;while(element&&element.tagName!="LI")element=element.parentNode;if(!element)return[];return element;}function moveSelect(step){listItems.slice(active,active+1).removeClass(CLASSES.ACTIVE);movePosition(step);var activeItem=listItems.slice(active,active+1).addClass(CLASSES.ACTIVE);if(options.scroll){var offset=0;listItems.slice(0,active).each(function(){offset+=this.offsetHeight;});if((offset+activeItem[0].offsetHeight-list.scrollTop())>list[0].clientHeight){list.scrollTop(offset+activeItem[0].offsetHeight-list.innerHeight());}else if(offset<list.scrollTop()){list.scrollTop(offset);}}};function movePosition(step){active+=step;if(active<0){active=listItems.size()-1;}else if(active>=listItems.size()){active=0;}}function limitNumberOfItems(available){return options.max&&options.max<available?options.max:available;}function fillList(){list.empty();var max=limitNumberOfItems(data.length);for(var i=0;i<max;i++){if(!data[i])continue;var formatted=options.formatItem(data[i].data,i+1,max,data[i].value,term);if(formatted===false)continue;var li=$("<li/>").html(options.highlight(formatted,term)).addClass(i%2==0?"ac_even":"ac_odd").appendTo(list)[0];$.data(li,"ac_data",data[i]);}listItems=list.find("li");if(options.selectFirst){listItems.slice(0,1).addClass(CLASSES.ACTIVE);active=0;}if($.fn.bgiframe)list.bgiframe();}return{display:function(d,q){init();data=d;term=q;fillList();},next:function(){moveSelect(1);},prev:function(){moveSelect(-1);},pageUp:function(){if(active!=0&&active-8<0){moveSelect(-active);}else{moveSelect(-8);}},pageDown:function(){if(active!=listItems.size()-1&&active+8>listItems.size()){moveSelect(listItems.size()-1-active);}else{moveSelect(8);}},hide:function(){element&&element.hide();listItems&&listItems.removeClass(CLASSES.ACTIVE);active=-1;},visible:function(){return element&&element.is(":visible");},current:function(){return this.visible()&&(listItems.filter("."+CLASSES.ACTIVE)[0]||options.selectFirst&&listItems[0]);},show:function(){var offset=$(input).offset();element.css({width:typeof options.width=="string"||options.width>0?options.width:$(input).width(),top:offset.top+input.offsetHeight,left:offset.left}).show();if(options.scroll){list.scrollTop(0);list.css({maxHeight:options.scrollHeight,overflow:'auto'});if($.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var listHeight=0;listItems.each(function(){listHeight+=this.offsetHeight;});var scrollbarsVisible=listHeight>options.scrollHeight;list.css('height',scrollbarsVisible?options.scrollHeight:listHeight);if(!scrollbarsVisible){listItems.width(list.width()-parseInt(listItems.css("padding-left"))-parseInt(listItems.css("padding-right")));}}}},selected:function(){var selected=listItems&&listItems.filter("."+CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);return selected&&selected.length&&$.data(selected[0],"ac_data");},emptyList:function(){list&&list.empty();},unbind:function(){element&&element.remove();}};};$.fn.selection=function(start,end){if(start!==undefined){return this.each(function(){if(this.createTextRange){var selRange=this.createTextRange();if(end===undefined||start==end){selRange.move("character",start);selRange.select();}else{selRange.collapse(true);selRange.moveStart("character",start);selRange.moveEnd("character",end);selRange.select();}}else if(this.setSelectionRange){this.setSelectionRange(start,end);}else if(this.selectionStart){this.selectionStart=start;this.selectionEnd=end;}});}var field=this[0];if(field.createTextRange){var range=document.selection.createRange(),orig=field.value,teststring="<->",textLength=range.text.length;range.text=teststring;var caretAt=field.value.indexOf(teststring);field.value=orig;this.selection(caretAt,caretAt+textLength);return{start:caretAt,end:caretAt+textLength}}else if(field.selectionStart!==undefined){return{start:field.selectionStart,end:field.selectionEnd}}};})(jQuery);
*/
/* Reading Room Tabs Script */
(function($){$.fn.rrtabs=function(param){var param=$.extend({ActiveClass:'on',List:'.jsTabsList',Content:'.jsTabsContent',ScrollClass:'.jsScrollPane'},param);return $(this).each(function(){var that=$(this),hasScroll=param.ScrollClass&&0<$(param.ScrollClass).length;if(hasScroll){that.find(param.Content).css({'height':'291px','overflow':'auto'});$('.jScrollPaneContainer').css({'width':'auto'});}
that.find(param.Content+" div[id*='tab']").hide();that.find(param.List+' li').removeClass(param.ActiveClass);that.find(param.List+' a').each(function(i){$(this).click(function(){that.find(param.List+' li').removeClass(param.ActiveClass);$(this).parent().addClass(param.ActiveClass);that.find(param.Content+" div[id*='tab']").hide().eq(i).show();if(hasScroll&&'function'==typeof $.fn.jScrollPane){$(param.ScrollClass).jScrollPane({showArrows:true,scrollbarWidth:15,scrollbarMargin:0,arrowSize:15,dragMinHeight:38,dragMaxHeight:38});}
return false;});});that.find(param.List+' a:eq(0)').click();});}})(jQuery);$(document).ready(function(){$('.jsTabsContainer').rrtabs();$('.eStoresListing ul.featureList li div.inner').show();});

/*
 *  jquery.rotator
 *  Version: 0.1
 */
 
(function($){ $.fn.rotator = function(options){

    var defaults = {
		ms: 8000,
		n: 1,
		autoHeight: false
	};
  
    var options = $.extend(defaults, options);
	
	return this.each(function(index) {
		
		var $this = $(this);
		
		var initialHeight = 0;
		$this.children().filter(":lt("+options.n+")").each(function(index,item){
		    initialHeight += $(item).height();
		});
		
		$this.height(initialHeight);
		
		setInterval(function(){
		    
			var childHeight = $this.children().filter(":first-child").height();
		    var animParams = {scrollTop: (childHeight) + "px"};
			var autoHeight = 0;
		    $this.children().filter(":lt("+(options.n+1)+")").each(function(index,item){
		        if(index>0)autoHeight += $(item).height();
		    });
			if(options.autoHeight)animParams = $.extend({height:(autoHeight) + "px"}, animParams);
		
			
		    $this.animate(animParams, 500, function(){
		        $this.scrollTop(0);
			    $this.append($this.children().filter(":first-child"));
				$this.css("overflow","hidden"); //Chrome hack
		    });

			
	    }, options.ms);
		

	});

  
}})(jQuery);

/*! 
 * jquery.mousewheel
 * Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
 * Licensed under the MIT License (LICENSE.txt).
 *
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 * Thanks to: Seamus Leahy for adding deltaX and deltaY
 *
 * Version: 3.0.4
 * 
 * Requires: 1.2.2+
 */

(function($) {

var types = ['DOMMouseScroll', 'mousewheel'];

$.event.special.mousewheel = {
    setup: function() {
        if ( this.addEventListener ) {
            for ( var i=types.length; i; ) {
                this.addEventListener( types[--i], handler, false );
            }
        } else {
            this.onmousewheel = handler;
        }
    },
    
    teardown: function() {
        if ( this.removeEventListener ) {
            for ( var i=types.length; i; ) {
                this.removeEventListener( types[--i], handler, false );
            }
        } else {
            this.onmousewheel = null;
        }
    }
};

$.fn.extend({
    mousewheel: function(fn) {
        return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
    },
    
    unmousewheel: function(fn) {
        return this.unbind("mousewheel", fn);
    }
});


function handler(event) {
    var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0;
    event = $.event.fix(orgEvent);
    event.type = "mousewheel";
    
    // Old school scrollwheel delta
    if ( event.wheelDelta ) { delta = event.wheelDelta/120; }
    if ( event.detail     ) { delta = -event.detail/3; }
    
    // New school multidimensional scroll (touchpads) deltas
    deltaY = delta;
    
    // Gecko
    if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
        deltaY = 0;
        deltaX = -1*delta;
    }
    
    // Webkit
    if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; }
    if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; }
    
    // Add event and delta to the front of the arguments
    args.unshift(event, delta, deltaX, deltaY);
    
    return $.event.handle.apply(this, args);
}

})(jQuery);

/*
 * jScrollPane - v2.0.0beta11 - 2011-07-04
 * http://jscrollpane.kelvinluck.com/
 *
 * Copyright (c) 2010 Kelvin Luck
 * Dual licensed under the MIT and GPL licenses.
 */
(function(b,a,c){b.fn.jScrollPane=function(e){function d(D,O){var az,Q=this,Y,ak,v,am,T,Z,y,q,aA,aF,av,i,I,h,j,aa,U,aq,X,t,A,ar,af,an,G,l,au,ay,x,aw,aI,f,L,aj=true,P=true,aH=false,k=false,ap=D.clone(false,false).empty(),ac=b.fn.mwheelIntent?"mwheelIntent.jsp":"mousewheel.jsp";aI=D.css("paddingTop")+" "+D.css("paddingRight")+" "+D.css("paddingBottom")+" "+D.css("paddingLeft");f=(parseInt(D.css("paddingLeft"),10)||0)+(parseInt(D.css("paddingRight"),10)||0);function at(aR){var aM,aO,aN,aK,aJ,aQ,aP=false,aL=false;az=aR;if(Y===c){aJ=D.scrollTop();aQ=D.scrollLeft();D.css({overflow:"hidden",padding:0});ak=D.innerWidth()+f;v=D.innerHeight();D.width(ak);Y=b('<div class="jspPane" />').css("padding",aI).append(D.children());am=b('<div class="jspContainer" />').css({width:ak+"px",height:v+"px"}).append(Y).appendTo(D)}else{D.css("width","");aP=az.stickToBottom&&K();aL=az.stickToRight&&B();aK=D.innerWidth()+f!=ak||D.outerHeight()!=v;if(aK){ak=D.innerWidth()+f;v=D.innerHeight();am.css({width:ak+"px",height:v+"px"})}if(!aK&&L==T&&Y.outerHeight()==Z){D.width(ak);return}L=T;Y.css("width","");D.width(ak);am.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end()}Y.css("overflow","auto");if(aR.contentWidth){T=aR.contentWidth}else{T=Y[0].scrollWidth}Z=Y[0].scrollHeight;Y.css("overflow","");y=T/ak;q=Z/v;aA=q>1;aF=y>1;if(!(aF||aA)){D.removeClass("jspScrollable");Y.css({top:0,width:am.width()-f});n();E();R();w();ai()}else{D.addClass("jspScrollable");aM=az.maintainPosition&&(I||aa);if(aM){aO=aD();aN=aB()}aG();z();F();if(aM){N(aL?(T-ak):aO,false);M(aP?(Z-v):aN,false)}J();ag();ao();if(az.enableKeyboardNavigation){S()}if(az.clickOnTrack){p()}C();if(az.hijackInternalLinks){m()}}if(az.autoReinitialise&&!aw){aw=setInterval(function(){at(az)},az.autoReinitialiseDelay)}else{if(!az.autoReinitialise&&aw){clearInterval(aw)}}aJ&&D.scrollTop(0)&&M(aJ,false);aQ&&D.scrollLeft(0)&&N(aQ,false);D.trigger("jsp-initialised",[aF||aA])}function aG(){if(aA){am.append(b('<div class="jspVerticalBar" />').append(b('<div class="jspCap jspCapTop" />'),b('<div class="jspTrack" />').append(b('<div class="jspDrag" />').append(b('<div class="jspDragTop" />'),b('<div class="jspDragBottom" />'))),b('<div class="jspCap jspCapBottom" />')));U=am.find(">.jspVerticalBar");aq=U.find(">.jspTrack");av=aq.find(">.jspDrag");if(az.showArrows){ar=b('<a class="jspArrow jspArrowUp" />').bind("mousedown.jsp",aE(0,-1)).bind("click.jsp",aC);af=b('<a class="jspArrow jspArrowDown" />').bind("mousedown.jsp",aE(0,1)).bind("click.jsp",aC);if(az.arrowScrollOnHover){ar.bind("mouseover.jsp",aE(0,-1,ar));af.bind("mouseover.jsp",aE(0,1,af))}al(aq,az.verticalArrowPositions,ar,af)}t=v;am.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function(){t-=b(this).outerHeight()});av.hover(function(){av.addClass("jspHover")},function(){av.removeClass("jspHover")}).bind("mousedown.jsp",function(aJ){b("html").bind("dragstart.jsp selectstart.jsp",aC);av.addClass("jspActive");var s=aJ.pageY-av.position().top;b("html").bind("mousemove.jsp",function(aK){V(aK.pageY-s,false)}).bind("mouseup.jsp mouseleave.jsp",ax);return false});o()}}function o(){aq.height(t+"px");I=0;X=az.verticalGutter+aq.outerWidth();Y.width(ak-X-f);try{if(U.position().left===0){Y.css("margin-left",X+"px")}}catch(s){}}function z(){if(aF){am.append(b('<div class="jspHorizontalBar" />').append(b('<div class="jspCap jspCapLeft" />'),b('<div class="jspTrack" />').append(b('<div class="jspDrag" />').append(b('<div class="jspDragLeft" />'),b('<div class="jspDragRight" />'))),b('<div class="jspCap jspCapRight" />')));an=am.find(">.jspHorizontalBar");G=an.find(">.jspTrack");h=G.find(">.jspDrag");if(az.showArrows){ay=b('<a class="jspArrow jspArrowLeft" />').bind("mousedown.jsp",aE(-1,0)).bind("click.jsp",aC);x=b('<a class="jspArrow jspArrowRight" />').bind("mousedown.jsp",aE(1,0)).bind("click.jsp",aC);
if(az.arrowScrollOnHover){ay.bind("mouseover.jsp",aE(-1,0,ay));x.bind("mouseover.jsp",aE(1,0,x))}al(G,az.horizontalArrowPositions,ay,x)}h.hover(function(){h.addClass("jspHover")},function(){h.removeClass("jspHover")}).bind("mousedown.jsp",function(aJ){b("html").bind("dragstart.jsp selectstart.jsp",aC);h.addClass("jspActive");var s=aJ.pageX-h.position().left;b("html").bind("mousemove.jsp",function(aK){W(aK.pageX-s,false)}).bind("mouseup.jsp mouseleave.jsp",ax);return false});l=am.innerWidth();ah()}}function ah(){am.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function(){l-=b(this).outerWidth()});G.width(l+"px");aa=0}function F(){if(aF&&aA){var aJ=G.outerHeight(),s=aq.outerWidth();t-=aJ;b(an).find(">.jspCap:visible,>.jspArrow").each(function(){l+=b(this).outerWidth()});l-=s;v-=s;ak-=aJ;G.parent().append(b('<div class="jspCorner" />').css("width",aJ+"px"));o();ah()}if(aF){Y.width((am.outerWidth()-f)+"px")}Z=Y.outerHeight();q=Z/v;if(aF){au=Math.ceil(1/y*l);if(au>az.horizontalDragMaxWidth){au=az.horizontalDragMaxWidth}else{if(au<az.horizontalDragMinWidth){au=az.horizontalDragMinWidth}}h.width(au+"px");j=l-au;ae(aa)}if(aA){A=Math.ceil(1/q*t);if(A>az.verticalDragMaxHeight){A=az.verticalDragMaxHeight}else{if(A<az.verticalDragMinHeight){A=az.verticalDragMinHeight}}av.height(A+"px");i=t-A;ad(I)}}function al(aK,aM,aJ,s){var aO="before",aL="after",aN;if(aM=="os"){aM=/Mac/.test(navigator.platform)?"after":"split"}if(aM==aO){aL=aM}else{if(aM==aL){aO=aM;aN=aJ;aJ=s;s=aN}}aK[aO](aJ)[aL](s)}function aE(aJ,s,aK){return function(){H(aJ,s,this,aK);this.blur();return false}}function H(aM,aL,aP,aO){aP=b(aP).addClass("jspActive");var aN,aK,aJ=true,s=function(){if(aM!==0){Q.scrollByX(aM*az.arrowButtonSpeed)}if(aL!==0){Q.scrollByY(aL*az.arrowButtonSpeed)}aK=setTimeout(s,aJ?az.initialDelay:az.arrowRepeatFreq);aJ=false};s();aN=aO?"mouseout.jsp":"mouseup.jsp";aO=aO||b("html");aO.bind(aN,function(){aP.removeClass("jspActive");aK&&clearTimeout(aK);aK=null;aO.unbind(aN)})}function p(){w();if(aA){aq.bind("mousedown.jsp",function(aO){if(aO.originalTarget===c||aO.originalTarget==aO.currentTarget){var aM=b(this),aP=aM.offset(),aN=aO.pageY-aP.top-I,aK,aJ=true,s=function(){var aS=aM.offset(),aT=aO.pageY-aS.top-A/2,aQ=v*az.scrollPagePercent,aR=i*aQ/(Z-v);if(aN<0){if(I-aR>aT){Q.scrollByY(-aQ)}else{V(aT)}}else{if(aN>0){if(I+aR<aT){Q.scrollByY(aQ)}else{V(aT)}}else{aL();return}}aK=setTimeout(s,aJ?az.initialDelay:az.trackClickRepeatFreq);aJ=false},aL=function(){aK&&clearTimeout(aK);aK=null;b(document).unbind("mouseup.jsp",aL)};s();b(document).bind("mouseup.jsp",aL);return false}})}if(aF){G.bind("mousedown.jsp",function(aO){if(aO.originalTarget===c||aO.originalTarget==aO.currentTarget){var aM=b(this),aP=aM.offset(),aN=aO.pageX-aP.left-aa,aK,aJ=true,s=function(){var aS=aM.offset(),aT=aO.pageX-aS.left-au/2,aQ=ak*az.scrollPagePercent,aR=j*aQ/(T-ak);if(aN<0){if(aa-aR>aT){Q.scrollByX(-aQ)}else{W(aT)}}else{if(aN>0){if(aa+aR<aT){Q.scrollByX(aQ)}else{W(aT)}}else{aL();return}}aK=setTimeout(s,aJ?az.initialDelay:az.trackClickRepeatFreq);aJ=false},aL=function(){aK&&clearTimeout(aK);aK=null;b(document).unbind("mouseup.jsp",aL)};s();b(document).bind("mouseup.jsp",aL);return false}})}}function w(){if(G){G.unbind("mousedown.jsp")}if(aq){aq.unbind("mousedown.jsp")}}function ax(){b("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp");if(av){av.removeClass("jspActive")}if(h){h.removeClass("jspActive")}}function V(s,aJ){if(!aA){return}if(s<0){s=0}else{if(s>i){s=i}}if(aJ===c){aJ=az.animateScroll}if(aJ){Q.animate(av,"top",s,ad)}else{av.css("top",s);ad(s)}}function ad(aJ){if(aJ===c){aJ=av.position().top}am.scrollTop(0);I=aJ;var aM=I===0,aK=I==i,aL=aJ/i,s=-aL*(Z-v);if(aj!=aM||aH!=aK){aj=aM;aH=aK;D.trigger("jsp-arrow-change",[aj,aH,P,k])}u(aM,aK);Y.css("top",s);D.trigger("jsp-scroll-y",[-s,aM,aK]).trigger("scroll")}function W(aJ,s){if(!aF){return}if(aJ<0){aJ=0}else{if(aJ>j){aJ=j}}if(s===c){s=az.animateScroll}if(s){Q.animate(h,"left",aJ,ae)
}else{h.css("left",aJ);ae(aJ)}}function ae(aJ){if(aJ===c){aJ=h.position().left}am.scrollTop(0);aa=aJ;var aM=aa===0,aL=aa==j,aK=aJ/j,s=-aK*(T-ak);if(P!=aM||k!=aL){P=aM;k=aL;D.trigger("jsp-arrow-change",[aj,aH,P,k])}r(aM,aL);Y.css("left",s);D.trigger("jsp-scroll-x",[-s,aM,aL]).trigger("scroll")}function u(aJ,s){if(az.showArrows){ar[aJ?"addClass":"removeClass"]("jspDisabled");af[s?"addClass":"removeClass"]("jspDisabled")}}function r(aJ,s){if(az.showArrows){ay[aJ?"addClass":"removeClass"]("jspDisabled");x[s?"addClass":"removeClass"]("jspDisabled")}}function M(s,aJ){var aK=s/(Z-v);V(aK*i,aJ)}function N(aJ,s){var aK=aJ/(T-ak);W(aK*j,s)}function ab(aW,aR,aK){var aO,aL,aM,s=0,aV=0,aJ,aQ,aP,aT,aS,aU;try{aO=b(aW)}catch(aN){return}aL=aO.outerHeight();aM=aO.outerWidth();am.scrollTop(0);am.scrollLeft(0);while(!aO.is(".jspPane")){s+=aO.position().top;aV+=aO.position().left;aO=aO.offsetParent();if(/^body|html$/i.test(aO[0].nodeName)){return}}aJ=aB();aP=aJ+v;if(s<aJ||aR){aS=s-az.verticalGutter}else{if(s+aL>aP){aS=s-v+aL+az.verticalGutter}}if(aS){M(aS,aK)}aQ=aD();aT=aQ+ak;if(aV<aQ||aR){aU=aV-az.horizontalGutter}else{if(aV+aM>aT){aU=aV-ak+aM+az.horizontalGutter}}if(aU){N(aU,aK)}}function aD(){return -Y.position().left}function aB(){return -Y.position().top}function K(){var s=Z-v;return(s>20)&&(s-aB()<10)}function B(){var s=T-ak;return(s>20)&&(s-aD()<10)}function ag(){am.unbind(ac).bind(ac,function(aM,aN,aL,aJ){var aK=aa,s=I;Q.scrollBy(aL*az.mouseWheelSpeed,-aJ*az.mouseWheelSpeed,false);return aK==aa&&s==I})}function n(){am.unbind(ac)}function aC(){return false}function J(){Y.find(":input,a").unbind("focus.jsp").bind("focus.jsp",function(s){ab(s.target,false)})}function E(){Y.find(":input,a").unbind("focus.jsp")}function S(){var s,aJ,aL=[];aF&&aL.push(an[0]);aA&&aL.push(U[0]);Y.focus(function(){D.focus()});D.attr("tabindex",0).unbind("keydown.jsp keypress.jsp").bind("keydown.jsp",function(aO){if(aO.target!==this&&!(aL.length&&b(aO.target).closest(aL).length)){return}var aN=aa,aM=I;switch(aO.keyCode){case 40:case 38:case 34:case 32:case 33:case 39:case 37:s=aO.keyCode;aK();break;case 35:M(Z-v);s=null;break;case 36:M(0);s=null;break}aJ=aO.keyCode==s&&aN!=aa||aM!=I;return !aJ}).bind("keypress.jsp",function(aM){if(aM.keyCode==s){aK()}return !aJ});if(az.hideFocus){D.css("outline","none");if("hideFocus" in am[0]){D.attr("hideFocus",true)}}else{D.css("outline","");if("hideFocus" in am[0]){D.attr("hideFocus",false)}}function aK(){var aN=aa,aM=I;switch(s){case 40:Q.scrollByY(az.keyboardSpeed,false);break;case 38:Q.scrollByY(-az.keyboardSpeed,false);break;case 34:case 32:Q.scrollByY(v*az.scrollPagePercent,false);break;case 33:Q.scrollByY(-v*az.scrollPagePercent,false);break;case 39:Q.scrollByX(az.keyboardSpeed,false);break;case 37:Q.scrollByX(-az.keyboardSpeed,false);break}aJ=aN!=aa||aM!=I;return aJ}}function R(){D.attr("tabindex","-1").removeAttr("tabindex").unbind("keydown.jsp keypress.jsp")}function C(){if(location.hash&&location.hash.length>1){var aL,aJ,aK=escape(location.hash);try{aL=b(aK)}catch(s){return}if(aL.length&&Y.find(aK)){if(am.scrollTop()===0){aJ=setInterval(function(){if(am.scrollTop()>0){ab(aK,true);b(document).scrollTop(am.position().top);clearInterval(aJ)}},50)}else{ab(aK,true);b(document).scrollTop(am.position().top)}}}}function ai(){b("a.jspHijack").unbind("click.jsp-hijack").removeClass("jspHijack")}function m(){ai();b("a[href^=#]").addClass("jspHijack").bind("click.jsp-hijack",function(){var s=this.href.split("#"),aJ;if(s.length>1){aJ=s[1];if(aJ.length>0&&Y.find("#"+aJ).length>0){ab("#"+aJ,true);return false}}})}function ao(){var aK,aJ,aM,aL,aN,s=false;am.unbind("touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick").bind("touchstart.jsp",function(aO){var aP=aO.originalEvent.touches[0];aK=aD();aJ=aB();aM=aP.pageX;aL=aP.pageY;aN=false;s=true}).bind("touchmove.jsp",function(aR){if(!s){return}var aQ=aR.originalEvent.touches[0],aP=aa,aO=I;Q.scrollTo(aK+aM-aQ.pageX,aJ+aL-aQ.pageY);aN=aN||Math.abs(aM-aQ.pageX)>5||Math.abs(aL-aQ.pageY)>5;
return aP==aa&&aO==I}).bind("touchend.jsp",function(aO){s=false}).bind("click.jsp-touchclick",function(aO){if(aN){aN=false;return false}})}function g(){var s=aB(),aJ=aD();D.removeClass("jspScrollable").unbind(".jsp");D.after(ap.append(Y.children())).remove();ap.scrollTop(s);ap.scrollLeft(aJ)}b.extend(Q,{reinitialise:function(aJ){aJ=b.extend({},az,aJ);at(aJ)},scrollToElement:function(aK,aJ,s){ab(aK,aJ,s)},scrollTo:function(aK,s,aJ){N(aK,aJ);M(s,aJ)},scrollToX:function(aJ,s){N(aJ,s)},scrollToY:function(s,aJ){M(s,aJ)},scrollToPercentX:function(aJ,s){N(aJ*(T-ak),s)},scrollToPercentY:function(aJ,s){M(aJ*(Z-v),s)},scrollBy:function(aJ,s,aK){Q.scrollByX(aJ,aK);Q.scrollByY(s,aK)},scrollByX:function(s,aK){var aJ=aD()+Math[s<0?"floor":"ceil"](s),aL=aJ/(T-ak);W(aL*j,aK)},scrollByY:function(s,aK){var aJ=aB()+Math[s<0?"floor":"ceil"](s),aL=aJ/(Z-v);V(aL*i,aK)},positionDragX:function(s,aJ){W(s,aJ)},positionDragY:function(aJ,s){V(aJ,s)},animate:function(aJ,aM,s,aL){var aK={};aK[aM]=s;aJ.animate(aK,{duration:az.animateDuration,easing:az.animateEase,queue:false,step:aL})},getContentPositionX:function(){return aD()},getContentPositionY:function(){return aB()},getContentWidth:function(){return T},getContentHeight:function(){return Z},getPercentScrolledX:function(){return aD()/(T-ak)},getPercentScrolledY:function(){return aB()/(Z-v)},getIsScrollableH:function(){return aF},getIsScrollableV:function(){return aA},getContentPane:function(){return Y},scrollToBottom:function(s){V(i,s)},hijackInternalLinks:function(){m()},destroy:function(){g()}});at(O)}e=b.extend({},b.fn.jScrollPane.defaults,e);b.each(["mouseWheelSpeed","arrowButtonSpeed","trackClickSpeed","keyboardSpeed"],function(){e[this]=e[this]||e.speed});return this.each(function(){var f=b(this),g=f.data("jsp");if(g){g.reinitialise(e)}else{g=new d(f,e);f.data("jsp",g)}})};b.fn.jScrollPane.defaults={showArrows:false,maintainPosition:true,stickToBottom:false,stickToRight:false,clickOnTrack:true,autoReinitialise:false,autoReinitialiseDelay:500,verticalDragMinHeight:0,verticalDragMaxHeight:99999,horizontalDragMinWidth:0,horizontalDragMaxWidth:99999,contentWidth:c,animateScroll:false,animateDuration:300,animateEase:"linear",hijackInternalLinks:false,verticalGutter:4,horizontalGutter:4,mouseWheelSpeed:0,arrowButtonSpeed:0,arrowRepeatFreq:50,arrowScrollOnHover:false,trackClickSpeed:0,trackClickRepeatFreq:70,verticalArrowPositions:"split",horizontalArrowPositions:"split",enableKeyboardNavigation:true,hideFocus:false,keyboardSpeed:0,initialDelay:300,speed:30,scrollPagePercent:0.8}})(jQuery,this);


// ColorBox v1.3.18 - 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 Y(c,d,e){var g=b.createElement(c);return d&&(g.id=f+d),e&&(g.style.cssText=e),a(g)}function Z(a){var b=y.length,c=(Q+a)%b;return c<0?b+c:c}function $(a,b){return Math.round((/%/.test(a)?(b==="x"?z.width():z.height())/100:1)*parseInt(a,10))}function _(a){return K.photo||/\.(gif|png|jpe?g|bmp|ico)((#|\?).*)?$/i.test(a)}function ba(){var b;K=a.extend({},a.data(P,e));for(b in K)a.isFunction(K[b])&&b.slice(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 bb(b,c){a.event.trigger(b),c&&c.call(P)}function bc(){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(W.next,K.slideshowSpeed)}).bind(i,function(){clearTimeout(a)}).one(c+" "+k,e),r.removeClass(b+"off").addClass(b+"on"),a=setTimeout(W.next,K.slideshowSpeed)},e=function(){clearTimeout(a),F.text(K.slideshowStart).unbind([j,i,k,c].join(" ")).one(c,function(){W.next(),d()}),r.removeClass(b+"on").addClass(b+"off")},K.slideshowAuto?d():e()):r.removeClass(b+"off "+b+"on")}function bd(b){if(!U){P=b,ba(),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=$(K.initialWidth,"x"),K.h=$(K.initialHeight,"y"),W.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),bb(h,K.onOpen),J.add(D).hide(),I.html(K.close).show()}W.load(!0)}}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:"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:undefined},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="div";W=a.fn[e]=a[e]=function(b,c){var f=this;b=b||{},W.init();if(!f[0]){if(f.selector)return f;f=a("<a/>"),b.open=!0}return 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)&&bd(f[0]),f},W.init=function(){if(!r){if(!a("body")[0]){a(W.init);return}z=a(c),r=Y(X).attr({id:e,"class":n?f+(o?"IE6":"IE"):""}),q=Y(X,"Overlay",o?"position:absolute":"").hide(),s=Y(X,"Wrapper"),t=Y(X,"Content").append(A=Y(X,"LoadedContent","width:0; height:0; overflow:hidden"),C=Y(X,"LoadingOverlay").add(Y(X,"LoadingGraphic")),D=Y(X,"Title"),E=Y(X,"Current"),G=Y(X,"Next"),H=Y(X,"Previous"),F=Y(X,"Slideshow").bind(h,bc),I=Y(X,"Close")),s.append(Y(X).append(Y(X,"TopLeft"),u=Y(X,"TopCenter"),Y(X,"TopRight")),Y(X,!1,"clear:left").append(v=Y(X,"MiddleLeft"),t,w=Y(X,"MiddleRight")),Y(X,!1,"clear:left").append(Y(X,"BottomLeft"),x=Y(X,"BottomCenter"),Y(X,"BottomRight"))).find("div div").css({"float":"left"}),B=Y(X,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),a("body").prepend(q,r.append(s,B)),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(){W.next()}),H.click(function(){W.prev()}),I.click(function(){W.close()}),J=G.add(H).add(E).add(F),q.click(function(){K.overlayClose&&W.close()}),a(b).bind("keydown."+f,function(a){var b=a.keyCode;S&&K.escKey&&b===27&&(a.preventDefault(),W.close()),S&&K.arrowKey&&y[1]&&(b===37?(a.preventDefault(),H.click()):b===39&&(a.preventDefault(),G.click()))})}},W.remove=function(){r.add(q).remove(),r=null,a("."+g).removeData(e).removeClass(g)},W.position=function(a,b){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 c=0,d=0,e=r.offset();z.unbind("resize."+f),r.css({top:-99999,left:-99999}),K.fixed&&!o?r.css({position:"fixed"}):(c=z.scrollTop(),d=z.scrollLeft(),r.css({position:"absolute"})),K.right!==!1?d+=Math.max(z.width()-K.w-O-M-$(K.right,"x"),0):K.left!==!1?d+=$(K.left,"x"):d+=Math.round(Math.max(z.width()-K.w-O-M,0)/2),K.bottom!==!1?c+=Math.max(z.height()-K.h-N-L-$(K.bottom,"y"),0):K.top!==!1?c+=$(K.top,"y"):c+=Math.round(Math.max(z.height()-K.h-N-L,0)/2),r.css({top:e.top,left:e.left}),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:c,left:d},{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",b&&b(),setTimeout(function(){z.bind("resize."+f,W.position)},1)},step:function(){g(this)}})},W.resize=function(a){S&&(a=a||{},a.width&&(K.w=$(a.width,"x")-O-M),a.innerWidth&&(K.w=$(a.innerWidth,"x")),A.css({width:K.w}),a.height&&(K.h=$(a.height,"y")-N-L),a.innerHeight&&(K.h=$(a.innerHeight,"y")),!a.innerHeight&&!a.height&&(A.css({height:"auto"}),K.h=A.height()),A.css({height:K.h}),W.position(K.transition==="none"?0:K.speed))},W.prep=function(b){function g(){return K.w=K.w||A.width(),K.w=K.mw&&K.mw<K.w?K.mw:K.w,K.w}function h(){return K.h=K.h||A.height(),K.h=K.mh&&K.mh<K.h?K.mh:K.h,K.h}if(!S)return;var c,d=K.transition==="none"?0:K.speed;A.remove(),A=Y(X,"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 q(){n&&r[0].style.removeAttribute("filter")}var b,c,g=y.length,h,i="frameBorder",k="allowTransparency",l,o,p;if(!S)return;l=function(){clearTimeout(V),C.hide(),bb(j,K.onComplete)},n&&R&&A.fadeIn(100),D.html(K.title).add(A).show();if(g>1){typeof K.current=="string"&&E.html(K.current.replace("{current}",Q+1).replace("{total}",g)).show(),G[K.loop||Q<g-1?"show":"hide"]().html(K.next),H[K.loop||Q?"show":"hide"]().html(K.previous),K.slideshow&&F.show();if(K.preloading){b=[Z(-1),Z(1)];while(c=y[b.pop()])o=a.data(c,e).href||c.href,a.isFunction(o)&&(o=o.call(c)),_(o)&&(p=new Image,p.src=o)}}else J.hide();K.iframe?(h=Y("iframe")[0],i in h&&(h[i]=0),k in h&&(h[k]="true"),h.name=f+ +(new Date),K.fastIframe?l():a(h).one("load",l),h.src=K.href,K.scrolling||(h.scrolling="no"),a(h).addClass(f+"Iframe").appendTo(A).one(m,function(){h.src="//about:blank"})):l(),K.transition==="fade"?r.fadeTo(d,1,q):q()},K.transition==="fade"?r.fadeTo(d,0,function(){W.position(0,c)}):W.position(d,c)},W.load=function(b){var c,d,e=W.prep;T=!0,R=!1,P=y[Q],b||ba(),bb(m),bb(i,K.onLoad),K.h=K.height?$(K.height,"y")-N-L:K.innerHeight&&$(K.innerHeight,"y"),K.w=K.width?$(K.width,"x")-O-M:K.innerWidth&&$(K.innerWidth,"x"),K.mw=K.w,K.mh=K.h,K.maxWidth&&(K.mw=$(K.maxWidth,"x")-O-M,K.mw=K.w&&K.w<K.mw?K.w:K.mw),K.maxHeight&&(K.mh=$(K.maxHeight,"y")-N-L,K.mh=K.h&&K.h<K.mh?K.h:K.mh),c=K.href,V=setTimeout(function(){C.show()},100),K.inline?(Y(X).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(X,"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(){W.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(X,"Error").text("Request unsuccessful: "+d.statusText):a(this).contents())})},W.next=function(){!T&&y[1]&&(Q<y.length-1||K.loop)&&(Q=Z(1),W.load())},W.prev=function(){!T&&y[1]&&(Q||K.loop)&&(Q=Z(-1),W.load())},W.close=function(){S&&!U&&(U=!0,S=!1,bb(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(),bb(m),A.remove(),setTimeout(function(){U=!1,bb(l,K.onClosed)},1)}))},W.element=function(){return a(P)},W.settings=d,a("."+g,b).live("click",function(a){a.which>1||a.shiftKey||a.altKey||a.metaKey||(a.preventDefault(),bd(this))}),W.init()})(jQuery,document,this);


/* * jQuery Filter Demo
	 * Matt Ryall
	 * http://www.mattryall.net/blog/2008/07/jquery-filter-demo
	 *
	 * Licensed under Creative Commons Attribution 3.0.
	 * http://creativecommons.org/licenses/by/3.0/
	 */
	jQuery(function ($) {
	    $("#filter").keyup(function () {
//			$('#atoz').fadeOut();
			$('#favretailers').fadeOut();
	        var filter = $(this).val(), count = 0;
	        $("#filterlist:first li").each(function () {
	            if ($(this).text().search(new RegExp(filter, "i")) < 0) {
	                $(this).addClass("hidden");
	            } else {
	                $(this).removeClass("hidden");
	                count++;
	            }
	        });
	        $("#filter-count").text(count);
	    });
	});
	



/* ****************** TWITTER *********************** */	
	
(function($) {
 
  $.fn.tweet = function(o){
    var s = {
      username: ["nectar"],              // [string]   required, unless you want to display our tweets. :) it can be an array, just do ["username1","username2","etc"]
      list: null,                              //[string]   optional name of list belonging to username
      avatar_size: null,                      // [integer]  height and width of avatar if displayed (48px max)
      count: 3,                               // [integer]  how many tweets to display?
      intro_text: null,                       // [string]   do you want text BEFORE your your tweets?
      outro_text: null,                       // [string]   do you want text AFTER your tweets?
      join_text:  null,                       // [string]   optional text in between date and tweet, try setting to "auto"
      auto_join_text_default: "i said,",      // [string]   auto text for non verb: "i said" bullocks
      auto_join_text_ed: "i",                 // [string]   auto text for past tense: "i" surfed
      auto_join_text_ing: "i am",             // [string]   auto tense for present tense: "i was" surfing
      auto_join_text_reply: "i replied to",   // [string]   auto tense for replies: "i replied to" @someone "with"
      auto_join_text_url: "i was looking at", // [string]   auto tense for urls: "i was looking at" http:...
      loading_text: null,                     // [string]   optional loading text, displayed while tweets load
      query: null                             // [string]   optional search query
    };
    
    if(o) $.extend(s, o);
    
    $.fn.extend({
      linkUrl: function() {
        var returning = [];
        var regexp = /((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi;
        this.each(function() {
          returning.push(this.replace(regexp,"<a href=\"$1\">$1</a>"));
        });
        return $(returning);
      },
      linkUser: function() {
        var returning = [];
        var regexp = /[\@]+([A-Za-z0-9-_]+)/gi;
        this.each(function() {
          returning.push(this.replace(regexp,"<a href=\"http://twitter.com/$1\">@$1</a>"));
        });
        return $(returning);
      },
      linkHash: function() {
        var returning = [];
        var regexp = /(?:^| )[\#]+([A-Za-z0-9-_]+)/gi;
        this.each(function() {
          returning.push(this.replace(regexp, ' <a href="http://search.twitter.com/search?q=&tag=$1&lang=all&from='+s.username.join("%2BOR%2B")+'">#$1</a>'));
        });
        return $(returning);
      },
      capAwesome: function() {
        var returning = [];
        this.each(function() {
          returning.push(this.replace(/\b(awesome)\b/gi, '<span class="awesome">$1</span>'));
        });
        return $(returning);
      },
      capEpic: function() {
        var returning = [];
        this.each(function() {
          returning.push(this.replace(/\b(epic)\b/gi, '<span class="epic">$1</span>'));
        });
        return $(returning);
      },
      makeHeart: function() {
        var returning = [];
        this.each(function() {
          returning.push(this.replace(/(&lt;)+[3]/gi, "<tt class='heart'>&#x2665;</tt>"));
        });
        return $(returning);
      }
    });

    function parse_date(date_str) {
      // The non-search twitter APIs return inconsistently-formatted dates, which Date.parse
      // cannot handle in IE. We therefore perform the following transformation:
      // "Wed Apr 29 08:53:31 +0000 2009" => "Wed, Apr 29 2009 08:53:31 +0000"
      return Date.parse(date_str.replace(/^([a-z]{3})( [a-z]{3} \d\d?)(.*)( \d{4})$/i, '$1,$2$4$3'));
    }

    function relative_time(time_value) {
      var parsed_date = parse_date(time_value);
      var relative_to = (arguments.length > 1) ? arguments[1] : new Date();
      var delta = parseInt((relative_to.getTime() - parsed_date) / 1000);
      var pluralize = function (singular, n) {
        return '' + n + ' ' + singular + (n == 1 ? '' : 's');
      };
      if(delta < 60) {
      return 'less than a minute ago';
      } else if(delta < (60*60)) {
      return 'about ' + pluralize("minute", parseInt(delta / 60)) + ' ago';
      } else if(delta < (24*60*60)) {
      return 'about ' + pluralize("hour", parseInt(delta / 3600)) + ' ago';
      } else {
      return 'about ' + pluralize("day", parseInt(delta / 86400)) + ' ago';
      }
    }

    function build_url() {
      var proto = ('https:' == document.location.protocol ? 'https:' : 'http:');
      if (s.list) {
        return proto+"//api.twitter.com/1/"+s.username[0]+"/lists/"+s.list+"/statuses.json?per_page="+s.count+"&callback=?";
      } else if (s.query == null && s.username.length == 1) {
        return proto+'//api.twitter.com/1/statuses/user_timeline.json?screen_name='+s.username[0]+'&count='+s.count+'&callback=?';
      } else {
        var query = (s.query || 'from:'+s.username.join(' OR from:'));
        return proto+'//search.twitter.com/search.json?&q='+escape(query)+'&rpp='+s.count+'&callback=?';
      }
    }

    return this.each(function(i, widget){
      var list = $('<ul class="tweet_list">').appendTo(widget);
      var intro = '<p class="tweet_intro">'+s.intro_text+'</p>';
      var outro = '<p class="tweet_outro">'+s.outro_text+'</p>';
      var loading = $('<p class="loading">'+s.loading_text+'</p>');

      if(typeof(s.username) == "string"){
        s.username = [s.username];
      }

      if (s.loading_text) $(widget).append(loading);
      $.getJSON(build_url(), function(data){
        if (s.loading_text) loading.remove();
        if (s.intro_text) list.before(intro);
        var tweets = (data.results || data);
        $.each(tweets, function(i,item){
          // auto join text based on verb tense and content
          if (s.join_text == "auto") {
            if (item.text.match(/^(@([A-Za-z0-9-_]+)) .*/i)) {
              var join_text = s.auto_join_text_reply;
            } else if (item.text.match(/(^\w+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&\?\/.=]+) .*/i)) {
              var join_text = s.auto_join_text_url;
            } else if (item.text.match(/^((\w+ed)|just) .*/im)) {
              var join_text = s.auto_join_text_ed;
            } else if (item.text.match(/^(\w*ing) .*/i)) {
              var join_text = s.auto_join_text_ing;
            } else {
              var join_text = s.auto_join_text_default;
            }
          } else {
            var join_text = s.join_text;
          };

          var from_user = item.from_user || item.user.screen_name;
          var profile_image_url = item.profile_image_url || item.user.profile_image_url;
          var join_template = '<span class="tweet_join"> '+join_text+' </span>';
          var join = ((s.join_text) ? join_template : ' ');
          var avatar_template = '<a class="tweet_avatar" href="http://twitter.com/'+from_user+'"><img src="'+profile_image_url+'" height="'+s.avatar_size+'" width="'+s.avatar_size+'" alt="'+from_user+'\'s avatar" title="'+from_user+'\'s avatar" border="0"/></a>';
          var avatar = (s.avatar_size ? avatar_template : '');
          var date = '<span class="tweet_time"><a href="http://twitter.com/'+from_user+'/statuses/'+item.id+'" title="view this tweet on twitter">'+relative_time(item.created_at)+'</a></span></span>';
          var text = '<span class="container"><span class="tweet_text">' +$([item.text]).linkUrl().linkUser().linkHash().makeHeart().capAwesome().capEpic()[0]+ '</span>';

          // until we create a template option, arrange the items below to alter a tweet's display.
          list.append('<li>' + avatar + join + text + '<br />' + date + '</li>');

          list.children('li:first').addClass('tweet_first');
          list.children('li:odd').addClass('tweet_even');
          list.children('li:even').addClass('tweet_odd');
        });
        if (s.outro_text) list.after(outro);
        $(widget).trigger("loaded").trigger((tweets.length == 0 ? "empty" : "full"));
      });

    });
  };
})(jQuery);

/* Slider */

(function($) {

	$.fn.easySlider = function(options){
	  
		// default configuration properties
		var defaults = {			
			prevId: 		'prevBtn',
			prevText: 		'Previous',
			nextId: 		'nextBtn',	
			nextText: 		'Next',
			controlsShow:	false,
			controlsBefore:	'',
			controlsAfter:	'',	
			controlsFade:	true,
			firstId: 		'firstBtn',
			firstText: 		'First',
			firstShow:		false,
			lastId: 		'lastBtn',	
			lastText: 		'Last',
			lastShow:		false,				
			vertical:		false,
			speed: 			800,
			auto:			false,
			pause:			2000,
			continuous:		false, 
			numeric: 		false,
			numericId: 		'controls'
		}; 
		
		var options = $.extend(defaults, options);  
				
		this.each(function() {  
			var obj = $(this); 				
			var s = $("li", obj).length;
			var w = $("li", obj).width(); 
			var h = $("li", obj).height(); 
			var clickable = true;
			obj.width(w); 
			obj.height(h); 
			obj.css("overflow","hidden");
			var ts = s-1;
			var t = 0;
			$("ul", obj).css('width',s*w);			
			
			if(options.continuous){
				$("ul", obj).prepend($("ul li:last-child", obj).clone().css("margin-left","-"+ w +"px"));
				$("ul", obj).append($("ul li:nth-child(2)", obj).clone());
				$("ul", obj).css('width',(s+1)*w);
			};				
			
			if(!options.vertical) $("li", obj).css('float','left');
								
			if(options.controlsShow){
				var html = options.controlsBefore;				
				if(options.numeric){
					html += '<ol id="'+ options.numericId +'"></ol>';
				} else {
					if(options.firstShow) html += '<span id="'+ options.firstId +'"><a href=\"javascript:void(0);\">'+ options.firstText +'</a></span>';
					html += ' <span id="'+ options.prevId +'"><a href=\"javascript:void(0);\">'+ options.prevText +'</a></span>';
					html += ' <span id="'+ options.nextId +'"><a href=\"javascript:void(0);\">'+ options.nextText +'</a></span>';
					if(options.lastShow) html += ' <span id="'+ options.lastId +'"><a href=\"javascript:void(0);\">'+ options.lastText +'</a></span>';				
				};
				
				html += options.controlsAfter;						
				$(obj).after(html);										
			};
			
			if(options.numeric){									
				for(var i=0;i<s;i++){						
					$(document.createElement("li"))
						.attr('id',options.numericId + (i+1))
						.html('<a rel='+ i +' href=\"javascript:void(0);\">'+ (i+1) +'</a>')
						.appendTo($("#"+ options.numericId))
						.click(function(){							
							animate($("a",$(this)).attr('rel'),true);
						}); 												
				};							
			} else {
				$("a","#"+options.nextId).click(function(){		
					animate("next",true);
				});
				$("a","#"+options.prevId).click(function(){		
					animate("prev",true);				
				});	
				$("a","#"+options.firstId).click(function(){		
					animate("first",true);
				});				
				$("a","#"+options.lastId).click(function(){		
					animate("last",true);				
				});				
			};
			
			function setCurrent(i){
				i = parseInt(i)+1;
				$("li", "#" + options.numericId).removeClass("current");
				$("li#" + options.numericId + i).addClass("current");
			};
			
			function adjust(){
				if(t>ts) t=0;		
				if(t<0) t=ts;	
				if(!options.vertical) {
					$("ul",obj).css("margin-left",(t*w*-1));
				} else {
					$("ul",obj).css("margin-left",(t*h*-1));
				}
				clickable = true;
				if(options.numeric) setCurrent(t);
			};
			
			function animate(dir,clicked){
				if (clickable){
					clickable = false;
					var ot = t;				
					switch(dir){
						case "next":
							t = (ot>=ts) ? (options.continuous ? t+1 : ts) : t+1;						
							break; 
						case "prev":
							t = (t<=0) ? (options.continuous ? t-1 : 0) : t-1;
							break; 
						case "first":
							t = 0;
							break; 
						case "last":
							t = ts;
							break; 
						default:
							t = dir;
							break; 
					};	
					var diff = Math.abs(ot-t);
					var speed = diff*options.speed;						
					if(!options.vertical) {
						p = (t*w*-1);
						$("ul",obj).animate(
							{ marginLeft: p }, 
							{ queue:false, duration:speed, complete:adjust }
						);				
					} else {
						p = (t*h*-1);
						$("ul",obj).animate(
							{ marginTop: p }, 
							{ queue:false, duration:speed, complete:adjust }
						);					
					};
					
					if(!options.continuous && options.controlsFade){					
						if(t==ts){
							$("a","#"+options.nextId).hide();
							$("a","#"+options.lastId).hide();
						} else {
							$("a","#"+options.nextId).show();
							$("a","#"+options.lastId).show();					
						};
						if(t==0){
							$("a","#"+options.prevId).hide();
							$("a","#"+options.firstId).hide();
						} else {
							$("a","#"+options.prevId).show();
							$("a","#"+options.firstId).show();
						};					
					};				
					
					if(clicked) clearTimeout(timeout);
					if(options.auto && dir=="next" && !clicked){;
						timeout = setTimeout(function(){
							animate("next",false);
						},diff*options.speed+options.pause);
					};
			
				};
				
			};
			// init
			var timeout;
			if(options.auto){;
				timeout = setTimeout(function(){
					animate("next",false);
				},options.pause);
			};		
			
			if(options.numeric) setCurrent(0);
		
			if(!options.continuous && options.controlsFade){					
				$("a","#"+options.prevId).hide();
				$("a","#"+options.firstId).hide();				
			};				
			
		});
	  
	};

})(jQuery);


/**
 * Cookie plugin
 *
 * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 */

/**
 * Create a cookie with the given name and value and other optional parameters.
 *
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Set the value of a cookie.
 * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
 * @desc Create a cookie with all available options.
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Create a session cookie.
 * @example $.cookie('the_cookie', null);
 * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
 *       used when the cookie was set.
 *
 * @param String name The name of the cookie.
 * @param String value The value of the cookie.
 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
 *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
 *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
 *                             when the the browser exits.
 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
 *                        require a secure protocol (like HTTPS).
 * @type undefined
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

/**
 * Get the value of a cookie with the given name.
 *
 * @example $.cookie('the_cookie');
 * @desc Get the value of a cookie.
 *
 * @param String name The name of the cookie.
 * @return The value of the cookie.
 * @type String
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */
jQuery.cookie = function(name, value, options) {
    if (typeof value != 'undefined') { // name and value given, set cookie
        options = options || {};
        if (value === null) {
            value = '';
            options.expires = -1;
        }
        var expires = '';
        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
            var date;
            if (typeof options.expires == 'number') {
                date = new Date();
                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
            } else {
                date = options.expires;
            }
            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
        }
        // CAUTION: Needed to parenthesize options.path and options.domain
        // in the following expressions, otherwise they evaluate to undefined
        // in the packed version for some reason...
        var path = options.path ? '; path=' + (options.path) : '';
        var domain = options.domain ? '; domain=' + (options.domain) : '';
        var secure = options.secure ? '; secure' : '';
        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
    } else { // only name given, get cookie
        var cookieValue = null;
        if (document.cookie && document.cookie != '') {
            var cookies = document.cookie.split(';');
            for (var i = 0; i < cookies.length; i++) {
                var cookie = jQuery.trim(cookies[i]);
                // Does this cookie string begin with the name we want?
                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};


/*
 * jQuery validation plug-in 1.7
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
 * http://docs.jquery.com/Plugins/Validation
 *
 * Copyright (c) 2006 - 2008 Jörn Zaefferer
 *
 * $Id: jquery.validate.js 6403 2009-06-17 14:27:16Z joern.zaefferer $
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
(function(a){a.extend(a.fn,{validate:function(b){if(!this.length){b&&b.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return}var c=a.data(this[0],"validator");if(c){return c}c=new a.validator(b,this[0]);a.data(this[0],"validator",c);if(c.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){c.cancelSubmit=true});if(c.settings.submitHandler){this.find("input, button").filter(":submit").click(function(){c.submitButton=this})}this.submit(function(d){if(c.settings.debug){d.preventDefault()}function e(){if(c.settings.submitHandler){if(c.submitButton){var f=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(c.submitButton.value).appendTo(c.currentForm)}c.settings.submitHandler.call(c,c.currentForm);if(c.submitButton){f.remove()}return false}return true}if(c.cancelSubmit){c.cancelSubmit=false;return e()}if(c.form()){if(c.pendingRequest){c.formSubmitted=true;return false}return e()}else{c.focusInvalid();return false}})}return c},valid:function(){if(a(this[0]).is("form")){return this.validate().form()}else{var c=true;var b=a(this[0].form).validate();this.each(function(){c&=b.element(this)});return c}},removeAttrs:function(d){var b={},c=this;a.each(d.split(/\s/),function(e,f){b[f]=c.attr(f);c.removeAttr(f)});return b},rules:function(e,b){var g=this[0];if(e){var d=a.data(g.form,"validator").settings;var i=d.rules;var j=a.validator.staticRules(g);switch(e){case"add":a.extend(j,a.validator.normalizeRule(b));i[g.name]=j;if(b.messages){d.messages[g.name]=a.extend(d.messages[g.name],b.messages)}break;case"remove":if(!b){delete i[g.name];return j}var h={};a.each(b.split(/\s/),function(k,l){h[l]=j[l];delete j[l]});return h}}var f=a.validator.normalizeRules(a.extend({},a.validator.metadataRules(g),a.validator.classRules(g),a.validator.attributeRules(g),a.validator.staticRules(g)),g);if(f.required){var c=f.required;delete f.required;f=a.extend({required:c},f)}return f}});a.extend(a.expr[":"],{blank:function(b){return !a.trim(""+b.value)},filled:function(b){return !!a.trim(""+b.value)},unchecked:function(b){return !b.checked}});a.validator=function(b,c){this.settings=a.extend(true,{},a.validator.defaults,b);this.currentForm=c;this.init()};a.validator.format=function(b,c){if(arguments.length==1){return function(){var d=a.makeArray(arguments);d.unshift(b);return a.validator.format.apply(this,d)}}if(arguments.length>2&&c.constructor!=Array){c=a.makeArray(arguments).slice(1)}if(c.constructor!=Array){c=[c]}a.each(c,function(d,e){b=b.replace(new RegExp("\\{"+d+"\\}","g"),e)});return b};a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(b){this.lastActive=b;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,b,this.settings.errorClass,this.settings.validClass);this.addWrapper(this.errorsFor(b)).hide()}},onfocusout:function(b){if(!this.checkable(b)&&(b.name in this.submitted||!this.optional(b))){this.element(b)}},onkeyup:function(b){if(b.name in this.submitted||b==this.lastElement){this.element(b)}},onclick:function(b){if(b.name in this.submitted){this.element(b)}else{if(b.parentNode.name in this.submitted){this.element(b.parentNode)}}},highlight:function(d,b,c){a(d).addClass(b).removeClass(c)},unhighlight:function(d,b,c){a(d).removeClass(b).addClass(c)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){this.labelContainer=a(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm);this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=(this.groups={});a.each(this.settings.groups,function(e,f){a.each(f.split(/\s/),function(h,g){b[g]=e})});var d=this.settings.rules;a.each(d,function(e,f){d[e]=a.validator.normalizeRule(f)});function c(g){var f=a.data(this[0].form,"validator"),e="on"+g.type.replace(/^validate/,"");f.settings[e]&&f.settings[e].call(f,this[0])}a(this.currentForm).validateDelegate(":text, :password, :file, select, textarea","focusin focusout keyup",c).validateDelegate(":radio, :checkbox, select, option","click",c);if(this.settings.invalidHandler){a(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)}},form:function(){this.checkForm();a.extend(this.submitted,this.errorMap);this.invalid=a.extend({},this.errorMap);if(!this.valid()){a(this.currentForm).triggerHandler("invalid-form",[this])}this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var b=0,c=(this.currentElements=this.elements());c[b];b++){this.check(c[b])}return this.valid()},element:function(c){c=this.clean(c);this.lastElement=c;this.prepareElement(c);this.currentElements=a(c);var b=this.check(c);if(b){delete this.invalid[c.name]}else{this.invalid[c.name]=true}if(!this.numberOfInvalids()){this.toHide=this.toHide.add(this.containers)}this.showErrors();return b},showErrors:function(c){if(c){a.extend(this.errorMap,c);this.errorList=[];for(var b in c){this.errorList.push({message:c[b],element:this.findByName(b)[0]})}this.successList=a.grep(this.successList,function(d){return !(d.name in c)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){if(a.fn.resetForm){a(this.currentForm).resetForm()}this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(d){var c=0;for(var b in d){c++}return c},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid){try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}}},findLastActive:function(){var b=this.lastActive;return b&&a.grep(this.errorList,function(c){return c.element.name==b.name}).length==1&&b},elements:function(){var c=this,b={};return a([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&c.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in b||!c.objectLength(a(this).rules())){return false}b[this.name]=true;return true})},clean:function(b){return a(b)[0]},errors:function(){return a(this.settings.errorElement+"."+this.settings.errorClass,this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=a([]);this.toHide=a([]);this.currentElements=a([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(b){this.reset();this.toHide=this.errorsFor(b)},check:function(c){c=this.clean(c);if(this.checkable(c)){c=this.findByName(c.name).not(this.settings.ignore)[0]}var h=a(c).rules();var d=false;for(var i in h){var g={method:i,parameters:h[i]};try{var b=a.validator.methods[i].call(this,c.value.replace(/\r/g,""),c,g.parameters);if(b=="dependency-mismatch"){d=true;continue}d=false;if(b=="pending"){this.toHide=this.toHide.not(this.errorsFor(c));return}if(!b){this.formatAndAdd(c,g);return false}}catch(f){this.settings.debug&&window.console&&console.log("exception occured when checking element "+c.id+", check the '"+g.method+"' method",f);throw f}}if(d){return}if(this.objectLength(h)){this.successList.push(c)}return true},customMetaMessage:function(b,d){if(!a.metadata){return}var c=this.settings.meta?a(b).metadata()[this.settings.meta]:a(b).metadata();return c&&c.messages&&c.messages[d]},customMessage:function(c,d){var b=this.settings.messages[c];return b&&(b.constructor==String?b:b[d])},findDefined:function(){for(var b=0;b<arguments.length;b++){if(arguments[b]!==undefined){return arguments[b]}}return undefined},defaultMessage:function(b,c){return this.findDefined(this.customMessage(b.name,c),this.customMetaMessage(b,c),!this.settings.ignoreTitle&&b.title||undefined,a.validator.messages[c],"<strong>Warning: No message defined for "+b.name+"</strong>")},formatAndAdd:function(c,e){var d=this.defaultMessage(c,e.method),b=/\$?\{(\d+)\}/g;if(typeof d=="function"){d=d.call(this,e.parameters,c)}else{if(b.test(d)){d=jQuery.format(d.replace(b,"{$1}"),e.parameters)}}this.errorList.push({message:d,element:c});this.errorMap[c.name]=d;this.submitted[c.name]=d},addWrapper:function(b){if(this.settings.wrapper){b=b.add(b.parent(this.settings.wrapper))}return b},defaultShowErrors:function(){for(var c=0;this.errorList[c];c++){var b=this.errorList[c];this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass);this.showLabel(b.element,b.message)}if(this.errorList.length){this.toShow=this.toShow.add(this.containers)}if(this.settings.success){for(var c=0;this.successList[c];c++){this.showLabel(this.successList[c])}}if(this.settings.unhighlight){for(var c=0,d=this.validElements();d[c];c++){this.settings.unhighlight.call(this,d[c],this.settings.errorClass,this.settings.validClass)}}this.toHide=this.toHide.not(this.toShow);this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(c,d){var b=this.errorsFor(c);if(b.length){b.removeClass().addClass(this.settings.errorClass);b.attr("generated")&&b.html(d)}else{b=a("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(c),generated:true}).addClass(this.settings.errorClass).html(d||"");if(this.settings.wrapper){b=b.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()}if(!this.labelContainer.append(b).length){this.settings.errorPlacement?this.settings.errorPlacement(b,a(c)):b.insertAfter(c)}}if(!d&&this.settings.success){b.text("");typeof this.settings.success=="string"?b.addClass(this.settings.success):this.settings.success(b)}this.toShow=this.toShow.add(b)},errorsFor:function(c){var b=this.idOrName(c);return this.errors().filter(function(){return a(this).attr("for")==b})},idOrName:function(b){return this.groups[b.name]||(this.checkable(b)?b.name:b.id||b.name)},checkable:function(b){return/radio|checkbox/i.test(b.type)},findByName:function(b){var c=this.currentForm;return a(document.getElementsByName(b)).map(function(d,e){return e.form==c&&e.name==b&&e||null})},getLength:function(c,b){switch(b.nodeName.toLowerCase()){case"select":return a("option:selected",b).length;case"input":if(this.checkable(b)){return this.findByName(b.name).filter(":checked").length}}return c.length},depend:function(c,b){return this.dependTypes[typeof c]?this.dependTypes[typeof c](c,b):true},dependTypes:{"boolean":function(c,b){return c},string:function(c,b){return !!a(c,b.form).length},"function":function(c,b){return c(b)}},optional:function(b){return !a.validator.methods.required.call(this,a.trim(b.value),b)&&"dependency-mismatch"},startRequest:function(b){if(!this.pending[b.name]){this.pendingRequest++;this.pending[b.name]=true}},stopRequest:function(b,c){this.pendingRequest--;if(this.pendingRequest<0){this.pendingRequest=0}delete this.pending[b.name];if(c&&this.pendingRequest==0&&this.formSubmitted&&this.form()){a(this.currentForm).submit();this.formSubmitted=false}else{if(!c&&this.pendingRequest==0&&this.formSubmitted){a(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false}}},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:true,message:this.defaultMessage(b,"remote")})}},classRuleSettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(b,c){b.constructor==String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(c){var d={};var b=a(c).attr("class");b&&a.each(b.split(" "),function(){if(this in a.validator.classRuleSettings){a.extend(d,a.validator.classRuleSettings[this])}});return d},attributeRules:function(c){var e={};var b=a(c);for(var f in a.validator.methods){var d=b.attr(f);if(d){e[f]=d}}if(e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)){delete e.maxlength}return e},metadataRules:function(b){if(!a.metadata){return{}}var c=a.data(b.form,"validator").settings.meta;return c?a(b).metadata()[c]:a(b).metadata()},staticRules:function(c){var d={};var b=a.data(c.form,"validator");if(b.settings.rules){d=a.validator.normalizeRule(b.settings.rules[c.name])||{}}return d},normalizeRules:function(c,b){a.each(c,function(f,e){if(e===false){delete c[f];return}if(e.param||e.depends){var d=true;switch(typeof e.depends){case"string":d=!!a(e.depends,b.form).length;break;case"function":d=e.depends.call(b,b);break}if(d){c[f]=e.param!==undefined?e.param:true}else{delete c[f]}}});a.each(c,function(d,e){c[d]=a.isFunction(e)?e(b):e});a.each(["minlength","maxlength","min","max"],function(){if(c[this]){c[this]=Number(c[this])}});a.each(["rangelength","range"],function(){if(c[this]){c[this]=[Number(c[this][0]),Number(c[this][1])]}});if(a.validator.autoCreateRanges){if(c.min&&c.max){c.range=[c.min,c.max];delete c.min;delete c.max}if(c.minlength&&c.maxlength){c.rangelength=[c.minlength,c.maxlength];delete c.minlength;delete c.maxlength}}if(c.messages){delete c.messages}return c},normalizeRule:function(c){if(typeof c=="string"){var b={};a.each(c.split(/\s/),function(){b[this]=true});c=b}return c},addMethod:function(b,d,c){a.validator.methods[b]=d;a.validator.messages[b]=c!=undefined?c:a.validator.messages[b];if(d.length<3){a.validator.addClassRules(b,a.validator.normalizeRule(b))}},methods:{required:function(c,b,e){if(!this.depend(e,b)){return"dependency-mismatch"}switch(b.nodeName.toLowerCase()){case"select":var d=a(b).val();return d&&d.length>0;case"input":if(this.checkable(b)){return this.getLength(c,b)>0}default:return a.trim(c).length>0}},remote:function(f,c,g){if(this.optional(c)){return"dependency-mismatch"}var d=this.previousValue(c);if(!this.settings.messages[c.name]){this.settings.messages[c.name]={}}d.originalMessage=this.settings.messages[c.name].remote;this.settings.messages[c.name].remote=d.message;g=typeof g=="string"&&{url:g}||g;if(this.pending[c.name]){return"pending"}if(d.old===f){return d.valid}d.old=f;var b=this;this.startRequest(c);var e={};e[c.name]=f;a.ajax(a.extend(true,{url:g,mode:"abort",port:"validate"+c.name,dataType:"json",data:e,success:function(i){b.settings.messages[c.name].remote=d.originalMessage;var k=i===true;if(k){var h=b.formSubmitted;b.prepareElement(c);b.formSubmitted=h;b.successList.push(c);b.showErrors()}else{var l={};var j=(d.message=i||b.defaultMessage(c,"remote"));l[c.name]=a.isFunction(j)?j(f):j;b.showErrors(l)}d.valid=k;b.stopRequest(c,k)}},g));return"pending"},minlength:function(c,b,d){return this.optional(b)||this.getLength(a.trim(c),b)>=d},maxlength:function(c,b,d){return this.optional(b)||this.getLength(a.trim(c),b)<=d},rangelength:function(d,b,e){var c=this.getLength(a.trim(d),b);return this.optional(b)||(c>=e[0]&&c<=e[1])},min:function(c,b,d){return this.optional(b)||c>=d},max:function(c,b,d){return this.optional(b)||c<=d},range:function(c,b,d){return this.optional(b)||(c>=d[0]&&c<=d[1])},email:function(c,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(c)},url:function(c,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(c)},date:function(c,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(c))},dateISO:function(c,b){return this.optional(b)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(c)},number:function(c,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(c)},digits:function(c,b){return this.optional(b)||/^\d+$/.test(c)},creditcard:function(f,c){if(this.optional(c)){return"dependency-mismatch"}if(/[^0-9-]+/.test(f)){return false}var g=0,e=0,b=false;f=f.replace(/\D/g,"");for(var h=f.length-1;h>=0;h--){var d=f.charAt(h);var e=parseInt(d,10);if(b){if((e*=2)>9){e-=9}}g+=e;b=!b}return(g%10)==0},accept:function(c,b,d){d=typeof d=="string"?d.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(b)||c.match(new RegExp(".("+d+")$","i"))},equalTo:function(c,b,e){var d=a(e).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){a(b).valid()});return c==d.val()}}});a.format=a.validator.format})(jQuery);(function(c){var a={};if(c.ajaxPrefilter){c.ajaxPrefilter(function(f,e,g){var d=f.port;if(f.mode=="abort"){if(a[d]){a[d].abort()}a[d]=g}})}else{var b=c.ajax;c.ajax=function(e){e=c.extend(e,c.extend({},c.ajaxSettings,e));var d=e.port;if(e.mode=="abort"){if(a[d]){a[d].abort()}return(a[d]=b.apply(this,arguments))}return b.apply(this,arguments)}}})(jQuery);(function(a){if(!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener){a.each({focus:"focusin",blur:"focusout"},function(c,b){a.event.special[b]={setup:function(){this.addEventListener(c,d,true)},teardown:function(){this.removeEventListener(c,d,true)},handler:function(f){arguments[0]=a.event.fix(f);arguments[0].type=b;return a.event.handle.apply(this,arguments)}};function d(f){f=a.event.fix(f);f.type=b;return a.event.handle.call(this,f)}})}a.extend(a.fn,{validateDelegate:function(d,c,b){return this.bind(c,function(e){var f=a(e.target);if(f.is(d)){return b.apply(f,arguments)}})}})})(jQuery);


/*
 * jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010
 * http://benalman.com/projects/jquery-bbq-plugin/
 * 
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * http://benalman.com/about/license/
 */
(function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&&E(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new RegExp(F.join("|"),"g")};c.noEscape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g," ").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M<N?O[P]||(R[M+1]&&isNaN(R[M+1])?{}:[]):J}}else{if($.isArray(H[P])){H[P].push(J)}else{if(H[P]!==i){H[P]=[H[P],J]}else{H[P]=J}}}}else{if(P){H[P]=F?i:""}}});return H};function z(H,F,G){if(F===i||typeof F==="boolean"){G=F;F=a[H?D:A]()}else{F=E(F)?F.replace(H?w:x,""):F}return l(F,G)}l[A]=B(z,0);l[D]=v=B(z,1);$[y]||($[y]=function(F){return $.extend(C,F)})({a:k,base:k,iframe:t,img:t,input:t,form:"action",link:k,script:t});j=$[y];function s(I,G,H,F){if(!E(H)&&typeof H!=="object"){F=H;H=G;G=i}return this.each(function(){var L=$(this),J=G||j()[(this.nodeName||"").toLowerCase()]||"",K=J&&L.attr(J)||"";L.attr(J,a[I](K,H,F))})}$.fn[A]=B(s,A);$.fn[D]=B(s,D);b.pushState=q=function(I,F){if(E(I)&&/^#/.test(I)&&F===i){F=2}var H=I!==i,G=c(p[g][k],H?I:{},H?F:2);p[g][k]=G+(/#/.test(G)?"":"#")};b.getState=u=function(F,G){return F===i||typeof F==="boolean"?v(F):v(G)[F]};b.removeState=function(F){var G={};if(F!==i){G=u();$.each($.isArray(F)?F:arguments,function(I,H){delete G[H]})}q(G,2)};e[d]=$.extend(e[d],{add:function(F){var H;function G(J){var I=J[D]=c();J.getState=function(K,L){return K===i||typeof K==="boolean"?l(I,K):l(I,L)[K]};H.apply(this,arguments)}if($.isFunction(F)){H=F;return G}else{H=F.handler;F.handler=G}}})})(jQuery,this);
/*
 * jQuery hashchange event - v1.2 - 2/11/2010
 * http://benalman.com/projects/jquery-hashchange-plugin/
 * 
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * http://benalman.com/about/license/
 */
(function($,i,b){var j,k=$.event.special,c="location",d="hashchange",l="href",f=$.browser,g=document.documentMode,h=f.msie&&(g===b||g<8),e="on"+d in i&&!h;function a(m){m=m||i[c][l];return m.replace(/^[^#]*#?(.*)$/,"$1")}$[d+"Delay"]=100;k[d]=$.extend(k[d],{setup:function(){if(e){return false}$(j.start)},teardown:function(){if(e){return false}$(j.stop)}});j=(function(){var m={},r,n,o,q;function p(){o=q=function(s){return s};if(h){n=$('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow;q=function(){return a(n.document[c][l])};o=function(u,s){if(u!==s){var t=n.document;t.open().close();t[c].hash="#"+u}};o(a())}}m.start=function(){if(r){return}var t=a();o||p();(function s(){var v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,"")+"#"+u}}r=setTimeout(s,$[d+"Delay"])})()};m.stop=function(){if(!n){r&&clearTimeout(r);r=0}};return m})()})(jQuery,this);




/*	
	jQuery pub/sub plugin by Peter Higgins (dante@dojotoolkit.org)

	Loosely based on Dojo publish/subscribe API, limited in scope. Rewritten blindly.

	Original is (c) Dojo Foundation 2004-2010. Released under either AFL or new BSD, see:
	http://dojofoundation.org/license for more information.

*/	
;(function(d){
	var cache = {};
	d.publish = function(/* String */topic, /* Array? */args){
		cache[topic] && d.each(cache[topic], function(){
			this.apply(d, args || []);
		});
	};
	d.subscribe = function(/* String */topic, /* Function */callback){
		if(!cache[topic]){
			cache[topic] = [];
		}
		cache[topic].push(callback);
		return [topic, callback]; // Array
	};
	d.unsubscribe = function(/* Array */handle){
		var t = handle[0];
		cache[t] && d.each(cache[t], function(idx){
			if(this == handle[1]){
				cache[t].splice(idx, 1);
			}
		});
	};
})(jQuery);

/*
 * jQuery branch plugin v0.1
 */
(function(b){var a={},d=function(){var e;this.each(function(){if(b(this).is(":checked")){e=b(this)}});if(e){c(e.attr("name"),e.val())}else{c(this.attr("name"))}return this},c=function(h,f){var g=a[h],e=this;b.each(g,function(j,i){b.each(i,function(k,l){b(l).find("input, textarea").attr("disabled","disabled");b(l).hide()})});b.each(g,function(j,i){if(j===f){b.each(i,function(k,l){b(l).find("input, textarea").removeAttr("disabled");b(l).show()})}})};b.fn.branch=function(h,g){var e={},i=this.attr("name");g=b.isArray(g)?g:[g];if(!a.hasOwnProperty(i)){a[i]={};this.click(function(){c(i,b(this).val())})}var f=a[i];if(f.hasOwnProperty(h)){f[h]=f[h].concat(g)}else{f[h]=g}return d.call(this)}})(jQuery);

/* Handlebars js */
if (typeof Handlebars === 'undefined'){	// this avoids conflict with JMVC
	// lib/handlebars/base.js
	var Handlebars = {};

	Handlebars.VERSION = "1.0.beta.6";

	Handlebars.helpers  = {};
	Handlebars.partials = {};

	Handlebars.registerHelper = function(name, fn, inverse) {
	  if(inverse) { fn.not = inverse; }
	  this.helpers[name] = fn;
	};

	Handlebars.registerPartial = function(name, str) {
	  this.partials[name] = str;
	};

	Handlebars.registerHelper('helperMissing', function(arg) {
	  if(arguments.length === 2) {
		return undefined;
	  } else {
		throw new Error("Could not find property '" + arg + "'");
	  }
	});

	var toString = Object.prototype.toString, functionType = "[object Function]";

	Handlebars.registerHelper('blockHelperMissing', function(context, options) {
	  var inverse = options.inverse || function() {}, fn = options.fn;


	  var ret = "";
	  var type = toString.call(context);

	  if(type === functionType) { context = context.call(this); }

	  if(context === true) {
		return fn(this);
	  } else if(context === false || context == null) {
		return inverse(this);
	  } else if(type === "[object Array]") {
		if(context.length > 0) {
		  for(var i=0, j=context.length; i<j; i++) {
			ret = ret + fn(context[i]);
		  }
		} else {
		  ret = inverse(this);
		}
		return ret;
	  } else {
		return fn(context);
	  }
	});

	Handlebars.registerHelper('each', function(context, options) {
	  var fn = options.fn, inverse = options.inverse;
	  var ret = "";

	  if(context && context.length > 0) {
		for(var i=0, j=context.length; i<j; i++) {
		  ret = ret + fn(context[i]);
		}
	  } else {
		ret = inverse(this);
	  }
	  return ret;
	});

	Handlebars.registerHelper('if', function(context, options) {
	  var type = toString.call(context);
	  if(type === functionType) { context = context.call(this); }

	  if(!context || Handlebars.Utils.isEmpty(context)) {
		return options.inverse(this);
	  } else {
		return options.fn(this);
	  }
	});

	Handlebars.registerHelper('unless', function(context, options) {
	  var fn = options.fn, inverse = options.inverse;
	  options.fn = inverse;
	  options.inverse = fn;

	  return Handlebars.helpers['if'].call(this, context, options);
	});

	Handlebars.registerHelper('with', function(context, options) {
	  return options.fn(context);
	});

	Handlebars.registerHelper('log', function(context) {
	  Handlebars.log(context);
	});
	;
	// lib/handlebars/compiler/parser.js
	/* Jison generated parser */
	var handlebars = (function(){

	var parser = {trace: function trace() { },
	yy: {},
	symbols_: {"error":2,"root":3,"program":4,"EOF":5,"statements":6,"simpleInverse":7,"statement":8,"openInverse":9,"closeBlock":10,"openBlock":11,"mustache":12,"partial":13,"CONTENT":14,"COMMENT":15,"OPEN_BLOCK":16,"inMustache":17,"CLOSE":18,"OPEN_INVERSE":19,"OPEN_ENDBLOCK":20,"path":21,"OPEN":22,"OPEN_UNESCAPED":23,"OPEN_PARTIAL":24,"params":25,"hash":26,"param":27,"STRING":28,"INTEGER":29,"BOOLEAN":30,"hashSegments":31,"hashSegment":32,"ID":33,"EQUALS":34,"pathSegments":35,"SEP":36,"$accept":0,"$end":1},
	terminals_: {2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"OPEN_PARTIAL",28:"STRING",29:"INTEGER",30:"BOOLEAN",33:"ID",34:"EQUALS",36:"SEP"},
	productions_: [0,[3,2],[4,3],[4,1],[4,0],[6,1],[6,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,3],[13,4],[7,2],[17,3],[17,2],[17,2],[17,1],[25,2],[25,1],[27,1],[27,1],[27,1],[27,1],[26,1],[31,2],[31,1],[32,3],[32,3],[32,3],[32,3],[21,1],[35,3],[35,1]],
	performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {

	var $0 = $$.length - 1;
	switch (yystate) {
	case 1: return $$[$0-1] 
	break;
	case 2: this.$ = new yy.ProgramNode($$[$0-2], $$[$0]) 
	break;
	case 3: this.$ = new yy.ProgramNode($$[$0]) 
	break;
	case 4: this.$ = new yy.ProgramNode([]) 
	break;
	case 5: this.$ = [$$[$0]] 
	break;
	case 6: $$[$0-1].push($$[$0]); this.$ = $$[$0-1] 
	break;
	case 7: this.$ = new yy.InverseNode($$[$0-2], $$[$0-1], $$[$0]) 
	break;
	case 8: this.$ = new yy.BlockNode($$[$0-2], $$[$0-1], $$[$0]) 
	break;
	case 9: this.$ = $$[$0] 
	break;
	case 10: this.$ = $$[$0] 
	break;
	case 11: this.$ = new yy.ContentNode($$[$0]) 
	break;
	case 12: this.$ = new yy.CommentNode($$[$0]) 
	break;
	case 13: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]) 
	break;
	case 14: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]) 
	break;
	case 15: this.$ = $$[$0-1] 
	break;
	case 16: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1]) 
	break;
	case 17: this.$ = new yy.MustacheNode($$[$0-1][0], $$[$0-1][1], true) 
	break;
	case 18: this.$ = new yy.PartialNode($$[$0-1]) 
	break;
	case 19: this.$ = new yy.PartialNode($$[$0-2], $$[$0-1]) 
	break;
	case 20: 
	break;
	case 21: this.$ = [[$$[$0-2]].concat($$[$0-1]), $$[$0]] 
	break;
	case 22: this.$ = [[$$[$0-1]].concat($$[$0]), null] 
	break;
	case 23: this.$ = [[$$[$0-1]], $$[$0]] 
	break;
	case 24: this.$ = [[$$[$0]], null] 
	break;
	case 25: $$[$0-1].push($$[$0]); this.$ = $$[$0-1]; 
	break;
	case 26: this.$ = [$$[$0]] 
	break;
	case 27: this.$ = $$[$0] 
	break;
	case 28: this.$ = new yy.StringNode($$[$0]) 
	break;
	case 29: this.$ = new yy.IntegerNode($$[$0]) 
	break;
	case 30: this.$ = new yy.BooleanNode($$[$0]) 
	break;
	case 31: this.$ = new yy.HashNode($$[$0]) 
	break;
	case 32: $$[$0-1].push($$[$0]); this.$ = $$[$0-1] 
	break;
	case 33: this.$ = [$$[$0]] 
	break;
	case 34: this.$ = [$$[$0-2], $$[$0]] 
	break;
	case 35: this.$ = [$$[$0-2], new yy.StringNode($$[$0])] 
	break;
	case 36: this.$ = [$$[$0-2], new yy.IntegerNode($$[$0])] 
	break;
	case 37: this.$ = [$$[$0-2], new yy.BooleanNode($$[$0])] 
	break;
	case 38: this.$ = new yy.IdNode($$[$0]) 
	break;
	case 39: $$[$0-2].push($$[$0]); this.$ = $$[$0-2]; 
	break;
	case 40: this.$ = [$$[$0]] 
	break;
	}
	},
	table: [{3:1,4:2,5:[2,4],6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{1:[3]},{5:[1,16]},{5:[2,3],7:17,8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,19],20:[2,3],22:[1,13],23:[1,14],24:[1,15]},{5:[2,5],14:[2,5],15:[2,5],16:[2,5],19:[2,5],20:[2,5],22:[2,5],23:[2,5],24:[2,5]},{4:20,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{4:21,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],24:[2,9]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],24:[2,10]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],24:[2,11]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],24:[2,12]},{17:22,21:23,33:[1,25],35:24},{17:26,21:23,33:[1,25],35:24},{17:27,21:23,33:[1,25],35:24},{17:28,21:23,33:[1,25],35:24},{21:29,33:[1,25],35:24},{1:[2,1]},{6:30,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{5:[2,6],14:[2,6],15:[2,6],16:[2,6],19:[2,6],20:[2,6],22:[2,6],23:[2,6],24:[2,6]},{17:22,18:[1,31],21:23,33:[1,25],35:24},{10:32,20:[1,33]},{10:34,20:[1,33]},{18:[1,35]},{18:[2,24],21:40,25:36,26:37,27:38,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,38],28:[2,38],29:[2,38],30:[2,38],33:[2,38],36:[1,46]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],36:[2,40]},{18:[1,47]},{18:[1,48]},{18:[1,49]},{18:[1,50],21:51,33:[1,25],35:24},{5:[2,2],8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,2],22:[1,13],23:[1,14],24:[1,15]},{14:[2,20],15:[2,20],16:[2,20],19:[2,20],22:[2,20],23:[2,20],24:[2,20]},{5:[2,7],14:[2,7],15:[2,7],16:[2,7],19:[2,7],20:[2,7],22:[2,7],23:[2,7],24:[2,7]},{21:52,33:[1,25],35:24},{5:[2,8],14:[2,8],15:[2,8],16:[2,8],19:[2,8],20:[2,8],22:[2,8],23:[2,8],24:[2,8]},{14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],24:[2,14]},{18:[2,22],21:40,26:53,27:54,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,23]},{18:[2,26],28:[2,26],29:[2,26],30:[2,26],33:[2,26]},{18:[2,31],32:55,33:[1,56]},{18:[2,27],28:[2,27],29:[2,27],30:[2,27],33:[2,27]},{18:[2,28],28:[2,28],29:[2,28],30:[2,28],33:[2,28]},{18:[2,29],28:[2,29],29:[2,29],30:[2,29],33:[2,29]},{18:[2,30],28:[2,30],29:[2,30],30:[2,30],33:[2,30]},{18:[2,33],33:[2,33]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],34:[1,57],36:[2,40]},{33:[1,58]},{14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],24:[2,13]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],24:[2,16]},{5:[2,17],14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],24:[2,17]},{5:[2,18],14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],24:[2,18]},{18:[1,59]},{18:[1,60]},{18:[2,21]},{18:[2,25],28:[2,25],29:[2,25],30:[2,25],33:[2,25]},{18:[2,32],33:[2,32]},{34:[1,57]},{21:61,28:[1,62],29:[1,63],30:[1,64],33:[1,25],35:24},{18:[2,39],28:[2,39],29:[2,39],30:[2,39],33:[2,39],36:[2,39]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],24:[2,19]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],24:[2,15]},{18:[2,34],33:[2,34]},{18:[2,35],33:[2,35]},{18:[2,36],33:[2,36]},{18:[2,37],33:[2,37]}],
	defaultActions: {16:[2,1],37:[2,23],53:[2,21]},
	parseError: function parseError(str, hash) {
		throw new Error(str);
	},
	parse: function parse(input) {
		var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
		this.lexer.setInput(input);
		this.lexer.yy = this.yy;
		this.yy.lexer = this.lexer;
		if (typeof this.lexer.yylloc == "undefined")
			this.lexer.yylloc = {};
		var yyloc = this.lexer.yylloc;
		lstack.push(yyloc);
		if (typeof this.yy.parseError === "function")
			this.parseError = this.yy.parseError;
		function popStack(n) {
			stack.length = stack.length - 2 * n;
			vstack.length = vstack.length - n;
			lstack.length = lstack.length - n;
		}
		function lex() {
			var token;
			token = self.lexer.lex() || 1;
			if (typeof token !== "number") {
				token = self.symbols_[token] || token;
			}
			return token;
		}
		var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
		while (true) {
			state = stack[stack.length - 1];
			if (this.defaultActions[state]) {
				action = this.defaultActions[state];
			} else {
				if (symbol == null)
					symbol = lex();
				action = table[state] && table[state][symbol];
			}
			if (typeof action === "undefined" || !action.length || !action[0]) {
				if (!recovering) {
					expected = [];
					for (p in table[state])
						if (this.terminals_[p] && p > 2) {
							expected.push("'" + this.terminals_[p] + "'");
						}
					var errStr = "";
					if (this.lexer.showPosition) {
						errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + this.terminals_[symbol] + "'";
					} else {
						errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'");
					}
					this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});
				}
			}
			if (action[0] instanceof Array && action.length > 1) {
				throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
			}
			switch (action[0]) {
			case 1:
				stack.push(symbol);
				vstack.push(this.lexer.yytext);
				lstack.push(this.lexer.yylloc);
				stack.push(action[1]);
				symbol = null;
				if (!preErrorSymbol) {
					yyleng = this.lexer.yyleng;
					yytext = this.lexer.yytext;
					yylineno = this.lexer.yylineno;
					yyloc = this.lexer.yylloc;
					if (recovering > 0)
						recovering--;
				} else {
					symbol = preErrorSymbol;
					preErrorSymbol = null;
				}
				break;
			case 2:
				len = this.productions_[action[1]][1];
				yyval.$ = vstack[vstack.length - len];
				yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column};
				r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
				if (typeof r !== "undefined") {
					return r;
				}
				if (len) {
					stack = stack.slice(0, -1 * len * 2);
					vstack = vstack.slice(0, -1 * len);
					lstack = lstack.slice(0, -1 * len);
				}
				stack.push(this.productions_[action[1]][0]);
				vstack.push(yyval.$);
				lstack.push(yyval._$);
				newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
				stack.push(newState);
				break;
			case 3:
				return true;
			}
		}
		return true;
	}
	};/* Jison generated lexer */
	var lexer = (function(){

	var lexer = ({EOF:1,
	parseError:function parseError(str, hash) {
			if (this.yy.parseError) {
				this.yy.parseError(str, hash);
			} else {
				throw new Error(str);
			}
		},
	setInput:function (input) {
			this._input = input;
			this._more = this._less = this.done = false;
			this.yylineno = this.yyleng = 0;
			this.yytext = this.matched = this.match = '';
			this.conditionStack = ['INITIAL'];
			this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};
			return this;
		},
	input:function () {
			var ch = this._input[0];
			this.yytext+=ch;
			this.yyleng++;
			this.match+=ch;
			this.matched+=ch;
			var lines = ch.match(/\n/);
			if (lines) this.yylineno++;
			this._input = this._input.slice(1);
			return ch;
		},
	unput:function (ch) {
			this._input = ch + this._input;
			return this;
		},
	more:function () {
			this._more = true;
			return this;
		},
	pastInput:function () {
			var past = this.matched.substr(0, this.matched.length - this.match.length);
			return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
		},
	upcomingInput:function () {
			var next = this.match;
			if (next.length < 20) {
				next += this._input.substr(0, 20-next.length);
			}
			return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, "");
		},
	showPosition:function () {
			var pre = this.pastInput();
			var c = new Array(pre.length + 1).join("-");
			return pre + this.upcomingInput() + "\n" + c+"^";
		},
	next:function () {
			if (this.done) {
				return this.EOF;
			}
			if (!this._input) this.done = true;

			var token,
				match,
				col,
				lines;
			if (!this._more) {
				this.yytext = '';
				this.match = '';
			}
			var rules = this._currentRules();
			for (var i=0;i < rules.length; i++) {
				match = this._input.match(this.rules[rules[i]]);
				if (match) {
					lines = match[0].match(/\n.*/g);
					if (lines) this.yylineno += lines.length;
					this.yylloc = {first_line: this.yylloc.last_line,
								   last_line: this.yylineno+1,
								   first_column: this.yylloc.last_column,
								   last_column: lines ? lines[lines.length-1].length-1 : this.yylloc.last_column + match[0].length}
					this.yytext += match[0];
					this.match += match[0];
					this.matches = match;
					this.yyleng = this.yytext.length;
					this._more = false;
					this._input = this._input.slice(match[0].length);
					this.matched += match[0];
					token = this.performAction.call(this, this.yy, this, rules[i],this.conditionStack[this.conditionStack.length-1]);
					if (token) return token;
					else return;
				}
			}
			if (this._input === "") {
				return this.EOF;
			} else {
				this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(), 
						{text: "", token: null, line: this.yylineno});
			}
		},
	lex:function lex() {
			var r = this.next();
			if (typeof r !== 'undefined') {
				return r;
			} else {
				return this.lex();
			}
		},
	begin:function begin(condition) {
			this.conditionStack.push(condition);
		},
	popState:function popState() {
			return this.conditionStack.pop();
		},
	_currentRules:function _currentRules() {
			return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;
		},
	topState:function () {
			return this.conditionStack[this.conditionStack.length-2];
		},
	pushState:function begin(condition) {
			this.begin(condition);
		}});
	lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {

	var YYSTATE=YY_START
	switch($avoiding_name_collisions) {
	case 0:
									   if(yy_.yytext.slice(-1) !== "\\") this.begin("mu");
									   if(yy_.yytext.slice(-1) === "\\") yy_.yytext = yy_.yytext.substr(0,yy_.yyleng-1), this.begin("emu");
									   if(yy_.yytext) return 14;
									 
	break;
	case 1: return 14; 
	break;
	case 2: this.popState(); return 14; 
	break;
	case 3: return 24; 
	break;
	case 4: return 16; 
	break;
	case 5: return 20; 
	break;
	case 6: return 19; 
	break;
	case 7: return 19; 
	break;
	case 8: return 23; 
	break;
	case 9: return 23; 
	break;
	case 10: yy_.yytext = yy_.yytext.substr(3,yy_.yyleng-5); this.popState(); return 15; 
	break;
	case 11: return 22; 
	break;
	case 12: return 34; 
	break;
	case 13: return 33; 
	break;
	case 14: return 33; 
	break;
	case 15: return 36; 
	break;
	case 16: /*ignore whitespace*/ 
	break;
	case 17: this.popState(); return 18; 
	break;
	case 18: this.popState(); return 18; 
	break;
	case 19: yy_.yytext = yy_.yytext.substr(1,yy_.yyleng-2).replace(/\\"/g,'"'); return 28; 
	break;
	case 20: return 30; 
	break;
	case 21: return 30; 
	break;
	case 22: return 29; 
	break;
	case 23: return 33; 
	break;
	case 24: yy_.yytext = yy_.yytext.substr(1, yy_.yyleng-2); return 33; 
	break;
	case 25: return 'INVALID'; 
	break;
	case 26: return 5; 
	break;
	}
	};
	lexer.rules = [/^[^\x00]*?(?=(\{\{))/,/^[^\x00]+/,/^[^\x00]{2,}?(?=(\{\{))/,/^\{\{>/,/^\{\{#/,/^\{\{\//,/^\{\{\^/,/^\{\{\s*else\b/,/^\{\{\{/,/^\{\{&/,/^\{\{![\s\S]*?\}\}/,/^\{\{/,/^=/,/^\.(?=[} ])/,/^\.\./,/^[\/.]/,/^\s+/,/^\}\}\}/,/^\}\}/,/^"(\\["]|[^"])*"/,/^true(?=[}\s])/,/^false(?=[}\s])/,/^[0-9]+(?=[}\s])/,/^[a-zA-Z0-9_$-]+(?=[=}\s\/.])/,/^\[[^\]]*\]/,/^./,/^$/];
	lexer.conditions = {"mu":{"rules":[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26],"inclusive":false},"emu":{"rules":[2],"inclusive":false},"INITIAL":{"rules":[0,1,26],"inclusive":true}};return lexer;})()
	parser.lexer = lexer;
	return parser;
	})();
	if (typeof require !== 'undefined' && typeof exports !== 'undefined') {
	exports.parser = handlebars;
	exports.parse = function () { return handlebars.parse.apply(handlebars, arguments); }
	exports.main = function commonjsMain(args) {
		if (!args[1])
			throw new Error('Usage: '+args[0]+' FILE');
		if (typeof process !== 'undefined') {
			var source = require('fs').readFileSync(require('path').join(process.cwd(), args[1]), "utf8");
		} else {
			var cwd = require("file").path(require("file").cwd());
			var source = cwd.join(args[1]).read({charset: "utf-8"});
		}
		return exports.parser.parse(source);
	}
	if (typeof module !== 'undefined' && require.main === module) {
	  exports.main(typeof process !== 'undefined' ? process.argv.slice(1) : require("system").args);
	}
	};
	;
	// lib/handlebars/compiler/base.js
	Handlebars.Parser = handlebars;

	Handlebars.parse = function(string) {
	  Handlebars.Parser.yy = Handlebars.AST;
	  return Handlebars.Parser.parse(string);
	};

	Handlebars.print = function(ast) {
	  return new Handlebars.PrintVisitor().accept(ast);
	};

	Handlebars.logger = {
	  DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3, level: 3,

	  // override in the host environment
	  log: function(level, str) {}
	};

	Handlebars.log = function(level, str) { Handlebars.logger.log(level, str); };
	;
	// lib/handlebars/compiler/ast.js
	(function() {

	  Handlebars.AST = {};

	  Handlebars.AST.ProgramNode = function(statements, inverse) {
		this.type = "program";
		this.statements = statements;
		if(inverse) { this.inverse = new Handlebars.AST.ProgramNode(inverse); }
	  };

	  Handlebars.AST.MustacheNode = function(params, hash, unescaped) {
		this.type = "mustache";
		this.id = params[0];
		this.params = params.slice(1);
		this.hash = hash;
		this.escaped = !unescaped;
	  };

	  Handlebars.AST.PartialNode = function(id, context) {
		this.type    = "partial";

		// TODO: disallow complex IDs

		this.id      = id;
		this.context = context;
	  };

	  var verifyMatch = function(open, close) {
		if(open.original !== close.original) {
		  throw new Handlebars.Exception(open.original + " doesn't match " + close.original);
		}
	  };

	  Handlebars.AST.BlockNode = function(mustache, program, close) {
		verifyMatch(mustache.id, close);
		this.type = "block";
		this.mustache = mustache;
		this.program  = program;
	  };

	  Handlebars.AST.InverseNode = function(mustache, program, close) {
		verifyMatch(mustache.id, close);
		this.type = "inverse";
		this.mustache = mustache;
		this.program  = program;
	  };

	  Handlebars.AST.ContentNode = function(string) {
		this.type = "content";
		this.string = string;
	  };

	  Handlebars.AST.HashNode = function(pairs) {
		this.type = "hash";
		this.pairs = pairs;
	  };

	  Handlebars.AST.IdNode = function(parts) {
		this.type = "ID";
		this.original = parts.join(".");

		var dig = [], depth = 0;

		for(var i=0,l=parts.length; i<l; i++) {
		  var part = parts[i];

		  if(part === "..") { depth++; }
		  else if(part === "." || part === "this") { this.isScoped = true; }
		  else { dig.push(part); }
		}

		this.parts    = dig;
		this.string   = dig.join('.');
		this.depth    = depth;
		this.isSimple = (dig.length === 1) && (depth === 0);
	  };

	  Handlebars.AST.StringNode = function(string) {
		this.type = "STRING";
		this.string = string;
	  };

	  Handlebars.AST.IntegerNode = function(integer) {
		this.type = "INTEGER";
		this.integer = integer;
	  };

	  Handlebars.AST.BooleanNode = function(bool) {
		this.type = "BOOLEAN";
		this.bool = bool;
	  };

	  Handlebars.AST.CommentNode = function(comment) {
		this.type = "comment";
		this.comment = comment;
	  };

	})();;
	// lib/handlebars/utils.js
	Handlebars.Exception = function(message) {
	  var tmp = Error.prototype.constructor.apply(this, arguments);

	  for (var p in tmp) {
		if (tmp.hasOwnProperty(p)) { this[p] = tmp[p]; }
	  }

	  this.message = tmp.message;
	};
	Handlebars.Exception.prototype = new Error;

	// Build out our basic SafeString type
	Handlebars.SafeString = function(string) {
	  this.string = string;
	};
	Handlebars.SafeString.prototype.toString = function() {
	  return this.string.toString();
	};

	(function() {
	  var escape = {
		"<": "&lt;",
		">": "&gt;",
		'"': "&quot;",
		"'": "&#x27;",
		"`": "&#x60;"
	  };

	  var badChars = /&(?!\w+;)|[<>"'`]/g;
	  var possible = /[&<>"'`]/;

	  var escapeChar = function(chr) {
		return escape[chr] || "&amp;";
	  };

	  Handlebars.Utils = {
		escapeExpression: function(string) {
		  // don't escape SafeStrings, since they're already safe
		  if (string instanceof Handlebars.SafeString) {
			return string.toString();
		  } else if (string == null || string === false) {
			return "";
		  }

		  if(!possible.test(string)) { return string; }
		  return string.replace(badChars, escapeChar);
		},

		isEmpty: function(value) {
		  if (typeof value === "undefined") {
			return true;
		  } else if (value === null) {
			return true;
		  } else if (value === false) {
			return true;
		  } else if(Object.prototype.toString.call(value) === "[object Array]" && value.length === 0) {
			return true;
		  } else {
			return false;
		  }
		}
	  };
	})();;
	// lib/handlebars/compiler/compiler.js
	Handlebars.Compiler = function() {};
	Handlebars.JavaScriptCompiler = function() {};

	(function(Compiler, JavaScriptCompiler) {
	  Compiler.OPCODE_MAP = {
		appendContent: 1,
		getContext: 2,
		lookupWithHelpers: 3,
		lookup: 4,
		append: 5,
		invokeMustache: 6,
		appendEscaped: 7,
		pushString: 8,
		truthyOrFallback: 9,
		functionOrFallback: 10,
		invokeProgram: 11,
		invokePartial: 12,
		push: 13,
		assignToHash: 15,
		pushStringParam: 16
	  };

	  Compiler.MULTI_PARAM_OPCODES = {
		appendContent: 1,
		getContext: 1,
		lookupWithHelpers: 2,
		lookup: 1,
		invokeMustache: 3,
		pushString: 1,
		truthyOrFallback: 1,
		functionOrFallback: 1,
		invokeProgram: 3,
		invokePartial: 1,
		push: 1,
		assignToHash: 1,
		pushStringParam: 1
	  };

	  Compiler.DISASSEMBLE_MAP = {};

	  for(var prop in Compiler.OPCODE_MAP) {
		var value = Compiler.OPCODE_MAP[prop];
		Compiler.DISASSEMBLE_MAP[value] = prop;
	  }

	  Compiler.multiParamSize = function(code) {
		return Compiler.MULTI_PARAM_OPCODES[Compiler.DISASSEMBLE_MAP[code]];
	  };

	  Compiler.prototype = {
		compiler: Compiler,

		disassemble: function() {
		  var opcodes = this.opcodes, opcode, nextCode;
		  var out = [], str, name, value;

		  for(var i=0, l=opcodes.length; i<l; i++) {
			opcode = opcodes[i];

			if(opcode === 'DECLARE') {
			  name = opcodes[++i];
			  value = opcodes[++i];
			  out.push("DECLARE " + name + " = " + value);
			} else {
			  str = Compiler.DISASSEMBLE_MAP[opcode];

			  var extraParams = Compiler.multiParamSize(opcode);
			  var codes = [];

			  for(var j=0; j<extraParams; j++) {
				nextCode = opcodes[++i];

				if(typeof nextCode === "string") {
				  nextCode = "\"" + nextCode.replace("\n", "\\n") + "\"";
				}

				codes.push(nextCode);
			  }

			  str = str + " " + codes.join(" ");

			  out.push(str);
			}
		  }

		  return out.join("\n");
		},

		guid: 0,

		compile: function(program, options) {
		  this.children = [];
		  this.depths = {list: []};
		  this.options = options;

		  // These changes will propagate to the other compiler components
		  var knownHelpers = this.options.knownHelpers;
		  this.options.knownHelpers = {
			'helperMissing': true,
			'blockHelperMissing': true,
			'each': true,
			'if': true,
			'unless': true,
			'with': true,
			'log': true
		  };
		  if (knownHelpers) {
			for (var name in knownHelpers) {
			  this.options.knownHelpers[name] = knownHelpers[name];
			}
		  }

		  return this.program(program);
		},

		accept: function(node) {
		  return this[node.type](node);
		},

		program: function(program) {
		  var statements = program.statements, statement;
		  this.opcodes = [];

		  for(var i=0, l=statements.length; i<l; i++) {
			statement = statements[i];
			this[statement.type](statement);
		  }
		  this.isSimple = l === 1;

		  this.depths.list = this.depths.list.sort(function(a, b) {
			return a - b;
		  });

		  return this;
		},

		compileProgram: function(program) {
		  var result = new this.compiler().compile(program, this.options);
		  var guid = this.guid++;

		  this.usePartial = this.usePartial || result.usePartial;

		  this.children[guid] = result;

		  for(var i=0, l=result.depths.list.length; i<l; i++) {
			depth = result.depths.list[i];

			if(depth < 2) { continue; }
			else { this.addDepth(depth - 1); }
		  }

		  return guid;
		},

		block: function(block) {
		  var mustache = block.mustache;
		  var depth, child, inverse, inverseGuid;

		  var params = this.setupStackForMustache(mustache);

		  var programGuid = this.compileProgram(block.program);

		  if(block.program.inverse) {
			inverseGuid = this.compileProgram(block.program.inverse);
			this.declare('inverse', inverseGuid);
		  }

		  this.opcode('invokeProgram', programGuid, params.length, !!mustache.hash);
		  this.declare('inverse', null);
		  this.opcode('append');
		},

		inverse: function(block) {
		  var params = this.setupStackForMustache(block.mustache);

		  var programGuid = this.compileProgram(block.program);

		  this.declare('inverse', programGuid);

		  this.opcode('invokeProgram', null, params.length, !!block.mustache.hash);
		  this.declare('inverse', null);
		  this.opcode('append');
		},

		hash: function(hash) {
		  var pairs = hash.pairs, pair, val;

		  this.opcode('push', '{}');

		  for(var i=0, l=pairs.length; i<l; i++) {
			pair = pairs[i];
			val  = pair[1];

			this.accept(val);
			this.opcode('assignToHash', pair[0]);
		  }
		},

		partial: function(partial) {
		  var id = partial.id;
		  this.usePartial = true;

		  if(partial.context) {
			this.ID(partial.context);
		  } else {
			this.opcode('push', 'depth0');
		  }

		  this.opcode('invokePartial', id.original);
		  this.opcode('append');
		},

		content: function(content) {
		  this.opcode('appendContent', content.string);
		},

		mustache: function(mustache) {
		  var params = this.setupStackForMustache(mustache);

		  this.opcode('invokeMustache', params.length, mustache.id.original, !!mustache.hash);

		  if(mustache.escaped && !this.options.noEscape) {
			this.opcode('appendEscaped');
		  } else {
			this.opcode('append');
		  }
		},

		ID: function(id) {
		  this.addDepth(id.depth);

		  this.opcode('getContext', id.depth);

		  this.opcode('lookupWithHelpers', id.parts[0] || null, id.isScoped || false);

		  for(var i=1, l=id.parts.length; i<l; i++) {
			this.opcode('lookup', id.parts[i]);
		  }
		},

		STRING: function(string) {
		  this.opcode('pushString', string.string);
		},

		INTEGER: function(integer) {
		  this.opcode('push', integer.integer);
		},

		BOOLEAN: function(bool) {
		  this.opcode('push', bool.bool);
		},

		comment: function() {},

		// HELPERS
		pushParams: function(params) {
		  var i = params.length, param;

		  while(i--) {
			param = params[i];

			if(this.options.stringParams) {
			  if(param.depth) {
				this.addDepth(param.depth);
			  }

			  this.opcode('getContext', param.depth || 0);
			  this.opcode('pushStringParam', param.string);
			} else {
			  this[param.type](param);
			}
		  }
		},

		opcode: function(name, val1, val2, val3) {
		  this.opcodes.push(Compiler.OPCODE_MAP[name]);
		  if(val1 !== undefined) { this.opcodes.push(val1); }
		  if(val2 !== undefined) { this.opcodes.push(val2); }
		  if(val3 !== undefined) { this.opcodes.push(val3); }
		},

		declare: function(name, value) {
		  this.opcodes.push('DECLARE');
		  this.opcodes.push(name);
		  this.opcodes.push(value);
		},

		addDepth: function(depth) {
		  if(depth === 0) { return; }

		  if(!this.depths[depth]) {
			this.depths[depth] = true;
			this.depths.list.push(depth);
		  }
		},

		setupStackForMustache: function(mustache) {
		  var params = mustache.params;

		  this.pushParams(params);

		  if(mustache.hash) {
			this.hash(mustache.hash);
		  }

		  this.ID(mustache.id);

		  return params;
		}
	  };

	  JavaScriptCompiler.prototype = {
		// PUBLIC API: You can override these methods in a subclass to provide
		// alternative compiled forms for name lookup and buffering semantics
		nameLookup: function(parent, name, type) {
				if (/^[0-9]+$/.test(name)) {
			return parent + "[" + name + "]";
		  } else if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) {
				return parent + "." + name;
				}
				else {
					return parent + "['" + name + "']";
		  }
		},

		appendToBuffer: function(string) {
		  if (this.environment.isSimple) {
			return "return " + string + ";";
		  } else {
			return "buffer += " + string + ";";
		  }
		},

		initializeBuffer: function() {
		  return this.quotedString("");
		},

		namespace: "Handlebars",
		// END PUBLIC API

		compile: function(environment, options, context, asObject) {
		  this.environment = environment;
		  this.options = options || {};

		  this.name = this.environment.name;
		  this.isChild = !!context;
		  this.context = context || {
			programs: [],
			aliases: { self: 'this' },
			registers: {list: []}
		  };

		  this.preamble();

		  this.stackSlot = 0;
		  this.stackVars = [];

		  this.compileChildren(environment, options);

		  var opcodes = environment.opcodes, opcode;

		  this.i = 0;

		  for(l=opcodes.length; this.i<l; this.i++) {
			opcode = this.nextOpcode(0);

			if(opcode[0] === 'DECLARE') {
			  this.i = this.i + 2;
			  this[opcode[1]] = opcode[2];
			} else {
			  this.i = this.i + opcode[1].length;
			  this[opcode[0]].apply(this, opcode[1]);
			}
		  }

		  return this.createFunctionContext(asObject);
		},

		nextOpcode: function(n) {
		  var opcodes = this.environment.opcodes, opcode = opcodes[this.i + n], name, val;
		  var extraParams, codes;

		  if(opcode === 'DECLARE') {
			name = opcodes[this.i + 1];
			val  = opcodes[this.i + 2];
			return ['DECLARE', name, val];
		  } else {
			name = Compiler.DISASSEMBLE_MAP[opcode];

			extraParams = Compiler.multiParamSize(opcode);
			codes = [];

			for(var j=0; j<extraParams; j++) {
			  codes.push(opcodes[this.i + j + 1 + n]);
			}

			return [name, codes];
		  }
		},

		eat: function(opcode) {
		  this.i = this.i + opcode.length;
		},

		preamble: function() {
		  var out = [];

		  // this register will disambiguate helper lookup from finding a function in
		  // a context. This is necessary for mustache compatibility, which requires
		  // that context functions in blocks are evaluated by blockHelperMissing, and
		  // then proceed as if the resulting value was provided to blockHelperMissing.
		  this.useRegister('foundHelper');

		  if (!this.isChild) {
			var namespace = this.namespace;
			var copies = "helpers = helpers || " + namespace + ".helpers;";
			if(this.environment.usePartial) { copies = copies + " partials = partials || " + namespace + ".partials;"; }
			out.push(copies);
		  } else {
			out.push('');
		  }

		  if (!this.environment.isSimple) {
			out.push(", buffer = " + this.initializeBuffer());
		  } else {
			out.push("");
		  }

		  // track the last context pushed into place to allow skipping the
		  // getContext opcode when it would be a noop
		  this.lastContext = 0;
		  this.source = out;
		},

		createFunctionContext: function(asObject) {
		  var locals = this.stackVars;
		  if (!this.isChild) {
			locals = locals.concat(this.context.registers.list);
		  }

		  if(locals.length > 0) {
			this.source[1] = this.source[1] + ", " + locals.join(", ");
		  }

		  // Generate minimizer alias mappings
		  if (!this.isChild) {
			var aliases = []
			for (var alias in this.context.aliases) {
			  this.source[1] = this.source[1] + ', ' + alias + '=' + this.context.aliases[alias];
			}
		  }

		  if (this.source[1]) {
			this.source[1] = "var " + this.source[1].substring(2) + ";";
		  }

		  // Merge children
		  if (!this.isChild) {
			this.source[1] += '\n' + this.context.programs.join('\n') + '\n';
		  }

		  if (!this.environment.isSimple) {
			this.source.push("return buffer;");
		  }

		  var params = this.isChild ? ["depth0", "data"] : ["Handlebars", "depth0", "helpers", "partials", "data"];

		  for(var i=0, l=this.environment.depths.list.length; i<l; i++) {
			params.push("depth" + this.environment.depths.list[i]);
		  }

		  if (asObject) {
			params.push(this.source.join("\n  "));

			return Function.apply(this, params);
		  } else {
			var functionSource = 'function ' + (this.name || '') + '(' + params.join(',') + ') {\n  ' + this.source.join("\n  ") + '}';
			Handlebars.log(Handlebars.logger.DEBUG, functionSource + "\n\n");
			return functionSource;
		  }
		},

		appendContent: function(content) {
		  this.source.push(this.appendToBuffer(this.quotedString(content)));
		},

		append: function() {
		  var local = this.popStack();
		  this.source.push("if(" + local + " || " + local + " === 0) { " + this.appendToBuffer(local) + " }");
		  if (this.environment.isSimple) {
			this.source.push("else { " + this.appendToBuffer("''") + " }");
		  }
		},

		appendEscaped: function() {
		  var opcode = this.nextOpcode(1), extra = "";
		  this.context.aliases.escapeExpression = 'this.escapeExpression';

		  if(opcode[0] === 'appendContent') {
			extra = " + " + this.quotedString(opcode[1][0]);
			this.eat(opcode);
		  }

		  this.source.push(this.appendToBuffer("escapeExpression(" + this.popStack() + ")" + extra));
		},

		getContext: function(depth) {
		  if(this.lastContext !== depth) {
			this.lastContext = depth;
		  }
		},

		lookupWithHelpers: function(name, isScoped) {
		  if(name) {
			var topStack = this.nextStack();

			this.usingKnownHelper = false;

			var toPush;
			if (!isScoped && this.options.knownHelpers[name]) {
			  toPush = topStack + " = " + this.nameLookup('helpers', name, 'helper');
			  this.usingKnownHelper = true;
			} else if (isScoped || this.options.knownHelpersOnly) {
			  toPush = topStack + " = " + this.nameLookup('depth' + this.lastContext, name, 'context');
			} else {
			  this.register('foundHelper', this.nameLookup('helpers', name, 'helper'));
			  toPush = topStack + " = foundHelper || " + this.nameLookup('depth' + this.lastContext, name, 'context');
			}

			toPush += ';';
			this.source.push(toPush);
		  } else {
			this.pushStack('depth' + this.lastContext);
		  }
		},

		lookup: function(name) {
		  var topStack = this.topStack();
		  this.source.push(topStack + " = (" + topStack + " === null || " + topStack + " === undefined || " + topStack + " === false ? " +
					topStack + " : " + this.nameLookup(topStack, name, 'context') + ");");
		},

		pushStringParam: function(string) {
		  this.pushStack('depth' + this.lastContext);
		  this.pushString(string);
		},

		pushString: function(string) {
		  this.pushStack(this.quotedString(string));
		},

		push: function(name) {
		  this.pushStack(name);
		},

		invokeMustache: function(paramSize, original, hasHash) {
		  this.populateParams(paramSize, this.quotedString(original), "{}", null, hasHash, function(nextStack, helperMissingString, id) {
			if (!this.usingKnownHelper) {
			  this.context.aliases.helperMissing = 'helpers.helperMissing';
			  this.context.aliases.undef = 'void 0';
			  this.source.push("else if(" + id + "=== undef) { " + nextStack + " = helperMissing.call(" + helperMissingString + "); }");
			  if (nextStack !== id) {
				this.source.push("else { " + nextStack + " = " + id + "; }");
			  }
			}
		  });
		},

		invokeProgram: function(guid, paramSize, hasHash) {
		  var inverse = this.programExpression(this.inverse);
		  var mainProgram = this.programExpression(guid);

		  this.populateParams(paramSize, null, mainProgram, inverse, hasHash, function(nextStack, helperMissingString, id) {
			if (!this.usingKnownHelper) {
			  this.context.aliases.blockHelperMissing = 'helpers.blockHelperMissing';
			  this.source.push("else { " + nextStack + " = blockHelperMissing.call(" + helperMissingString + "); }");
			}
		  });
		},

		populateParams: function(paramSize, helperId, program, inverse, hasHash, fn) {
		  var needsRegister = hasHash || this.options.stringParams || inverse || this.options.data;
		  var id = this.popStack(), nextStack;
		  var params = [], param, stringParam, stringOptions;

		  if (needsRegister) {
			this.register('tmp1', program);
			stringOptions = 'tmp1';
		  } else {
			stringOptions = '{ hash: {} }';
		  }

		  if (needsRegister) {
			var hash = (hasHash ? this.popStack() : '{}');
			this.source.push('tmp1.hash = ' + hash + ';');
		  }

		  if(this.options.stringParams) {
			this.source.push('tmp1.contexts = [];');
		  }

		  for(var i=0; i<paramSize; i++) {
			param = this.popStack();
			params.push(param);

			if(this.options.stringParams) {
			  this.source.push('tmp1.contexts.push(' + this.popStack() + ');');
			}
		  }

		  if(inverse) {
			this.source.push('tmp1.fn = tmp1;');
			this.source.push('tmp1.inverse = ' + inverse + ';');
		  }

		  if(this.options.data) {
			this.source.push('tmp1.data = data;');
		  }

		  params.push(stringOptions);

		  this.populateCall(params, id, helperId || id, fn, program !== '{}');
		},

		populateCall: function(params, id, helperId, fn, program) {
		  var paramString = ["depth0"].concat(params).join(", ");
		  var helperMissingString = ["depth0"].concat(helperId).concat(params).join(", ");

		  var nextStack = this.nextStack();

		  if (this.usingKnownHelper) {
			this.source.push(nextStack + " = " + id + ".call(" + paramString + ");");
		  } else {
			this.context.aliases.functionType = '"function"';
			var condition = program ? "foundHelper && " : ""
			this.source.push("if(" + condition + "typeof " + id + " === functionType) { " + nextStack + " = " + id + ".call(" + paramString + "); }");
		  }
		  fn.call(this, nextStack, helperMissingString, id);
		  this.usingKnownHelper = false;
		},

		invokePartial: function(context) {
		  params = [this.nameLookup('partials', context, 'partial'), "'" + context + "'", this.popStack(), "helpers", "partials"];

		  if (this.options.data) {
			params.push("data");
		  }

		  this.pushStack("self.invokePartial(" + params.join(", ") + ");");
		},

		assignToHash: function(key) {
		  var value = this.popStack();
		  var hash = this.topStack();

		  this.source.push(hash + "['" + key + "'] = " + value + ";");
		},

		// HELPERS

		compiler: JavaScriptCompiler,

		compileChildren: function(environment, options) {
		  var children = environment.children, child, compiler;

		  for(var i=0, l=children.length; i<l; i++) {
			child = children[i];
			compiler = new this.compiler();

			this.context.programs.push('');     // Placeholder to prevent name conflicts for nested children
			var index = this.context.programs.length;
			child.index = index;
			child.name = 'program' + index;
			this.context.programs[index] = compiler.compile(child, options, this.context);
		  }
		},

		programExpression: function(guid) {
		  if(guid == null) { return "self.noop"; }

		  var child = this.environment.children[guid],
			  depths = child.depths.list;
		  var programParams = [child.index, child.name, "data"];

		  for(var i=0, l = depths.length; i<l; i++) {
			depth = depths[i];

			if(depth === 1) { programParams.push("depth0"); }
			else { programParams.push("depth" + (depth - 1)); }
		  }

		  if(depths.length === 0) {
			return "self.program(" + programParams.join(", ") + ")";
		  } else {
			programParams.shift();
			return "self.programWithDepth(" + programParams.join(", ") + ")";
		  }
		},

		register: function(name, val) {
		  this.useRegister(name);
		  this.source.push(name + " = " + val + ";");
		},

		useRegister: function(name) {
		  if(!this.context.registers[name]) {
			this.context.registers[name] = true;
			this.context.registers.list.push(name);
		  }
		},

		pushStack: function(item) {
		  this.source.push(this.nextStack() + " = " + item + ";");
		  return "stack" + this.stackSlot;
		},

		nextStack: function() {
		  this.stackSlot++;
		  if(this.stackSlot > this.stackVars.length) { this.stackVars.push("stack" + this.stackSlot); }
		  return "stack" + this.stackSlot;
		},

		popStack: function() {
		  return "stack" + this.stackSlot--;
		},

		topStack: function() {
		  return "stack" + this.stackSlot;
		},

		quotedString: function(str) {
		  return '"' + str
			.replace(/\\/g, '\\\\')
			.replace(/"/g, '\\"')
			.replace(/\n/g, '\\n')
			.replace(/\r/g, '\\r') + '"';
		}
	  };

	  var reservedWords = (
		"break else new var" +
		" case finally return void" +
		" catch for switch while" +
		" continue function this with" +
		" default if throw" +
		" delete in try" +
		" do instanceof typeof" +
		" abstract enum int short" +
		" boolean export interface static" +
		" byte extends long super" +
		" char final native synchronized" +
		" class float package throws" +
		" const goto private transient" +
		" debugger implements protected volatile" +
		" double import public let yield"
	  ).split(" ");

	  var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};

	  for(var i=0, l=reservedWords.length; i<l; i++) {
		compilerWords[reservedWords[i]] = true;
	  }

		JavaScriptCompiler.isValidJavaScriptVariableName = function(name) {
			if(!JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(name)) {
				return true;
			}
			return false;
		}

	})(Handlebars.Compiler, Handlebars.JavaScriptCompiler);

	Handlebars.precompile = function(string, options) {
	  options = options || {};

	  var ast = Handlebars.parse(string);
	  var environment = new Handlebars.Compiler().compile(ast, options);
	  return new Handlebars.JavaScriptCompiler().compile(environment, options);
	};

	Handlebars.compile = function(string, options) {
	  options = options || {};

	  var compiled;
	  function compile() {
		var ast = Handlebars.parse(string);
		var environment = new Handlebars.Compiler().compile(ast, options);
		var templateSpec = new Handlebars.JavaScriptCompiler().compile(environment, options, undefined, true);
		return Handlebars.template(templateSpec);
	  }

	  // Template is only compiled on first use and cached after that point.
	  return function(context, options) {
		if (!compiled) {
		  compiled = compile();
		}
		return compiled.call(this, context, options);
	  };
	};
	;
	// lib/handlebars/runtime.js
	Handlebars.VM = {
	  template: function(templateSpec) {
		// Just add water
		var container = {
		  escapeExpression: Handlebars.Utils.escapeExpression,
		  invokePartial: Handlebars.VM.invokePartial,
		  programs: [],
		  program: function(i, fn, data) {
			var programWrapper = this.programs[i];
			if(data) {
			  return Handlebars.VM.program(fn, data);
			} else if(programWrapper) {
			  return programWrapper;
			} else {
			  programWrapper = this.programs[i] = Handlebars.VM.program(fn);
			  return programWrapper;
			}
		  },
		  programWithDepth: Handlebars.VM.programWithDepth,
		  noop: Handlebars.VM.noop
		};

		return function(context, options) {
		  options = options || {};
		  return templateSpec.call(container, Handlebars, context, options.helpers, options.partials, options.data);
		};
	  },

	  programWithDepth: function(fn, data, $depth) {
		var args = Array.prototype.slice.call(arguments, 2);

		return function(context, options) {
		  options = options || {};

		  return fn.apply(this, [context, options.data || data].concat(args));
		};
	  },
	  program: function(fn, data) {
		return function(context, options) {
		  options = options || {};

		  return fn(context, options.data || data);
		};
	  },
	  noop: function() { return ""; },
	  invokePartial: function(partial, name, context, helpers, partials, data) {
		options = { helpers: helpers, partials: partials, data: data };

		if(partial === undefined) {
		  throw new Handlebars.Exception("The partial " + name + " could not be found");
		} else if(partial instanceof Function) {
		  return partial(context, options);
		} else if (!Handlebars.compile) {
		  throw new Handlebars.Exception("The partial " + name + " could not be compiled when running in runtime-only mode");
		} else {
		  partials[name] = Handlebars.compile(partial);
		  return partials[name](context, options);
		}
	  }
	};

	Handlebars.template = Handlebars.VM.template;
	;
}


/**
 * SlideDeck 1.3.0 Pro - 2011-10-14
 * Copyright (c) 2011 digital-telepathy (http://www.dtelepathy.com)
 * 
 * BY USING THIS SOFTWARE, YOU AGREE TO THE TERMS OF THE SLIDEDECK 
 * LICENSE AGREEMENT FOUND AT http://www.slidedeck.com/license. 
 * IF YOU DO NOT AGREE TO THESE TERMS, DO NOT USE THE SOFTWARE.
 * 
 * More information on this project:
 * http://www.slidedeck.com/
 * 
 * Requires: jQuery v1.3+
 * 
 * Full Usage Documentation: http://www.slidedeck.com/usage-documentation 
 * Usage:
 *     $(el).slidedeck(opts);
 * 
 * @param {HTMLObject} el    The <DL> element to extend as a SlideDeck
 * @param {Object} opts      An object to pass custom override options to
 */

eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('12 2X;12 5N={};(15($){56.2X=15(B,C){12 D=17,B=$(B);12 E="1.3.0";17.13={1K:4u,1U:\'5m\',2C:1,1J:14,1F:14,2k:14,3E:14,3s:19,3W:64,1w:19,2q:19,22:\'1C\',4E:{x:50,y:30},4k:14,3h:19};17.1d={1C:\'1C\',2Q:\'2Q\',3R:\'3R\',1F:\'1F\',1E:\'1E\',3Z:\'3Z\',1J:\'1J\',3e:\'3e\',1x:\'51\',2P:\'2P\',1z:\'1z\'};17.18=1;17.2x=B;17.1X=-1;17.1k=B.2w(\'4h\');17.1f=B.2w(\'3a\');17.34=1;17.2M=[];17.2m=[];17.1G=19;17.3t=19;12 F=5n.5B.32();17.1c={1Y:F.1o(/1Y/)?14:19,2p:F.1o(/2p/)?14:19,4o:F.1o(/2p\\/2/)?14:19,4w:F.1o(/2p\\/3\\.0/)?14:19,1u:F.1o(/1u/)?14:19,4B:(F.1o(/1u 6/)&&!F.1o(/1u 7|8/))?14:19,3x:F.1o(/1u 7/)?14:19,2S:F.1o(/1u 8/)?14:19,2f:F.1o(/1u 9/)?14:19,2Y:(F.1o(/1u/)&&F.1o(/1Y/))?14:19,2B:F.1o(/2B/)?14:19,2r:(F.1o(/2r/)&&!F.1o(/1Y/))?14:19};1y(12 b 1S 17.1c){11(17.1c[b]===14){17.1c.2T=b}}11(17.1c.1Y===14&&!17.1c.2Y){17.1c.2b=F.1o(/1Y\\/([0-9\\.]+)/)[1]}11(17.1c.2p===14){17.1c.2b=F.1o(/2p\\/([0-9\\.]+)/)[1]}11(17.1c.1u===14){17.1c.2b=F.1o(/1u ([0-9\\.]+)/)[1]}11(17.1c.2B===14){17.1c.2b=F.1o(/2b\\/([0-9\\.]+)/)[1]}11(17.1c.2r===14){17.1c.2b=F.1o(/2b\\/([0-9\\.]+)/)[1]}12 G;12 H;12 I,1V,1Z,1T;17.2y=19;12 J="";1R(D.1c.2T){1e"2p":1e"57":J="-2J-";1q;1e"1Y":1e"2r":J="-2I-";1q;1e"2B":J="-o-";1q}12 K=15(a){11(D.1c.1u&&!D.1c.2f){12 b=a.1b(\'4W-3X\');12 c=b;11(c=="53"){b="#55"}1i{11(c.1o(\'#\')){11(c.1a<7){12 t="#"+c.2e(1,1)+c.2e(1,1)+c.2e(2,1)+c.2e(2,1)+c.2e(3,1)+c.2e(3,1);b=t}}}b=b.5z("#","");12 d={r:b.2e(0,2),g:b.2e(2,2),b:b.2e(4,2)};12 e="#";12 f="6t";1y(12 k 1S d){d[k]=1m.21(0,(1r(d[k],16)-1));d[k]=f.3Y((d[k]-d[k]%16)/16)+f.3Y(d[k]%16);e+=d[k]}a.1B(\'.\'+D.1d.1F).1b({\'42\':\'43:45.4a.4e(31=1) 5D(3X=\'+e+\')\',5I:e})}};12 L=15(){11(1g(3M)!="1t"){3M.4U.4V(15(){11(1g(D.13.2F)!="1t"){12 a=[];11(1g(D.13.2F)=="3v"){a.2o(D.13.2F)}1i{a=D.13.2F}1y(12 i=0;i<a.1a;i++){3M.54(a[i])}}11(D.13.1w===19){12 b=0;11(D.1c.2S&&!D.1c.2Y){b=1m.3y(($(D.1k[0]).4K()-$($(D.1k[0]).1B(\'3B\')[0]).1H())/2)}11(D.1c.2r||D.1c.1Y||D.1c.2Y){11(1N.5o.5q.32().1o(/5y/)){b=1m.3y(($(D.1k[0]).3J()-$($(D.1k[0]).1B(\'3B\')[0]).1H())/2)}}D.1k.1B(\'>3B\').1b(\'3Q-1n\',b)}})}};12 M=19;12 N=15(){12 a=1N.5E(\'5H\');1y(12 i=0;i<a.1a;i++){12 b=a[i].44;11(b.1o(/1P\\.5K(\\.(47|5Q))?(\\.5R)?\\.5U/)){12 c=b.61(\'?\');11(c.1a>1){11(c[1].1o(/63/)){M=14}}}}11(M===19){M=14;12 d=3d 65();d.44=(1N.67.68=="4c:"?"4c:":"4P:")+"//4Q.1P.4R/4S/"+E+"/47"}};12 O=15(){11(D.13.3h===14){1y(12 i=0;i<D.1k.1a;i++){11(i<D.34){$(D.1k[i]).2E(D.1d.3e)}1i{$(D.1k[i]).1s(D.1d.3e)}}}};12 P=15(a){12 b=19;11(1g(D.2g)!=\'1t\'){11(1g(D.1x().13)!=\'1t\'){11(D.1x().13.2k===14&&$(a.4n).2A(\'.\'+D.1d.1x).1a>0){b=14}}}1p b};12 Q={3H:15(){12 a=3d 58();12 b=a.59()+"-"+a.5e()+"-"+a.5f()+" "+a.5h()+":"+a.5i()+":"+a.5k();12 c=(0-a.5l()/60);12 d=1m.3y(c);12 e="6z";11(d!=c){e=(c-d)*60}1p b+d+":"+e},3K:15(a){11(D.2M.1a===0||D.2M[D.2M.1a-1].1C!=a){D.2M.2o({1C:a,3H:17.3H()})}}};12 R=15(){12 c=19,2s=19;12 d=15(){c=19;11(D.1G===19){11(1g(D.1x())!=\'1t\'){11(D.1x().2v){11(D.1x().18+1!=D.1x().1f.1a){c=14}}}12 b=14;11(D.13.2q===19&&D.18==D.1f.1a){11(c===14){11(D.1x().18+1===D.1x().1f.1a){b=19}}1i{b=19}}11(b===19){D.1G=14}1i{11(c===14){D.1x().1z(15(a){11(1g(a.1x().1f)!=\'1t\'){11(a.1x().18+1==a.1x().1f.1a){c=19;2s=a.18}}})}1i{D.1z(15(a){11(2s!==19){a.2s(2s);2s=19}})}}}};3o(d,D.13.3W)};12 S=15(a,i){12 b={3q:\'3r\'};b[J+\'1l-23\']="50% 50%";b[J+\'1l\']="";11(i<D.18){12 c=i*1V;11(D.13.1w===14){11(i==D.18-1){c=0}1i{c=0-(D.13.2C-i-1)*B.1v()}}}1i{12 c=i*1V+1Z;11(D.13.1w===14){c=(i+1-D.13.2C)*B.1v()}}1R(a){1e"3u":1e"2K":b.1L=D.1f.1a-i;b.1h=0;1q;1e"2z":b.1L=D.1f.1a-i;b.1h=0;11(i!=(D.18-1)){b[J+\'1l\']="5T(0)"}1q;1e"2L":b.1L=D.1f.1a-i;b.1h=0;11(i!=(D.18-1)){b[J+\'1l\']="5Y(0)"}1q;1e"1C":3z:b.1h=c;b.1L=1;1q}D.1f.1W(i).1b(J+\'1U\',"").1b(b);1p c};12 T=15(){11($.2l(B.1b(\'1Q\'),[\'1Q\',\'2a\',\'69\'])){B.1b(\'1Q\',\'6q\')}B.1b(\'3F\',\'3G\');1y(12 i=0;i<D.1f.1a;i++){12 d=$(D.1f[i]);11(D.1k.1a>i){12 e=$(D.1k[i])}12 f={1n:1r(d.1b(\'1I-1n\'),10),1A:1r(d.1b(\'1I-1A\'),10),1D:1r(d.1b(\'1I-1D\'),10),1h:1r(d.1b(\'1I-1h\'),10)};12 g={1n:1r(d.1b(\'2j-1n-1v\'),10),1A:1r(d.1b(\'2j-1A-1v\'),10),1D:1r(d.1b(\'2j-1D-1v\'),10),1h:1r(d.1b(\'2j-1h-1v\'),10)};1y(12 k 1S g){g[k]=3P(g[k])?0:g[k]}11(i<D.18){11(i==D.18-1){11(D.13.1w!==14){e.1s(D.1d.1E)}d.1s(D.1d.1E)}}D.1Z=(1Z-f.1h-f.1A-g.1h-g.1A);12 h={1Q:\'2a\',1H:(H-f.1n-f.1D-g.1n-g.1D)+"1j",1v:D.1Z+"1j",3Q:0,52:f.1h+1V+"1j"};12 j=S(D.13.22,i);d.1b(h).1s(D.1d.1C).1s(D.1d.1C+"35"+(i+1));11(D.13.1w!==14){12 l={1n:1r(e.1b(\'1I-1n\'),10),1A:1r(e.1b(\'1I-1A\'),10),1D:1r(e.1b(\'1I-1D\'),10),1h:1r(e.1b(\'1I-1h\'),10)};1y(12 k 1S l){11(l[k]<10&&(k=="1h"||k=="1A")){l[k]=10}}12 m=l.1n+"1j "+l.1A+"1j "+l.1D+"1j "+l.1h+"1j";12 n={1Q:\'2a\',1L:3,3q:\'3r\',1h:j,1v:(H-l.1h-l.1A)+"1j",1H:I+"1j",1I:m,31:\'2D\',\'-2I-1l\':\'2i(2D)\',\'-2I-1l-23\':1T+\'1j 29\',\'-2J-1l\':\'2i(2D)\',\'-2J-1l-23\':1T+\'1j 29\',\'-o-1l\':\'2i(2D)\',\'-o-1l-23\':1T+\'1j 29\',46:\'1A\'};11(!D.1c.2f){n.1n=(D.1c.1u)?0:(H-1T)+"1j";n.5g=((D.1c.1u)?0:(0-1T))+"1j";n.42=\'43:45.4a.4e(31=3)\'}e.1b(n).1s(D.1d.2Q).1s(D.1d.2Q+"35"+(i+1));11(D.1c.2f){e[0].1O.48=\'2i(2D)\';e[0].1O.5j=1m.49(1r(B[0].1O.1H,10)/2)+\'1j \'+1m.49(1r(B[0].1O.1H,10)/2)+\'1j\'}}1i{11(1g(e)!="1t"){e.3i()}}11(i==D.1f.1a-1){d.1s(\'4b\');11(D.13.1w!==14){e.1s(\'4b\')}}11(D.13.1J===14&&D.13.1w===19){12 o=1N.2u(\'4d\');o.2c=D.1d.1J+\' \'+(D.1d.2Q+\'35\'+(i+1));e.5r(o);e.1z(\'.\'+D.1d.1J).1b({1Q:\'2a\',1n:\'5s\',1h:j+1V+"1j",3F:"3G",1L:"5u"}).3i();11(e.5v(D.1d.1E)){e.1z(\'.\'+D.1d.1J).4f()}}11(D.13.1w!==14){12 p=1N.2u(\'4d\');p.2c=D.1d.1F;11(D.13.1F!==19){12 q;11(1g(D.13.1F)!=\'3C\'){q=D.13.1F[i%D.13.1F.1a]}1i{q=""+(i+1)}p.2G(1N.4l(q))}e.38(p);e.1B(\'.\'+D.1d.1F).1b({1Q:\'2a\',1L:2,3q:\'3r\',1v:I+"1j",1H:I+"1j",46:\'5G\',1D:((D.1c.1u)?0:(0-1T))+"1j",1h:((D.1c.1u)?5:20)+"1j",31:"2H",\'-2I-1l\':\'2i(2H)\',\'-2I-1l-23\':1T+\'1j 29\',\'-2J-1l\':\'2i(2H)\',\'-2J-1l-23\':1T+\'1j 29\',\'-o-1l\':\'2i(2H)\',\'-o-1l-23\':1T+\'1j 29\'});11(D.1c.2f){e.1B(\'.\'+D.1d.1F)[0].1O.48=\'2i(2H)\'}K(e)}}N();11(D.13.1w!==14){D.1k.3g(\'4z\',15(a){a.2d();D.24(D.1k.1F(17)+1)})}11(D.13.3E!==19){$(1N).3g(\'5S\',15(a){11($(a.4n).2A().1F(D.2x)==-1){11(a.4C==39){D.1G=14;D.1z()}1i 11(a.4C==37){D.1G=14;D.28()}}})}11(1g($.4F.4I.2U)!="1t"){B.3g("2U",15(a){11(D.13.2k!==19){11(!P(a)){12 b=a.2V?a.2V:a.4L;11(D.1c.1u||D.1c.2r||D.1c.1Y){b=0-b}12 c=19;11($(a.2W).2A(D.2x).1a){11($.2l(a.2W.3n.32(),[\'3S\',\'3T\',\'3U\',\'3V\'])!=-1){c=14}}11(c!==14){11(b>0){1R(D.13.2k){1e"2h":a.2d();1q;1e 14:3z:11(D.18<D.1f.1a||D.13.2q===14){a.2d()}1q}D.1G=14;D.1z()}1i{1R(D.13.2k){1e"2h":a.2d();1q;1e 14:3z:11(D.18!=1||D.13.2q===14){a.2d()}1q}D.1G=14;D.28()}}}}})}11((D.1c.1u!==14)&&(D.13.4k!==19)){12 r={x:0,y:0};12 s={x:0,y:0};12 t=D.13.4E;B[0].3p(\'4T\',15(a){r.x=a.2Z[0].40;r.y=a.2Z[0].41},19);B[0].3p(\'4X\',15(a){a.2d();s.x=a.2Z[0].40;s.y=a.2Z[0].41},19);B[0].3p(\'4Y\',15(a){12 b=r.x-s.x;12 c=r.y-s.y;11(s.x!==0){11(b<(0-t.x)){D.1G=14;D.28()}1i 11(b>t.x){D.1G=14;D.1z()}11(c<(0-t.y)){D.1G=14;D.1x().28()}1i 11(c>t.y){D.1G=14;D.1x().1z()}}},19)}$(D.1k[D.18-2]).1s(D.1d.2P);$(D.1k[D.18]).1s(D.1d.1z);L();O();Q.3K(D.18);11(D.13.3s===14){R()}D.3t=14};12 U=15(a){a=1m.21(1,a-1);11($.2l(a,D.2m)!=-1){11(a==1){a=1}1i{a=U(a)}}1p a};12 V=15(a){a=1m.25(D.1f.1a,a+1);11($.2l(a,D.2m)!=-1){11(a==D.1f.1a){a=D.18}1i{a=V(a)}}1p a};12 W=15(a){a=1m.25(D.1f.1a,1m.21(1,a));11($.2l(a,D.2m)!=-1){11(a<D.18){a=U(a)}1i{a=V(a)}}1p a};12 X=15(a){12 b=[];11(1g(D.13.1M)=="15"){b.2o(15(){D.13.1M(D)})}1R(1g(a)){1e"15":b.2o(15(){a(D)});1q;1e"33":b.2o(15(){a.1M(D)});1q}Q.3K(D.18);12 c=15(){D.2y=19;1y(12 z=0;z<b.1a;z++){b[z]()}};1p c};12 Y={2K:15(a,b,c){12 d=D.1f.1W(D.18-1);D.1f.3w(d).5a(D.13.1K);d.5b(D.13.1K,15(){X(b)()})},2z:15(b,c,d,e){12 f=(D.13.1K/5c)/2;12 g=D.1f.1W(D.1X-1);12 h=D.1f.1W(D.18-1);11(1g(e)==\'1t\'){e=19}12 i=e==14?"X":"Y";12 j={1Q:\'2a\',1L:5d,1n:0,1A:0,1D:0,1h:0,1v:\'36%\',1H:\'36%\',2N:0};12 k=g.1B(\'.1P-1C-2n\');11(k.1a){k.2O()}g.38(\'<3b 4g="1P-1C-2n 2n-3A"></3b>\');k=g.1B(\'.1P-1C-2n\').1b(j);12 l=h.1B(\'.1P-1C-2n\');11(l.1a){k.2O()}h.38(\'<3b 4g="1P-1C-2n 2n-1S"></3b>\');j.2N=1;l=h.1B(\'.1P-1C-2n\').1b(j);12 m={};m[J+\'1U\']="";m[J+\'1l-23\']="50% 50%";m[J+\'1l\']="3c"+i+"(0)";D.1f.3w(g).1b(m);12 n={};n[J+\'1l-23\']="50% 50%";n[J+\'1l\']="3c"+i+"(0)";g.1b(J+\'1U\',J+\'1l \'+f+\'s 4j-3A\').1b(n);k.26({2N:1},{2t:D.13.1K/2,1M:15(){k.2O()}});l.26({2N:1},{2t:D.13.1K/2,1M:15(){n[J+\'1l\']="3c"+i+"(1)";h.1s(D.1d.1E).1b(J+\'1U\',J+\'1l \'+f+\'s 4j-3A\').1b(n);l.26({2N:0},{5p:D.13.1K/2,1M:15(){D.1f.1b(J+\'1U\',"");12 a={};a[J+\'1l-23\']="50% 50%";a[J+\'1l\']="3c"+i+"(1)";D.1f.1W(D.18-1).1b(a);X(c)();k.2O();l.2O()}})}})},2L:15(a,b,c){17.2z(a,b,c,14)},3u:15(b,c,d){11((D.18==D.1f.1a&&D.1X==1)||(D.1X==D.1f.1a&&D.18==1)){D.2y=14}1y(12 i=0;i<D.1f.1a;i++){12 e=0;12 f=D.1f.1W(i);11(D.2y===19){11(i<D.18-1){11(i==(D.18-1)){f.1s(D.1d.1E);L()}e=(0-G)}1i{e=0}}1i{11(D.1X==D.1f.1a&&D.18==1){11(i==(D.18)-1){f.1b({1h:0,1L:5}).1s(D.1d.1E);L();e=0}1i{11(i==(D.1X-1)){f.1b(\'z-1F\',10);e=0-G}1i{f.1b(\'z-1F\',1);e=0}}}1i 11(D.1X==1&&D.18==D.1f.1a){11(i!=D.1X-1){11(i==(D.18-1)){f.1b({1h:(0-G),1L:36});f.1s(D.1d.1E);L();e=0}}}}12 g={2t:D.13.1K,3f:D.13.1U};11(i==(d===14&&D.18-1)||i==(d===19&&D.18)){11(i==D.18-1){g.1M=15(){11(D.2y===14){D.1f.4m(15(a){11(a!=(D.18-1)){17.1O.1h=(D.18==1?0:(0-G))+"1j"}17.1O.1L=D.1f.1a-a})}X(c)()}}}f.2h().26({1h:e,1v:D.1Z},g)}},1C:15(a,b,c){1y(12 i=0;i<D.1f.1a;i++){12 d=0;11(D.13.1w!==14){12 e=$(D.1k[i])}12 f=$(D.1f[i]);11(i<D.18){11(i==(D.18-1)){f.1s(D.1d.1E);11(D.13.1w!==14){e.1s(D.1d.1E);e.1z(\'.\'+D.1d.1J).4f()}L()}d=i*1V}1i{d=i*1V+1Z}11(D.13.1w===14){d=(i-D.18+1)*B.1v()}12 g={2t:D.13.1K,3f:D.13.1U};11(i==(c===14&&D.18-1)||i==(c===19&&D.18)){11(i===0){g.1M=X(b)}}f.2h().26({1h:d+"1j",1v:D.1Z+"1j"},g);11(D.13.1w!==14){K(e);11(e.1b(\'1h\')!=d+"1j"){e.2h().26({1h:d+"1j"},{2t:D.13.1K,3f:D.13.1U});e.1z(\'.\'+D.1d.1J).2h().26({1h:d+1V+"1j"},{2t:D.13.1K,3f:D.13.1U})}}}}};12 Z=15(a,b){a=W(a);11((a<=D.34||D.13.3h!==14)&&D.2y===19){12 c=14;11(a<D.18){c=19}12 d=[D.1d.1E,D.1d.1z,D.1d.2P].5t(\' \');D.1X=D.18;D.18=a;11(1g(D.13.27)=="15"){D.13.27(D)}11(1g(b)!="1t"){11(1g(b.27)=="15"){b.27(D)}}D.1k.2E(d);D.1f.2E(d);B.1B(\'.\'+D.1d.1J).3i();D.1k.1W(D.18-2).1s(D.1d.2P);D.1k.1W(D.18).1s(D.1d.1z);11(D.18!=D.1X){12 e=\'1C\';11(1g(Y[D.13.22])!=\'1t\'){e=D.13.22}Y[e](a,b,c)}N()}};12 4p=15(a,b){12 c=a;11(1g(a)==="3v"){c={};c[a]=b}1y(12 d 1S c){b=c[d];1R(d){1e"1K":1e"2C":b=5w(b);11(3P(b)){b=D.13[d]}1q;1e"2k":1e"3E":1e"1J":1e"3h":1e"1w":1e"3s":1e"2q":11(1g(b)!=="3C"){b=D.13[d]}1q;1e"2F":1e"1U":11(1g(b)!=="3v"){b=D.13[d]}1q;1e"1M":1e"27":11(1g(b)!=="15"){b=D.13[d]}1q;1e"1F":11(1g(b)!=="3C"){11(!$.5x(b)){b=D.13[d]}}1q;1e"22":1y(12 k 1S Y){11(b==k){1R(D.1c.2T){1e"1u":1e"3x":1e"2S":1e"2f":1R(b){1e"2z":1e"2L":b="2K";1q}1q}D.13.22=b;1y(12 i=0;i<D.1f.1a;i++){S(D.13.22,i)}}}1q}D.13[d]=b}};12 4q=15(a){11($.2l(a,D.2m)==-1&&a!==1&&a!==0){D.2m.2o(a)}};12 4r=15(a){12 b=$.2l(a,D.2m);11(b!=-1){D.2m.5A(b,1)}};12 4s=15(l,m,n){12 o=17;12 l=$(l);12 p=l.2w();11(l[0].3n=="5C"){p=l.2w(\'3a\');12 q=l.2w(\'4h\').3i()}12 r=p.1a;12 s=l.2A(\'3a.1C\');12 t=l.4t();12 u=s.4v();12 w=36;11(m.2x.1B(\'.\'+m.1d.1J).1a){w=m.2x.1B(\'.\'+m.1d.1J).1b(\'z-1F\')-1}17.5F=4x;17.2v=4x;17.18=0;17.1f=p;17.13={1K:4u,2k:14,4y:19};11(1g(n)==\'33\'){1y(12 k 1S n){17.13[k]=n[k]}}17.1d={2R:\'5J\',3j:\'3j\',4A:\'5L\'};12 x=15(a,b,c){11(1g(o.13.27)==\'15\'){o.13.27(o)}11(1g(c)==\'33\'){11(1g(c.27)==\'15\'){c.27(o)}}o.18=a;12 d=o.13.1K;11(1g(b)!=\'1t\'){d=0}s.1B(\'5M.\'+o.1d.2R+\' 3I.\'+o.1d.3j).2h().26({1n:$(o.2v[o.18]).1Q().1n+\'1j\'},5O);o.2v.2E(\'1E\');$(o.2v[o.18]).1s(\'1E\');l.2h().26({1n:0-(o.18*u)+\'1j\'},d,15(){11(1g(o.13.1M)==\'15\'){o.13.1M(o)}11(1g(c)==\'33\'){11(1g(c.1M)==\'15\'){c.1M(o)}}1i 11(1g(c)==\'15\'){c(m)}})};12 y=15(){12 b=1N.2u(\'5P\');b.2c=o.1d.2R;b.1O.1Q=\'2a\';b.1O.1L=w;b.1O.3k=\'3l\';1y(12 a=0;a<r;a++){12 c=1N.2u(\'4D\');c.2c=\'3L\'+(a+1)+(a===0?\' 1E\':\'\');c.1O.3k=\'3l\';12 d=1N.2u(\'A\');11(p[a].4G){d.4H="#"+p[a].4G}1i{d.4H="#"+(a+1)}d.2c=\'3L\'+(a+1);12 e="5V "+(a+1);11(1g(q)!=\'1t\'){e=q.1W(a).5W()}d.5X=e;c.2G(d);b.2G(c)}12 f=1N.2u(\'4D\');f.2c=o.1d.3j;f.1O.1n=0;f.2G(1N.4l(\' \'));b.2G(f);s.38(b);o.2v=s.1B(\'.\'+b.2c+\' 3I\');s.1B(\'.\'+b.2c+\' 3I a\').4z(15(a){a.2d();x(17.2c.1o(\'3L([0-9]+)\')[1]-1)})};17.24=15(v,h,a){v=1m.25(r-1,1m.21(0,v-1));h=1m.25(m.1f.1a-1,1m.21(0,v));$(m.1f[h]).1B(\'.\'+17.1d.2R+\' a:1W(\'+v+\')\').1s(m.1d.1E).5Z().2E(m.1d.1E);x(v,a)};17.1z=15(a){x(1m.25(r-1,o.18+1),1t,a)};17.28=15(a){x(1m.21(0,o.18-1),1t,a)};17.4J=15(v,a){x(1m.21(0,1m.25(r-1,v)),14,a)};12 z=15(){11(!s.1B(\'.\'+o.1d.2R).1a){12 f=(((m.1c.1u!==14)||m.1c.2f)?$(m.1k[0]).3J():$(m.1k[0]).4K());11(m.13.1w===14){f=0}l.1b({1Q:\'2a\',1L:w-1,1n:\'29\',1h:f,3k:\'3l\',1I:\'29\',3Q:\'29\',1v:t.62()-f,1H:u*r});12 g={1n:1r(p.1b(\'1I-1n\'),10),1A:1r(p.1b(\'1I-1A\'),10),1D:1r(p.1b(\'1I-1D\'),10),1h:1r(p.1b(\'1I-1h\'),10)};12 h={1n:1r(p.1b(\'2j-1n-1v\'),10),1A:1r(p.1b(\'2j-1A-1v\'),10),1D:1r(p.1b(\'2j-1D-1v\'),10),1h:1r(p.1b(\'2j-1h-1v\'),10)};1y(12 k 1S h){11(3P(h[k])){h[k]=0}}12 i=u-g.1n-g.1D-h.1n-h.1D;12 j=l.1v()-g.1A-g.1h-h.1A-h.1h;p.4m(15(a,e){$(e).1b({3k:\'3l\',1Q:\'2a\',1n:a*u,1v:j,1H:i}).1s(o.1d.4A+\'35\'+(a+1))});t.1b({3F:\'3G\'});y();11(1g($.4F.4I.2U)!="1t"){l.3g("2U",15(a){11(o.13.2k!==19){12 b=a.2V?a.2V:a.4L;11(m.1c.1u||m.1c.2r||m.1c.1Y){b=0-b}12 c=19;11($(a.2W).2A(o.2x).1a){11($.2l(a.2W.3n.32(),[\'3S\',\'3T\',\'3U\',\'3V\'])!=-1){c=14}}11(c!==14){12 d,3N=19;11(o.13.4y===14){11((o.18+1)==1){d=14}1i 11((o.18+1)==o.1f.1a){3N=14}}11(b>0){a.2d();m.1G=14;11(3N){m.1z();1p 19}1i{o.1z()}}1i{a.2d();m.1G=14;11(d){m.28();1p 19}1i{o.28()}}}}})}}};11(u>0){z()}1i{12 A;A=3o(15(){l=$(l);p=l.2w();r=p.1a;s=l.2A(\'3a.1C\');t=l.4t();u=s.4v();11(u>0){3O(A);z()}},20)}};12 3m=15(){H=B.1H();G=B.1v();B.1b(\'1H\',H+"1j");I=0;1V=0;11(D.13.1w!==14&&D.1k.1a>0){I=$(D.1k[0]).1H();1V=$(D.1k[0]).3J()}1Z=G-1V*D.1k.1a;11(D.13.1w===14){1Z=G}1T=1m.66(I/2)};12 4M=15(a){11((D.1c.2B&&D.1c.2b<"10.5")||D.1c.4B||D.1c.4o||D.1c.4w){11(1g(3D)!="1t"){11(1g(3D.4N)=="15"){3D.4N("6a 6b 1c 6c 3w 6d 6e 2X. 6f 6g 17 6h 1S a 6i, 6j 6k 1c 6l a 18 2b 6m 6n 6o")}}1p 19}11(1g(a)!="1t"){1y(12 b 1S a){D.13[b]=a[b]}}11(D.1k.1a<1){D.13.1w=14}1R(D.1c.2T){1e"1u":1e"3x":1e"2S":1e"2f":1R(D.13.22){1e"2z":1e"2L":D.13.22="2K";1q}1q}1R(D.13.22){1e"2z":1e"2L":1e"2K":1e"3u":D.13.1w=14;1q}11(D.13.1w===14){D.13.1J=19}D.18=1m.25(D.1f.1a,1m.21(1,D.13.2C));11(B.1H()>0){3m();T()}1i{12 c;c=6p(15(){3m();11(B.1H()>0){3O(c);3m();T()}},20)}};12 4O=15(a){12 b;b=3o(15(){11(D.3t===14){3O(b);a(D)}},20)};17.6r=15(a){4O(a);1p D};17.1z=15(a){12 b=1m.25(D.1f.1a,(D.18+1));11(D.13.2q===14){11(D.18+1>D.1f.1a){b=1}}Z(b,a);1p D};17.28=15(a){12 b=1m.21(1,(D.18-1));11(D.13.2q===14){11(D.18-1<1){b=D.1f.1a}}Z(b,a);1p D};17.24=15(a,b){D.1G=14;Z(1m.25(D.1f.1a,1m.21(1,a)),b);1p D};17.6s=15(a,b){D.1G=14;D.4i(a);D.24(a,b);1p D};17.4i=15(a){D.34=a;O();1p D};17.6u=15(a){4q(a);1p D};17.6v=15(a){4r(a);1p D};17.6w=15(a,b){4p(a,b);1p D};17.1x=15(a){12 b=17;11(1g(17.2g)==\'1t\'){17.2g={};1y(12 i=0;i<17.1f.1a;i++){12 c=$(17.1f[i]).1B(\'.\'+17.1d.1x);12 v={1z:15(){1p 19},28:15(){1p 19},24:15(){1p 19}};11(c.1a){v=3d 4s(c,17,a)}17.2g[i]=v}}1i{1p 17.2g[17.18-1]}};17.6x=15(v,h){11(1g(h)!=\'1t\'){11(17.2g[h-1]!==19){11(17.18==h){17.1x().24(v)}1i{17.2g[h-1].24(v,h,14);17.24(h)}}}1i{17.1x().24(v)}};17.2s=15(h){11(1g(h)==\'1t\'){h=17.18}17.2g[h-1].4J(0)};4M(C)};$.6y.1P=15(a){12 b=[];1y(12 i=0;i<17.1a;i++){11(!17[i].1P){17[i].1P=3d 2X(17[i],a)}b.2o(17[i].1P)}1p b.1a>1?b:b[0]}})(4Z);',62,408,'|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||if|var|options|true|function||this|current|false|length|css|browser|classes|case|slides|typeof|left|else|px|spines|transform|Math|top|match|return|break|parseInt|addClass|undefined|msie|width|hideSpines|vertical|for|next|right|find|slide|bottom|active|index|pauseAutoPlay|height|padding|activeCorner|speed|zIndex|complete|document|style|slidedeck|position|switch|in|spine_half_width|transition|spine_outer_width|eq|former|chrome|slide_width||max|slideTransition|origin|goTo|min|animate|before|prev|0px|absolute|version|className|preventDefault|substr|msie9|verticalSlides|stop|rotate|border|scroll|inArray|disabledSlides|mask|push|firefox|cycle|safari|resetVertical|duration|createElement|navChildren|children|deck|looping|flip|parents|opera|start|270deg|removeClass|cufonRefresh|appendChild|90deg|webkit|moz|fade|flipHorizontal|session|opacity|remove|previous|spine|navContainer|msie8|_this|mousewheel|detail|originalTarget|SlideDeck|chromeFrame|targetTouches||rotation|toLowerCase|object|controlTo|_|100||append||dd|div|scale|new|disabled|easing|bind|controlProgress|hide|arrow|listStyleType|none|bl|nodeName|setInterval|addEventListener|display|block|autoPlay|isLoaded|stack|string|not|msie7|floor|default|out|cufon|boolean|console|keys|overflow|hidden|timestamp|li|outerHeight|track|nav_|Cufon|lastSlide|clearInterval|isNaN|margin|label|input|select|option|textarea|autoPlayInterval|color|charAt|indicator|pageX|pageY|filter|progid|src|DXImageTransform|textAlign|pro|msTransform|round|Microsoft|last|https|DIV|BasicImage|show|class|dt|updateControlTo|ease|touch|createTextNode|each|target|firefox2|bh|bi|bj|bk|parent|500|innerHeight|firefox30|null|continueScrolling|click|prefix|msie6|keyCode|LI|touchThreshold|event|id|href|special|snapTo|outerWidth|wheelDelta|bm|error|bn|http|www|com|6885858486f31043e5839c735d99457f045affd0|touchstart|DOM|ready|background|touchmove|touchend|jQuery||slidesVertical|paddingLeft|transparent|refresh|ffffff|window|firefox3|Date|getUTCFullYear|fadeOut|fadeIn|1000|999|getUTCMonth|getUTCDate|marginLeft|getUTCHours|getUTCMinutes|msTransformOrigin|getUTCSeconds|getTimezoneOffset|swing|navigator|doctype|dureation|publicId|after|25px|join|20000|hasClass|parseFloat|isArray|transitional|replace|splice|userAgent|DL|chroma|getElementsByTagName|navParent|center|script|backgroundColor|verticalSlideNav|jquery|verticalSlide|ul|SlideDeckSkin|250|UL|profree|pack|keydown|scaleY|js|Nav|html|innerHTML|scaleX|siblings||split|innerWidth|noping|5000|Image|ceil|location|protocol|fixed|This|web|is|supported|by|Please|view|page|modern|CSS3|capable|or|of|Inernet|Explorer|setTimeout|relative|loaded|progressTo|01234567890ABCDEF|disableSlide|enableSlide|setOption|goToVertical|fn|00'.split('|'),0,{}));


/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 * 
 * Open source under the BSD License. 
 * 
 * Copyright © 2008 George McGinley Smith
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:
 * 
 * Redistributions of source code must retain the above copyright notice, this list of 
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list 
 * of conditions and the following disclaimer in the documentation and/or other materials 
 * provided with the distribution.
 * 
 * Neither the name of the author nor the names of contributors may be used to endorse 
 * or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
 * OF THE POSSIBILITY OF SUCH DAMAGE. 
 *
*/

// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing['jswing'] = jQuery.easing['swing'];

jQuery.extend( jQuery.easing,
{
	def: 'easeOutQuad',
	swing: function (x, t, b, c, d) {
		//alert(jQuery.easing.default);
		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
	},
	easeInQuad: function (x, t, b, c, d) {
		return c*(t/=d)*t + b;
	},
	easeOutQuad: function (x, t, b, c, d) {
		return -c *(t/=d)*(t-2) + b;
	},
	easeInOutQuad: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t + b;
		return -c/2 * ((--t)*(t-2) - 1) + b;
	},
	easeInCubic: function (x, t, b, c, d) {
		return c*(t/=d)*t*t + b;
	},
	easeOutCubic: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t + 1) + b;
	},
	easeInOutCubic: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t + b;
		return c/2*((t-=2)*t*t + 2) + b;
	},
	easeInQuart: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t + b;
	},
	easeOutQuart: function (x, t, b, c, d) {
		return -c * ((t=t/d-1)*t*t*t - 1) + b;
	},
	easeInOutQuart: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
		return -c/2 * ((t-=2)*t*t*t - 2) + b;
	},
	easeInQuint: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t*t + b;
	},
	easeOutQuint: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t*t*t + 1) + b;
	},
	easeInOutQuint: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
		return c/2*((t-=2)*t*t*t*t + 2) + b;
	},
	easeInSine: function (x, t, b, c, d) {
		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
	},
	easeOutSine: function (x, t, b, c, d) {
		return c * Math.sin(t/d * (Math.PI/2)) + b;
	},
	easeInOutSine: function (x, t, b, c, d) {
		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
	},
	easeInExpo: function (x, t, b, c, d) {
		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
	},
	easeOutExpo: function (x, t, b, c, d) {
		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
	},
	easeInOutExpo: function (x, t, b, c, d) {
		if (t==0) return b;
		if (t==d) return b+c;
		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
	},
	easeInCirc: function (x, t, b, c, d) {
		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
	},
	easeOutCirc: function (x, t, b, c, d) {
		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
	},
	easeInOutCirc: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
	},
	easeInElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
	},
	easeOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
	},
	easeInOutElastic: function (x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
	},
	easeInBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*(t/=d)*t*((s+1)*t - s) + b;
	},
	easeOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
	},
	easeInOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158; 
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
	},
	easeInBounce: function (x, t, b, c, d) {
		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
	},
	easeOutBounce: function (x, t, b, c, d) {
		if ((t/=d) < (1/2.75)) {
			return c*(7.5625*t*t) + b;
		} else if (t < (2/2.75)) {
			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
		}
	},
	easeInOutBounce: function (x, t, b, c, d) {
		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
	}
});



/**
* hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
* 
* @param  f  onMouseOver function || An object with configuration options
* @param  g  onMouseOut function  || Nothing (use configuration options object)
* @author    Brian Cherne <brian@cherne.net>
*/
(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;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var 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);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var 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);var 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);


/*
 * Lazy Load - jQuery plugin for lazy loading images
 *
 * Copyright (c) 2007-2011 Mika Tuupola
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Project home:
 *   http://www.appelsiini.net/projects/lazyload
 *
 * Version:  1.6.0-dev
 * ADDED - ADAM LAFENE 23/11/11: imgOnLoad option - function to call on each image load. Takes one parameter - the DOM element which the image load has been called on.
 *
 */
(function(b){b.fn.lazyload=function(c){var a={threshold:0,failurelimit:0,event:"scroll",effect:"show",container:window,imgOnLoad:null};c&&b.extend(a,c);var e=this;"scroll"==a.event&&b(a.container).bind("scroll",function(){var c=0;e.each(function(){if(!b.abovethetop(this,a)&&!b.leftofbegin(this,a))if(!b.belowthefold(this,a)&&!b.rightoffold(this,a))b(this).trigger("appear");else if(c++>a.failurelimit)return!1});var d=b.grep(e,function(a){return!a.loaded});e=b(d)});this.each(function(){var c=this,d= b(c);c.loaded=!1;d.one("appear",function(){this.loaded||b("<img />").bind("load",function(){d.hide().attr("src",d.data("original"))[a.effect](a.effectspeed);null!=a.imgOnLoad&&b.isFunction(a.imgOnLoad)&&a.imgOnLoad(c);c.loaded=!0}).attr("src",d.data("original"))});c.loaded||"scroll"!=a.event&&d.bind(a.event,function(){c.loaded||d.trigger("appear")})});b(a.container).trigger(a.event);return this};b.belowthefold=function(c,a){return(void 0===a.container||a.container===window?b(window).height()+b(window).scrollTop(): b(a.container).offset().top+b(a.container).height())<=b(c).offset().top-a.threshold};b.rightoffold=function(c,a){return(void 0===a.container||a.container===window?b(window).width()+b(window).scrollLeft():b(a.container).offset().left+b(a.container).width())<=b(c).offset().left-a.threshold};b.abovethetop=function(c,a){return(void 0===a.container||a.container===window?b(window).scrollTop():b(a.container).offset().top)>=b(c).offset().top+a.threshold+b(c).height()};b.leftofbegin=function(c,a){return(void 0=== a.container||a.container===window?b(window).scrollLeft():b(a.container).offset().left)>=b(c).offset().left+a.threshold+b(c).width()};b.extend(b.expr[":"],{"below-the-fold":"$.belowthefold(a, {threshold : 0, container: window})","above-the-fold":"!$.belowthefold(a, {threshold : 0, container: window})","right-of-fold":"$.rightoffold(a, {threshold : 0, container: window})","left-of-fold":"!$.rightoffold(a, {threshold : 0, container: window})"})})(jQuery);

/**
* plugin: jquery.naviDropDown.js
* author: kt.cheung @ Brandammo
* website: www.brandammo.co.uk
* version: 1.0
* date: 19th feb 2011
* description: simple jquery navigation drop down menu with easing and hoverIntent

Copyright (c) 2011 KT Cheung

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

**/

(function($){

  $.fn.naviDropDown = function(options) {  
  
	//set up default options 
	var defaults = { 
		dropDownClass: 'dropdown', //the class name for your drop down
		dropDownEvent: 'mouseover', //the mouse event on which to call your dropdown
		dropDownWidth: 'auto',	//the default width of drop down elements
		dropDownAlign: 'left',	//Align the dropdown menu to the left or the right (can be used in conjunction with dropdownPosition)
		dropDownPosition: null,	//set the position a certain number of px to the left/right - if set to null will align with the activation link.
		slideDownEasing: 'easeInOutCirc', //easing method for slideDown
		slideUpEasing: 'easeInOutCirc', //easing method for slideUp
		slideDownDuration: 500, //easing duration for slideDown
		slideUpDuration: 500, //easing duration for slideUp
		orientation: 'horizontal', //orientation - either 'horizontal' or 'vertical' - note vertical option is not coded
		useList: true, // if you don't want to use a list set this to false to just apply the dropdown to the object/s selected
		beforeShowFunction: null,
		afterShowFunction: null,
		beforeHideFunction: null,
		afterHideFunction: null
	}; 
  	
	var opts = $.extend({}, defaults, options); 
	var currentMouseOver = null;
	var lastMouseOver = null;
	var dropdownHeights = new Array();
	var timeout = 0;

    return this.each(function() {  
	  var $this = $(this);
	  $this.find('.'+opts.dropDownClass).css('width', opts.dropDownWidth).css('display', 'none');
	  
	  var dropdownItems;
	  
	  if (opts.useList == false || $(this).find('ul').length < 1) {
		dropdownItems = $(this);
	  }
	  else if ($(this).children('li').length > 0) {
		// if the object itself is a list use its child LIs as the selector
		dropdownItems = $(this).children('li');
	  }
	  else {
		// apply the dropdown to the LIs in the first UL it finds
		dropdownItems = $(this).find('ul:eq(0) > li');
	  }
	  dropdownItems.css('z-index', 1000);
	  
	  dropdownItems.each(function(i) {
								  
			if ($(this).find('.'+opts.dropDownClass).length<1) {
				return;
			}
			
			var dropDownActivationLink = $(this).find('a:eq(0)');
			var dropDownContainer = $(this).find('.'+opts.dropDownClass);
			
			dropDownContainer.css('display', 'block');
			dropdownHeights[i] = dropDownContainer.height();
			dropDownContainer.css('display', 'none');
			
			
		  if(opts.orientation == 'horizontal') {
			dropDownActivationLink.siblings('.'+opts.dropDownClass).css('top', $this.position().top+$this.outerHeight()+'px');
			
			switch (opts.dropDownAlign.toLowerCase()) {
			
				case 'right':
				dropDownActivationLink.siblings('.'+opts.dropDownClass).css('right', (opts.dropDownPosition == null) ? parseInt(dropDownActivationLink.position().left+dropDownActivationLink.outerWidth()) : parseInt(opts.dropDownPosition));
				break;
				
				case 'left':
				default:
				dropDownActivationLink.siblings('.'+opts.dropDownClass).css('left', (opts.dropDownPosition == null) ? parseInt(dropDownActivationLink.position().left) : parseInt(opts.dropDownPosition));
			}
			
			
		  }
			
			switch(opts.dropDownEvent) {
				 case 'click':
				 dropDownActivationLink.click(function() {
					
					if (dropDownContainer.css('display')=='none') {
						showDropDown($(this).parent());
					}
					else {
						hideDropDown($(this).parent());
					}
				 });

				 break;
				 
				 case 'mouseover':
				 default:
					dropDownActivationLink.hoverIntent( { 
						over: function() {
							currentMouseOver = i;
							activeNav = $(this).parent();
							showDropDown(activeNav);
							dropDownContainer.mouseleave(function(){
								hideDropDown(activeNav);
							});
						},
						out: function(e) {
							lastMouseOver = i;
							var $link = $(this);
							if (e.pageX>=dropDownContainer.offset().left && e.pageX<=(dropDownContainer.offset().left+dropDownContainer.outerWidth()) &&
								e.pageY>=(dropDownContainer.offset().top) && e.pageY<=(dropDownContainer.offset().top+dropDownContainer.outerHeight())) {
									return;
							}
							else {
								hideDropDown($(this).parent());
							 }
						}
					});
				break;
			}
		});
		function showDropDown(obj){
			
			if (opts.beforeShowFunction != null && $.isFunction(opts.beforeShowFunction)) {
					opts.beforeTransitionFunction($this, obj, opts);
			}
			
			dropDownClass = opts.dropDownClass;
			slideDownDuration = opts.slideDownDuration;
			slideDownEasing = opts.slideDownEasing;
			obj.find('.'+opts.dropDownClass).slideDown(opts.slideDownDuration, opts.slideDownEasing, function() {
				
				$(obj).find('a:eq(0)').addClass('active');
				if (opts.afterShowFunction != null && $.isFunction(opts.afterShowFunction)) {
					opts.afterShowFunction($this, obj, opts);
				}
				
			});
		}
		
		function hideDropDown(obj){
			if (opts.beforeHideFunction != null && $.isFunction(opts.beforeHideFunction)) {
					opts.beforeHideFunction($this, obj, opts);
			}
			
			obj.find('a:eq(0)').removeClass('active');
			obj.find('.'+opts.dropDownClass).slideUp(opts.slideUpDuration, opts.slideUpEasing, function() {
				obj.find('a:eq(0)').removeClass('active');
				if (opts.afterHideFunction != null && $.isFunction(opts.afterHideFunction)) {
					opts.afterHideFunction($this, obj, opts);
				}
			});
		} 
    });
	
	/*function showDropDown(item){
		var duration = (timeout == 0) ? opts.slideDownDuration : Math.round(opts.slideDownDuration/2);
		setTimeout(function() {
			timeout = Math.round(opts.slideDownDuration/2);
			item.find('.'+opts.dropDownClass).slideDown(duration, opts.slideDownEasing, function() {
				$(item).find('a:eq(0)').addClass('active');
			});
		}, timeout);
	}
	
	function hideDropDown(item){
		item.find('a:eq(0)').removeClass('active');
		var duration = (timeout == 0) ? opts.slideUpDuration : Math.round(opts.slideUpDuration/2);
		item.find('.'+opts.dropDownClass).slideUp(duration, opts.slideUpEasing, function() {
				item.find('a:eq(0)').removeClass('active');
				timeout = 0;
		});
	} */
	
	
	
  };
})(jQuery);


