function SlidePanel(Speed, SlidePanel, VerticalAlign, State) {

    if (Speed) {
        var SlidePanelSpeed = parseInt(Speed * 1000);
    }
    else {}

    if (VerticalAlign == "top") {
        var SlidePanelNumber = parseInt(SlidePanel);
        var SlidePanelObject = $(".slide-panel" + SlidePanelNumber).css({ "bottom": "240px", "display": "block" });
        //SlidePanelObject.append("<div class='slide-panel" + SlidePanelNumber + "-footer'></div>");
    }
    else if (VerticalAlign == "bottom") {
        var SlidePanelNumber = parseInt(SlidePanel);
        var SlidePanelObject = $(".slide-panel" + SlidePanelNumber).css({ "bottom": "0px", "display": "block" });
    }

    if (State == "open") {
        var SlidePanel = parseInt(SlidePanel);
        $(".content" + SlidePanel).css({ "display": "block", "height": "160px" });
    }
    else if (State == "close") {
        var SlidePanel = parseInt(SlidePanel);
        $(".content" + SlidePanel).css({ "display": "none", "height": "1px" });
    }

    $(".slide-panel1" || "slide-panel1-footer").mouseenter(function() {
        if (parseInt($(".content1").css("height")) == 1) {

            $(".content1").stop().animate({
                height: "160px"
            }, SlidePanelSpeed);
        }
    }).mouseleave(function() {
        $(".content1").stop().animate({
            height: "1px"
        }, SlidePanelSpeed);
    });

    $(".slide-panel2" || "slide-panel2-footer").mouseenter(function() {
        if (parseInt($(".content2").css("height")) == 1) {
            $(".content2").stop().animate({
                height: "160px"
            }, SlidePanelSpeed);
        }
    }).mouseleave(function() {
        $(".content2").stop().animate({
            height: "1px"
        }, SlidePanelSpeed);
    });

    $(".slide-panel3" || "slide-panel3-footer").mouseenter(function() {
        if (parseInt($(".content3").css("height")) == 1 & State != "disabled") {
            /*$(".content3").stop().animate({
                height: "160px"
            }, SlidePanelSpeed);*/
        }
    }).mouseleave(function() {
        /*$(".content3").stop().animate({
            height: "1px"
        }, SlidePanelSpeed);*/
    });

    $(".slide-panel4" || "slide-panel4-footer").mouseenter(function() {
        if (parseInt($(".content4").css("height")) == 1) {
            $(".content4").stop().animate({
                height: "160px"
            }, SlidePanelSpeed);
        }
    }).mouseleave(function() {
        $(".content4").stop().animate({
            height: "1px"
        }, SlidePanelSpeed);
    });
}
