jQuery().ready(function(){
	
	lastBlock = $("#div1");
    maxWidth = 560;
    minWidth = 40;	

    $(".accordion").click(
      function(){
        $(lastBlock).animate({width: minWidth+"px"}, { queue:false, duration:400 });
		$(this).animate({width: maxWidth+"px"}, { queue:false, duration:400});
		lastBlock = this;
      }
    );

	
	
	
	$(function() {
        $('#gallery a').lightBox();
    });
	
	
});

function slideBanner() {

		var $active = $('#banner img.active');
		
		if ( $active.length == 0 ) $active = $('#banner img:last');
		
		if ($active.next().length)
		{
			$next = $active.next();
		}
		else
		{
			$next = $('#banner img:first')
		}
		
		$active.fadeOut(2000, function(){
			$active.removeClass('active');
		});
		
		$next.fadeIn(2000, function(){
			$next.addClass('active');
		});
	
}

$(function() {
    setInterval( "slideBanner()", 5000 );
});
