$(document).ready(function(){
 $(function () {
	//$.sifr({path:'fonts'});
	//$('h2').sifr({font:'HelveticaNeueLight'});
	//$('h3').sifr({font:'HelveticaNeueLight'});
	//$('#nav li a').sifr({font:'HelveticaNeueLight'});
});


$('a[rel*=facebox]').facebox() 


$('.keys').hide();

 $(function () {
 loca = location.href; //  address of this page
 arr = loca.split('.');
 arr = arr[arr.length-2].split('/');
 arr = arr[arr.length-1].split('/');
 $("#nav a[href*='" + arr + "']").parent('li').addClass("current");
 });


/*
$(".forms .error").each(function(){
var msg = $(this).html();
if(msg == ""){
$(this).hide();
}

});
*/


		$('a.toggle').parent('p').next('div').hide();	//select all links with class of toggle, find the next div after the parent and hide them all.
		$('a.toggle').html('Show examples');		// Make all links with class toggle read - show examples
		$('a.toggle').toggle(function(){		// set up the show hide toggle
		$(this).html('Hide examples');		// change the button text to 'hide examples					  
		$(this).parent('p').next('div').slideToggle('slow');return false;},		//then find the next div after the parent and hide it.
		
		function showExamples(){		// Set up the reverse of the toggle...	
		$(this).html('Show examples');		// change the button text to 'show examples						  
		$(this).parent('p').next('div').slideToggle('slow');return false;		//then find the next div after the parent and show it.

			
		});

})

