/* Top Nav */

$(document).ready(function () {
 
    $('#topNav li').append('<div class="hover"></div>');
 
    $('#topNav li').hover(
        function() {
            $(this).children('div').stop(true, true).fadeIn('1000');   
        },
     
        function() {
            $(this).children('div').stop(true, true).fadeOut('1000');  
    	}).click (function () {
        	$(this).addClass('active'); 
    });

 });


 $(document).ready(function () {
     $(".videos").jCarouselLite({
         btnNext: ".nextButton",
         btnPrev: ".prevButton"
     });
 }); 


/* Fading Links */

jQuery.fn.dwFadingLinks = function (settings) {
    settings = jQuery.extend({
        color: '#fff',
        duration: 500
    }, settings);
    return this.each(function () {
        var original = $(this).css('color');
        $(this).mouseover(function () { $(this).animate({ color: settings.color }, settings.duration); });
        $(this).mouseout(function () { $(this).animate({ color: original }, settings.duration); });
    });
};

$(document).ready(function () {
    $('.fade').dwFadingLinks({
        color: '#ccc',
        duration: 350
    });
});

$(document).ready(function () {
    $('#footer .navhead').dwFadingLinks({
        color: '#bebebe',
        duration: 350
    });
});


/* Homepage Video - Fancybox */

/*$(document).ready(function () {

    $("#homepage-video").fancybox({
        'width': '50%',
        'height': '50%',
        'autoScale': false,
        'transitionIn': 'none',
        'transitionOut': 'none',
        'type': 'iframe'
    });

});*/

