$(document).ready(function(){

	$('h1 + h2').addClass("subline"); //h2-heads nach h1-heads mehr abstand zum text
	/*$('a[href*="praxis-paket-marketing"]').parents("li").addClass("navspacer");*/ //abstand in navigation
	$('a[href*="beratung"]').parents("li").addClass("navspacer"); //abstand in navigation
	$('a[href*="netzwerk"]').parents("li").addClass("navspacer"); //abstand in navigation
	

// hide #back-top first
	$("#back-top").hide();
	
	// fade in #back-top
	$(function () {
		$(window).scroll(function () {
			if ($(this).scrollTop() > 100) {
				$('#back-top').fadeIn();
			} else {
				$('#back-top').fadeOut();
			}
		});

		// scroll body to 0px on click
		$('#back-top a').click(function () {
			$('body,html').animate({
				scrollTop: 0
			}, 800);
			return false;
		});
	});	
});


(function(){
  // to prevent firefox @fontface flicker: 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.firstChild.appendChild(s);
    function f(){ s.parentNode && s.parentNode.removeChild(s); }
    addEventListener('load',f,false);
    setTimeout(f,3000);
  }
})();


function protectmail(name, domain) {
	document.write('<a href=\"mailto:' + name + '@' + domain + '\">');
	document.write(name + '@' + domain + '</a>');
	}
