/*
PEN Javascript File
AUTHOR: Jason Zajac & TJ Nicolaides
VERSION: 1.0
****************************/
//var disqus_container_id = "ctl00_MainTop_GenericControl6_uc20eaff621e65470f8373439a55a78c51_PaginationLinks";
//var disqus_container_id = "disqus_thingie";


function parseUri (str) {
	var	o   = parseUri.options,
		m   = o.parser[o.strictMode ? "strict" : "loose"].exec(str),
		uri = {},
		i   = 14;

	while (i--) uri[o.key[i]] = m[i] || "";

	uri[o.q.name] = {};
	uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
		if ($1) uri[o.q.name][$1] = $2;
	});

	return uri;
};

parseUri.options = {
	strictMode: false,
	key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],
	q:   {
		name:   "queryKey",
		parser: /(?:^|&)([^&=]*)=?([^&]*)/g
	},
	parser: {
		strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
		loose:  /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
	}
};


function returnDocument() {
        var file_name = document.location.href;
        var end = (file_name.indexOf("?") == -1) ? file_name.length : file_name.indexOf("?");
        return file_name.substring(file_name.lastIndexOf("/")+1, end).toLowerCase();
    }
	
function returnPath() {
		var path_name = parseUri(document.location.href).directory;
		path_name = window.location.protocol + window.location.host + path_name;
		return path_name;
}
	
function rescanFB() {
	  FB.XFBML.parse();
}




