	$(function(){
		$('#about h3, #aboutpadding').click(function(){
			$('#aboutexp').slideToggle("slow");
			});
		$('#release h2, #release h3').click(function(){
			$('#releaseexp').slideToggle("slow");
			});
		$('#concerts h2, #concerts h3').click(function(){
			$('#concertsexp').slideToggle("slow");
			});
		$('#releases h2, #releases h3').click(function(){
			$('#releasesexp').slideToggle("slow");
			});
		$('#projects h2, #projects h3').click(function(){
			$('#projectsexp').slideToggle("slow");
			});
		$('#news h2, #news h3').click(function(){
			$('#newsexp').slideToggle("slow");
			});
		$('#photos h2, #photos h3').click(function(){
			$('#photosexp').slideToggle("slow");
			});
		$('#press h2, #press h3').click(function(){
			$('#pressexp').slideToggle("slow");
			});
		$('#band h2, #band h3').click(function(){
			$('#bandexp').slideToggle("slow");
			});
		$('#videos h2, #videos h3').click(function(){
			$('#videosexp').slideToggle("slow");
			});
	});
	
	$(function(){
		$('#releasesexp li').click(function(){
			$('#releasesexp li.active').removeClass('active');
			$(this).addClass('active');
			});
		$('#projectsexp li').click(function(){
			$('#projectsexp li.active').removeClass('active');
			$(this).addClass('active');
			});
		$('#bandexp li').click(function(){
			$('#bandexp li.active').removeClass('active');
			$(this).addClass('active');
			});
		$('#concerts h3 span.upcoming').click(function(){
			$('#concerts h3 span.active, #concertsexp ul.active').removeClass('active');
			$(this).addClass('active');
			$('#concertsexp ul.upcoming_concerts' ).addClass('active');
			});
		$('#concerts h3 span.previous').click(function(){
			$('#concerts h3 span.active, #concertsexp ul.active').removeClass('active');
			$(this).addClass('active');
			$('#concertsexp ul.previous_concerts' ).addClass('active');
			});
	});
	
	$(function(){
		$('#projectsexp li:nth-child(1)').click(function(){
			$('ul.projectinfo li.active').removeClass('active');
			$('ul.projectinfo li:nth-child(1)').addClass('active');
			});
		$('#projectsexp li:nth-child(2)').click(function(){
			$('ul.projectinfo li.active').removeClass('active');
			$('ul.projectinfo li:nth-child(2)').addClass('active');
			});
		$('#projectsexp li:nth-child(3)').click(function(){
			$('ul.projectinfo li.active').removeClass('active');
			$('ul.projectinfo li:nth-child(3)').addClass('active');
			});
		$('#projectsexp li:nth-child(4)').click(function(){
			$('ul.projectinfo li.active').removeClass('active');
			$('ul.projectinfo li:nth-child(4)').addClass('active');
			});
		$('#projectsexp li:nth-child(5)').click(function(){
			$('ul.projectinfo li.active').removeClass('active');
			$('ul.projectinfo li:nth-child(5)').addClass('active');
			});
		$('#projectsexp li:nth-child(6)').click(function(){
			$('ul.projectinfo li.active').removeClass('active');
			$('ul.projectinfo li:nth-child(6)').addClass('active');
			});
		$('#projectsexp li:nth-child(7)').click(function(){
			$('ul.projectinfo li.active').removeClass('active');
			$('ul.projectinfo li:nth-child(8)').addClass('active');
			});
		$('#projectsexp li:nth-child(8)').click(function(){
			$('ul.projectinfo li.active').removeClass('active');
			$('ul.projectinfo li:nth-child(8)').addClass('active');
			});
		$('#bandexp li:nth-child(1)').click(function(){
			$('ul.bandinfo li.active').removeClass('active');
			$('ul.bandinfo li:nth-child(1)').addClass('active');
			});
		$('#bandexp li:nth-child(2)').click(function(){
			$('ul.bandinfo li.active').removeClass('active');
			$('ul.bandinfo li:nth-child(2)').addClass('active');
			});
		$('#bandexp li:nth-child(3)').click(function(){
			$('ul.bandinfo li.active').removeClass('active');
			$('ul.bandinfo li:nth-child(3)').addClass('active');
			});
		$('#bandexp li:nth-child(4)').click(function(){
			$('ul.bandinfo li.active').removeClass('active');
			$('ul.bandinfo li:nth-child(4)').addClass('active');
			});
		$('#bandexp li:nth-child(5)').click(function(){
			$('ul.bandinfo li.active').removeClass('active');
			$('ul.bandinfo li:nth-child(5)').addClass('active');
			});
		$('#bandexp li:nth-child(6)').click(function(){
			$('ul.bandinfo li.active').removeClass('active');
			$('ul.bandinfo li:nth-child(6)').addClass('active');
			});
		$('#bandexp li:nth-child(7)').click(function(){
			$('ul.bandinfo li.active').removeClass('active');
			$('ul.bandinfo li:nth-child(7)').addClass('active');
			});
		$('#bandexp li:nth-child(8)').click(function(){
			$('ul.bandinfo li.active').removeClass('active');
			$('ul.bandinfo li:nth-child(8)').addClass('active');
			});
	});
	
	/* 
	 * Flickr integration with Flickrninja
	 */
	$(function(){

		//Variables to dictate Flickr API usage. 
		var flickr_api_key = 'ae5ba6ac9c7cee55c9e1c7dbf49cf960';	/* Put your Flickr API key here */
		var flickr_user_key = '67525110@N02'; /* Put your Flickr user key here */
		var num_of_images = 11;
		var image_tag = 'lemurfm'; /* Use this tag to select the image you want to display */
		
		if ($('.js_flickr_pix').length > 0)
		{
			var fn = ninja.flickr_ninja.init(flickr_api_key, flickr_user_key, num_of_images);

			fn.setCallback(function(obj) { 
				var i;
				$('.js_flickr_pix').empty();
				for(i = 0; i < obj.pix.length; i++)
				{
					$('.js_flickr_pix').append(
						$('<li rel="shadowbox[Flickr]"></li>').addClass('js_flickr_pic').append(
							$('<a></a>').attr({'href': obj.pix[i].photoUrl.d, 'id': obj.pix[i].id}).append(
								$('<img width="68" height="68" alt="lemur_photo"></img>').attr({'src': obj.pix[i].photoUrl.s})
							)
						)
					);
				}

				Shadowbox.setup($('.js_flickr_pix a'), { 
					overlayColor: '#333333',
					gallery: 'flickr',
					onFinish: function(gallery) {
						fn.getPhotoInfo(gallery.link.id, function(data) {
							$('#sb-counter').append($('<span></span').html(' &raquo; ' + data.photo.owner.username).css('display' , 'inline').hide());
							$('#sb-counter > span').fadeIn()
						});
					}
				});
			});

			fn.getByText(image_tag);
		}
	}); // End of flickr integration
	
this.randomquote = function(){
	var length = $("#quote li").length;
	var ran = Math.floor(Math.random()*length) + 1;
	$("#quote li:nth-child(" + ran + ")").show();
};

$(document).ready(function(){	
	randomquote();
});

