
jQuery(function () {
  jQuery(window).load(function () {
    jQuery('input.autofocus:first, textarea.autofocus:first').focus();
  });
})




$(document).ready(function() {
  $('.with-bubble').each(function() {
     var msg = $(this).attr('title');
     if (msg != null && msg != '') {
       $(this).qtip({
          content: $(this).attr('title'), // Set the tooltip content to the current corner
          position: {
             corner: {
                tooltip: 'topRight', // Use the corner...
                target: 'bottomMiddle' // ...and opposite corner
             }
          },
          show: {
             when: false, // Don't specify a show event
             ready: true // Show the tooltip when ready
          },
          hide: false, // Don't specify a hide event
          style: {
             border: {
                width: 5,
                radius: 5
             },
             padding: 5, 
             textAlign: 'center',
             tip: true, // Give it a speech bubble tip with automatic corner detection
             name: 'cream' // Style it according to the preset 'cream' style
          }
       });
     }
  });
});

$(document).ready(function(){jQuery('input:text, textarea').hint()});
