function blurAnchors(){
if(document.getElementsByTagName) {
var a = document.getElementsByTagName("a");
for(var i = 0; i < a.length; i++){
a[i].onfocus = function(){this.blur();};
}
}
}

window.onload = blurAnchors;

$(document).ready(function(){

	// ułatwienie przy animacji
	jQuery.fn.slideFadeToggle = function(speed, easing, callback) {
		return this.animate({opacity: 'toggle', height: 'toggle'}, speed, easing, callback); 
	};	
	
	// walidacja formularza polecenia
	var validator4 = $("#polecznajomemu").validate({
	rules: {
		'timie'  	: "required",
		'temail' 	: { required: true, email: true },		
		'zimie'  	: "required",		
		'zemail' 	: { required: true, email: true }
	},
	messages: {
		'timie'   : "Wpisz swoje imię",
		'zimie'   : "Wpisz imię znajomego",		
		'temail'  : "Podaj Twój e-mail",		
		'zemail'  : "Podaj e-mail znajomego"		
	},

	errorPlacement: function(error, element) {
			error.appendTo( element.parent() );
	}
	
	});	
	
    $(function($) {
      $('.jclock').jclock();
    });
	
	$("a.foto").lightBox({
		'imageLoading': "/img/lightbox-ico-loading.gif",
		'imageBtnClose': "/img/lightbox-btn-close.gif",
		'imageBtnPrev': "/img/lightbox-btn-prev.gif",		
		'imageBtnNext': "/img/lightbox-btn-next.gif",		
		'imageBlank': "/img/lightbox-blank.gif",
		'txtImage': 'Obraz',
		'txtOf': 'z'
	});		
	
});

function bookmark() {
	title = "Bank Spółdzielczy w Chojnicach";
	url = "http://www.bschojnice.pl/";

	if (window.sidebar) {
		window.sidebar.addPanel(title, url,"");
	} else if( window.external ) {
		window.external.AddFavorite(url, title);
	}
}
