$(document).ready(function(){

  $("#hmenu ul").superfish();
  $('#hmenu ul li').each(function(i){$(this).css('z-index',100+i);});

  $("#vmenu ul").superfish();

  $("#bmenu ul").superfish({dropShadows:false});
  $("#bmenu ul li:first-child").attr("id","first");

  $('.table').each(function() {
    $('tr:first', this).addClass('firstTr');
    $('tr:even', this).not(':first').addClass('evenTr');
    $('tr',this).not(':first').each(function() {
      $('td',this).addClass('allTd');
      });
    });

  Date.format = 'dd/mm/yyyy';
  $('.calendar').each(function() {
  	$(this).datePicker({
      startDate: '01/01/1900',  			
      clickInput:true,
      createButton:false,
      showYearNavigation:false,
      verticalOffset:20
    });
  });

});

function popup(url, target, width, height, features)
{
    var wnd, features1;

    features1 = 'width=' + width + ',height=' + height;
    if (screen) {
        features1 += ',left=' + (screen.width - width) / 2 +
                ',top=' + (screen.height - height) /2;
    }
    if (features) {
        features1 += ',' + features;
    }

    wnd = window.open(url, target, features1);
    wnd.focus();

    return false;    
}
