/*****************************************************************************
 * jQuery Headline Scroll
 * Version: 2.0 released 2009-02-11
 * Author: Dave Ross <dave@csixty4.com>
 * License: BSD
 * Requires: jQuery 1.2.1 or higher (may work with others, not tested)
 *
 * Copyright (c) 2009, Dave Ross <dave@csixty4.com>
 * All rights reserved.
 ****************************************************************************/
var scrollerIntervalMs=200;function jQueryAutoScroll(){}
jQueryAutoScroll.initScroller=function()
{$('.autoscroll').each(function(){$(this).mouseover(function(){jQueryAutoScroll.doPause(this);});$(this).mouseout(function(){jQueryAutoScroll.doPause(this);});if($(this).attr('scrollerStep')==undefined)
if(undefined===window.scrollerStep)
$(this).attr('scrollerStep',1);else
$(this).attr('scrollerStep',scrollerStep);});setInterval("jQueryAutoScroll.doScroll()",scrollerIntervalMs);}
jQueryAutoScroll.doScroll=function()
{$('.autoscroll').filter(':not(".paused")').each(function(){var scrollerStep=parseInt($(this).attr('scrollerStep'),10);if($(this).hasClass('horizontalscroll'))
{var x=this.scrollLeft;var divWidth=parseInt($(this).css('width'));var contentWidth=this.scrollWidth;x+=scrollerStep;if((x<=0)||(x>=(contentWidth-divWidth)))
{if($(this).hasClass('reversingscroll'))
{scrollerStep*=-1;x=x+scrollerStep;}
else
{x=0;}}
this.scrollLeft=x;}
else
{var x=this.scrollTop;var divHeight=parseInt($(this).css('height'));var contentHeight=this.scrollHeight;x+=scrollerStep;if((x<=0)||(x>=(contentHeight-divHeight)))
{if($(this).hasClass('reversingscroll'))
{scrollerStep*=-1;x=x+scrollerStep;}
else
{x=0;}}
this.scrollTop=x;}
$(this).attr('scrollerStep',scrollerStep);});}
jQueryAutoScroll.doPause=function(el)
{$(el).toggleClass('paused');}
$(document).ready(function(){jQueryAutoScroll.initScroller();});