
//For performance testing
var dood = 0;
var d = new Date();
var scrollvar=0;

//Cufon
			Cufon.replace('h1'); // Works without a selector engine
			Cufon.replace('#sub1'); // Requires a selector engine for IE 6-7, see above
			Cufon.replace('.blurb');
			Cufon.replace('.copyright');
			Cufon.replace('.content-pages ul li a', { hover:true });
			Cufon.replace('.block-title span');


//LocalScroll
jQuery(function( $ ){
	/**
	 * Most jQuery.localScroll's settings, actually belong to jQuery.ScrollTo, check it's demo for an example of each option.
	 * @see http://flesler.demos.com/jquery/scrollTo/
	 * You can use EVERY single setting of jQuery.ScrollTo, in the settings hash you send to jQuery.LocalScroll.
	 */
	
	// The default axis is 'y', but in this demo, I want to scroll both
	// You can modify any default like this
	$.localScroll.defaults.axis = 'xy';
	
	// Scroll initially if there's a hash (#something) in the url 
	$.localScroll.hash({
		queue:true,
		duration:1500
	});
	
	/**
	 * NOTE: I use $.localScroll instead of $('#navigation').localScroll() so I
	 * also affect the >> and << links. I want every link in the page to scroll.
	 */
	$.localScroll({
		  axis:'xy',
		queue:false, //for axis, one axis at a time if true.
		duration:5200,
		hash:true,
		onBefore:function( e, anchor, $target ){
   		//var dood = d.getMilliseconds();
   		// The 'this' is the settings object, can be modified
		jQuery.scrollTo.window().queue([]).stop();
		//$('.nullspace').animate({ height: 400 }, 10);

		
  		},
 		onAfter:function( anchor, settings ){

	
		//	if(scrollvar!=1)
		//	{
		//	$(window).scrollTop(1400);
		//	scrollvar=1;
		//	alert(scrollvar);
		//	}


  		},
		easing:'easeOutElastic'
	});
});


//Animation

jQuery(document).ready(

function($) {
var openspeed=850;
var closespeed=250;
var easingtype="easeOutElastic";



$(window).scroll(function() {
							 
if($(window).scrollTop()!="0"){$('.message').animate({ opacity:1 }, 2000);}
});

//arrows
	$('.arrow').hover(
	function() {$(this).stop().animate({ backgroundPosition: "0px 20px" }, openspeed, easingtype);}, 
	function() {$(this).stop().animate({ backgroundPosition: "0px 0px" }, closespeed);}
	);
//arrow up
	$('.arrow.up').hover(
	function() {$(this).stop().animate({ backgroundPosition: "0px 7px" }, openspeed, easingtype);}, 
	function() {$(this).stop().animate({ backgroundPosition: "0 27px" }, closespeed);}
	);

//singlescrollingnavigation
$('#navlinks').onePageNav({
  currentClass: 'current'
});
	
	
}
);


