
$(function(){
	// wyszarzanie w rankingu
	
  //  $('.shop img').hover(function() { //apply the handlers
	//	$(this).pixastic('desaturate');
   // }, function() {
//		$(this).reset();
  //  }); 
	$('.kategoria_logo').addClass('moja_klasa');
	  $('.kategoria_logo').hover(function(){
			$(this).removeClass('moja_klasa');
		}, function(){
			$(this).addClass('moja_klasa');
		});

	$("#tooltip-toogle").click(function(){
		if ($("#tooltip").css("display")=="none")
			$("#tooltip-toogle").attr("src", "images/icons/charts/43.png");
		else
			$("#tooltip-toogle").attr("src", "images/icons/charts/44.png");
		$("#tooltip").toggle();
		return false;
	});
	
	$('#shop_rank_alphabet a').click(function(){
		var attr = $(this).attr('id');
		if(attr){
			$('#'+attr).text('Schowaj statystyki');
			$('#div_rozwijany_'+attr).animate({ 
					opacity: 0,
				  }, 1 ).slideToggle().animate({ 
					opacity: 0.8,
				  }, 1000 );
			return false;
		}else return true;

	});
	
	$('#shop_rank_alphabet2 a').click(function(){
		var attr = $(this).attr('id');
		if(attr){
			$('#'+attr).text('Schowaj statystyki');
			$('#div_rozwijany_'+attr).animate({ 
					opacity: 0,
				  }, 1 ).slideToggle().animate({ 
					opacity: 0.8,
				  }, 1000 );
			return false;
		}else return true;

	});
	
	$('#shop_rank_alphabet3 a').click(function(){
		var attr = $(this).attr('id');
		if(attr){
			$('#'+attr).text('Schowaj statystyki');
			$('#div_rozwijany_'+attr).animate({ 
					opacity: 0,
				  }, 1 ).slideToggle().animate({ 
					opacity: 0.8,
				  }, 1000 );
			return false;
		}else return true;

	});
	
    $('.table_sklepy tr').hover(
      function () {
        $(this).css('background-color', '#eeeeee');
      }, 
      function () {
        $(this).css('background-color', 'white');
      }
    );

    $('.tablelist tr').hover(
      function () {
        $(this).css('background-color', '#eeeeee');
      }, 
      function () {
        $(this).css('background-color', 'white');
      }
    );
	
	$('.op-nr-a').hover(
		function (e) {
			//$(this).animate({backgroundColor:'Yellow', color:'Red'}, {queue:false,duration:500});
			var name = $(this).attr('name');
				
			$('.op-nr-' + name).css('top', e.pageY+10+'px').css('left', e.pageX-250+'px').show();
		}, function () {
			//$(this).animate({backgroundColor:'#ececed', color:'#777777'}, {queue:false,duration:500});
			var name = $(this).attr('name');
			$('.op-nr-' + name).hide();
	});
});
