$(document).ready(function(){
  $('div#belowBannerUpper 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#belowBannerUpper li').each(function(){
    if($(this).hasClass('current')){
      $(this).removeClass('ui-state-default').removeClass('ui-state-focus').addClass('ui-state-active');
    }
  });
  if(browser!="Microsoft Internet Explorer"&&browser!="Opera"){//if(!uselessBrowser&&!opera)
    //if the browser isn't useless or isn't Opera, use the following code to make the page look prettier
    $('div#wrapper').corner('round 20px');
    $('div#header').corner('round top 20px');
    $('div#footer').corner('round bottom 20px');
    $('div#main-body_threeCol div#content').corner('keep round 15px');
    $('div#sidebar_left3 ul li').corner('10px');
    $('div#sidebar_left3 ul li a').corner('10px');
    $('div#sidebar_left3 ul li a span').corner('10px');
    $('div#sidebar_right3 ul li').corner('10px');
    $('div#sidebar_right3 ul li a').corner('10px');
    $('div#sidebar_right3 ul li a span').corner('10px');
    $('div#belowBannerUpper li').corner('5px');
    $('div.layoutAdmin li').corner('5px');
    $('div.layoutPhotos dl').corner('10px');
    $('.submit input').corner('5px');
    $('input.cloneElement').corner('5px');
    $('input.removeElement').corner('5px');
    $('fieldset').corner('10px');
    $("div.layoutPhotos dl.photos dt.image img").hover(function () {
      $(this).css({'border' : '2px solid #ccc'});
    }, function () {
      var cssObj = {
        'border-color' : '#fff'
      }
      $(this).css(cssObj);
    });
    $("div.layoutPhotos dl.album").hover(function () {
      $(this).css({'background' : '#ddd'});
    }, function () {
      var cssObj = {
        'background' : '#eee'
      }
      $(this).css(cssObj);
    });
  }
  else if(browser=="Opera"){
    //if the browser is Opera
  }else if(msiVersion[1]=="8.0"){
    //if the browser is mostly useless, do the following code
    $('div#wrapper').corner('round 20px');
    $('div#main-body_threeCol div#content').corner('keep round 15px cc:#252935');
    $('div.layoutPhotos dl').corner('10px');
    $("div.layoutPhotos dl.photos dt.image img").hover(function () {
      $(this).css({'border' : '2px solid #ccc'});
    }, function () {
      var cssObj = {
        'border-color' : '#fff'
      }
      $(this).css(cssObj);
    });
    $("div.layoutPhotos dl.album").hover(function () {
      $(this).css({'background' : '#ddd'});
    }, function () {
      var cssObj = {
        'background' : '#eee'
      }
      $(this).css(cssObj);
    });

  }else{
    //else, if the browser is useless, do the following (which isn't much because
    //Internet Explorer is a stupidly unsophisticated browser and has unbelievably limited potential)
    DD_roundies.addRule('div#wrapper', '20px');
    //$('div#wrapper').corner('round top 20px');
    //$('div#wrapper').corner('round bottom 20px cc:#ffffff');
    DD_roundies.addRule('div#main-body_threeCol div#content', '15px');
    //$('div#main-body_threeCol div#content').corner('15px cc:#252935');
    //$('div#contentBtmCorn').corner('bottom cc:#252935');
  }
});