/* ### sfmenu ### */
$(document).ready(function() {
	
	// taby - usuniecie bordera z pierwszego
	$('.tabs').each(function() {
		$(this).find('li:first a').css({'border':0});
	}) 
	
	// top - pogoda $(selector).bind("mouseenter mouseleave", handlerInOut);
	$('#h2-tr .r1c').live('mouseenter', function() {
		$(this).parent().find('div.full').css('margin-left','0');
	})
	$('#GoscWeather').live('mouseleave', function() {
		$('#h2-tr div.full').css('margin-left','-9999px');
	})
	
	// wyszukiwanie wydan
	$('.product_search .list-w').hover(function() {
		$(this).addClass('hover');
	}, function() {
		$(this).removeClass('hover');
	})
	
	// zamiana webpartow miejscami
	
	/* swap_wp_arrows();
	
	$('.c411 a.swap_wp').live('click', function () {
		
		if ($(this).parent().find('.change-wp-ani-wrapper').get(0)) { // webpart ajaxowy przenosimy wywolujac click na strzalkach sasiednich webpartow
			if ($(this).hasClass('swap_wp-up')) {
				$(this).parent().prev().find('.swap_wp-dn').trigger('click');
			} else if ($(this).hasClass('swap_wp-dn')) {
				$(this).parent().next().find('.swap_wp-up').trigger('click');
			}
			return false;
		}
		
		var element = $(this).parent().clone();
		var prev = $(this).parent().prev();
		var next = $(this).parent().next();
		$(this).parent().remove();
		if ($(this).hasClass('swap_wp-up')) {
			element.insertBefore(prev);
		} else if ($(this).hasClass('swap_wp-dn')) {
			element.insertAfter(next);
		}
		
		swap_wp_arrows();
		return false;
	});	

	function swap_wp_arrows() { // wstawia strzalki do przestawiania webpartow
		var swap_wp = $('.c411').children().children();
		swap_wp.each(function(i) {
			$(this).css({'position':'relative'});
			$(this).find('.swap_wp').remove();
			if (i != 0) {
				$('<a href="#" class="swap_wp swap_wp-up" title="przenieś wyżej">▲</a>').insertBefore($(this).children()[0]);
			}
			if (i != swap_wp.size()-1) {
				if(i==0) {var top_only = 'swap_wp-dn-only'} else {var top_only = ''}
				$('<a href="#" class="swap_wp swap_wp-dn '+top_only+'" title="przenieś niżej">▼</a>').insertBefore($(this).children()[0]);
			}
		});
	} */
	
	
});

// -------------------------------------------------------------------------------------------------------------

