	jQuery(document).ready( function() {
	
///////////////////////////////////////
	
	 $("#lastfmrecords").prepend("<h3>What I'm listening to</h3> ");
	

	  var _config = {username: 'pegasusblur',        // last.fm username
					 placeholder: 'lastfmrecords',       // id of the div in HTML to use for cd covers
					 defaultthumb: 'http://d2j5g0i259spfm.cloudfront.net/gfx/lastfm-noimg.png',  // image to show when no cd cover or artist image was found
					 period: '7day',              // which period/type of data do you want to show? you can choose from
														 // recenttracks, 7day, 3month, 6month, 12month, overall, topalbums and lovedtracks
					 count: 8,                          // number of images to show
					 refresh: 5,                         // when to get new data from last.fm (in minutes)
					 offset: 4                           // difference between your timezone and GMT.
					};
	
	  lastFmRecords.debug();                             // log to console
	  lastFmRecords.init(_config);
	  
	  
/*
	  $("#lastfmrecords ol li a").append("<em></em>");
	$("#lastfmrecords ol li a").hover(function() {
		$(this).find("em").animate({opacity: "show"}, "fast");
		var hoverText = $(this).attr("title");
	    $(this).find("em").text(hoverText);
	}, function() {
		$(this).find("em").animate({opacity: "hide"}, "fast");
	});


	  $("#images ul li a").append("<em></em>");
	$("#images ul li a").hover(function() {
		$(this).find("em").animate({opacity: "show"}, "fast");
		var hoverText = $(this).attr("title");
	    $(this).find("em").text(hoverText);
	}, function() {
		$(this).find("em").animate({opacity: "hide"}, "fast");
	});
*/

 $("#lastfmrecords ol").after("<p class=\"note\">via <a href=\"http://www.last.fm/user/pegasusblur\">Last FM</a></p> ");

	$("#lastfmrecords ol li:last").each(function(){
      $(this).addClass("last");
});

	$("#images ul li:last").each(function(){
      $(this).addClass("last");
});

//lightbox
$("#images li a").fancybox({
	'overlayShow': true,
	'titleShow': false
	});


$("#chat a").fancybox({
	'type': 'iframe',
	'overlayShow': true,
	'titleShow': false
	});


// new windows
$('a[rel="external"]').click( function() {
window.open( $(this).attr('href') );
return false;
});


	$("#portfolio").click(function(){
	  window.location=$(this).find("a").attr("href"); return false;
	});


$('#images ul li a, #lastfmrecords ol li a').tinyTips('light', 'title');


	  
	});
