var $timerID = -1;

$(document).ready(function () {
    positionFooter();

    $(window)
        .scroll(positionFooter)
        .resize(positionFooter);

    $(".contentRotator").cycle({
        fx: 'fade', //effect to apply to rotation
        speed: 1000, // speed of the transition (any valid fx speed value) 
        timeout: 6000 // milliseconds between slide transitions (0 to disable auto advance) 
    });
});

function positionFooter() {
    if ($(".ui-content-wrap").height() + $(".ui-footer-wrap").height() < $(window).height()) {
        $(".ui-footer-wrap").css({ position: "absolute", top: ($(window).scrollTop() + $(window).height() - $(".ui-footer-wrap").height()) + "px" })
    }
    else {
        $(".ui-footer-wrap").css({ position: "static" });
    }
}
