/*  * No Spam (1.3)
http://www.leftrightdesigns.com/library/jquery/nospam/   */
jQuery.fn.nospam=function(settings){settings=jQuery.extend({replaceText:false,filterLevel:'normal'},settings);return this.each(function(){e=null;if(settings.filterLevel=='low'){if($(this).is('a[rel]')){e=$(this).attr('rel').replace('//','@').replace(/\//g,'.');}else{e=$(this).text().replace('//','@').replace(/\//g,'.');}}else{if($(this).is('a[rel]')){e=$(this).attr('rel').split('').reverse().join('').replace('//','@').replace(/\//g,'.');}else{e=$(this).text().split('').reverse().join('').replace('//','@').replace(/\//g,'.');}}
if(e){if($(this).is('a[rel]')){$(this).attr('href','mailto:'+e);if(settings.replaceText){$(this).text(e);}}else{$(this).text(e);}}});};

/** jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/   */
// 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){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;}});

/* Mousewheel Copyright (c) 2009 Brandon Aaron (http://brandonaaron.net)
 * 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. */
(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(f){var d=[].slice.call(arguments,1),g=0,e=true;f=c.event.fix(f||window.event);f.type="mousewheel";if(f.wheelDelta){g=f.wheelDelta/120}if(f.detail){g=-f.detail/3}d.unshift(f,g);return c.event.handle.apply(this,d)}})(jQuery);

/*** hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+     * <http://cherne.net/brian/resources/jquery.hoverIntent.html>   */
(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);

/* bgIframe  Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)  * Version 2.1*/
(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&parseInt($.browser.version)<=6){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;};if(!$.browser.version)$.browser.version=navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1];})(jQuery);

