var temp;
var dur='250';
var colorsE=new Array("#7ec000",
					"#c3fb17",
					"#ffffff",
					"#004800",
					"#206300",
					"#ffffff",
					"#ffffff");
var colorsS=new Array("#0c5d00",
					"#26800e",
					"#448c0d",
					"#4d9615",
					"#4d9615",
					"#c27800",
					"#6f0b53");
					
jQuery.noConflict();
function showinfo(e) {
				jQuery("div#dymek").css('display','block');
				jQuery("div#dymek").css('zindex','2');
				jQuery("div#dymek").css('left',e.pageX+2);
				jQuery("div#dymek").css('top',e.pageY+2);
}
var ddx=0;
var onNotanim=false;
function newcatanim(){
	
	
	jQuery("#migpods").animate( {  "opacity":"0" },  { duration: 1000, queue: true }   ).animate( {  "opacity":"1" },  { duration: 1000, queue: true }   );
if (!onNotanim){
	jQuery(".oneCategory:eq(6) .submenu li a:eq("+ddx+")").each(function(){
			var myFx = new Fx.Tween(this);
			this.set('tween', {duration: 1000});
			myFx.set('color', colorsE[6], {duration: 'short'});		
					
			this.highlight( colorsS[6],"#ffffff");	
			
		});	
	ddx=ddx+1;
	}
	if (ddx==5) 
	{
		ddx=0;
		setTimeout('newcatanim()','2500');
		jQuery(".oneCategory:eq(6) .submenu li a").css("color","#6F0B53");
	}
	else setTimeout('newcatanim()','100');

	
	
}
function showevent(day,mon,year) {
$("eventInfo").load("content/"+day+"-"+mon+"-"+year+".html");
jQuery("#eventInfo").show();
}

