/* 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;
    });
    
    // Recent Posts Fade
    
    $("#featured_post_slider").innerfade({
		continuous: true,
		auto: true,
		speed: 800,
		timeout: 3000
	});
    
            jQuery('a.wGallery').fancybox({
		'transitionIn'	:	'fade',
		'transitionOut'	:	'fade',
		'speedIn'	:	600, 
		'speedOut'	:	200, 
		'overlayShow'	:	false,
		'titleShow'	:	false
            });
	    // Close down the JSON function call
});
