$(document).ready(function(){

// aidewidget add class
/*var aide = window.setInterval(function() {
  
  if ($('#aidewidget li')[0]) {
    var maxValue = parseFloat($('#aidewidget li:first a.PostRank').text());
    $('#aidewidget li').each(function(index) {
      var value = parseFloat($('a.PostRank', this).text());
      if (value >= maxValue) $(this).addClass('first');
      if (value >= (maxValue/2) && value < maxValue) $(this).addClass('middle');
      if (value >= 0 && value < (maxValue/2)) $(this).addClass('last');
      //$('.aideRSS-story', this).append(" ("+value+")");
    });
    window.clearInterval(aide);
  }
  
}, 200); */

// search input
$('input[type=text],textarea').focus(function() {
  $(this).attr('bgcolor', $(this).css('background-color')).css('background-color', '#fffcb9');
}).blur(function() {
  $(this).css('background-color', $(this).attr('bgcolor'));
});

var A=$("form").each(function(){$(this).bind("submit",function(C){var B=false;$(this).find("dl.required").each(function(){var F=$(this).find("input")[0];var E=$(this).find("textarea")[0];var D=$(this).find("select")[0];if((F&&F.value=="")||(E&&E.value=="")||(D&&D.options[D.selectedIndex].value=="")){$(this).addClass("error");if(!$(this).find("error")[0]){/*$("<dd></dd>").addClass("error").text("This field is required!.").prependTo(this)*/}B=true}else{$(this).removeClass("error")}});if(B){return false}})})});