




/******************************************************************

project "pages"

******************************************************************/
var total_pages  = 1;
var current_page = 1;

function showDescription(num)
{
	$j('#current_page').html($j('#project_page_'+num).html());

	sIFR.replace(galaxie, {
		selector: "h1",
		css: {		
			'.sIFR-root': {'color': '#1e1918', 'letter-spacing': '-2'}
		}
	})
		
	// update nav links	
	$j('.project_nav a').each(function(index) {
		$j(this).removeClass("current");
	});
	$j('#project_nav_'+num).addClass("current");

	current_page = num;
		
	// check arrow states
	if (current_page == total_pages) {
		$j('#next_arrow').attr('src', '/images/arrow_forward_off.gif');		
	}
	else {
		$j('#next_arrow').attr('src', '/images/arrow_forward_on.gif');				
	}

	if (current_page == 1) {
		$j('#previous_arrow').attr('src', '/images/arrow_back_off.gif');						
	}
	else {
		$j('#previous_arrow').attr('src', '/images/arrow_back_on.gif');								
	}
	
	// reset screenshot links
	initScreenshotLinks();
}

function showNextPage()
{
	if (current_page+1 <= total_pages) {
		showDescription(current_page+1);
	}	
}

function showPreviousPage()
{
	if (current_page-1 > 0) {
		showDescription(current_page-1);		
	}	
}

function initScreenshotLinks()
{
	$j('a.screenshots').click(function() {
		scroll(0,0);
		showDescription(2);
		return false;		
	});
}
