$.fn.moveToTop = function()
{
  $(this).each(function(){
    var hold = $(this);
    var parent = hold.parent();
    var header = parent.find('h1, h2, h3');
    if(header.length) {
      header.eq(0).before(hold);
    } else {
      hold.prependTo(parent);
    }
  });
};

$(document).ready(function() {
  if($.fn.placeholder)
  {
    $(".placeholder").placeholder();
  }
  if($.fn.moveToTop)
  {
    $(".moveToTop").moveToTop();
  }
});
