﻿$(document).ready(function() {

$("div#cuFtFour p:last").css({border: 'none'});

$("div#announcements p:last").css({border: 'none'});




//accordion
  $(".accordion_body").hide();
  $(".first_accordion_body").show();
  //slides the element with class "accordion_body" when paragraph with class "accordion_header" is clicked
  $("div.accordion_header").click(function() {

    $(this).toggleClass('active');
    $(this).next("div.accordion_body").slideToggle("normal").siblings("div.accordion_body").slideUp("normal");
    $(this).siblings("div.accordion_header").removeClass("active");
    });
    



//Table Zebra Striping
      var rowIndex = 0
      $('.tablegrid tbody tr').each(function(index) {
      if ($('th',this).length) {
       $(this).addClass('subhead')
            rowIndex = -1
      } else {
      if (rowIndex % 2 < 1) {//these were adding classes each time tables were edited, so adding clean up before adding classes 
            $(this).removeClass('odd').removeClass('even').addClass('even')
       }
      else {
      $(this).removeClass('odd').removeClass('even').addClass('odd')
       }
      }
      rowIndex++
      })


});


// Strip leading and trailing white-space
String.prototype.trim = function() { return this.replace(/^\s*|\s*$/g, ''); }
 
// Check if string is empty
String.prototype.empty = function() {
    if (this.length == 0)
        return true;
    else if (this.length > 0)
        return /^\s*$/.test(this);
}
 
// Breaks cookie into an object of keypair cookie values
function crumbleCookie(c)
{
    var cookie_array = document.cookie.split(';');
    var keyvaluepair = {};
    for (var cookie = 0; cookie < cookie_array.length; cookie++)
    {
        var key = cookie_array[cookie].substring(0, cookie_array[cookie].indexOf('=')).trim();
        var value = cookie_array[cookie].substring(cookie_array[cookie].indexOf('=')+1, cookie_array[cookie].length).trim();
        keyvaluepair[key] = value;
    }
 
    if (c)
        return keyvaluepair[c] ? keyvaluepair[c] : null;
 
    return keyvaluepair;
}

// JavaScript Document

var ut_r1=Math.floor(Math.random()*9999999);
//alert(ut_r1);
document.write("<img src='http://ads.undertone.com/f?pid=5423&cb="+ut_r1+"' alt='' style='display:none;' border='0' height='1' width='1' />");  



 

