// JavaScript Document                                                                                             
// Frömming + Struck GbR 
// ROCKmedia      
// Andreas-Gayk-Str. 7-11
// 24103 Kiel
// author: ROCKmedia / Germany / Kiel
// e-mail: info@rockmedia.de

$(".feature-box-hover-bg").animate({opacity: 0.0, }, 0 );
$(".feature-box-hover-go").animate({opacity: 0.0, }, 0 );


var intTime = 1000;
	$('.feature-box').each(function(i){
		var _this = this;
		window.setTimeout(function(){$(_this).slideDown('0');}, intTime);
		intTime += 600;
});


$('.feature-box').hover(function(){
    $(this).find('.feature-box-hover-bg').stop(false, true).animate({opacity: 0.9, }, 350 );
    $(this).find('.feature-box-hover-go').stop(false, true).animate({opacity: 1.0, }, 350 );
}, function(){
    $(this).find('.feature-box-hover-bg').stop(true, false).animate({opacity: 0.0, }, 200 );
    $(this).find('.feature-box-hover-go').stop(true, false).animate({opacity: 0.0, }, 200 );
});

$(".feature-box-hover-go a").click(function() {
 if( $(this).attr('href') != '#' )
 {
     var url = $(this).attr('href');   
     var without = '?site=main_nav';
	 var url_front = 'http://www.halle400.de'
     var url_without = url_front+url+without;  
	
 	}
 	else
 	{
    	return false;
 	}
 
 $("#content-wrapper").delay(0).slideUp(300);
 $("#fullbg").delay(0).fadeOut(500);
 $("#fullbg").delay(300).slideUp(500);

 $('#nav > ul > li').removeClass('rex-active');
 $('#nav > ul > li').removeClass('rex-current');
 $(this).parent().addClass('rex-active');
	
	window.location.hash = url;

   
 setTimeout (function() {
	
     $('#content-wrapper').load(url_without);
     $("#content-wrapper").delay(1000).slideDown(500);
	 $("#fullbg").delay(200).fadeIn(500);

 }, 600 );
 return false;
	});
