$(document).ready(function() {

    //Home Page Slider
    $('#home_slide').anythingSlider({ buildStartStop: false, autoPlay: true, buildArrows: true, buildNavigation: false, toggleControls: true, height: '622', width: '468', autoPlayLocked: true} );

    $.ajax({
      url: "/facebook_feed.asp",
      success: function(feedoutput){
        $("#rssFeed").html(feedoutput);
      }
    });

});

Xposition = 0;
MoveRight = 0;
stepNum = 6;
keepscrolling = true;
intTimeout = 1;

function StartScroll(MoveRight) {
    keepscrolling = true;
    setTimeout("SlideHorizontal(" + MoveRight + ");", intTimeout);
}

function SlideHorizontal(MoveRight) {
    if (keepscrolling) {
        LayerPointer = window.document.getElementById("brand_slide_ctrl_content");
        if (!MoveRight && Xposition < -458) {
            keepscrolling = false;
        } else if (MoveRight && Xposition > 0) {
            keepscrolling = false;
        }
        if (keepscrolling) {
            if (MoveRight) {
                Xposition += stepNum;
            } else {
                Xposition -= stepNum;
            }
            status = Xposition;
            LayerPointer.style.marginLeft = Xposition + "px";
            setTimeout("SlideHorizontal(" + MoveRight + ");", intTimeout);
        }
    }
}

function NoSlide() {
    keepscrolling = false;
}
