//<!--
var browser=navigator.appName;
var b_version=navigator.appVersion;
var version=parseFloat(b_version);
var msiVersion;
msiVersion=b_version.match(/(?:MSIE) (\d+\.?\d?)/);

$(document).ready(function(){
  //set a target="_blank" attribute on the footer URLs so they open in a new tab/window
  //AFTER the page loads so the XHTML 1.1 validator doesn't freak out over them.
  //99% of browsers that support jquery/ajax will also support the target="_blank" attribute.
  $('a.outside').attr('target','_blank');
  //deobfuscate e-mail address to protect from spam (after adding the rel attribute because the xhtml validator
  //for some pointless reason doesn't like slashes or anything else for that matter in the "rel" attribute....)
  $('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));
  //$('.layout1 dl table').css('width','auto');
  $('input:submit, input:button, div.layoutAdmin li').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');
  });
  $('div.layoutAdmin li').each(function(){
    if($(this).hasClass('current')){
      $(this).removeClass('ui-state-default').removeClass('ui-state-focus').addClass('ui-state-active');
    }
  });
  $('input:checkbox, input:radio').focusin(function(){
    $('label[for="' + $(this).attr('id') + '"]').addClass('checkboxFocus');
  }).focusout(function(){
    $('label[for="' + $(this).attr('id') + '"]').removeClass('checkboxFocus');
  });
  if(!$.browser.msie){
    $('<link href="/site-unique/css/aesthetics.css" id="stylesheetScreenAesthetics" media="screen" rel="stylesheet" type="text/css" />').insertAfter('link#stylesheetScreenMain');
  }
});
//-->