$(window).load(function(){
    var $homeBannerCycle = new HomeBannerCycle();
    $homeBannerCycle.Cycle();
    
    var $rates = new Rates(40);
    $rates.Init();
});
$(document).ready(function(){
    var $testimonial = new Testimonial();
    $testimonial.Ticker();
});
function HomeBannerCycle(){
    var $self = this;
    this.Cycle = function(){
        $('#hcarousel-list li.hcarousel-item').click(function(){
            document.location.href = $(this).find(".hcarousel-link").attr('href');
        }).css('cursor', 'pointer');
        $('#hcarousel-list')
            .before('<div id="hcarousel-list-nav" class="hcarousel-list-nav">')
            .cycle({
                fx:'fade',
                speed:500,
                timeout:10000,
                pause:1,
                pager:'#hcarousel-list-nav'
        });
    };
};

//Testimonial ticker on the home page
function Testimonial(){
    var $self = this;
    
    this.Ticker = function(){
        $('#htestimonial').innerfade({animationtype:'fade', speed: 750, timeout: 4000, type:'random', containerheight: '1em' }); 
    };
};

