$(document).ready(function(){
	//divvone=document.getElementById('fade');
	if(fadeOut){
		
		//$('#neroBG').css('background-color','#000000');
		//$('body.sez_2').css("opacity",0.5);
		if(logoFadeOut)
			$('#nero').css('background-color','#000000');

		window.setTimeout(function() {
			if(logoFadeOut)
				fadeLogo();
			else
				fadeBg();
		}, 50);
	}
	else
		fadeInContent();
	
});

/*function SetFullScreenBG(imgPath){
	window.setTimeout(function() {
		$('body').css("background-image", "url("+imgPath+")");
	}, 500);
}*/

function fadeBg(){
	$('#neroBG').fadeOut(1000,function() {
		fadeInContent();

	  });
}

function fadeLogo(){
	$('#nero').fadeOut(1300,function() {
		fadeBg()

	  });
}

function growAndGo(url){
	$('#neroBG').css('display','inline');
	$('#neroBG').css('width','0px');
	$('#neroBG').css('background-color','#000000');
	$('#neroBG').stop().animate({width:'100%'},{queue:false, duration:900,complete:function() {
		location.replace(url);
	  	}
	});
}

function fadeInContent(){
	$('#body_cont-DX').fadeIn(700);
	
}

function subMenuSlideDown(){
	$('#subMenuUl').slideDown('slow', function() {
	    // Animation complete.
	});
}




//ooooold


function expand(elem,width){
	//alert(elem.id);
	if(width=='')
		width='150';

	elem=document.getElementById(elem);
	$(elem).stop().animate({width:width+'px'},{queue:false, duration:800, easing: 'easeOutBounce'});
}

function contract(elem){
	//alert('out');
	elem=document.getElementById(elem);
	$(elem).stop().animate({width:'5px'},{queue:false, duration:800, easing: 'easeOutBounce'});
}

function expand_sub(elem){
	elem=document.getElementById(elem);
	$(elem).stop().animate({width:'10px',height:'23px'},{queue:false, duration:200});
	$(elem).css('background-color','#000000');
}

function contract_sub(elem){
	//alert('out');
	elem=document.getElementById(elem);
	$(elem).css('background-color','#cccccc');
	$(elem).stop().animate({width:'5px',height:'19px'},{queue:false, duration:200});
}

function expand_img(elem,width,showName){
	//alert(elem.id);
	name='#name_'+elem;//document.getElementById('name_'+elem);
	
	elem=document.getElementById(elem);	
	$(elem).stop().animate({width:width+'px'},{queue:false, duration:800});	
	
	if(showName){
		
		//$(name).stop().animate({opacity: 1.0}, {queue:false, duration:1000}, function() {  });
		$(name).stop(true, true).fadeIn(1000);
	}
	


	//$(name).stop().animate({opacity: 0.1},{queue:false, duration:990});
		
}

function contract_img(elem,width,hideName){
	
	name='#name_'+elem;//document.getElementById('name_'+elem);
	
	elem=document.getElementById(elem);
	$(elem).stop().animate({width:width+'px'},{queue:false, duration:800});
	
	
	if(hideName){
		
		//$(name).stop().animate({opacity: 0.0}, 1000, function() { });
		$(name).stop(true, true).fadeOut(1000);
	}
	
	
}

function expand_section(elem){
	
	pElem=document.getElementById('p'+elem);
	hElem=document.getElementById('h'+elem);
	//alert($(elem).is(":visible"));
	$(pElem).stop().animate({height:'toggle'},{queue:false, duration:700});
	//$(name).stop().animate({opacity: 0.1},{queue:false, duration:990});
	$(hElem).toggleClass('minus');
		
}

function contract_section(elem,height){
	
	elem=document.getElementById(elem);
	
	$(elem).stop().animate({height:'show'},{queue:false, duration:700});
	//$(name).stop().animate({opacity: 0.1},{queue:false, duration:990});
		
}

