
    $(document).ready(function(){
        function slidePanel( newPanel, direction ) {
            //$('#test').html(newPanel);
            // define the offset of the slider obj, vis a vis the document
            var offsetLeft = $slider.offset().left;
      
            // offset required to hide the content off to the left / right
            var hideLeft = -1 * ( offsetLeft + $slider.width() );
            var hideRight = $(window).width() - offsetLeft;
    
            // change the current / next positions based on the direction of the animation
            if ( direction == "left" ) {
                currPos = hideLeft;
                nextPos = hideRight;
            }
            else {
                currPos = hideRight;
                nextPos = hideLeft;
            }

            $( $sliderPanels[currPanel]).animate({
                left: hideLeft
            }, 600, "easeOutBounce", function() {
                $(this).css('left',hideRight).hide();
            });
            
            //$('#test').append('<li>LOOP START! slide '+currPanel+' out</li>');
            
            currPanel++;

      // check if the new panel value is too big
            if ( currPanel >= $sliderPanels.length ) currPanel = 0;
          
            $( $sliderPanels[currPanel] ).css('left',hideRight).show().animate({
                left: 0
            }, 600,"easeOutBounce" );
            
         //$('#test').append('<li>slide '+currPanel+' in LOOP END!</li>');
        }
    
        var $slider = $("#full-slider");
        var $sliderPanels = $slider.children(".slide-panel");
    
        var $navWrap = $('<div id="full-slider-nav"></div>').appendTo( $slider );
        var $navLeft = $('<div id="full-slider-nav-left">&laquo;</div>').appendTo( $navWrap );
        var $navRight = $('<div id="full-slider-nav-right">&raquo;</div>').appendTo( $navWrap );
    
        var currPanel = 2;

        $(document).everyTime(5000, "timer", function() {                                      
          
                slidePanel();
        }, 0);
    
        $("#full-slider").hover(function(){
          $(document).stopTime("timer");
          }, function() {
            $(document).everyTime(5000, "timer", function() {
            slidePanel();
          }, 0);
        });    
    
    });

