
$(document).ready(function() {
 document.body.setAttribute("class","loaded");

if(document.body.getAttribute("class")=='loaded'){

	 setTimeout(function(){

     $('.nebel_object').css('transform','scale(8,1)');
	 }, 2000);
	 
}

 setTimeout(function(){
	 $('body').css('background-image','none');
	 if( $('#intro_als_content_premium').hasClass('intro_over')==false){
	 $('.fade_div').fadeIn(1000);
	 $('#intro_als_content_premium').addClass("intro_over");
	 $('.intro_over').fadeIn(3000);
	 $('#footer').fadeIn(3000);
	 $('#content_Premium').fadeIn(3000);
	 $('#menu').fadeIn(3000);
	 $('#navigation1').fadeIn(3000);
	 $('#navigation').fadeIn(3000);
	 //$('#footer').addClass("intro_over");
	 $('#content_Premium').addClass("intro_over");
	 $('.fade_div').fadeOut(500);
	 //$('#intro_als_content_premium').addClass("intro_over");
 }}, 20000);

$( "#intro_als_content_premium" ).click(function() {
	$('body').css('background-image','none');
    if( $('#intro_als_content_premium').hasClass('intro_over')==false){	 
		 $('.fade_div').fadeIn(1000);
		 $('#intro_als_content_premium').addClass("intro_over");
		 $('.intro_over').fadeIn(3000);
		 $('#footer').fadeIn(3000);
		 $('#content_Premium').fadeIn(3000);
		 $('#menu').fadeIn(3000);
		 $('#navigation1').fadeIn(3000);
		 $('#navigation').fadeIn(3000);
		 //$('#footer').addClass("intro_over");
		 $('#content_Premium').addClass("intro_over");
		 $('.fade_div').fadeOut(500);
	 //$('#intro_als_content_premium').addClass("intro_over");
 }
});
	
});

function pulse(){
		
	$('.stoerer_intro').animate({width: "120%"},500);	
	 setTimeout(function(){
	 //$('.stoerer_intro').css('display','block');

	 //$('.stoerer_intro').addClass("pulse");
	 	$('.stoerer_intro').animate({width: "100%"},500);	
	 }, 500);
	 	 setTimeout(function(){


		 $('.stoerer_intro').animate({width: "120%"},500);	
	 }, 1500);
		 setTimeout(function(){
	 //$('.stoerer_intro').css('display','block');

	 //$('.stoerer_intro').addClass("pulse");
	 	$('.stoerer_intro').animate({width: "100%"},500);	
	 }, 2000);
 /**setTimeout(function(){
$('.stoerer_intro').removeClass("pulse");

	 }, 3500);*/
}
function pulse1(){
		
		
	 setTimeout(function(){
	 $('.stoerer_intro').fadeIn(1000);
     $('.stoerer_intro').animate({width: "100%"},5000);
	 $('.stoerer_intro').addClass("pulse1");
	 }, 2000);
 setTimeout(function(){
$('.stoerer_intro').removeClass("pulse1");
pulse();
	 }, 3000);
}





//POP UP BOX
$(document).ready(function() {
  //var height = 0;
  //height = jQuery('body').outerHeight();
  //height = height+'px';
  //alert(height);
  
  jQuery('.popup').show('', function(){
    jQuery('.padding-five-percent').css('opacity', '0.5');
  });
  
  jQuery('body').on('click', function(){
    jQuery('.popup').hide();
    jQuery('.padding-five-percent').css('opacity', '1');    
  });
  
});

//OnePager Navigation
var root = jQuery('html, body');

jQuery('a.menu-item-link').on( "click" ,function(){
  var href = jQuery.attr(this, 'href').split('#')[1];
  var item = jQuery(this).parent('.menu-item');
  $('#navigation .menu-toggle').toggleClass('active');
   $('.navi_ul').toggleClass('open');  
    root.animate({
        scrollTop: $('[id="' + href + '"]').offset().top
    }, 500, function () {
    window.location.hash = href;
    jQuery(item).addClass('active');
    jQuery(item).siblings('.menu-item').each(function(){
      jQuery(this).removeClass('active');

    });
    });
    return false;
});

//Navigation Mobile
jQuery('#navigation .menu-toggle').click(function(e){
  $(this).toggleClass('active');
  $('.navi_ul').toggleClass('open');
  $('#navigation').toggleClass('navi_open');
  e.preventDefault();
  return false;
});
