/*Modernizr._fontfaceready(function(bool){
	//if (!bool) alert("Web fonts not supported.");
	//else alert("Web fonts supported."); 
});*/

function delay_fonts(timeout){
  // if firefox 3.5+, hide content till load (or 3 seconds) to prevent FOUT
  var d = document, e = d.documentElement, s = d.createElement('style');
  if (e.style.MozTransform === ''){ // gecko 1.9.1 inference
    s.textContent = 'body{visibility:hidden}';
    e.appendChild(s);
    function f(){ s.parentNode && s.parentNode.removeChild(s); }
    addEventListener('load',f,false);
    setTimeout(f,timeout); 
  }
}

$(document).ready(function() {
	if ($.support.opacity) {
		$('#logos').cycle({
			fx: 'fade',
			speed: 500,
			timeout: 8000,
			cleartypeNoBg: true
		});
	}
	else {
		$('.logo').each(function(index) {
			if (index != 0)
				$(this).css('display','none');
		});
	}
	
	var id = $('.selected a').attr('href').split('.')[0];
	if (id == "about" || id == "offer") {
		$('#contentTable h3').each(function(index) {
			$(this).attr('id','par'+index);
			//$('#sidemenu').append('<ul>');
			$('#sidemenu').append('<a href="#'+$(this).attr('id')+'">'+ $(this).html() + '</a><br/>');
			//$('#sidemenu').append('</ul>');
		});
		$('#sidemenu').css("height","100%");
	}
});


