﻿function EmailToAFriend()
{
    var message = "Hi,\nCheck this out, this page from the new TodayFM website rocks!:\n"+window.location;
    var subject = "Check this page on the TodayFM website";
    
    window.open("mailto:?subject="+escape(subject)+"&body="+escape(message),"_self");
}
function CreateBookmark()
{
    var url = window.location;
    var title = "TodayFM - "+document.title;
        
    if(jQuery.browser.mozilla == true)
    {
        window.sidebar.addPanel(title, url,'');
    }
    else if(jQuery.browser.msie == true)
    {
        window.external.AddFavorite(url, title);
    }
    else if(jQuery.browser.safari == true || jQuery.browser.opera == true)
    {
        alert("Please, press Control + D to bookmark this page");
    }
    else
        alert("Bookmarking support not detected for your browser\nPlease try pressing Control + D or Control + T to bookmark this page");
}
function OpenListenLive(url)
{
    window.open(url,'TodayFMLive','width=728,height=435,location=no,menubar=no,resizable=no,toolbar=no,status=no,scrollbars=no');
}

// Shop in new window
$().ready(function(){
    $('#GnsWrapper li.last a[href$=Shop.aspx]').attr("target","TodayFM-shop");
});
