/*$(function(){
	$("#menu li a img").hover(function(){
				if($(this).attr("src").indexOf("_hover") == -1) {
					var newSrc = $(this).attr("src").replace(".png","_hover.png#hover");
					$(this).attr("src",newSrc);
				}
			},
			function(){
				if($(this).attr("src").indexOf("_hover.png#hover") != -1) {
					var oldSrc = $(this).attr("src").replace("_hover.png#hover",".png");
					$(this).attr("src",oldSrc);
				}
			});
	$('#kategorie ul ul').hide();
	$('#kategorie ul li a').click(function(){
		$(this).parent().parent().children().find('ul').hide();
		$(this).next().show();
		return false;
	})
	$('#kategorie ul li ul li').hover(function(){
		$(this).children().show();
		return false;
	},
	function(){
		$(this).children().find('ul').hide();
		return false;
	}
	);
});*/

function productList(catId,page)
{
  url = jsBaseUrl+'oferta2/'+catId+'/'+page;
	div = "#subpage";
  $(div).empty();
  $("#loader").show();
  $.post(url,{ajaxRequest:true},function(data){$("#loader").hide();$(div).html(data)});
}

function showProduct(id,catId,page)
{
  url = jsBaseUrl+'produkt/'+id;
  div = "#subpage";
	//searcher = '<img src="http://www.starpak.pl/images/ajax-loader.gif" alt="loader" class="loader" />';
  //$(div).html(searcher);
  $(div).empty();
  $("#loader").show();
  //$.post(jsBaseUrl+'follower/'+id+'/0',{ajaxRequest:true},function(data){$("#follower").html(data)});
  $.post(url,{ajaxRequest:true,cat:catId,page:page},function(data){$("#loader").hide();$(div).html(data);$('.noweTabsy').tabs();});
}
