$(document).ready(function() {

jQuery.fn.extend({
  slideRight: function() {
    return this.each(function() {
      jQuery(this).animate({width: 'show'});
    });
  },
  slideLeft: function() {
    return this.each(function() {
      jQuery(this).animate({width: 'hide'});
    });
  },
  slideToggleWidth: function() {
    return this.each(function() {
      var el = jQuery(this);
      if (el.css('display') == 'none') {
        el.slideRight();
      } else {
        el.slideLeft();
      }
    });
  }
});  

  // CLOSE MESSAGE
  $("#sClose").click(function () {
    $("#minner").slideToggle(400);
    return false;
  });  

  // INPUT SELECT
  document.getElementById('inputone').focus();
  $('#buttonone').click(function() {
    $('#inputone').focus();
    return false;
  });
  $('#buttonthree').click(function() {
    $('#inputtwo').focus();
    return false;
  });
  $('#buttonfour').click(function() {
    $('#inputfour').focus();
    return false;
  });
  $('#buttonfive').click(function() {
    $('#inputthree').focus();
    return false;
  });
  $('#buttonshout').click(function() {
    $('#inputfive').focus();
    return false;
  });

  // SHOUT FUNCTIONS
  $('#clooseS').click(function () {
    $('#shoutbox').slideToggleWidth();
    $('#clooseS').fadeOut("fast");
    $('#OopenS').fadeIn("fast");
  });

  $('#OopenS').click(function () {
    $('#shoutbox').slideToggleWidth();
    $('#clooseS').fadeIn("fast");
    $('#OopenS').fadeOut("fast");
  });

});