jQuery("#eventInfo").click(function(){
jQuery(this).hide();
});
jQuery(document).ready(function() {
newcatanim();

		if (jQuery("#nazwa_mapy area"))
		{
			
			var i=0;
			var len=jQuery("#nazwa_mapy area").length;
			for (i=0;i<len;i++)
			{
				jQuery("#nazwa_mapy area").eq(i).mouseout(function(e){
				jQuery("div#dymek").css('display','none');
				
				});
				jQuery("#nazwa_mapy area").eq(i).mouseenter(function(e){
				jQuery("div#dymek").load("showinfo.php?index="+jQuery(this).attr('tabindex'),{index:''+jQuery(this).attr('tabindex')+''},showinfo(e));
				
				
				
				
				
				});
				
			}

			
		}
		if (jQuery("#nazwa_mapy1 area"))
		{
			
			var i=0;
			
				jQuery("#nazwa_mapy1 area").mouseout(function(e){
				jQuery("div#dymek").css('display','none');
				
				});
				jQuery("#nazwa_mapy1 area").mouseenter(function(e){
				jQuery("div#dymek").load("showinfo.php?index="+jQuery(this).attr('tabindex'),{index:''+jQuery(this).attr('tabindex')+''},showinfo(e));
				
				
				
				
				
				});
				
			

			
		}
		if (jQuery("#calendarContainer"))
		{
			jQuery("#calendarContainer").load("calendar.php");
		}
		
		jQuery("div#newsletter form").submit(function(){
			var str=jQuery('#email').val();
			if (!((str.indexOf(".") > 2) && (str.indexOf("@") > 0) && str.lastIndexOf(".")>str.indexOf("@")+1))
			{
				alert('Musisz wpisać swój poprawny adres e-mail.');
				return false;
			}
		});
		

		jQuery("#email").bind("click", function(e){
		  
		  jQuery(this).val('');
		  jQuery(this).unbind('click');

		});

		
		
		
		
		jQuery("a.fancy").fancybox({ 'zoomOpacity' : true, 'zoomSpeedIn': 300, 'zoomSpeedOut': 300, 'overlayShow': true }); 
		jQuery("div#page img").each(function(){
		if (!(jQuery(this).hasClass('nocorner')))
		{
			jQuery(this).addClass('corner');
			jQuery(this).addClass('iradius16');
			
				
		}
		});
		
		jQuery(".galleriesThumb .corner").each(function(){
		jQuery(this).addClass('galleriesThumb');
		});

		jQuery(".oneCategory:eq(0) .submenu li").mouseover(function(){
			var myFx = new Fx.Tween(this);
			this.set('tween', {duration: 'short'});
			this.tween('background-color', colorsS[0]);
		});		
		jQuery(".oneCategory:eq(0) .submenu li").mouseout(function(){
			var myFx = new Fx.Tween(this);
			this.set('tween', {duration: dur});
			this.tween('background-color', colorsE[0]);	
			this.highlight(colorsS[0], colorsE[0]);
		});
		
		jQuery(".oneCategory:eq(0) .submenu li a").mouseover(function(){
			var myFx = new Fx.Tween(this);
			myFx.set('color', colorsE[0], {duration: 'short'});	
		});		
		jQuery(".oneCategory:eq(0) .submenu li a").mouseout(function(){
			var myFx = new Fx.Tween(this);
			myFx.set('color', colorsS[0], {duration: 'short'});	
		});	
		///////
		jQuery(".oneCategory:eq(1) .submenu li").mouseover(function(){
			var myFx = new Fx.Tween(this);
			this.set('tween', {duration: 'short'});
			this.tween('background-color', colorsS[1]);
		});		
		jQuery(".oneCategory:eq(1) .submenu li").mouseout(function(){
			var myFx = new Fx.Tween(this);
			this.set('tween', {duration: dur});
			this.tween('background-color', colorsE[1]);	
			this.highlight(colorsS[1], colorsE[1]);
		});
		
		jQuery(".oneCategory:eq(1) .submenu li a").mouseover(function(){
			var myFx = new Fx.Tween(this);
			myFx.set('color', colorsE[1], {duration: 'short'});	
		});		
		jQuery(".oneCategory:eq(1) .submenu li a").mouseout(function(){
			var myFx = new Fx.Tween(this);
			myFx.set('color', colorsS[1], {duration: 'short'});	
		});	
		///////
		///////
		jQuery(".oneCategory:eq(2) .submenu li").mouseover(function(){
			var myFx = new Fx.Tween(this);
			this.set('tween', {duration: 'short'});
			this.tween('background-color', colorsS[2]);
		});		
		jQuery(".oneCategory:eq(2) .submenu li").mouseout(function(){
			var myFx = new Fx.Tween(this);
			this.set('tween', {duration: dur});
			this.tween('background-color', colorsE[2]);	
			this.highlight(colorsS[2], colorsE[2]);
		});
		
		jQuery(".oneCategory:eq(2) .submenu li a").mouseover(function(){
			var myFx = new Fx.Tween(this);
			myFx.set('color', colorsE[2], {duration: 'short'});	
		});		
		jQuery(".oneCategory:eq(2) .submenu li a").mouseout(function(){
			var myFx = new Fx.Tween(this);
			myFx.set('color', colorsS[2], {duration: 'short'});	
		});	
		///////
		///////
		jQuery(".oneCategory:eq(3) .submenu li").mouseover(function(){
			var myFx = new Fx.Tween(this);
			this.set('tween', {duration: 'short'});
			this.tween('background-color', colorsS[3]);
		});		
		jQuery(".oneCategory:eq(3) .submenu li").mouseout(function(){
			var myFx = new Fx.Tween(this);
			this.set('tween', {duration: dur});
			this.tween('background-color', colorsE[3]);	
			this.highlight(colorsS[3], colorsE[3]);
		});
		
		jQuery(".oneCategory:eq(3) .submenu li a").mouseover(function(){
			var myFx = new Fx.Tween(this);
			myFx.set('color', colorsE[3], {duration: 'short'});	
		});		
		jQuery(".oneCategory:eq(3) .submenu li a").mouseout(function(){
			var myFx = new Fx.Tween(this);
			myFx.set('color', colorsS[3], {duration: 'short'});	
		});	
		///////
		///////
		jQuery(".oneCategory:eq(4) .submenu li").mouseover(function(){
			var myFx = new Fx.Tween(this);
			this.set('tween', {duration: 'short'});
			this.tween('background-color', colorsS[4]);
		});		
		jQuery(".oneCategory:eq(4) .submenu li").mouseout(function(){
			var myFx = new Fx.Tween(this);
			this.set('tween', {duration: dur});
			this.tween('background-color', colorsE[4]);	
			this.highlight(colorsS[4], colorsE[4]);
		});
		
		jQuery(".oneCategory:eq(4) .submenu li a").mouseover(function(){
			var myFx = new Fx.Tween(this);
			myFx.set('color', colorsE[4], {duration: 'short'});	
		});		
		jQuery(".oneCategory:eq(4) .submenu li a").mouseout(function(){
			var myFx = new Fx.Tween(this);
			myFx.set('color', colorsS[4], {duration: 'short'});	
		});	
		///////
				///////
		jQuery(".oneCategory:eq(5) .submenu li").mouseover(function(){
			var myFx = new Fx.Tween(this);
			this.set('tween', {duration: 'short'});
			this.tween('background-color', colorsS[5]);
		});		
		jQuery(".oneCategory:eq(5) .submenu li").mouseout(function(){
			var myFx = new Fx.Tween(this);
			this.set('tween', {duration: dur});
			this.tween('background-color', colorsE[5]);	
			this.highlight(colorsS[5], colorsE[5]);
		});
		
		jQuery(".oneCategory:eq(5) .submenu li a").mouseover(function(){
			var myFx = new Fx.Tween(this);
			myFx.set('color', colorsE[5], {duration: 'short'});	
		});		
		jQuery(".oneCategory:eq(5) .submenu li a").mouseout(function(){
			var myFx = new Fx.Tween(this);
			myFx.set('color', colorsS[5], {duration: 'short'});	
		});	
		///////
				///////
		jQuery(".oneCategory:eq(6) .submenu li").mouseover(function(){
			var myFx = new Fx.Tween(this);
			this.set('tween', {duration: 'short'});
			this.tween('background-color', colorsS[6]);
		});		
		jQuery(".oneCategory:eq(6) .submenu li").mouseout(function(){
			var myFx = new Fx.Tween(this);
			this.set('tween', {duration: dur});
			this.tween('background-color', colorsE[6]);	
			this.highlight(colorsS[6], colorsE[6]);
		});
		
		jQuery(".oneCategory:eq(6) .submenu li a").mouseover(function(){
			var myFx = new Fx.Tween(this);
			myFx.set('color', colorsE[6], {duration: 'short'});	
			onNotanim=true;
		});		
		jQuery(".oneCategory:eq(6) .submenu li a").mouseout(function(){
			var myFx = new Fx.Tween(this);
			myFx.set('color', colorsS[6], {duration: 'short'});	
			onNotanim=false;
		});	
		///////
 });
window.onload=function(){
jQuery("#partnersBackground").css('height',jQuery("#partnersList").height());

}
