//var $J = jQuery.noConflict();
jQuery(document).ready(function(){

        heights();

        menu();
        $("#menu a:first").css('border', 'none');
        $("#menu a.active").parent().css('background', '#92210c url(/data/img/bg_menu_act.jpg) top repeat-x');
        $("#menu a").hover(function(){
                $(this).parent().css('background', '#92210c url(/data/img/bg_menu_act.jpg) top repeat-x');
        },function(){
                if ($(this).attr('class')!='active') $(this).parent().css('background', 'none');
        });

        /*table with coloured columns*/
        $(".table_cols tr").each(function(){
                $(this).children("td:even").css({'background': '#d8c198', 'font-weight': '600'});
                $(this).children("td:first").css({'text-align': 'left', 'padding-left': '12px'});
        });
        $(".table_cols tr:last(:not) td").css('border-bottom', 'none');

        /* page numbers */
        $(".pages, .index_tel").corner();


        /* item's pictures */
/*
        $("#item_pics a").click(function(){
                $("#item_pics img.main_img").attr("src", $(this).attr('href'));
                return false;
        });
*/


});

$(window).resize(function(){
        heights();
        menu();
});

/* menu's width */
menu = function(){
        $("#menu table").width($("#menu").width() - 84);
};
/* central block's height */
heights = function ()
{
        $("#main2").height($(document).height() - $("#top").height() - $("#footer1").height() - 55)
}
