/* Accordion functionality tutorial (code has been edited):
		http://designreviver.com/tutorials/jquery-examples-horizontal-accordion/
*/

$(document).ready(function() {
	
	// Vertical Accordion Effects
	
	lastBlock = $("#current");
    maxHeight = 458;
    minHeight = 50;
    
    $("#announcement li:last").css({
    	"border-bottom" : "0px"
    });

    $("#announcement li .order").click(function() {
        $(lastBlock).animate({
        	height: minHeight+"px"
        }, { queue:false, duration:403 }).attr("id", "");
        
	$(this).parent().animate({
		height: maxHeight+"px"
	}, { queue:false, duration:398}).attr("id", "current");
		
	lastBlock = $(this).parent();
		
	return false;
    });
    
    // Discography Effects
    
    $(".album_summary").children("img").hover(function() {
    	$(this).css({
    		"cursor" : "pointer"
    	});
    }, function() {
    	$(this).css({
    		"cursor" : "auto"
    	});
    });
    
    $(".album_summary").click(function() {
    	$("#first_album_summary").children().not("img").hide();
    	
    	$("#first_album_summary").animate({
        	width: "117px"
        }, { duration:500 }).attr("id", "");
        
	$(this).animate({
		width: "300px"
	}, { duration:398}).attr("id", "first_album_summary");
    	
    	$(this).children().not("img").fadeIn("fast");
    });
});