$(document).ready(function() {	
	
	/* AUDIO PLAYER TOOLTIPS */
$(function () {
  $('div[id*="Audio"]').each(function () {
	$(this).addClass("blog-audio-player");
	$(this).parent('div').addClass("blog-audio-container");
	$(this).after("<div class='blog-audio-tooltip'><p>To listen, <b>click the play button</b> here.</p><p>(<a href='mailto:webmaster@975thefanatic.com?subject=97.5 The Fanatic Web Comment - Difficulty Listening To Podcast Audio'>Having trouble? Click here!</a>)</p></div>");
	
    // options
    var distance = 30;
    var time = 250;
    var hideDelay = 500;

    var hideDelayTimer = null;

    // tracker
    var beingShown = false;
    var shown = false;
    
    var trigger = $(this);
    var popup = $(trigger).siblings('.blog-audio-tooltip').css('opacity', 0);
	var popupWidth = $(trigger).width();
	
	// animate when the page loads
	setTimeout(function() {      
		beingShown = true;
		popup.css({
			  bottom: 10, display: 'block' // brings the popup back in to view
			  })        
			.animate({opacity:1}).animate({left:'-=5px'}).animate({left:'+=5px'}).animate({left:'-=5px'}).animate({left:'+=5px'}).animate({left:'-=5px'}).animate({left:'+=2px'}, function () {
		  // reset the timer if we get fired again - avoids double animations
		  if (hideDelayTimer) clearTimeout(hideDelayTimer);
				  beingShown = false;
				  shown = true;
		  // store the timer so that it can be cleared in the mouseover if required
		  hideDelayTimer = setTimeout(function () {
			hideDelayTimer = null;
			popup.animate({
			  bottom: '-=' + distance + 'px',
			  opacity: 0
			}, time, 'swing', function () {
			  // once the animate is complete, set the tracker variables
			  shown = false;
			  // hide the popup entirely after the effect (opacity alone doesn't do the job)
			  popup.css('display', 'none');
			});
		  }, 4000);
		});
	}, 4000);

    // set the mouseover and mouseout on both element
    $([trigger.get(0), popup.get(0)]).mouseover(function () {
      // stops the hide event if we move from the trigger to the popup element
      if (hideDelayTimer) clearTimeout(hideDelayTimer);

      // don't trigger the animation again if we're being shown, or already visible
      if (beingShown || shown) {
        return;
      } else {
        beingShown = true;
        // reset position of popup box
        popup.css({
          bottom: 40,
          //left: -10,
          display: 'block' // brings the popup back in to view
        })
        // (we're using chaining on the popup) now animate it's opacity and position
        .animate({
          bottom: '-=' + distance + 'px',
          opacity: 1
        }, time, 'swing', function() {
          // once the animation is complete, set the tracker variables
          beingShown = false;
          shown = true;
        });
      }
    }).mouseout(function () {
      // reset the timer if we get fired again - avoids double animations
      if (hideDelayTimer) clearTimeout(hideDelayTimer);
      
      // store the timer so that it can be cleared in the mouseover if required
      hideDelayTimer = setTimeout(function () {
        hideDelayTimer = null;
        popup.animate({
          bottom: '-=' + distance + 'px',
          opacity: 0
        }, time, 'swing', function () {
          // once the animate is complete, set the tracker variables
          shown = false;
          // hide the popup entirely after the effect (opacity alone doesn't do the job)
          popup.css('display', 'none');
        });
      }, hideDelay);
    });
  });
});
   					   
	/*Generate RSS Menu
	****************************/
	$('input[src$=rss.gif], img[src$=rss.gif]').each(function(){
		// Selects RSS Images on Event Calendars					  
		if ($('img[src$=rss.gif]').length > 0) {
				//Grab Input ID
				var cssID = $(this).parents('a:eq(0)').attr("id");
				//Place RSS Image Icon in page
				$(this).parents('div:eq(0)').after("<div class=\"subscribe\"><a href=\"#\" id='" + cssID + "' class='rssIMG' >Subscribe</a></div>");
				}
		// Selects RSS Images everywhere else (Blogs, Channels)
		else {
				//Grab Input ID
				var cssID = $(this).attr("id");
				var rssInputID = "input#" + cssID;
				//Place RSS Image Icon in page
				$(this).parents('table:eq(0)').after("<div class=\"subscribe\"><a href=\"#\" id='" + cssID + "' class='rssIMG' >Subscribe</a></div>");
				}	
		//Remove RSS Input from page
		$(this).remove();
		//Detects What RSS Feed it is
		detectRSS(cssID);
	});
	
	// Binds new link to  drop-down action
	$("a.rssIMG").bind("click", function(){
			var optionDisplay = $("ul.mmr-rss-links").css("display");
				if (optionDisplay == "none") {
					$("ul.mmr-rss-links").slideDown("slow");
				}
				else {
					$("ul.mmr-rss-links").slideUp("slow");
				}		
			return false;
	});				   
						   
						   
						   
	// Enable caching
    $.ajaxSetup({ cache: true });					   

	$("td.commentsPagination").append("<div id='disqus_thread'></div>");
	if($("#disqus_thread").length) {
		var head = document.getElementsByTagName('head')[0];
		$(document.createElement('link'))
		.attr({type: 'text/css', href: 'http://greatermediaphiladelphia.net/wpen/jquery.disqus.css', rel: 'stylesheet', media: 'screen'})
		.appendTo(head);
		$('#disqus_thread').disqus({
          domain: '975thefanatic' // This is your Disqus short domain name.
        });

	}
	$("tr.metaData").find("td.mini:eq(1)").find("a:eq(0)").each(function(){
		var linkVal = $(this).attr("href");
		$(this).attr("href", linkVal + "#disqus_thread");
	});	
	$.disqusLinks('975thefanatic');
	
        /**
         * Process all links to the number of comments.
         */
        //jQuery.disqusLinks('robloach'); // The short domain name.					   
	
	/*Random Masthead Image
	****************************/
	//Get URL
	var currentDirectory_array = window.location.pathname.split( '/' );
	
	//set total number of images
	var imgTotal = 10;
	
	//Generate Random Number
	var randomNumber = Math.round(Math.random()*(imgTotal-1));
    
	//Set up image array
	var image = new Array(imgTotal);
	image[0]="http://origin-www.975thefanatic.com/Pics/Global/Masthead/masthead-red-lidge.jpg";
	image[1]="http://origin-www.975thefanatic.com/Pics/Global/Masthead/masthead-red-ryan-howard.jpg";
	image[2]="http://origin-www.975thefanatic.com/Pics/Global/Masthead/masthead-red-reggie-white.jpg";
	image[3]="http://origin-www.975thefanatic.com/Pics/Global/Masthead/masthead-red-desean-jackson.jpg";
	image[4]="http://origin-www.975thefanatic.com/Pics/Global/Masthead/masthead-red-flyers-1976-stanley-cup.jpg";
	image[5]="http://origin-www.975thefanatic.com/Pics/Global/Masthead/masthead-red-flyers-2009.jpg";
	image[6]="http://origin-www.975thefanatic.com/Pics/Global/Masthead/masthead-red-julius-irving.jpg";
	image[7]="http://origin-www.975thefanatic.com/Pics/Global/Masthead/masthead-red-andre-iguodala.jpg";
	image[8]="http://origin-www.975thefanatic.com/Pics/Global/Masthead/masthead-red-joe-paterno.jpg";
	image[9]="http://origin-www.975thefanatic.com/Pics/Global/Masthead/masthead-red-villanova-1985.jpg";
	
	//Replace Masthead
	switch (currentDirectory_array[2]) {
		case "phillies":
			$('img#top_logo').attr('src', 'http://origin-www.975thefanatic.com/Pics/Global/Masthead/masthead-red-lidge.jpg' );
			//$('body').attr('src', 'http://greatermediaphiladelphia.net/images/bg-red-default.jpg' );
			break;
		case "flyers":
			$('img#top_logo').attr('src', 'http://origin-www.975thefanatic.com/Pics/Global/Masthead/masthead-orange-flyers-1976-stanley-cup.jpg' );
			$('body').css("background-image", "url(http://origin-www.975thefanatic.com/Pics/Global/Backgrounds/bg-orange.jpg)" );
			break;
		case "eagles":
			$('img#top_logo').attr('src', 'http://origin-www.975thefanatic.com/Pics/Global/Masthead/masthead-green-reggie-white.jpg' );
			$('body').css("background-image", "url(http://origin-www.975thefanatic.com/Pics/Global/Backgrounds/bg-green.jpg)" );
			break;
		case "sixers":
			$('img#top_logo').attr('src', 'http://origin-www.975thefanatic.com/Pics/Global/Masthead/masthead-blue-julius-irving.jpg' );
			$('body').css("background-image", "url(http://origin-www.975thefanatic.com/Pics/Global/Backgrounds/bg-blue.jpg)" );
			break;
		case "college":
			$('img#top_logo').attr('src', 'http://origin-www.975thefanatic.com/Pics/Global/Masthead/masthead-midnight-villanova-1985.jpg' );
			$('body').css("background-image", "url(http://origin-www.975thefanatic.com/Pics/Global/Backgrounds/bg-midnight-blue.jpg)" );
			break;
		default:
			$('img#top_logo').attr('src', image[randomNumber] );
			break;
	};
	
	
	// NOW ON AIR Control
	$("div.onairnow").each(function(){
			$(this).hide();
			var url = $(this).find("h2 a").attr("href");
			var className = $(this).find("div:eq(1)").html();
			$("#header").append("<a id='on-air-now' class='"+ className +"' href='"+ url +"'></a>");
	});
	 
	$("ul.sf-menu").superfish({ 
		autoArrows:  false,  
		dropShadows: false, 
		delay: 1000, 
		onBeforeShow:  function() {
			$("ul#twitter_top li").fadeTo(10, 0);
		}, 
		onShow:  function() {
			$("ul#twitter_top li").fadeTo(10, 0);
		}, 
		onHide: function() {
			$("ul#twitter_top li").fadeTo(1, 0).fadeTo(1000, 1);
		} 
	});
	   
   //Listen Live || Pop-up Window
	$(".stream-popup").popup({
		width: 600,
		height: 600,
		titlebar: true,
		status: true,
		resizeable: false,
		toolbar: false,
		scrollbars: false,
		menubar: false
	});
	
	//Listen Live || Pop-up Window
	$(".stream-popup-lc").popup({
		width: 680,
		height: 511,
		titlebar: true,
		status: true,
		resizeable: false,
		toolbar: false,
		scrollbars: false,
		menubar: false
	});
	
	//TEXT CLUB || Pop-up Window
	$(".text-popup").popup({
		width: 750,
		height: 600,
		titlebar: true,
		status: true,
		resizeable: false,
		toolbar: false,
		scrollbars: true,
		menubar: false
	});
	
	//AV PLAYER || Pop-up Window
	$(".av-popup").popup({
		width: 675,
		height: 320,
		titlebar: true,
		status: true,
		resizeable: false,
		toolbar: false,
		scrollbars: false,
		menubar: false
	});

	// ALLOWS YOU TO SELECT ALL EXTERNAL LINKS WITH $('a:external')					
	$.expr[':'].external = function(obj){
    return !obj.href.match(/^mailto\:/) && (obj.hostname != location.hostname) && !obj.href.match(/^javascript\:/);
	};
	
		
	//FORCES ALL EXTERNAL LINKS TO OPEN IN NEW WINDOW
	$('a:external').attr("target","_blank");
	
	/*ShareThis  // AddThis
	****************************/
	/*var addME = '<br /><br /><a class="addthis" title="97.5 The Fanatic - Share or Bookmark This Page"></a>';
	if ($('table.blog_entry').length > 0 ) {
		$('table.blog_entry td.mini').append(addME);
	}
	if ($('a.jumperlink[href*=TellAFriend]').length > 0 ) {
		$('a.jumperlink[href*=TellAFriend]').after(addME);
		$('a.jumperlink[href*=TellAFriend]').remove();
	}
	$.addthis('jzajac');*/
	
		
	/* Facebook "Like" Button // ShareThis  // AddThis 
	****************************/	
	var addME = '<a class="addthis" title="97.5 The Fanatic - Share or Bookmark This Page"></a>';
	var page_name = returnDocument();

	if(page_name == "home.aspx" || page_name == null || page_name =="index.aspx" || page_name == "") {
			var pathName = returnPath();
			
		$('table.blogs_home_link').each(function(){
			var entryLink = $(this).find("a:last").attr("href");
			var fbLike = '<div class="facebook-like"><fb:like href="' + entryLink + '" layout="standard" show-faces="true" width="600" action="like" colorscheme="light"></fb:like></div>';
			$(this).after("<div class='share-widgets'>" + fbLike + "</div>");

		});
		
		$('a.jumperlink').each(function(){
			var entryLink = pathName + $(this).attr("href");
			var fbLike = '<div class="facebook-like"><fb:like href="' + entryLink + '" layout="standard" show-faces="true" width="600" action="like" colorscheme="light"></fb:like></div>';
			$(this).after("<div class='share-widgets'>" + fbLike + "</div>");
			
		});
		
		rescanFB();

	}
	else if (page_name == "blogentry.aspx") {
		var fbLike = '<div class="facebook-like"><fb:like href="' + window.location.href + '" layout="standard" show-faces="true" width="600" action="like" colorscheme="light"></fb:like></div>';

		$('table.blog_entry td.mini').append("<div class='share-widgets'>" + fbLike +  addME + "</div>");
			$.addthis('jzajac');
		rescanFB();
				
	}
	else if (page_name == "story.aspx") {
		var fbLike = '<div class="facebook-like"><fb:like href="' + window.location.href + '" layout="standard" show-faces="true" width="600" action="like" colorscheme="light"></fb:like></div>';	
		$('a.jumperlink[href*=TellAFriend]').after("<div class='share-widgets'>"+ addME + fbLike + "</div>");
				$.addthis('jzajac');
		$('a.jumperlink[href*=TellAFriend]').remove();	
		rescanFB();

	}
	


	//REMOVE "..." from Contest Descriptions
	/*$("span[id*='lblContestDescription']").each(function(){
		//$(this).css("border", "10px solid black");
		console.log($(this).html());
		if ($(this).html() == "-...") 
			$(this).remove();
	});*/
	/*The Fanatic - CURRENT CONTESTS
   ******************************/
	if ( $("div[ class *= 'contestTeaser' ] div[ id *= 'ctl00_MainBotLeft_GenericControl5_uc7f2ab769d8fd450899fdbdaf6113d835_NormalMode' ] ul li p span[ id *= 'rptContestList_ctl01_lblContestDescription' ]").length > 0 ) {

		$("div[ class *= 'contestTeaser' ] div[ id *= 'ctl00_MainBotLeft_GenericControl5_uc7f2ab769d8fd450899fdbdaf6113d835_NormalMode' ] ul li p span[ id *= 'ContestDescription' ]").each(function() {																																																													
																																																							
			$(this).remove();	

		});
	}
	
	if ( $("div[ class *= 'contestTeaser' ] div[ id *= 'ctl00_MainBotLeft_GenericControl6_uc7f2ab769d8fd450899fdbdaf6113d835_NormalMode' ] ul li p span[ id *= 'rptContestList_ctl01_lblContestDescription' ]").length > 0 ) {

		$("div[ class *= 'contestTeaser' ] div[ id *= 'ctl00_MainBotLeft_GenericControl6_uc7f2ab769d8fd450899fdbdaf6113d835_NormalMode' ] ul li p span[ id *= 'ContestDescription' ]").each(function() {																																																													
																																																							
			$(this).remove();	

		});
	}
	
	if ( $("div[ class *= 'contestTeaser' ] div[ id *= 'ctl00_MainBotRight_GenericControl7_uc7f2ab769d8fd450899fdbdaf6113d835_NormalMode' ] ul li p span[ id *= 'ContestDescription' ]").length > 0 ) {

		$("div[ class *= 'contestTeaser' ] div[ id *= 'ctl00_MainBotRight_GenericControl7_uc7f2ab769d8fd450899fdbdaf6113d835_NormalMode' ] ul li p span[ id *= 'ContestDescription' ]").each(function() {																																																													
																																																							
			$(this).remove();	

		});
	}

	//Remove LOGIN/REGISTER form from On-Air Contest posts
	if ( $("span.header span:contains('[ON-AIR]')").length > 0 ) {
		$("span.header span:contains('[ON-AIR]')").each(function() {
		$("div.uloginverify div[ id *= 'ucUnivLoginVerify_pnlLogin' ], div.hdiv11, div[ id *= 'MemberAuthenticated' ]").remove();
		});
	} else if ( $("span.header span:contains('[ONLINE*]')").length > 0 ) {
		$("span.header span:contains('[ONLINE*]')").each(function() {
		$("div.uloginverify div[ id *= 'ucUnivLoginVerify_pnlLogin' ], div.hdiv11, div[ id *= 'MemberAuthenticated' ]").remove();
		});
	}
	
	// GOOGLE ANALYTICS TRACKING FOR PHOTO GALLERIES AND AV PLAYERS
	
	$("div[ id *= 'flash_gallery' ] > *").bind("click", function() {
		trackThis(this);
		});
	
	$("div[ id *= 'AVPlayerFlash' ] > *").bind("click", function() {
		trackThis(this);
		});
	
	$("div[ id *= 'Images_' ] > *").bind("click", function() {
		trackThis(this);
		});
	
	$("div[ id *= 'Audio_' ] > *").one("click", function() {
		trackThis(this);
		});
	
	$("a[href=*='.mp3']").bind("click", function() {
			trackThis(this);									  
		});
	
	$('a:external').click(function(){
 		pageTracker._trackPageview('/outgoing/'+ $(this).attr('href'));
		});
	
	
	// ALERT VIP MEMBERS TO FIND THEIR PASSWORD
	$('.button_memberlogin').after("<div id=\"vip-help\" class=\"button_memberlogin\"><a href=\"#\"><span class=\"question\">Already a member, but no password?</span> Help!</a></div><div class=\"friendly-warning\"><p>We've got your password waiting for you! We'll deliver it to your email inbox right away, in three easy steps:<ol><li>Enter your email address in the field above. In the password field, enter \"Fanatic\", and click \"Login\".</li><li>You'll get an error saying this password is incorrect. Don't worry! Click \"Send Reminder\" and we'll give you the real one.</li><li>Once you've checked your email and you've got your new password, come back here and log in with it.</li></ol></p><p>If you've got any problems, please don't hesitate to drop <a href=\"mailto:webmaster@975thefanatic.com?Subject=Trouble logging in to the new 975thefanatic.com!\">tech support</a> an email.</p></div>");
	
	$('#vip-help').bind("click", function() {
		var warningDisplay = $("div.friendly-warning").css("display");
				if (warningDisplay == "none") {
					$("div.friendly-warning").slideDown("slow");
				}
				else {
					$("div.friendly-warning").slideUp("slow");
				}		
			return false;
		});
	
	/*EMAIL SUBSCRIBE BOX
	****************************************/
	$("div#email-subscribe p#no-java").remove();
	$("div#email-subscribe input#es-input, div#email-subscribe input#subscribe-button").css("display", "inline-block");
	
	$("input#es-input").focus(function(){
		$("input#es-input").val("");
    });
	$("input#es-input").blur(function(){
		emailValue = $("input#es-input").val();
		$("input#es-input").val(emailValue);
    });
	
	$("input#subscribe-button").click(function(){
		formEmail = "http://www.feedburner.com/fb/a/mailverify?uri=WPEN/all&email=" + $("input#es-input").val();
		window.open(formEmail , "", "scrollbars=yes,width=550,height=520");								   
    });
	
	
	
});



