$(document).ready(function(){
	//document loaded
	$(window).bind("load",function(){
		//crossfade images
		$('#images').crossFade({duration:500,timeout:3500,element:'img'});						   
	});
	
	//a href click
	$('a').click(function(){
		thisLink=$(this).attr('href');
		thisRel=$(this).attr('rel');
		if(thisLink!="" && thisLink!=" " && thisLink!="#")
		{
			if(thisRel=="nw"){window.open(thisLink);}
			else{window.location=thisLink;}
		}
		return false;
	});
	
	//navigation
	if(pgindx!=undefined){
		$('#fnav li a').eq(pgindx).css({color: "#35498c"});
	}
});



