$().ready(function(){
    // display: inline-block would eliminate all of it, but it doesn't work for <ul>s in IE <= 7
    $('#nav ul').each(function(){
        var w = 0;
        $(this).children('li').each(function(){ w += ($(this).width() + 24) });
        $(this).css({width: w});
    });
    
    $('#shipping-info').click(function(){
        var d = new Ctrl_Dialog_Ajax({
            width: 800,
            height: 600,
            resizable: false
        }, this.href + '?format=html').open();

        d.elem.css({height: 'auto', overflow: 'auto'});       
 
        return false;
    });
    
    $('div.share').hover(
        function(){ 
            $(this).parent().css({'z-index': 2222}).end().children('.share-inside').show();
        }, 
        function(){ 
            $(this).parent().css({'z-index': 1}).end().children('.share-inside').hide();
        }
    );
    
});

