$(document).ready(function() {
    $( ".datepicker" ).datepicker({ autoSize: true, dateFormat: 'yy-mm-dd' });
});

/*shows the loading div every time we have an Ajax call*/
$("#loading").show();

$(document).ready(function() {
    // Check for hash value in URL
    var hash = window.location.hash.substr(1);
    var href = $('#nav li a').each(function(){
        var href = $(this).attr('href');
        if(hash==href.substr(0,href.length)){
            var toLoad = hash+' #content';
            if (hash != '/')
                $('#content').removeClass('home');
            $('#nav li a').each(function(){ $(this).parent().removeClass('active'); });
            $(this).parent().addClass('active');
            $('#content').load(toLoad);
        }
    });

                        $('#logobarcontainer').css('left','0');
                        $("#loading").fadeOut(500);
        $('#bodydiv').fadeIn(800, function() {
                                        $('#logobarcontainer').animate({left:'0px'}, 0, 'easeOutBounce');
                                });


    if ($('#project-list').length > 0)
    {
        $(function() {
            $('#project-list').vTicker({
               speed: 2000,
               pause: 5000,
               showItems: 5,
               animation: 'fade',
               mousePause: true,
               height: 400,
               direction: 'up'
            });
        });
    }

    $(".nav li").hover(function ()
            {
                $(this).siblings().stop().animate({opacity: 0.33}, "normal");
            },
            function ()
            {
                $(".nav li").stop().animate({opacity: 1.0}, "normal");
            }
        );

});



