
$(document).ready(function()
{
    // adjust styling for macosx-based browsers
    if ($.browser.safari) {
        $('head').append('<link type="text/css" rel="stylesheet" media="all" href="css/safari.css" />');
    }
    else if (navigator.appVersion.indexOf('Mac') != -1) {
        $('head').append('<link type="text/css" rel="stylesheet" media="all" href="css/mac.css" />');
    }

    // image rollovers
    $("a.rover").hover(function() {
        $(this).children('img').attr('src', function() {
            return this.src.replace('.png', '_ovr.png');
        });
    }, function() {
        $(this).children('img').attr('src', function() {
            return this.src.replace('_ovr', '');
        });
    });

    // form button rollovers
    $("input[type=image]").hover(function() {
        $(this).attr('src', function() {
            return this.src.replace('.png', '_ovr.png');
        });
    }, function() {
        $(this).attr('src', function() {
            return this.src.replace('_ovr', '');
        });
    });

    // auto-select
    $(".share-video textarea").click(function() {
        $(this).select();
    });

    // load staf popup
    if (typeof jQuery.fn.colorbox == 'function') {
        $("#share-links .share-email a").colorbox({width:"630px", height:"655px", iframe:true});
    }

});

