$(document).ready(function(){
		// select #flowplanes and make it scrollable. use circular and navigator plugins
		$("#flowpanes").scrollable({ circular: true}).navigator({

			// select #flowtabs to be used as navigator
			navi: "#flowtabs",

			// select A tags inside the navigator to work as items (not direct children)
			naviItem: 'a',

			// assign "current" class name for the active A tag inside navigator
			activeClass: 'current',
			
			rotate: true

			// make browser's back button work
			//history: true
		}).autoscroll({ autoplay: true, interval: 8000 });
		
		$("#MAIN_MENU a").click(function () { 
			$("#MAIN_MENU a").parent().removeClass("active");
			$(this).parent().addClass("active");
		});
		$("#CAT_MENU a").click(function () { 
			$("#CAT_MENU a").parent().removeClass("active");
			$(this).parent().addClass("active");
		});
		$(".STRONICOWANIE a.num").click(function () { 
			$(".STRONICOWANIE a.num").removeClass("active");
			$(this).addClass("active");
		});
		
		/* automatyczna wysokosc strony, jezeli mniejsza niz wysokosc ekranu */
		l = $("#LAYOUT");
		w = $(window);
		if(l.height() < w.height()-45){
			l.height(w.height()-45);
		}
});

