$(document).ready(function(){
  $('a.contactEmail').attr('rel', $('span#e-mail').text());
  $('a.alternateEmail').attr('rel', $('span#alt-e-mail').text());
  $('a.webEmail').attr('rel', 'moc/snoitulosretawmlac//evad');
  $('a.email').nospam();
  if($('a.contactEmail').attr('href') != null) $('a.contactEmail').attr('title', $('a.contactEmail').attr('href').slice(7));
  if($('a.alternateEmail').attr('href') != null) $('a.alternateEmail').attr('title', $('a.alternateEmail').attr('href').slice(7));
  if($('a.webEmail').attr('href') != null) $('a.webEmail').attr('title', $('a.webEmail').attr('href').slice(7));
  $('input:submit, input:button, div.layoutAdmin li, .nwt-mod_paging-pageContainer a, .nwt_admin_sub_buttons a').addClass('ui-state-default').hover(function(){
    $(this).toggleClass('ui-state-default');
    $(this).toggleClass('ui-state-hover');
  }).focusin(function(){
    $(this).toggleClass('ui-state-default');
    $(this).toggleClass('ui-state-focus');
  }).focusout(function(){
    $(this).toggleClass('ui-state-default');
    $(this).toggleClass('ui-state-focus');
  });
  $('input:checkbox, input:radio').focusin(function(){
    $('label[for="' + $(this).attr('id') + '"]').addClass('checkboxFocus');
  }).focusout(function(){
    $('label[for="' + $(this).attr('id') + '"]').removeClass('checkboxFocus');
  });
  if($.browser.ie){
    $(".nwt-widget-header").corner("7px top");
    $(".nwt-widget-content").corner("7px bottom");
  }
});
