$(document).ready(function () {
    //Cufon.replace('#banner-text', { textShadow: '#355a6f 0px -2px;' });
    //$('#banner-text').css({ textShadow: '#355a6f 0px -2px' });

    $('#nav').children('li').hover(function () {
        var self = $(this).addClass('hover');
        var menu = self.children('.dropdown-menu');
        var header = $('header');
        var off = header.offset();
        var maxright = off.left + header.outerWidth();
        var left = menu.offset().left;
        var right = left + menu.outerWidth();

        if(right > maxright )
            menu.css({ left: (maxright-right) });

    }, function () {
        $(this).removeClass('hover');
    });


    /*  Hover effect icon image swap  */
    $("#client-login").hover(function () {
        $("#client-login img").attr("src", "images/lock-icon-2.png");
    }, function () {
        $("#client-login img").attr("src", "images/lock-icon.png");
    });
});  

$(':not(a)[href]').live('click', function(){ location = $(this).attr('href'); });
