/*
	Autor: Grzegorz Jaworek
	E-mail: grzegorz.jaworek@gmail.com
	www: http://gjaworek.pl 
	Tel.: +48 519 133 159
*/


$(document).ready(function(){
	var fixbrowser = false;
	jQuery.each(jQuery.browser, function(i, val) {
	  if(i=="msie" && jQuery.browser.version.substr(0,1)=="8")
		 fixbrowser = true;
	});
		
	$('#imageslider').cycle({fx: 'fade', speed: 'slow', timeout: 5000});
	$(".menu li a").each(function () {
		var htmlStr = '<span>'+$(this).html()+'</span>';
		$(this).html(htmlStr);
		if (fixbrowser) {
			$(this).children('span').css('padding-top', ($(this).height()-$(this).children('span').height())/2);
		}
	});
	$('.menu li').hover(function() {
		$(this).children('ul:hidden').slideDown();
	}, function() {
		$(this).children('ul:visible').slideUp();
	});
});
