(function(b){var a=b.scrollTo=function(d,f,e){b(window).scrollTo(d,f,e)};a.defaults={axis:"y",duration:1};a.window=function(d){return b(window).scrollable()};b.fn.scrollable=function(){return this.map(function(){var d=this.parentWindow||this.defaultView,h=this.nodeName=="#document"?d.frameElement||d:this,f=h.contentDocument||(h.contentWindow||h).document,e=h.setInterval;return h.nodeName=="IFRAME"||e&&b.browser.safari?f.body:e?f.documentElement:this})};b.fn.scrollTo=function(f,e,d){if(typeof e=="object"){d=e;e=0}if(typeof d=="function"){d={onAfter:d}}d=b.extend({},a.defaults,d);e=e||d.speed||d.duration;d.queue=d.queue&&d.axis.length>1;if(d.queue){e/=2}d.offset=c(d.offset);d.over=c(d.over);return this.scrollable().each(function(){var h=this,s=b(h),r=f,g,n={},m=s.is("html,body");switch(typeof r){case"number":case"string":if(/^([+-]=)?\d+(px)?$/.test(r)){r=c(r);break}r=b(r,this);case"object":if(r.is||r.style){g=(r=b(r)).offset()}}b.each(d.axis.split(""),function(k,x){var u=x=="x"?"Left":"Top",p=u.toLowerCase(),w="scroll"+u,q=h[w],o=x=="x"?"Width":"Height",l=o.toLowerCase();if(g){n[w]=g[p]+(m?0:q-s.offset()[p]);if(d.margin){n[w]-=parseInt(r.css("margin"+u))||0;n[w]-=parseInt(r.css("border"+u+"Width"))||0}n[w]+=d.offset[p]||0;if(d.over[p]){n[w]+=r[l]()*d.over[p]}}else{n[w]=r[p]}if(/^\d+$/.test(n[w])){n[w]=n[w]<=0?0:Math.min(n[w],i(o))}if(!k&&d.queue){if(q!=n[w]){j(d.onAfterFirst)}delete n[w]}});j(d.onAfter);function j(k){s.animate(n,e,d.easing,k&&function(){k.call(this,f,d)})}function i(k){var o="scroll"+k,l=h.ownerDocument;return m?Math.max(l.documentElement[o],l.body[o]):h[o]}}).end()};function c(d){return typeof d=="object"?d:{top:d,left:d}}})(jQuery);
(function(a){jQuery.fn.smoothDivScroll=function(b){var c={scrollingHotSpotLeft:"div.scrollingHotSpotLeft",scrollingHotSpotRight:"div.scrollingHotSpotRight",scrollWrapper:"div.scrollWrapper",scrollableArea:"div.scrollableArea",hiddenOnStart:false,ajaxContentURL:"",countOnlyClass:"",mouseDownSpeedBooster:1,autoScrollOnStart:false,autoScrollSpeed:1,visibleHotSpots:"",hotSpotsVisibleTime:5};b=a.extend(c,b);return this.each(function(){var f=a(this);if(b.ajaxContentURL.length!==0){f.scrollableAreaWidth=0;f.find(b.scrollableArea).load((b.ajaxContentURL),function(){f.find(b.scrollableArea).children((b.countOnlyClass)).each(function(){f.scrollableAreaWidth=f.scrollableAreaWidth+a(this).outerWidth(true)});f.find(b.scrollableArea).css("width",(f.scrollableAreaWidth+"px"));if(b.hiddenOnStart){f.hide()}r();p()})}var m;var l;var u=f.offset().left;var v=0;l=1;a(window).one("load",function(){if(b.ajaxContentURL.length===0){f.scrollableAreaWidth=0;f.find(b.scrollableArea).children((b.countOnlyClass)).each(function(){f.scrollableAreaWidth=f.scrollableAreaWidth+a(this).outerWidth(true)});f.find(b.scrollableArea).css("width",f.scrollableAreaWidth+"px");if(b.hiddenOnStart){f.hide()}}if(b.autoScrollOnStart){autoScrollInterval=setInterval(k,15)}switch(b.visibleHotSpots){case"always":j();break;case"onstart":j();hideHotSpotBackgroundsInterval=setInterval(d,(b.hotSpotsVisibleTime*1000));break;default:break}});f.find(b.scrollingHotSpotRight).one("mouseover",function(){if(b.autoScrollOnStart){clearInterval(autoScrollInterval)}});f.find(b.scrollingHotSpotLeft).one("mouseover",function(){if(b.autoScrollOnStart){clearInterval(autoScrollInterval)}});function j(){f.find(b.scrollingHotSpotLeft).addClass("scrollingHotSpotLeftVisible");f.find(b.scrollingHotSpotRight).addClass("scrollingHotSpotRightVisible")}function d(){clearInterval(hideHotSpotBackgroundsInterval);f.find(b.scrollingHotSpotLeft).fadeTo("slow",0,function(){f.find(b.scrollingHotSpotLeft).removeClass("scrollingHotSpotLeftVisible")});f.find(b.scrollingHotSpotRight).fadeTo("slow",0,function(){f.find(b.scrollingHotSpotRight).removeClass("scrollingHotSpotRightVisible")})}a(window).bind("resize",function(){r()});function r(){if(!(b.hiddenOnStart)){f.scrollableAreaWidth=0;f.find(b.scrollableArea).children((b.countOnlyClass)).each(function(){f.scrollableAreaWidth=f.scrollableAreaWidth+a(this).outerWidth(true)});f.find(b.scrollableArea).css("width",f.scrollableAreaWidth+"px")}f.find(b.scrollWrapper).scrollLeft("0");var w=a("body").innerWidth();if(f.scrollableAreaWidth<w){q();n()}else{o()}}function q(){f.find(b.scrollingHotSpotLeft).hide()}function n(){f.find(b.scrollingHotSpotRight).hide()}function t(){f.find(b.scrollingHotSpotLeft).show();if(v<=0){v=f.find(b.scrollingHotSpotLeft).width()}}function s(){f.find(b.scrollingHotSpotRight).show();if(v<=0){v=f.find(b.scrollingHotSpotRight).width()}}function p(){jQuery.each(jQuery.browser,function(w,x){if(w=="msie"&&jQuery.browser.version.substr(0,1)=="6"){f.find(b.scrollingHotSpotLeft).css("height",(f.find(b.scrollableArea).innerHeight()));f.find(b.scrollingHotSpotRight).css("height",(f.find(b.scrollableArea).innerHeight()))}})}var h;f.find(b.scrollingHotSpotRight).bind("mousemove",function(y){var w=y.pageX-(this.offsetLeft+u);w=Math.round(w/(v/15));m=w});f.find(b.scrollingHotSpotRight).bind("mouseover",function(w){h=setInterval(g,15)});f.find(b.scrollingHotSpotRight).bind("mouseout",function(w){clearInterval(h);m=0});f.find(b.scrollingHotSpotRight).bind("mousedown",function(w){l=b.mouseDownSpeedBooster});a("*").bind("mouseup",function(w){l=1});var g=function(){f.find(b.scrollWrapper).scrollLeft(f.find(b.scrollWrapper).scrollLeft()+(m*l));o()};var k=function(){f.find(b.scrollWrapper).scrollLeft(f.find(b.scrollWrapper).scrollLeft()+b.autoScrollSpeed);o()};var i;f.find(b.scrollingHotSpotLeft).bind("mousemove",function(y){var w=f.find(b.scrollingHotSpotLeft).innerWidth()-(y.pageX-u);w=Math.round(w/(v/15));m=w});f.find(b.scrollingHotSpotLeft).bind("mouseover",function(w){if(b.autoScrollOnStart){clearInterval(autoScrollInterval)}i=setInterval(e,15)});f.find(b.scrollingHotSpotLeft).bind("mouseout",function(w){clearInterval(i);m=0});f.find(b.scrollingHotSpotLeft).bind("mousedown",function(w){l=b.mouseDownSpeedBooster});var e=function(){f.find(b.scrollWrapper).scrollLeft(f.find(b.scrollWrapper).scrollLeft()-(m*l));o()};function o(){if(f.find(b.scrollWrapper).scrollLeft()===0){q();s()}else{if((f.scrollableAreaWidth)<=(f.find(b.scrollWrapper).innerWidth()+f.find(b.scrollWrapper).scrollLeft())){n();t()}else{s();t()}}}})}})(jQuery);
$(function(){$("#scrollable").smoothDivScroll({mouseDownSpeedBooster:2,autoScrollOnStart:true,autoScrollSpeed:1,visibleHotSpots:"always"})});
$(function(){$(".scrollingHotSpotLeft").fadeTo("fast",.7);$(".scrollingHotSpotLeft").hover(function(){$(this).fadeTo("normal",1)},function(){$(this).fadeTo("fast",.7)})});
$(function(){$(".scrollingHotSpotRight").fadeTo("fast",.7);$(".scrollingHotSpotRight").hover(function(){$(this).fadeTo("normal",1)},function(){$(this).fadeTo("fast",.7)})});
