/* Content url javascript file */


function contentUrlHide() {
    $('#content_url, #tweet_box').hide();

    $('#tweet_box button').html('<img src="/site_media/img/ajax-loader.gif" alt="loading..."/>');
    $('#tweet_box h3').html('');
    $('#tweet_box textarea').val('');

    $('#url_display a').text('');
    $('#url_display a').attr('href', '#');
    $('#footer_icons a:first').attr(
        'href', 'http://twitter.com/Twiangulate'
    ).attr('title', 'Follow on Twitter').attr('alt', 'Follow on Twitter');
}


function contentUrlShow() {
    $('#content_url').show();
    //if ($('#displayType').val() != 'map')
    //    $('#tweet_box').show();
    var url = document.location.href;
    tweetBoxLoad(url);
    $('#url_display a').text(url);
    $('#url_display a').attr('href', url);
    $('#footer_icons a:first').attr(
        'href', 'javascript:tweetBoxFocus();'
    ).attr('title', 'Tweet it!').attr('alt', 'Tweet it!');
}


function updateSocialIconLinks() {
    $('#footer_icons a').each(function() {
        if (this.href.indexOf('=') != -1) {
            href = document.location.href;
            this.href = this.href.substring(0, this.href.indexOf('=') + 1) + href;
        }
    });
}