function trackThis(object) {
	var embedID = $(object).attr("id");	
	var thisURL = document.location+"";
	var splitURL = thisURL.split("?");
	var noQueryStringURL = splitURL[0]; 
	//console.log(noQueryStringURL + "#" + embedID);
	pageTracker._trackPageview(noQueryStringURL + "#" + embedID);
}

//Detects What RSS Feed it is
function detectRSS(cssID) {
	var fbPage;
	var fbEmail;
	
	switch (cssID) {
		
		// Eagles / NFL Blog
		case 'ctl00_MainTop_GenericControl4_uc34c942a6aea4443e9af1ae34d62cf492_hlinkRSS':
			fbURL = "WPEN/blogs/eagles-nfl";
			fbName = "Eagles News and Interviews";
			break;
		// Phillies / MLB Blog
		case 'ctl00_MainTop_GenericControl4_uc736e9ab9d7434056a9ebd4fb989cb41f_hlinkRSS':
			fbURL = "WPEN/blogs/phillies-mlb";
			fbName = "Phillies News and Interviews";
			break;
		// Flyers / NHL Blog
		case 'ctl00_MainTop_GenericControl4_uceeec9bd4927f402db9b0551eedff5b8a_hlinkRSS':
			fbURL = "WPEN/blogs/flyers-nhl";
			fbName = "Flyers News and Interviews";
			break;
		// 76ers / NBA Blog
		case 'ctl00_MainTop_GenericControl5_uc45fa91d5dbf341f5a53f99e899b1357f_hlinkRSS':
			fbURL = "WPEN/blogs/76ers-nba";
			fbName = "76ers News and Interviews";
			break;		
		// Collegiate / NCAA Blog
		case 'ctl00_MainTop_GenericControl5_ucf6242034c64a4a4eaa98dec367adf5dc_hlinkRSS':
			fbURL = "WPEN/blogs/collegiate-ncaa";
			fbName = "NCAA News and Interviews";
			break;
		// News / All Blog
		case 'ctl00_MainTop_GenericControl5_uc051cae583f0d41a38d8323ad46fa497e_hlinkRSS':
			fbURL = "WPEN/blogs/news-all";
			fbName = "Fanatic News and Interviews";
			break;	
		// Lifestyle / All Blog
		case 'ctl00_MainTop_GenericControl4_uc71ccd0ed5ff045529f15ef31ef4e8fcd_hlinkRSS':
			fbURL = "WPEN/blogs/lifestyle-all";
			fbName = "Lifestyle News and Interviews";
			break;		
			
		//Events Calendar - 975thefanatic.com/events
		case 'ctl00_MainTop_GenericControl5_uc7fdd7193a7784e75b69291f821fdec3b_hlinkRSS':
			fbURL = "WPEN/calendar/events";
			fbName = "the Fanatic Events Calendar";
			break;					
			
		//Community Events Calendar - 975thefanatic.com/events/community
		case 'ctl00_MainTop_GenericControl7_ucc99c442a68ff4cef9aa1e2e251eee063_hlinkRSS':
			fbURL = "WPEN/calendar/community-events";
			fbName = "the Fanatic Community Calendar";
			break;		

		default:
			fbURL = "WPEN/all";
			fbName = "975thefanatic.com"
			break;
	}
	fbPage = "http://feeds.feedburner.com/" + fbURL;
	fbEmail = "http://feedburner.google.com/fb/a/mailverify?uri=" + fbURL

	rssHTML(fbPage, fbEmail, fbName);
}

//Inserts RSS Menu into HTML
function rssHTML(feed_url, email_url, feed_name) {
	$("div.subscribe").after("<ul class='mmr-rss-links rssHide'><li class='info'><h3>Subscribe to " + feed_name + "</h3></li> <li id='rss-option'><h4>Option 1: RSS</h4><p>Take our RSS [ <a href='http://origin-www.975thefanatic.com/about/RSS/' target='_blank'>?</a> ] feed and use it with one of your favorite Feed Reader or News Aggregator software.</p><a href='" + feed_url + "' target='_blank'>Subscribe via RSS</a></li><li id='email-option'><h4>Option 2: Email</h4><p>Not too familiar with any RSS reader or News Aggregators? No problem! We offer updates via email!</p><a href='" + email_url + "' class='rss-email-popup'>Subscribe via Email</a></li><li id='all-feeds-option' class='info'><a href='http://origin-www.975thefanatic.com/about/RSS/#feeds-list'>All 975thefanatic.com feeds</a></li></ul>");
}


