$(document).ready(function()    {        $('#showMore').click(function(){                        $('#hiddenTable').toggle();                    });        $('.print_link').click(function()        {                var print_win = window.open('','Drukowanie','menubar=yes, toolbar=no, location=no, scrollbars=yes, resizable=yes, status=no,width=550,height=500');                print_win.document.open();                print_win.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><title>'+$('#art_title').html()+'</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link rel="stylesheet" type="text/css" href="'+url+'/css/print.css" media="all" /></head><body onload="setTimeout(function(){this.print();},500)">'+$('#print_content').html()+'</body></html>');                print_win.document.close();                setTimeout(function(){                    print_win.close();                },1500);            });         $('.mm_but').hover(            function () {                tmp = this.src;                tmp2 = this.src.replace(/_0/,"_1");                this.src = tmp2;            },            function () {                this.src = tmp;            }            );         $('.right_menu_img').click(function()        {                var imgs = $('#' + $(this).parent().attr('id') + ' .right_menu_img');                for(i = 0; i < imgs.length; i++)                {                    $(imgs[i]).attr({                        'src' : $(imgs[i]).attr('src').replace(/_1/,"_0")                        });                }                 $(this).attr({                    'src' : $(this).attr('src').replace(/_0/,"_1")                    });                $('#' + $('#' + $(this).parent().parent().attr('id')).attr('id') + ' .gray_txt_right').addClass('hidden');                $('#' + $('#' + $(this).parent().parent().attr('id')).attr('id') + ' .gray_txt_right2').addClass('hidden');                $('.' +$(this).attr('id')).removeClass('hidden');            });         $('.event').hover(            function(e)            {                $('.output').hide();                var selector = $(this).attr('id');                //getting height and width of the message box                //var height = $('#calendar').height();                //var width  = $('#calendar').width();                //calculating offset for displaying popup message                leftVal =(e.pageX-5)+"px";                topVal  =(e.pageY-5)+"px";                $('#' + selector + ' .output').css({                    left:leftVal,                    top:topVal                }).fadeIn(200);            },            function(){                $('.output').hide();            }	);        //$('div.output p.close').click(function(){  $('.output').hide(); });         $('.charcount').keyup(function()        {                var chars = $(this).val();                var id = $(this).attr('id');                var max_chars = parseInt(id.substr(1));                if(chars.length > max_chars)                {                    var str = $(this).val();                    $(this).val('');                    str = str.substring(0,max_chars);                    $(this).val(str);                }                var left = max_chars-chars.length;                if(left < 0 ) left = 0;                $('.'+ id).html('('+left+')');            });    });
