
//<![CDATA[

  
jQuery().ready(function()
		{
      

    
    

      
      
    $('.ajax_list3').before('<div id="nav3" class="nav3">').cycle({
        fx:     'fade',
        speed:  'slow',
        timeout: 6000,
        pager:  '#nav3',
        before: function() { if (window.console) console.log(this.src); }
    });
      
    
    
// See which font size the user wants
		$(".fontResizer a").click(function() {
			switch ($(this).attr("class")) {
				case 'small'	: setFontSize(.8);	break;
				case 'large'	: setFontSize(1.2);	break;
				default			: setFontSize(1);	break;
			}
			$(".fontResizer a").removeClass('actual_size');
			$(this).addClass('actual_size');
			
			return false;
		});

		// Set the font size and set a cookie
		

		// Create and read coookies
		// Code functions by: Peter-Paul Koch
		// http://www.quirksmode.org/js/cookies.html
		function createCookie(value) {
			var date = new Date();
			date.setTime(date.getTime()+(30*24*60*60*1000));
			var expires = "; expires="+date.toGMTString();
			document.cookie = "font_size="+value+expires+"; path=/";
		}

		function readCookie() {
			var nameEQ = "font_size=";
			var ca = document.cookie.split(';');
			for(var i=0;i < ca.length;i++) {
				var c = ca[i];
				while (c.charAt(0)==' ') c = c.substring(1,c.length);
				if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
			}
			return 1;
		}
			
           
      
      
      
      });
      
      
      
      //funckja animacja po wjechaniu slajdu
function onAfter() { 
    
     setTimeout(effect_down,100); 
     setTimeout(effect_up,5500); 
}
function effect_up(){
    $('.banner_text').slideUp(1000)
}
function effect_down(){
         $('.banner_text').slideDown(1000); 
}
//dodawanie do ulubionych
var bookmarkurl=document.location
var bookmarktitle=document.title

function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function dodaj() { var tytul = 'Związek Polaków w Wielkiej Brytanii'; var adres = 'http://www.zpwb.org.uk/';
 //FireFox 
 if (window.sidebar) { window.sidebar.addPanel(tytul, adres, "");
  //IE 
  } else if (window.external) { window.external.AddFavorite(adres, tytul); //Opera
   } else if (window.opera && window.print) { var a = document.createElement('a'); a.setAttribute('href', adres); a.setAttribute('title', tytul); a.setAttribute('rel','sidebar'); a.click(); } 
   } 
   
   //if (window.external || window.sidebar || (window.opera && window.print) ) { document.writeln('<a href="javascript:dodaj()"> Dodaj do ulubionych</a>'); }          
          
//etykiety w ppolach formularza
this.label2value = function(){	
    
	// CSS class names
	// put any class name you want
	// define this in external css (example provided)
	var inactive = "inactive";
	var active = "active";
	var focused = "focused";
	
	// function
	$("#window_content label").each(function(){		
		obj = document.getElementById($(this).attr("for"));
		if(($(obj).attr("type") == "text") || (obj.tagName.toLowerCase() == "textarea")){			
			$(obj).addClass(inactive);			
			var text = $(this).text();
			$(this).css("display","none");			
			$(obj).val(text);
			$(obj).focus(function(){	
				$(this).addClass(focused);
				$(this).removeClass(inactive);
				$(this).removeClass(active);								  
				if($(this).val() == text) $(this).val("");
			});	
			$(obj).blur(function(){	
				$(this).removeClass(focused);													 
				if($(this).val() == "") {
					$(this).val(text);
					$(this).addClass(inactive);
				} else {
					$(this).addClass(active);		
				};				
			});				
		};	
	});		
};




