$(document).ready(function(){
  
  if(!($.browser.msie && $.browser.version < 7))
  {
    $('.round_white').each(function(){
      var hold = $(this);
      hold.mousedown(function(){ $(this).addClass('pressed'); });
      $('body').mouseup(function(){ hold.removeClass('pressed'); });
    });
  }
  
//  $('#header .sign_in .button').click(function(e){
//    e.preventDefault();
//    $(this).siblings('.overlay').add(this).toggleClass('active');
//  });
  
  if($.fn.customInput)
    $('input[type=checkbox], input[type=radio]').customInput();
    
  if($.fn.customSelect)
    $('select').customSelect();
    
  if($.fn.placeholder)
    $('input[type=text][data-placeholder], textarea[data-placeholder]').placeholder({ attr: "data-placeholder", className : "placeholded", blankSubmit: true });
    
  $('.time_input').each(function(){
    $(this)
      .click(function(){ $(this).toggleClass('active'); })
      .find('.overlay').click(function(e){ e.preventDefault(); e.stopPropagation(); });
  });
  
  if($.fn.autoResize)
    $('.textarea textarea').autoResize();
    
  if($.fn.tooltip)
    $('.tooltip').tooltip();
});