/** Superfish v1.4.8 - jQuery menu widget  * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt  */
(function(b){b.fn.superfish=function(k){var g=b.fn.superfish,j=g.c,f=b(['<span class="',j.arrowClass,'"> &#187;</span>'].join("")),i=function(){var c=b(this),l=d(c);clearTimeout(l.sfTimer);c.showSuperfishUl().siblings().hideSuperfishUl()},e=function(){var c=b(this),m=d(c),l=g.op;clearTimeout(m.sfTimer);m.sfTimer=setTimeout(function(){l.retainPath=(b.inArray(c[0],l.$path)>-1);c.hideSuperfishUl();if(l.$path.length&&c.parents(["li.",l.hoverClass].join("")).length<1){i.call(l.$path)}},l.delay)},d=function(c){var l=c.parents(["ul.",j.menuClass,":first"].join(""))[0];g.op=g.o[l.serial];return l},h=function(c){c.addClass(j.anchorClass).append(f.clone())};return this.each(function(){var c=this.serial=g.o.length;var m=b.extend({},g.defaults,k);m.$path=b("li."+m.pathClass,this).slice(0,m.pathLevels).each(function(){b(this).addClass([m.hoverClass,j.bcClass].join(" ")).filter("li:has(ul)").removeClass(m.pathClass)});g.o[c]=g.op=m;b("li:has(ul)",this)[(b.fn.hoverIntent&&!m.disableHI)?"hoverIntent":"hover"](i,e).each(function(){if(m.autoArrows){h(b(">a:first-child",this))}}).not("."+j.bcClass).hideSuperfishUl();var l=b("a",this);l.each(function(n){var o=l.eq(n).parents("li");l.eq(n).focus(function(){i.call(o)}).blur(function(){e.call(o)})});m.onInit.call(this)}).each(function(){var c=[j.menuClass];if(g.op.dropShadows&&!(b.browser.msie&&b.browser.version<7)){c.push(j.shadowClass)}b(this).addClass(c.join(" "))})};var a=b.fn.superfish;a.o=[];a.op={};a.IE7fix=function(){var c=a.op;if(b.browser.msie&&b.browser.version>6&&c.dropShadows&&c.animation.opacity!=undefined){this.toggleClass(a.c.shadowClass+"-off")}};a.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"};a.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},speed:"normal",autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};b.fn.extend({hideSuperfishUl:function(){var e=a.op,d=(e.retainPath===true)?e.$path:"";e.retainPath=false;var c=b(["li.",e.hoverClass].join(""),this).add(this).not(d).removeClass(e.hoverClass).find(">ul").hide().css("visibility","hidden");e.onHide.call(c);return this},showSuperfishUl:function(){var e=a.op,d=a.c.shadowClass+"-off",c=this.addClass(e.hoverClass).find(">ul:hidden").css("visibility","visible");a.IE7fix.call(c);e.onBeforeShow.call(c);c.animate(e.animation,e.speed,function(){a.IE7fix.call(c);e.onShow.call(c)});return this}})})(jQuery);

/** 	Easy Tooltip 1.0 - jQuery plugin
http://cssglobe.com/post/4380/easy-tooltip--jquery-plugin **/
(function($){$.fn.easyTooltip=function(options){var defaults={xOffset:10,yOffset:25,tooltipId:"easyTooltip",clickRemove:false,content:"",useElement:""};var options=$.extend(defaults,options);var content;this.each(function(){var title=$(this).attr("title");$(this).hover(function(e){content=(options.content!="")?options.content:title;content=(options.useElement!="")?$("#"+options.useElement).html():content;$(this).attr("title","");if(content!=""&&content!=undefined){$("body").append("<div id='"+options.tooltipId+"'>"+content+"</div>");$("#"+options.tooltipId).css("position","absolute").css("top",(e.pageY-options.yOffset)+"px").css("left",(e.pageX+options.xOffset)+"px").css("display","none").fadeIn("fast")}},function(){$("#"+options.tooltipId).remove();$(this).attr("title",title);});$(this).mousemove(function(e){$("#"+options.tooltipId).css("top",(e.pageY-options.yOffset)+"px").css("left",(e.pageX+options.xOffset)+"px")});if(options.clickRemove){$(this).mousedown(function(e){$("#"+options.tooltipId).remove();$(this).attr("title",title);});}});};})(jQuery);

/* jquery.mCustomScrollbar.js -- malihu custom scrollbar plugin */
/** http://manos.malihu.gr/jquery-custom-content-scroller **/
(function($){$.fn.mCustomScrollbar=function(scrollType,animSpeed,easeType,bottomSpace,draggerDimType,mouseWheelSupport,scrollBtnsSupport,scrollBtnsSpeed){var id=$(this).attr("id");var $customScrollBox=$("#"+id+" .customScrollBox");var $customScrollBox_container=$("#"+id+" .customScrollBox .container");var $customScrollBox_content=$("#"+id+" .customScrollBox .content");var $dragger_container=$("#"+id+" .dragger_container");var $dragger=$("#"+id+" .dragger");var $scrollUpBtn=$("#"+id+" .scrollUpBtn");var $scrollDownBtn=$("#"+id+" .scrollDownBtn");var $customScrollBox_content_images=$customScrollBox_content.find("img");if(!$customScrollBox.data("minDraggerHeight")){$customScrollBox.data("minDraggerHeight",$dragger.height());}
if(!$customScrollBox.data("minDraggerWidth")){$customScrollBox.data("minDraggerWidth",$dragger.width());}
if(!$customScrollBox.data("contentHeight")){$customScrollBox.data("contentHeight",$customScrollBox_container.height());}
if(!$customScrollBox.data("contentWidth")){$customScrollBox.data("contentWidth",$customScrollBox_container.width());}
CustomScroller();function CustomScroller(reloadType){if(scrollType=="horizontal"){var visibleWidth=$customScrollBox.width();$customScrollBox.data("totalContent",$customScrollBox_content_images.parent().outerWidth(true)-$customScrollBox_content_images.parent().width());$customScrollBox_content_images.each(function(i){$customScrollBox.data("totalContent",$customScrollBox.data("totalContent")+$(this).outerWidth(true));$customScrollBox_container.css("width",$customScrollBox.data("totalContent"));});if($customScrollBox_container.width()>visibleWidth){$dragger.css("display","block");if(reloadType!="resize"&&$customScrollBox_container.width()!=$customScrollBox.data("contentWidth")){$dragger.css("left",0);$customScrollBox_container.css("left",0);$customScrollBox.data("contentWidth",$customScrollBox_container.width());}
$dragger_container.css("display","block");$scrollDownBtn.css("display","inline-block");$scrollUpBtn.css("display","inline-block");var totalContent=$customScrollBox_content.width();var minDraggerWidth=$customScrollBox.data("minDraggerWidth");var draggerContainerWidth=$dragger_container.width();function AdjustDraggerWidth(){if(draggerDimType=="auto"){var adjDraggerWidth=Math.round(totalContent-((totalContent-visibleWidth)*1.3));if(adjDraggerWidth<=minDraggerWidth){$dragger.css("width",minDraggerWidth+"px");}else if(adjDraggerWidth>=draggerContainerWidth){$dragger.css("width",draggerContainerWidth-10+"px");}else{$dragger.css("width",adjDraggerWidth+"px");}}}
AdjustDraggerWidth();var targX=0;var draggerWidth=$dragger.width();$dragger.draggable({axis:"x",containment:"parent",drag:function(event,ui){ScrollX();},stop:function(event,ui){DraggerRelease();}});$dragger_container.click(function(e){var $this=$(this);var mouseCoord=(e.pageX-$this.offset().left);if(mouseCoord<$dragger.position().left||mouseCoord>($dragger.position().left+$dragger.width())){var targetPos=mouseCoord+$dragger.width();if(targetPos<$dragger_container.width()){$dragger.css("left",mouseCoord);ScrollX();}else{$dragger.css("left",$dragger_container.width()-$dragger.width());ScrollX();}}});$(function($){if(mouseWheelSupport=="yes"){$customScrollBox.unbind("mousewheel");$customScrollBox.bind("mousewheel",function(event,delta){var vel=Math.abs(delta*10);$dragger.css("left",$dragger.position().left-(delta*vel));ScrollX();if($dragger.position().left<0){$dragger.css("left",0);$customScrollBox_container.stop();ScrollX();}
if($dragger.position().left>$dragger_container.width()-$dragger.width()){$dragger.css("left",$dragger_container.width()-$dragger.width());$customScrollBox_container.stop();ScrollX();}
return false;});}});if(scrollBtnsSupport=="yes"){$scrollDownBtn.mouseup(function(){BtnsScrollXStop();}).mousedown(function(){BtnsScrollX("down");});$scrollUpBtn.mouseup(function(){BtnsScrollXStop();}).mousedown(function(){BtnsScrollX("up");});$scrollDownBtn.click(function(e){e.preventDefault();});$scrollUpBtn.click(function(e){e.preventDefault();});btnsScrollTimerX=0;function BtnsScrollX(dir){if(dir=="down"){var btnsScrollTo=$dragger_container.width()-$dragger.width();var scrollSpeed=Math.abs($dragger.position().left-btnsScrollTo)*(100/scrollBtnsSpeed);$dragger.stop().animate({left:btnsScrollTo},scrollSpeed,"linear");}else{var btnsScrollTo=0;var scrollSpeed=Math.abs($dragger.position().left-btnsScrollTo)*(100/scrollBtnsSpeed);$dragger.stop().animate({left:-btnsScrollTo},scrollSpeed,"linear");}
clearInterval(btnsScrollTimerX);btnsScrollTimerX=setInterval(ScrollX,20);}
function BtnsScrollXStop(){clearInterval(btnsScrollTimerX);$dragger.stop();}}
var scrollAmount=(totalContent-visibleWidth)/(draggerContainerWidth-draggerWidth);function ScrollX(){var draggerX=$dragger.position().left;var targX=-draggerX*scrollAmount;var thePos=$customScrollBox_container.position().left-targX;$customScrollBox_container.stop().animate({left:"-="+thePos},animSpeed,easeType);}}else{$dragger.css("left",0).css("display","none");$customScrollBox_container.css("left",0);$dragger_container.css("display","none");$scrollDownBtn.css("display","none");$scrollUpBtn.css("display","none");}}else{var visibleHeight=$customScrollBox.height();if($customScrollBox_container.height()>visibleHeight){$dragger.css("display","block");if(reloadType!="resize"&&$customScrollBox_container.height()!=$customScrollBox.data("contentHeight")){$dragger.css("top",0);$customScrollBox_container.css("top",0);$customScrollBox.data("contentHeight",$customScrollBox_container.height());}
$dragger_container.css("display","block");$scrollDownBtn.css("display","inline-block");$scrollUpBtn.css("display","inline-block");var totalContent=$customScrollBox_content.height();var minDraggerHeight=$customScrollBox.data("minDraggerHeight");var draggerContainerHeight=$dragger_container.height();function AdjustDraggerHeight(){if(draggerDimType=="auto"){var adjDraggerHeight=Math.round(totalContent-((totalContent-visibleHeight)*1.3));if(adjDraggerHeight<=minDraggerHeight){$dragger.css("height",minDraggerHeight+"px").css("line-height",minDraggerHeight+"px");}else if(adjDraggerHeight>=draggerContainerHeight){$dragger.css("height",draggerContainerHeight-10+"px").css("line-height",draggerContainerHeight-10+"px");}else{$dragger.css("height",adjDraggerHeight+"px").css("line-height",adjDraggerHeight+"px");}}}
AdjustDraggerHeight();var targY=0;var draggerHeight=$dragger.height();$dragger.draggable({axis:"y",containment:"parent",drag:function(event,ui){Scroll();},stop:function(event,ui){DraggerRelease();}});$dragger_container.click(function(e){var $this=$(this);var mouseCoord=(e.pageY-$this.offset().top);if(mouseCoord<$dragger.position().top||mouseCoord>($dragger.position().top+$dragger.height())){var targetPos=mouseCoord+$dragger.height();if(targetPos<$dragger_container.height()){$dragger.css("top",mouseCoord);Scroll();}else{$dragger.css("top",$dragger_container.height()-$dragger.height());Scroll();}}});$(function($){if(mouseWheelSupport=="yes"){$customScrollBox.unbind("mousewheel");$customScrollBox.bind("mousewheel",function(event,delta){var vel=Math.abs(delta*10);$dragger.css("top",$dragger.position().top-(delta*vel));Scroll();if($dragger.position().top<0){$dragger.css("top",0);$customScrollBox_container.stop();Scroll();}
if($dragger.position().top>$dragger_container.height()-$dragger.height()){$dragger.css("top",$dragger_container.height()-$dragger.height());$customScrollBox_container.stop();Scroll();}
return false;});}});if(scrollBtnsSupport=="yes"){$scrollDownBtn.mouseup(function(){BtnsScrollStop();}).mousedown(function(){BtnsScroll("down");});$scrollUpBtn.mouseup(function(){BtnsScrollStop();}).mousedown(function(){BtnsScroll("up");});$scrollDownBtn.click(function(e){e.preventDefault();});$scrollUpBtn.click(function(e){e.preventDefault();});btnsScrollTimer=0;function BtnsScroll(dir){if(dir=="down"){var btnsScrollTo=$dragger_container.height()-$dragger.height();var scrollSpeed=Math.abs($dragger.position().top-btnsScrollTo)*(100/scrollBtnsSpeed);$dragger.stop().animate({top:btnsScrollTo},scrollSpeed,"linear");}else{var btnsScrollTo=0;var scrollSpeed=Math.abs($dragger.position().top-btnsScrollTo)*(100/scrollBtnsSpeed);$dragger.stop().animate({top:-btnsScrollTo},scrollSpeed,"linear");}
clearInterval(btnsScrollTimer);btnsScrollTimer=setInterval(Scroll,20);}
function BtnsScrollStop(){clearInterval(btnsScrollTimer);$dragger.stop();}}
if(bottomSpace<1){bottomSpace=1;}
var scrollAmount=(totalContent-(visibleHeight/bottomSpace))/(draggerContainerHeight-draggerHeight);function Scroll(){var draggerY=$dragger.position().top;var targY=-draggerY*scrollAmount;var thePos=$customScrollBox_container.position().top-targY;$customScrollBox_container.stop().animate({top:"-="+thePos},animSpeed,easeType);}}else{$dragger.css("top",0).css("display","none");$customScrollBox_container.css("top",0);$dragger_container.css("display","none");$scrollDownBtn.css("display","none");$scrollUpBtn.css("display","none");}}
$dragger.mouseup(function(){DraggerRelease();}).mousedown(function(){DraggerPress();});function DraggerPress(){$dragger.addClass("dragger_pressed");}
function DraggerRelease(){$dragger.removeClass("dragger_pressed");}}
$(window).resize(function(){if(scrollType=="horizontal"){if($dragger.position().left>$dragger_container.width()-$dragger.width()){$dragger.css("left",$dragger_container.width()-$dragger.width());}}else{if($dragger.position().top>$dragger_container.height()-$dragger.height()){$dragger.css("top",$dragger_container.height()-$dragger.height());}}
CustomScroller("resize");});};})(jQuery);


/* Quicksand 1.2.2 Tri by CSS  
Project site: http://razorjack.net/quicksand
Github site: http://github.com/razorjack/quicksand  */
(function($){$.fn.quicksand=function(collection,customOptions){var options={duration:750,easing:'swing',attribute:'data-id',adjustHeight:'auto',useScaling:true,enhancement:function(c){},selector:'> *',dx:0,dy:0};$.extend(options,customOptions);if($.browser.msie||(typeof($.fn.scale)=='undefined')){options.useScaling=false;}
var callbackFunction;if(typeof(arguments[1])=='function'){var callbackFunction=arguments[1];}else if(typeof(arguments[2]=='function')){var callbackFunction=arguments[2];}
return this.each(function(i){var val;var animationQueue=[];var $collection=$(collection).clone();var $sourceParent=$(this);var sourceHeight=$(this).css('height');var destHeight;var adjustHeightOnCallback=false;var offset=$($sourceParent).offset();var offsets=[];var $source=$(this).find(options.selector);if($.browser.msie&&$.browser.version.substr(0,1)<7){$sourceParent.html('').append($collection);return;}
var postCallbackPerformed=0;var postCallback=function(){if(!postCallbackPerformed){postCallbackPerformed=1;$toDelete=$sourceParent.find('> *');$sourceParent.prepend($dest.find('> *'));$toDelete.remove();if(adjustHeightOnCallback){$sourceParent.css('height',destHeight);}
options.enhancement($sourceParent);if(typeof callbackFunction=='function'){callbackFunction.call(this);}}};var $correctionParent=$sourceParent.offsetParent();var correctionOffset=$correctionParent.offset();if($correctionParent.css('position')=='relative'){if($correctionParent.get(0).nodeName.toLowerCase()=='body'){}else{correctionOffset.top+=(parseFloat($correctionParent.css('border-top-width'))||0);correctionOffset.left+=(parseFloat($correctionParent.css('border-left-width'))||0);}}else{correctionOffset.top-=(parseFloat($correctionParent.css('border-top-width'))||0);correctionOffset.left-=(parseFloat($correctionParent.css('border-left-width'))||0);correctionOffset.top-=(parseFloat($correctionParent.css('margin-top'))||0);correctionOffset.left-=(parseFloat($correctionParent.css('margin-left'))||0);}
if(isNaN(correctionOffset.left)){correctionOffset.left=0;}
if(isNaN(correctionOffset.top)){correctionOffset.top=0;}
correctionOffset.left-=options.dx;correctionOffset.top-=options.dy;$sourceParent.css('height',$(this).height());$source.each(function(i){offsets[i]=$(this).offset();});$(this).stop();var dx=0;var dy=0;$source.each(function(i){$(this).stop();var rawObj=$(this).get(0);if(rawObj.style.position=='absolute'){dx=-options.dx;dy=-options.dy;}else{dx=options.dx;dy=options.dy;}
rawObj.style.position='absolute';rawObj.style.margin='0';rawObj.style.top=(offsets[i].top-parseFloat(rawObj.style.marginTop)-correctionOffset.top+dy)+'px';rawObj.style.left=(offsets[i].left-parseFloat(rawObj.style.marginLeft)-correctionOffset.left+dx)+'px';});var $dest=$($sourceParent).clone();var rawDest=$dest.get(0);rawDest.innerHTML='';rawDest.setAttribute('id','');rawDest.style.height='auto';rawDest.style.width=$sourceParent.width()+'px';$dest.append($collection);$dest.insertBefore($sourceParent);$dest.css('opacity',0.0);rawDest.style.zIndex=-1;rawDest.style.margin='0';rawDest.style.position='absolute';rawDest.style.top=offset.top-correctionOffset.top+'px';rawDest.style.left=offset.left-correctionOffset.left+'px';if(options.adjustHeight==='dynamic'){$sourceParent.animate({height:$dest.height()},options.duration,options.easing);}else if(options.adjustHeight==='auto'){destHeight=$dest.height();if(parseFloat(sourceHeight)<parseFloat(destHeight)){$sourceParent.css('height',destHeight);}else{adjustHeightOnCallback=true;}}
$source.each(function(i){var destElement=[];if(typeof(options.attribute)=='function'){val=options.attribute($(this));$collection.each(function(){if(options.attribute(this)==val){destElement=$(this);return false;}});}else{destElement=$collection.filter('['+options.attribute+'='+$(this).attr(options.attribute)+']');}
if(destElement.length){if(!options.useScaling){animationQueue.push({element:$(this),animation:{top:destElement.offset().top-correctionOffset.top,left:destElement.offset().left-correctionOffset.left,opacity:1.0}});}else{animationQueue.push({element:$(this),animation:{top:destElement.offset().top-correctionOffset.top,left:destElement.offset().left-correctionOffset.left,opacity:1.0,scale:'1.0'}});}}else{if(!options.useScaling){animationQueue.push({element:$(this),animation:{opacity:'0.0'}});}else{animationQueue.push({element:$(this),animation:{opacity:'0.0',scale:'0.0'}});}}});$collection.each(function(i){var sourceElement=[];var destElement=[];if(typeof(options.attribute)=='function'){val=options.attribute($(this));$source.each(function(){if(options.attribute(this)==val){sourceElement=$(this);return false;}});$collection.each(function(){if(options.attribute(this)==val){destElement=$(this);return false;}});}else{sourceElement=$source.filter('['+options.attribute+'='+$(this).attr(options.attribute)+']');destElement=$collection.filter('['+options.attribute+'='+$(this).attr(options.attribute)+']');}
var animationOptions;if(sourceElement.length===0){if(!options.useScaling){animationOptions={opacity:'1.0'};}else{animationOptions={opacity:'1.0',scale:'1.0'};}
d=destElement.clone();var rawDestElement=d.get(0);rawDestElement.style.position='absolute';rawDestElement.style.margin='0';rawDestElement.style.top=destElement.offset().top-correctionOffset.top+'px';rawDestElement.style.left=destElement.offset().left-correctionOffset.left+'px';d.css('opacity',0.0);if(options.useScaling){d.css('transform','scale(0.0)');}
d.appendTo($sourceParent);animationQueue.push({element:$(d),animation:animationOptions});}});$dest.remove();options.enhancement($sourceParent);for(i=0;i<animationQueue.length;i++){animationQueue[i].element.animate(animationQueue[i].animation,options.duration,options.easing,postCallback);}});};})(jQuery);


/* Quicksand Sorted  */
(function($){$.fn.sorted=function(customOptions){var options={reversed:false,by:function(a){return a.text();}};$.extend(options,customOptions);$data=$(this);arr=$data.get();arr.sort(function(a,b){var valA=options.by($(a));var valB=options.by($(b));if(options.reversed){return(valA<valB)?1:(valA>valB)?-1:0;}else{return(valA<valB)?-1:(valA>valB)?1:0;}});return $(arr);};})(jQuery);




