/**
 * @Copyright CSSJockey - Web Design and Development
 * @Website: http://www.cssjockey.com
 * @Terms of Use: http://www.cssjockey.com/terms-of-use
 * If you change the contents below sky will fall on your head!
 */
$(document).ready(function(){
    $("#main-nav li").hover(function(){
        $(this).find(".mega-menu").fadeIn(0);
        $(this).find('a').addClass('main-nav-hover');
    },function(){
        $(this).find(".mega-menu").fadeOut(0);
        $(this).find('a').removeClass('main-nav-hover');
    })

    $('#slideshow').cycle({
        fx:     'fade',
        speed:  'fast',
        timeout: 3000,
        next:   '#next',
        prev:   '#prev'
    });

    $('#testimonials').cycle({
        fx:     'fade',
        speed:  'fast',
        timeout: 3000,
        next:   '#t-next',
        prev:   '#t-prev'
    });


})
DD_roundies.addRule('.round', 5, true);

$(document).ready(function(){
    setTimeout(abc, 6000);
    function abc(){
        $('.errors').fadeOut('slow');
    }
});

$(document).ready(function(){
    $(function() {
        $("#datepicker").datepicker();
    });

    $('.images').after('<ul id="nav">').cycle({
    fx:     'fade',
    speed:  'slow',
    timeout: 3000,
    pager:  '#nav',

    // callback fn that creates a thumbnail to use as pager anchor
    pagerAnchorBuilder: function(idx, slide) {
        return '<li><a href="#"><img src="' + slide.src + '" width="50" height="50" /></a></li>';
    }
});
});
