// jQuery
 $(document).ready(function(){

	jQuery.fn.sort = function() {
	   return this.pushStack( [].sort.apply( this, arguments ), []);
	 };
	
	function sortAlpha(a,b){
	    return a.innerHTML > b.innerHTML ? 1 : -1;
	};
	
	$('ol.slope li').sort(sortAlpha).appendTo('ol.slope');
	$('ol.4_remixes_from_slope li').sort(sortAlpha).appendTo('ol.4_remixes_from_slope');
	$('ol.the_opiates li').sort(sortAlpha).appendTo('ol.the_opiates');
	$('ol.misc_live_songs li').sort(sortAlpha).appendTo('ol.misc_live_songs');
	$('ol.commissions_and_collaborations li').sort(sortAlpha).appendTo('ol.commissions_and_collaborations');
	$('ol.we_just_did_what_happened_and_no_one_came li').sort(sortAlpha).appendTo('ol.we_just_did_what_happened_and_no_one_came');
	$('ol.twice_born_men li').sort(sortAlpha).appendTo('ol.twice_born_men');
	$('ol.manafon li').sort(sortAlpha).appendTo('ol.manafon');
	
	
	$(".tools").css({});
	
	$(".tools").hover(function() {
   	$(this).animate({
    		color: "#fff"
    	}, 1000 );
   })
	
});

$(document).ready(function() {
  $("a.quickLyric").click(function(){
    // capture the url to load from the id
    var urlLoad = $(this).attr("id");
      // load the second template with AJAX
      $("div[class="+urlLoad+"]").load('/songs/inc/'+urlLoad+'/');
     	$("div[class="+urlLoad+"]").toggle("normal");
    // make sure the page doesn’t reload
    return false;
  });
}); 