$(document).ready(function () {
    //if($('.hmLeft .hmc_content').size() == 1) {
    //$('.hmLeft .hmc_content').anythingSlider({
    if ($('.l460_block #promotions .promoSlides').size() == 1) {
        $('.l460_block #promotions .pad10').anythingSlider({
            easing: "easeInOutBack",                // Anything other than "linear" or "swing" requires the easing plugin
            autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not
            startStopped: false,            // If autoPlay is on, this can force it to start stopped
            delay: 15000,                    // How long between slide transitions in AutoPlay mode
            animationTime: 1000,             // How long the slide transition takes
            hashTags: true,                 // Should links change the hashtag in the URL?
            buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
            pauseOnHover: false,             // If true, and autoPlay is enabled, the show will pause on hover
            startText: "Start",             // Start text
            stopText: "Stop",               // Stop text
            navigationFormatter: null       // Details at the top of the file on this use (advanced use)
        });
    }
});
// Need to wait for images to load...
$(window).load(function () {
    makeBottomBlocksEqualHeight($('#planetEditorial .pad10'), $('.homeFeeds .pad10'));
});

function makeBottomBlocksEqualHeight(blockL, blockR) {
    if (blockL.size() > 0 && blockR.size() > 0) {
        var maxHeight = 0,
            elems = $().add(blockL).add(blockR);
        elems.each(function () {
            var h = $(this).height();
            if (h > maxHeight) maxHeight = h;
        });
        if (blockL.height() < maxHeight) {
            var offset = maxHeight - blockL.height();
            blockL.find('.hmc_divid:last').css({ height: offset });
        } else {
            var offset = maxHeight - blockR.height();
            blockR.find('.view > ul').css({ paddingBottom: offset });
        }
    }
}
