﻿function LoadHomePageItems() 
{
    LoadImagePromo();
    LoadNewsTicker();
}

$(function() {
    $('#s1').before('<div id="nav">').cycle({
        fx: 'fade',
        speed: '300',
        timeout: 5000,
        pager: '#nav',
        pagerAnchorBuilder: function(idx, slide) {
            return '<a href="#"><div id="navItem">' + (parseInt(idx) + parseInt(1)) + '</div></a>';
        }
    });
});

function LoadImagePromo()
{
    /* An initial static item is loaded first while the others are hidden otherwise when the page 
       loads you can see the full list of news items.*/
    //$('#initialImagePromo').hide();
    //$('#imagePromo').show(); // Can't use this otherwise it sets all the promo images to display.
    document.getElementById('imagePromo').style.display = 'block';
}

function LoadNewsTicker() {
    /* News items are hidden initially otherwise when the page loads you can see 
       the full list of news items.*/
    $('#news').show();
    $("#news").newsticker();
}
