(function($){
    var absUrl = /^(\w+:)?\/\/([^\/?#]+)(.*)/;

    $("a[href]").live("click", function(e){
        var href = $(this).attr("href");
        var parts = absUrl.exec(href);
        if (parts) {
            var loc = absUrl.exec(document.location.href);
            if (!loc || !(parts[1] && loc[1] == parts[1]) || loc[2] != parts[2]) {
                var wnd = window.open(href, "extern");
                e.preventDefault();
                wnd.focus();
            }
        }
    });
})(jQuery);

jQuery(function($){
    $("div.effect > img").wrap('<span class="browser"><a href="#"/><span/></span>');
    $("div.effect").each(function(){$("> span.browser", this).wrapAll("<span/>")});
});


