// Placeholder script
jQuery.fn.textPlaceholder=function(){return this.each(function(){var that=this;if(that.placeholder&&'placeholder'in document.createElement(that.tagName))return;var placeholder=that.getAttribute('placeholder');var input=jQuery(that);if(that.value===''||that.value==placeholder){input.addClass('text-placeholder');that.value=placeholder;}input.focus(function(){if(input.hasClass('text-placeholder')){this.value='';input.removeClass('text-placeholder')}});input.blur(function(){if(this.value===''){input.addClass('text-placeholder');this.value=placeholder;}else{input.removeClass('text-placeholder');}});that.form&&jQuery(that.form).submit(function(){if(input.hasClass('text-placeholder')){that.value='';}});});};

// Random little tweaks
jQuery("#menu-top > li > a:last").addClass("noborder");jQuery("#menu-bottom > li:last").addClass("noborder");jQuery("#menu-bottom > li:first").addClass("nopad");jQuery("blockquote p:last-child").addClass("nopad");jQuery(document).ready(function($){$("[placeholder]").textPlaceholder();$(".toggle_container").hide();$("h3.trigger").click(function(){$(this).toggleClass("active").next().slideToggle(50);return false;});$('.block > br').remove();$('.box > br').remove();});

 // Equal heights in rows (samples, two column posts)
$(window).load(function() {
var currentTallest = 0,
     currentRowStart = 0,
     rowDivs = new Array(),
     $el,
     topPosition = 0;

 $('.equal').each(function() {

   $el = $(this);
   topPostion = $el.position().top;

   if (currentRowStart != topPostion) {

     // we just came to a new row.  Set all the heights on the completed row
     for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) {
       rowDivs[currentDiv].height(currentTallest);
     }

     // set the variables for the new row
     rowDivs.length = 0; // empty the array
     currentRowStart = topPostion;
     currentTallest = $el.height();
     rowDivs.push($el);

   } else {

     // another div on the current row.  Add it to the list and check if it's taller
     rowDivs.push($el);
     currentTallest = (currentTallest < $el.height()) ? ($el.height()) : (currentTallest);

  }

  // do the last row
   for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) {
     rowDivs[currentDiv].height(currentTallest);
   }

 });});
