WebFontConfig = {
	google: { families: [ 'Droid Sans', 'Droid Sans:bold', 'Droid Serif' ] }
};



(function() {
	var wf = document.createElement('script');
	wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
	    '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
	wf.type = 'text/javascript';
	wf.async = 'true';
	var s = document.getElementsByTagName('script')[0];
	s.parentNode.insertBefore(wf, s);
})();



Event.observe(document, 'dom:loaded', function() {
  

  

});

var tmpStr = '';
/*var navOffSet = 0;*/
var __mzOverride = false;
var __hasTests = false;
Event.observe(document, 'dom:loaded', function() {


	var stickyFeaturesNav 		= new protoSticky('features-nav');

/*	navOffSet = $('features-nav').cumulativeOffset()[1];*/


	/**
	 *	HasJS - Added: 05/11/2010
	 *	Hoiked, hacked and scratched completely from:
	 *	https://github.com/phiggins42/has.js/blob/master/tests/runTests.html
	 *	(Thanks to http://badassjs.com/post/1217357060/hasjs for tipping me off to this :-)
	 */
	if ( typeof runHasJSFullSpread != 'undefined' ) {
		__hasTests = $H(runHasJSFullSpread());
	}

	if ( !__mzOverride ) {
		/* Target Test */
		if ( (document.location.hash == '') && (document.location.pathname.substr(0,7) != '/litmus') ){
			document.body.id 		= 'target-selector';
			document.location.hash 	= 'target-selector';
			
			
		} else {
			h = document.location.hash.substr(1);
			if ( h.length ) {
				document.location.hash = '';
				document.body.id = h;
				document.location.hash = h;
			}
		}
		
		
		
		/* http://jsbin.com/afosa */
		__addHTML5Tests();
		
		/* Add Modernizr's InputType tests to HTML */
		__addInputTests();
		
		/* Add Modernizr's InputAttr tests to HTML */
		__addInputAttributes();
		
		/* Add Modernizr's Audio/Video tests to HTML */
		__addAV();
	
		
		
		history.pushState("", document.title, window.location.pathname);
		console.info(window.location.hash);
		
		// Highligh correct tab in Primary navigation
		$$('#home-nav ul a').invoke('observe','click', function() {
			$(this).up('ul').select('li').each(function(e) {
				e.removeClassName('active');
			});
			$(this).up('li').addClassName('active');
		});
		
		/* Modernizer
		------------------------------------------------*/
		if ($$('ul.modernizer-support')[0]) {
			var mzrList = $$('ul.modernizer-support')[0];
		}
		
		// Get the Modernizr Object and convert to a Hash
		var mzr = $H(window.Modernizr);
		
		
	} else {
		
		document.documentElement.className = '';
		$$('.selector-tests').invoke('removeClassName','selector-tests');
		
		$H(__mzOverride).each(function(pair){
			if ( pair.value == '1' ) {
				// console.log([pair.key,$(pair.key),pair.value]);
				$(pair.key).setStyle({ 
					backgroundImage :'url(/r/i/icons/silk_set_ie6/tick.png)' 
				});
			} else {
				$(pair.key).setStyle({ 
					backgroundImage :'url(/r/i/icons/silk_set_ie6/cross.png)' 
				});
			}
		})
	}
	
	
	if ( typeof __saveData != 'undefined') {
		__saveData();
	}
	
	/* Other bits & bobs.. 
	------------------------------------------------*/
	/** Hook up the navigation widget.. */
	// Event.observe(window,'scroll',__navScroller);
	 
});

function checkOverwrite(mzr){
	if ( typeof __mzOverride != 'undefined' ) {
		$H(__mzOverride).each(function(pair){
			if ( mzr.get(pair.key) != 'undefined' ) {
				alert( pair.key + " = " + pair.value + " == " + !!(pair.value=='1'));
				mzr.set(pair.key, !!(pair.value=='1'));
			}
		})
	}
}	



function __addHTML5Tests(){
	/**
	 *	Now using Modernizr 1.1 supported classes where practical..
	 */
	if ( mXtra = document.body ) {
		// localstorage -> localstorage (ok)
		Modernizr.localstorage			&& mXtra.addClassName('localstorage');
		
		// sessionstorage -> sessionstorage (ok)
		Modernizr.sessionstorage		&& mXtra.addClassName('sessionstorage');
		
		
		// offlineapplications -> offlineapplications
		// !!window.applicationCache		&& $('modernizer').addClassName('offlineapplications');
		Modernizr.applicationcache 		&& mXtra.addClassName('offlineapplications');
		
		// workers -> webworkers
		// !!window.Worker					&& $('modernizer').addClassName('workers');
		Modernizr.webworkers			&& mXtra.addClassName('workers');
		Modernizr.history				&& mXtra.addClassName('historymanagement');
		
		
		// No apparent modernizr support?
		!!document.querySelector		&& mXtra.addClassName('queryselector');
		!!window.openDatabase			&& mXtra.addClassName('webdatabase');
		!!navigator.geolocation			&& mXtra.addClassName('geolocation');
	}
}


function __addInputTests(){
	inputClasses = [];
	$H( window.Modernizr.inputtypes ).each(function(a,b){
		// God knows what's happened but a prototype/modernizr clash... 
		if (Object.isString(a[0]) && !a[0].startsWith('function')){
			if ( a[1] ) { // true
				inputClasses.push('input-'+a[0]);
			}
		}
	});
	if ( document.documentElement ) {
		document.documentElement.className += ' ' + inputClasses.join( ' ' );
	}
}
function __addInputAttributes(){
	inputClasses = [];
	$H( window.Modernizr.input ).each(function(a,b){
		// God knows what's happened but a prototype/modernizr clash... 
		if (Object.isString(a[0]) && !a[0].startsWith('function')){
			if ( a[1] ) { // true
				inputClasses.push('input-'+a[0]);
			}
		}
	});
	if ( document.documentElement ) {
		document.documentElement.className += ' ' + inputClasses.join( ' ' );
	}
}
function __addAV(){
	classes = [];
	'h264 ogg webm'.split(' ').each(function(a){
		if ( Modernizr.video[a] && ( Modernizr.video[a] != '' ) ){
			//alert(a + " = " + Modernizr.video[a]);
			classes.push('video-'+a);
		}
	});
	'm4a mp3 ogg wav'.split(' ').each(function(a){
		//alert(a + " = " + Modernizr.audio[a]);
		if ( Modernizr.audio[a] && ( Modernizr.audio[a] != '' ) ){
			classes.push('audio-'+a);
		}
	});
	if ( document.documentElement ) {
		document.documentElement.className += ' ' + classes.join( ' ' );
	}
}

function __addMoer(){
	
}




 




