// JavaScript Document

$(function() {
		   
	 
	 
$('#banner').serialScroll({
        items:'.banner_item', // Selector to the items ( relative to the matched elements, '#sections' in this case )
        axis:'y',// The default is 'y' scroll on both ways
      
        duration:1200,// Length of the animation (if you scroll 2 axes and use queue, then each axis take half this time)
        force:true, // Force a scroll to the element specified by 'start' (some browsers don't reset on refreshes)
        interval:6000, // It's the number of milliseconds to automatically go to the next
        onBefore:function( e, elem, $pane, $items, pos ){
            $('.banner_nav').removeClass('banner_active');
            var current=pos+1;
           $('#banner_nav_'+current).addClass('banner_active');
            //$items.addClass('banner_active');
            e.preventDefault();
            if( this.blur )
                this.blur();
        },
        onAfter:function( elem ){
        //'this' is the element being scrolled ($pane) not jqueryfied
        }
    });

});

