// initial homepage setup scrips

//stepcarousel.setup({
//    galleryid: 'mygallery', //id of carousel DIV
//    beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
//    panelclass: 'panel', //class of panel DIVs each holding content
//    autostep: { enable: true, moveby: 1, pause: 3000 },
//    panelbehavior: { speed: 500, wraparound: true, wrapbehavior: 'pushpull', persist: true },
//    defaultbuttons: { enable: false, moveby: 1, leftnav: ['images/homepage/carousel/button-left.gif', -40, 0], rightnav: ['images/homepage/carousel/button-right.gif', 5, 0] },
//    statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
//    contenttype: ['inline'] //content setting ['inline'] or ['ajax', 'path_to_external_file']
//})

jQuery(document).ready(function() {
    jQuery('#hpcarousel').jcarousel({
        auto: 0,
        scroll: 1,
        wrap: 'circular',
        initCallback: mycarousel_initCallback,
        // This tells jCarousel NOT to autobuild prev/next buttons
        buttonNextHTML: null,
        buttonPrevHTML: null,
        animation: "slow"
    });
});
 

$(function() {

    $('.features .item').mouseover(function() {
        var myid = $(this).attr('id');
        myid = myid.replace("div_feature_", "");
        FadeOut('div_feature_off_' + myid, 10); FadeOut('div_summary_' + myid, 0);
    });
    $('.features .item').mouseout(function() {
        var myid = $(this).attr('id');
        myid = myid.replace("div_feature_", "");
        FadeIn('div_feature_off_' + myid, 0); FadeIn('div_summary_' + myid, 0);
    });

});

$(function() {
$('#bannerslideshow').cycle({
        fx:     'fade',
        speed:  'slow',
        timeout: 6000,
        pager: '.bannernavigation',
		slideExpr: '.bgimage'
    });
});

function mycarousel_initCallback(carousel) {

    jQuery('#mycarousel-next').bind('click', function() {
        carousel.next();
        return false;
    });

    jQuery('#mycarousel-prev').bind('click', function() {
        carousel.prev();
        return false;
    });
};
