function CreateMenuNavigation()
{
window.addEvent('domready', function(){
	
	$('navbox').addEvent('mouseenter', function(e){

		$$('.menu_off').set('class', 'menu_on').fade('in');
	});
	$('navbox').addEvent('mouseleave', function(e){

		$$('.menu_on').set('class', 'menu_off').fade('out');
	});	
									 
});
}
/***********************************************************/
function OtvoriInfo(idm)
{
window.addEvent('domready', function(){
	
	var imgid = 'home_box_x'+idm+'_img';
	
	$(imgid).setStyle('height','136px');
	var mysSlide = new Fx.Slide(imgid,
	{						   
	mode:'horizontal',
	duration:400,
	transition: Fx.Transitions.Quart.easeOut
	}
	);    

    $('home_box_x'+idm).addEvent('mouseenter', function(e){
		e = new Event(e);
		mysSlide.slideOut();
		e.stop();
	});

    $('home_box_x'+idm).addEvent('mouseleave', function(e){
		e = new Event(e);
		mysSlide.slideIn();
		e.stop();
	});
	$('home_box_x'+idm).addEvent('mouseleave', function(e){
		e = new Event(e);
		(function(){ mysSlide.slideIn(); }).delay(1000);
		e.stop();
	});
	

});
}
/***********************************************************/
function GetHtmlContent(type)
{
window.addEvent('domready', function() {
			
			function new_rows(type){
				var myHTMLRequest = new Request({
					url:'ps_web/ps_content/ajaxpage.php',
					method:'post',
					autoCancel:true,
					data: 'type='+type,
					onRequest: function() {
						$('home_recive').set('text','');
						
						for(i=1;i<=8;i++)
						{
						var myEffect = new Fx.Morph('home_box_x'+i, {duration: 800, transition: Fx.Transitions.Sine.easeOut});
						myEffect.start({'opacity':0.3});
						
						var myEffect2 = new Fx.Morph('home_box_x'+i+'_img', {duration: 800, transition: Fx.Transitions.Sine.easeOut});
						myEffect2.start({'opacity':0.3});
						
						var myEffect = new Fx.Morph('home_box_opt1'+i, {duration: 800, transition: Fx.Transitions.Sine.easeOut});
						myEffect.start({'opacity':0.2});
						
						var myEffect = new Fx.Morph('home_box_opt2'+i, {duration: 800, transition: Fx.Transitions.Sine.easeOut});
						myEffect.start({'opacity':0.2});
						}
					},
					onComplete: function(responseText) {
						var new_rows = new Element('div', {  
							'html': responseText
						});
						new_rows.inject($('home_recive'));
						var myEffect3 = new Fx.Morph('items', {duration: 800, transition: Fx.Transitions.Sine.easeOut});
						myEffect3.start({'opacity':1});
						//$('loadingdata').set('text','');
						
						
					}
				}).send();
			}
			
			new_rows(type);
					
		$('zatvori').addEvent('click', function(e){
			
			var myEffect3 = new Fx.Morph('items', {duration: 800, transition: Fx.Transitions.Sine.easeOut});
			myEffect3.start({'opacity':0});
			
			for(i=1;i<=8;i++)
				{
				var myEffect = new Fx.Morph('home_box_x'+i, {duration: 800, transition: Fx.Transitions.Sine.easeOut});
				myEffect.start({'opacity':1});
				
				var myEffect2 = new Fx.Morph('home_box_x'+i+'_img', {duration: 800, transition: Fx.Transitions.Sine.easeOut});
				myEffect2.start({'opacity':1});
				
				var myEffect = new Fx.Morph('home_box_opt1'+i, {duration: 800, transition: Fx.Transitions.Sine.easeOut});
				myEffect.start({'opacity':1});
				
				var myEffect = new Fx.Morph('home_box_opt2'+i, {duration: 800, transition: Fx.Transitions.Sine.easeOut});
				myEffect.start({'opacity':1});
				}
			//$('items').empty();
		//(function(){ mysSlide.slideIn(); }).delay(1000);
		
		});
   });
}

/***********************************************************/
/*window.addEvent('domready',function() {
	
	var showDuration = 3000;
	var container = $('slideshow-container');
	var images = container.getElements('img');
	var currentIndex = 0;
	var interval;
	
	images.each(function(img,i){ 
		if(i > 0) {
			img.set('opacity',0);
		}
	});
	
	var show = function() {
		images[currentIndex].fade('out');
		images[currentIndex = currentIndex < images.length - 1 ? currentIndex+1 : 0].fade('in');
	};
	
	window.addEvent('load',function(){
		interval = show.periodical(showDuration);
	});
});*/

