$(document).ready(function(){

	//$("#accordion").accordion({header:"p", collapsible: true});
	$('#left').jScrollPane({scrollbarWidth:7, animateTo:true, animateInterval:50, animateStep:5, width:440, height:1000, showArrows:1});
	
	page = 0;
	offset = -440;
	
	$(".slide-next").click(function()
	{
		if(page < $("#slide-content > div").size() - 1)
		{
			page++;
			position = offset*page;
			
			$("#slide-content").animate({
				left: position
			}, 700 );
			//alert('next');
		}
	});
	
	$(".slide-previous").click(function()
	{
		if(page > 0)
		{
			page--;
			position = offset*page;
			
			$("#slide-content").animate({
				left: position
			}, 700 );
			//alert('previous');
		}
	});
	
	$(".accordion-header", this).toggle(
		function()
		{
			$(this).css({"color":"#ff0000", "background-image":"url(graphics/arrow_down.png)"});
		},
		function()
		{
			$(this).css({"color":"#939598", "background-image":"url(graphics/arrow_right.png)"});
		}
	);
	
	$(".accordion-header", this).click(
	function()
	{
		$(this).next().slideToggle('slow', function() {
			$('#left').jScrollPane({scrollbarWidth:7, animateTo:true, animateInterval:50, animateStep:5, width:440, height:1000, showArrows:1});
		});
	});
});