		$(document).ready(function() {

			// Chapter Index

				$('#index_current').mouseenter(function() {
					$('#chapter_index').slideDown('fast')
			  	});

				$('#index_container').mouseleave(function() {
					$('#chapter_index').slideUp('fast')
			  	});

				$('#quicksearchtext').click(function() {

					document.getElementById("quicksearchtext").value = "";

				});

				$('[id^="readmore_"]').click(function () {
					$(this).hide();
					$('#moretext_' + $(this).attr("id").split("_")[1]).slideDown();
				});
				
			// Outgoing link tracker
				function recordOutboundLink(link, category, action, label) {
					_gat._getTrackerByName()._trackEvent(category, action, label);
					//_gaq.push(['_trackEvent', category, action, label]);
					//setTimeout('window.open("' + action + '")', 100);
				}
				
				$("a[rel*='adlink']").click(function(){
					recordOutboundLink($(this), 'Outbound Links', $(this).attr('href'),'AdLink');
					//return false;
				});
				$("a[rel*='list']").click(function(){
					recordOutboundLink($(this), 'Outbound Links', $(this).attr('href'),'Chapter');
					//return false;
				});
				$("a[rel*='profile']").click(function(){
					recordOutboundLink($(this), 'Outbound Links', $(this).attr('href'),'Detail');
					//return false;
				});
				$("a[rel*='content-feed']").click(function(){
					recordOutboundLink($(this), 'Outbound Links', $(this).attr('href'),'Content Feed');
					//return false;
				});			
		});
		
	function jt(cid, t) {$.post("/jumptrack.asp", {cid: cid, t: t});}
