/*
	Autor: Grzegorz Jaworek
	E-mail: grzegorz.jaworek@gmail.com
	www: http://gjaworek.pl 
	Tel.: +48 696 818 300
*/

jQuery(document).ready(function(){
	try {
		Cufon.replace('h2, h3, .content h4, h5', { fontFamily: 'arial' });
		Cufon.replace('ul#menu > li > a, #offer-nav a', { fontFamily: 'arial', hover: true });
	} catch(err) {}
	jQuery('.totop').click(function () {
		scroll(0,0);
		return false;
	});
	jQuery('ul#menu > li > a, ul#menu > li.current_page_item > a').each(function () {
		jQuery(this).prepend('<span class="ca cl" /><span class="ca cr" />');
	});
	jQuery('ul#menu > li > ul').after(function () {
		jQuery(this).append('<span class="submenu-end" />');
	});
	jQuery('#menu a').mouseover(function () {
		jQuery(this).children('.ca').show();
	});
	jQuery('#menu a').mouseout(function () {
		jQuery(this).children('.ca').hide();
	});
	jQuery('#menu > li > ul').hide();
	jQuery('.category_list > li > ul').hide();
	jQuery('.category_list > li.current_cat > ul').show();
	jQuery('.category_list > li > a').click(function () {
		jQuery(this).next('ul').animate({height: 'toggle'}, 400);
		return false;
	});	
	jQuery('ol li').each(function () {
		jQuery(this).wrapInner('<span />');
	});
	jQuery('td, th').each(function () {
		if (jQuery(this).html() == '') {jQuery(this).html('&nbsp;')};
	});
	jQuery('.wp-pagenavi').css('margin-right',(jQuery('.wp-pagenavi').parent().width()-jQuery('.wp-pagenavi').width())/2);
});