$(document).ready(function(){
	$('#books').change(function(el){ 
		tmp = $(this).fieldValue();
		if(tmp != '0') {
			document.location.href = base_url + '/lektura/' + tmp + '/';
		}
		return(false);
	});
	
	$('#ages').change(function(el){ 
		tmp = $(this).fieldValue();
		if(tmp != '0') {
			document.location.href = base_url + '/epoka/' + tmp + '/';
		}
		return(false);
	});
	
	$('#themes').change(function(el){ 
		tmp = $(this).fieldValue();
		if(tmp != '0') {
			document.location.href = base_url + '/motywy/' + tmp + '/';
		}
		return(false);
	});	
	
	$('#authors').change(function(el){ 
		tmp = $(this).fieldValue();
		if(tmp != '0') {
			document.location.href = base_url + '/autor/' + tmp + '/';
		}
		return(false);
	});
	/*
	$("div#roll_up").click(function() {
    	$("div#items_list").hide('slow');
    	$("div#menu").hide('slow');
    	$("div#content-navigation").show('slow');
    	$("div#column3").show('slow');
    	$("div#column2").css({"margin": "0 35px"});
    	$("div#content-main").css({"width": "570px"});
    	$("div#payments").css({"width": "570px"});
    	$("div#right_pay").css({"width": "255px"});
  		$("div#subpage_list").show('slow');
   	});
   
    $("div#subpage_list").click(function() {
    	$("div#items_list").show('slow');
    	$("div#menu").show('slow');
    	$("div#content-navigation").hide('slow');
    	$("div#column3").hide('slow');
    	$("div#column2").css({"margin": "0 0 0 122px"});
    	$("div#content-main").css({"width": "640px"});
    	$("div#payments").css({"width": "640px"});
    	$("div#right_pay").css({"width": "325px"});
  		$("div#subpage_list").hide('slow');
   	});
   	if(admin) {
   		$("div#roll_up").click();
   	}*/
});
