Drupal.locale = { 'pluralFormula': function ($n) { return Number(($n!=1)); }, 'strings': {"An AJAX HTTP error occurred.":"Hubo un error HTTP AJAX.","HTTP Result Code: !status":"C\u00f3digo de Resultado HTTP: !status","An AJAX HTTP request terminated abnormally.":"Una solicitud HTTP de AJAX termin\u00f3 de manera anormal.","Debugging information follows.":"A continuaci\u00f3n se detalla la informaci\u00f3n de depuraci\u00f3n.","Path: !uri":"Ruta: !uri","StatusText: !statusText":"StatusText: !statusText","ResponseText: !responseText":"ResponseText: !responseText","ReadyState: !readyState":"ReadyState: !readyState","Loading":"Cargando","(active tab)":"(solapa activa)","Hide":"Ocultar","Show":"Mostrar","@title dialog":"Di\u00e1logo @title","Configure":"Configurar","Show shortcuts":"Mostrar atajos","Hide shortcuts":"Ocultar atajos","This permission is inherited from the authenticated user role.":"Este permiso se hereda del rol de usuario registrado.","Re-order rows by numerical weight instead of dragging.":"Reordenar las filas por peso num\u00e9rico en lugar de arrastrar.","Show row weights":"Mostrar pesos de la fila","Hide row weights":"Ocultar pesos de la fila","Drag to re-order":"Arrastre para reordenar","Changes made in this table will not be saved until the form is submitted.":"Los cambios realizados en esta tabla no se guardar\u00e1n hasta que se env\u00ede el formulario","Enabled":"Activado","Disabled":"Desactivado","Split summary at cursor":"Dividir el sumario en el cursor","Join summary":"Unir sumario","Insert Teaser Break":"Insertar Marca de Separaci\u00f3n","Insert Page Break":"Insertar Salto de P\u00e1gina","The document already contains a teaser break. Do you want to proceed by removing it first?":"El documento ya contiene una marca de separaci\u00f3n. \u00bfQuiere eliminarla?","Error !msg":"Error !msg","Error on retrieving data from module.":"Error recuperando la informaci\u00f3n del m\u00f3dulo","Embed Media Dialog":"Di\u00e1logo de incrustaci\u00f3n multimedia","Embed media code":"Incrustar c\u00f3digo multimedia","Paste embed code here":"Pegue el c\u00f3digo incrustado aqu\u00ed","Edit":"Editar","Upload":"Subir","Done":"Hecho","Select all rows in this table":"Seleccionar todas las filas de esta tabla","Deselect all rows in this table":"Quitar la selecci\u00f3n a todas las filas de esta tabla","Not published":"No publicado","Please wait...":"Espere, por favor...","Only files with the following extensions are allowed: %files-allowed.":"S\u00f3lo se permiten archivos con las siguientes extensiones: %files-allowed.","By @name on @date":"Por @name en @date","By @name":"Por @name","Not in menu":"No est\u00e1 en un men\u00fa","Alias: @alias":"Alias: @alias","No alias":"Sin alias","New revision":"Revisi\u00f3n nueva","The changes to these blocks will not be saved until the \u003cem\u003eSave blocks\u003c\/em\u003e button is clicked.":"Los cambios sobre estos bloques no se guardar\u00e1n hasta que no pulse el bot\u00f3n \u003cem\u003eGuardar bloques\u003c\/em\u003e.","No revision":"Sin revisi\u00f3n","@number comments per page":"@number comentarios por p\u00e1gina","Requires a title":"Necesita un t\u00edtulo","Not restricted":"Sin restricci\u00f3n","Not customizable":"No personalizable","Restricted to certain pages":"Restringido a algunas p\u00e1ginas","The block cannot be placed in this region.":"El bloque no se puede colocar en esta regi\u00f3n.","Customize dashboard":"Personalizar panel de control","Hide summary":"Ocultar resumen","Edit summary":"Editar resumen","Don't display post information":"No mostrar informaci\u00f3n del env\u00edo","Searching for matches...":"Buscando coincidencias"} };;
// $Id: jquery_madness.js $
/*
** we're using the jQuery based javascript, but our design pattern will be
** the Yui object paradigm which is much better at stability and 
** expandability.
*/
var Ticode = (("undefined" == typeof Ticode) || (!Ticode)) ? {} : Ticode;

(
function ($)
{

Ticode.JqueryMadness = function ()
{
  /*  
  ******************************************************************
  ** private variables available only to methods of the module.
  */

  /*  
  ** private shorthand variables to comon jQuery parts/utilities
  */

  /*  
  ** private shorthand variable for built jQuery objects. set in init()
  */

  /*  
  ** constants used in this module.
  */

  /*  
  ** module state:
  */

  /*  
  ** these are Dom refrences that won't change, they are set by direct
  ** calls when needed, and then used freely after that.
  */

  /*  
  ** ******************************************************************
  ** private methods available only to other methods of the module.
  */

  var that =
    /*
    ** publicly accessible variables where we store AJAX results by
    ** evaluating valid js pointing to these arrays.
    */
    { translations: [] // Ticode.JqueryMadness.translations[]

      /*
      ** public method Ticode.JqueryMadness.move() -- Method moves the 
      **					      themeroller path base
      **  to a more appropriate place in the layout.
      */
    , move: function ()
      {
	var before  = $(  'form#jquery_madness_admin_form '
			+ 'input#edit-tr-alt-path')
	  , obj	= $(this)
	  ;
	$(obj)	  .remove();
	$(before) .before(obj);
      }
    };
      /*
      ** for finding .attr('style', 'background:#ee9933');
      */
	//attr('style', 'background:#ee9933');

  return that;

}(); // the parens here cause the anonymous func to execute and return

Drupal.behaviors.jquery_madness = 
{
  attach: function (context, settings)
  {
    $('form#jquery_madness_admin_form b#tr_path_txt', context)
    
      .once('jquery_madness', Ticode.JqueryMadness.move);
  }
};

}
)(jQuery);
;
/*
** we're using the jQuery based javascript, but our design pattern will be
** the Yui object paradigm which is much better at stability and 
** expandability.
*/
var Ticode = (("undefined" == typeof Ticode) || (!Ticode)) ? {} : Ticode;

(
function ($)
{

/**
*
*  Javascript sprintf
*  http://www.webtoolkit.info/
*
*
**/
Ticode.sprintfWrapper =
{
    
  gexp:
    new RegExp(/(%([%]|(\-)?(\+|\x20)?(0)?(\d+)?(\.(\d)?)?([bcdfosxX])))/g)

, init : function ()
  {
    if (typeof arguments == "undefined")  { return null; }
    if (1 > arguments.length)		  { return null; }
    if (typeof arguments[0] != "string")  { return null; }
    if (typeof RegExp == "undefined")	  { return null; }

    var exp		= Ticode.sprintfWrapper.gexp
      , convert		= Ticode.sprintfWrapper.convert
      , string		= arguments[0]
      , matches		= new Array()
      , strings		= new Array()
      , convCount	= 0
      , stringPosStart	= 0
      , stringPosEnd	= 0
      , matchPosEnd	= 0
      , newString	= ''
      , match		= null
      , neg		= false
      , arg		= ''
      , code		= null
      , i		= null
      ;
    while (match = exp.exec(string))
    {
      if (match[9]) { convCount += 1; }

      stringPosStart	      = matchPosEnd;
      stringPosEnd	      = exp.lastIndex - match[0].length;
      strings[strings.length] = string.substring( stringPosStart,
						  stringPosEnd);
      neg = (0 > parseInt(arguments[convCount])) ? true : false;
      arg = String(arguments[convCount])


      matchPosEnd	      = exp.lastIndex;
      matches[matches.length] = { match:      match[0]
				, left:	      match[3] ? true : false
				, sign:	      match[4] || ''
				, pad:	      match[5] || ' '
				, min:	      match[6] || 0
				, precision:  match[8]
				, code:	      match[9] || '%'
				, negative:   neg
				, argument:   arg
				};
    }
    strings[strings.length] = string.substring(matchPosEnd);

    if (matches.length == 0)		    { return string;  }
    if (convCount > (arguments.length - 1)) { return null;    }

    match = i = null;

    for (i=0; i < matches.length; i++)
    {
      if      ('%' == matches[i].code)	{ substitution = '%' }
      else if ('b' == matches[i].code)
      {
	matches[i].argument =
	  String(Math.abs(parseInt(matches[i].argument)).toString(2));

	substitution = convert(matches[i], true);
      }
      else if ('c' == matches[i].code)
      {
	matches[i].argument =
	  String(
	    String.fromCharCode(
	      parseInt(Math.abs(parseInt(matches[i].argument)))));

	substitution = convert(matches[i], true);
      }
      else if ('d' == matches[i].code)
      {
	matches[i].argument =
	  String(Math.abs(parseInt(matches[i].argument)));

	substitution = convert(matches[i]);
      }
      else if ('f' == matches[i].code)
      {
	matches[i].argument =
	  String(
	    Math.abs(parseFloat(matches[i].argument)		    ).
	    toFixed(matches[i].precision ? matches[i].precision : 6));

	substitution = convert(matches[i]);
      }
      else if ('o' == matches[i].code)
      {
	matches[i].argument =
	  String(Math.abs(parseInt(matches[i].argument)).toString(8));

	substitution = convert(matches[i]);
      }
      else if ('s' == matches[i].code)
      {
	matches[i].argument =
	  matches[i].argument.
	    substring(0,
		      matches[i].precision ?
		      matches[i].precision : matches[i].argument.length);

	substitution = convert(matches[i], true);
      }
      else if ('x' == matches[i].code)
      {
	matches[i].argument =
	  String(Math.abs(parseInt(matches[i].argument)).toString(16));

	substitution = convert(matches[i]);
      }
      else if ('X' == matches[i].code)
      {
	matches[i].argument =
	  String(Math.abs(parseInt(matches[i].argument)).toString(16));
	  
	substitution = convert(matches[i]).toUpperCase();
      }
      else
      {
	substitution = matches[i].match;
      }
      newString += strings[i];
      newString += substitution;
    }
    newString += strings[i];

    return newString;
  }
  
, convert : function (match, nosign)
  {
    if (nosign) { match.sign = '';				  }
    else	{ match.sign = match.negative ? '-' : match.sign; }

    var l = match.min - match.argument.length + 1 - match.sign.length
      ;
    var pad = new Array((l < 0) ? 0 : l).join(match.pad)
      ;
    if (!match.left)
    {
      if (match.pad == '0' || nosign)
      {
	return match.sign + pad + match.argument;
      }
      else
      {
	return pad + match.sign + match.argument;
      }
    }
    else
    {
      if (match.pad == '0' || nosign)
      {
	return match.sign + match.argument + pad.replace(/0/g, ' ');
      }
      else
      {
	return match.sign + match.argument + pad;
      }
    }
  }
}

Ticode.System = function ()
{
  /*  
  ******************************************************************
  ** private variables available only to methods of the module.
  */
  var c_do  = false
    , w_do  = false
    , p_do  = false
    , s_do  = false
    , g_do  = false
    , dtop  = null
    ;
  /*  
  ** private shorthand variables to comon YUI/Prototype parts/utilities
  */

  /*  
  ** private shorthand variable for built YUI objects. set in init()
  */
  
  /*  
  ** constants used in this module.
  */

  /*  
  ** module state:
  */
  var once  = false
    , id    = 0
    ;
  /*  
  ** these are Dom refrences that won't change, they are set by direct
  ** calls when needed, and then used freely after that.
  */
  var chalkboard  = null
    ;

  /*  
  ** ******************************************************************
  ** private methods available only to other methods of the module.
  */

  /*
  ** generic page based event handler
  */
  var event_handler = function (ev)
  {
    var el  = null
      , val = 0
      , whc = 0;

    if ((!ev) || (!(el = ev.target)))
    {
      return;
    }
    el = $(el);

    while (el != dtop)
    {
      $('#debug').append('<h1>val = ' + val + ', id: ' + el[0]['id']
                        + '</h1><h2>"Graphics" for id = '
                        + '</h2><h2>"DIV" for tag Name = '
                        + ('DIV' == el[0]['tagName'])
                        + '</h2><h2>el.hasClass() = '
                        + el.hasClass('clickable') + '</h2><ul>'
                        + '<li>tagName: ' + el[0]['tagName'] + '</li>'
                        + '</ul>');
      /*
      ** handle click's
      */
      if (!el)
      {
        break;
      }
      if ('click' == ev.type)
      {
        if (('DIV' == el[0]['tagName']) && (el.hasClass('clickable')))
        {
          if ('clickhere' == el[0]['id'])
          {
            if (c_do)
            {
              $('#debug').append('<h4>here hiding</h4>');
              $('#show, #boxes, #grow1').hide('slow');
            }
            else
            {
              $('#debug').append('<h4>here showing</h4>');
              $('#show, #boxes, #grow1').show('slow');
            }
            c_do = !c_do
            break;
          }
          if (('Graphics'     == el[0]['id']) ||
              ('Web-Design'   == el[0]['id']) ||
              ('Programming'  == el[0]['id']) ||
              ('SEO'          == el[0]['id']))
          {
            $('#grow2, #grow3, #grow4, #grow5').hide('slow');

            if ('Graphics' == el[0]['id'])
            {
              whc = 'g_do';

              if (!(val = g_do))
              {
                $('#grow2').show('slow');
              }
            }
            else if ('Web-Design' == el[0]['id'])
            {
              whc = 'w_do';

              if (!(val = w_do))
              {
                $('#grow3').show('slow');
              }
            }
            else if ('Programming' == el[0]['id'])
            {
              whc = 'p_do';

              if (!(val = p_do))
              {
                $('#grow4').show('slow');
              }
            }
            else
            {
              whc = 's_do';

              if (!(val = s_do))
              {
                $('#grow5').show('slow');
              }
            }
            g_do = w_do = p_do = s_do = false;

            eval(whc + '  = !val');
            break;
          }
        }
      }
      else if ('change' == ev.type)
      {
      }
      else if ('keyup' == ev.type)
      {
      }
      val++;

      el = $(el).parent();
      if ((!(val % 10)) && (confirm('quit')))
      {
        break;
      }
    }
  };

  var that =
    /*
    ** publicly accessible variables where we store AJAX results by
    ** evaluating valid js pointing to these arrays.
    */
    { translations: [] // Ticode.System.translations[]

      /*
      ** Public Ticode.System.erudiate() -- Erudiate means to instruct or
      **				    teach us.  Here we mean teaching
      **    us about the contents of some obscure object in an easy to use
      **    jQuery dialog.  This function builds the dialog, or resets it.
      **
      **  @param  mixed	  obj	- The object to display.
      **  @param  string  name	- The name of the object we will display.
      **  @return null
      **  @side-effect	- Opens a dialog filled with information about the
      **		  object item.
      */
    , erudiate:	function (obj, name)
      {
	var content = null
	  ;
	if (!chalkboard) // Ticode object private scope item.
	{
	  chalkboard = $('<div id="tic_sys_chalkboard"></div>');

	  $(document).append(chalkboard);
	  $(chalkboard).dialog( { autoOpen: false 
				, modal:    true 
				, width:    539 
				, height:   254 
				});
	}
	content = that.imbue(obj, name);

	$(chalkboard).html(content.html());
	$(chalkboard).dialog('open');
      }

      /*
      ** Public Ticode.System.imbue() - Imbue is another word for 'to teach'
      **				or 'instuct'.  In this case we mean
      **    to show us the contents of some obscure object in an html layout
      **    that we ajaxify to expand on sub items by click.
      **
      **  @param  mixed	  obj	- The object to display.
      **  @param  string  name	- The name of the object we will display.
      **  @return object	- The jQuery HTML object for display.
      */
    , imbue:  function (obj, name)
      {
	var fieldset  = null
	  , legend    = null
	  , div	      = null
	  , index     = null
	  , item      = null
	  , ul	      = null
	  , part      = null
	  , d_id      = 'tic_sys-d-' + id
	  , click     = null
	  , b_id      = null
	  , expand    = null
	  ;
	click = function ()
	{
	  $('#' + d_id).toggle();
	};
	id++;

	fieldset  = $('<fieldset></fieldset>');
	legend	  = $('<legend>' + name + '</legend>');
	div	  = $('<div id="' + d_id + '"></div>');

	// Interior contents

	ul = $('<ul>' + (typeof obj) + ' contents:<br /></ul>');

	if (('object' == typeof obj) || ('array' == typeof obj))
	{
	  for (index in obj)
	  {
	    item = obj[index];

	    if (undefined == item)
	    {
	      part = $('<li><b>.' + index + '</b> = undefined</li>');
	    }
	    else if ('integer' == typeof item)
	    {
	      part = $('<li><b>.' + index + '</b> = ' + item + '</li>');
	    }
	    else if ('string' == typeof item)
	    {
	      part = $('<li><b>.' + index + '</b> = "' + item + '"</li>');
	    }
	    else if ('array' == typeof item)
	    {
	      b_id    = 'tic_sys-b-' + id;
	      expand  = function ()
	      {
		var content = that.imbue(item, index)
		  ;
		$('#' + b_id).parent().html(content);
	      };
	      id++;
	      part = $(	'<li><b id="' + b_id + '">.' + index +
			'</b> (array click to expand)</li>');

	      $('#:not(.ticode_system-processed)').click(expand).
		      addClass('ticode_system-processed');
	    }
	    else if ('object' == typeof item)
	    {
	      if (('nextSibling'    != index) && ('document'	!= index) &&
		  ('parentElement'  != index) && ('namespaces'	!= index) &&
		  ('parentTextEdit' != index) && ('ownerElement'!= index) &&
		  ('ownerDocument'  != index) && ('offsetParent'!= index) &&
		  ('previousSibling'!= index) && ('parentNode'	!= index))
	      {
		b_id    = 'tic_sys-b-' + id;
		expand  = function ()
		{
		  var content = that.imbue(item, index)
		    ;
		  $('#' + b_id).parent().html(content);
		};
		id++;
		part = $(	'<li><b id="' + b_id + '">.' + index +
			  '</b> (object click to expand)</li>');

		$('#:not(.ticode_system-processed)').click(expand).
			addClass('ticode_system-processed');
	      }
	    }
	    else 
	    {
	      part = $(	'<li><b>.' + index +
			'</b> item type of [' + (typeof item) +
			'] is not explicitly handled by function ' +
			'Ticode.System.imbue</li>');
	    }
	    $(ul).append(part);
	  }
	}
	else if ('integer' == typeof obj)
	{
	  $(ul).append('<em>' + obj + '</em>');
	}
	else if ('string' == typeof obj)
	{
	  $(ul).append('<i>"' + obj + '"</i>');
	}
	div.hide();

	$(legend).filter(':not(.ticode_system-processed)').click(click).
		  addClass('ticode_system-processed');

	$(fieldset).append(legend);
	$(fieldset).append(div);

	return fieldset;
      }

      /*
      ** Public Ticode.System.imagefix() -- Makes sure the hspace and 
      **				    vspace values are taken with
      **    higher priority than reset.css stylesheet.
      **
      **  Our wysiwyg tool gives the user the power to set a spacing
      **  to an image, be either vertical or horizontal.  Problem is that
      **  drupal adds a clear.css stylesheet that will override those
      **  values.  We can set divs and classes to allow margins, but you
      **  cannot expect regular users to learn those tricks, so we need
      **  to keep basic tools for them.  This function will take those
      **  values and convert them to margin rules directly added to the
      **  tag, so they can have the top-most priority.
      */
    , imagefix:	function ()
      {
	var style   = $(this).attr('style');
	var hspace  = $(this).attr('hspace');
	var vspace  = $(this).attr('vspace');

	// We will extend the style property for the image tag (if there
	// is something).  Just make sure we have the current style value
	// or empty string as default.
	//
	if ('undefined' == typeof(style))
	{
	  style = '';
	}

	// Check if we have a manually added hspace *or* vspace to use
	// If so, add the appropiate margin to the image.
	//
	if (0 < hspace)
	{
	  style	+= ' margin-left:'+hspace+'px; margin-right:'+hspace+'px;';
	}
	if (0 < vspace)
	{
	  style	+= ' margin-top:'+vspace+'px; margin-bottom:'+vspace+'px;';
	}

	// Set the new (or modified) style to the image tag (only if there
	// is an actual change.
	//
	if ((0 < hspace) || (0 < vspace))
	{
	  $(this).attr('style', style);
	}
      }

    };
      /*
      ** for finding .attr('style', 'background:#ee9933');
      */
        //attr('style', 'background:#ee9933');

  return that;

}(); // the parens here cause the anonymous func to execute and return

Drupal.behaviors.ticode_system  = 
{
  attach: function (context, settings)
  {
    if (undefined = Ticode.System.sprintf)
    {
      Ticode.System.sprintf = Ticode.sprintfWrapper.init;
    }

    $('form#system-modules fieldset.collapsible:not(.collapsed)')
      .addClass('collapsed');

    // Add support to hspace and vspace properties set to images by
    // wysiwyg tool.
    //
    $('img', context)	  .once('ticode_system', Ticode.System.imagefix);
  }
};

}
)(jQuery);

;
(function ($) {

/**
 * Toggle the visibility of a fieldset using smooth animations.
 */
Drupal.toggleFieldset = function (fieldset) {
  var $fieldset = $(fieldset);
  if ($fieldset.is('.collapsed')) {
    var $content = $('> .fieldset-wrapper', fieldset).hide();
    $fieldset
      .removeClass('collapsed')
      .trigger({ type: 'collapsed', value: false })
      .find('> legend span.fieldset-legend-prefix').html(Drupal.t('Hide'));
    $content.slideDown({
      duration: 'fast',
      easing: 'linear',
      complete: function () {
        Drupal.collapseScrollIntoView(fieldset);
        fieldset.animating = false;
      },
      step: function () {
        // Scroll the fieldset into view.
        Drupal.collapseScrollIntoView(fieldset);
      }
    });
  }
  else {
    $fieldset.trigger({ type: 'collapsed', value: true });
    $('> .fieldset-wrapper', fieldset).slideUp('fast', function () {
      $fieldset
        .addClass('collapsed')
        .find('> legend span.fieldset-legend-prefix').html(Drupal.t('Show'));
      fieldset.animating = false;
    });
  }
};

/**
 * Scroll a given fieldset into view as much as possible.
 */
Drupal.collapseScrollIntoView = function (node) {
  var h = document.documentElement.clientHeight || document.body.clientHeight || 0;
  var offset = document.documentElement.scrollTop || document.body.scrollTop || 0;
  var posY = $(node).offset().top;
  var fudge = 55;
  if (posY + node.offsetHeight + fudge > h + offset) {
    if (node.offsetHeight > h) {
      window.scrollTo(0, posY);
    }
    else {
      window.scrollTo(0, posY + node.offsetHeight - h + fudge);
    }
  }
};

Drupal.behaviors.collapse = {
  attach: function (context, settings) {
    $('fieldset.collapsible', context).once('collapse', function () {
      var $fieldset = $(this);
      // Expand fieldset if there are errors inside, or if it contains an
      // element that is targeted by the uri fragment identifier. 
      var anchor = location.hash && location.hash != '#' ? ', ' + location.hash : '';
      if ($('.error' + anchor, $fieldset).length) {
        $fieldset.removeClass('collapsed');
      }

      var summary = $('<span class="summary"></span>');
      $fieldset.
        bind('summaryUpdated', function () {
          var text = $.trim($fieldset.drupalGetSummary());
          summary.html(text ? ' (' + text + ')' : '');
        })
        .trigger('summaryUpdated');

      // Turn the legend into a clickable link, but retain span.fieldset-legend
      // for CSS positioning.
      var $legend = $('> legend .fieldset-legend', this);

      $('<span class="fieldset-legend-prefix element-invisible"></span>')
        .append($fieldset.hasClass('collapsed') ? Drupal.t('Show') : Drupal.t('Hide'))
        .prependTo($legend)
        .after(' ');

      // .wrapInner() does not retain bound events.
      var $link = $('<a class="fieldset-title" href="#"></a>')
        .prepend($legend.contents())
        .appendTo($legend)
        .click(function () {
          var fieldset = $fieldset.get(0);
          // Don't animate multiple times.
          if (!fieldset.animating) {
            fieldset.animating = true;
            Drupal.toggleFieldset(fieldset);
          }
          return false;
        });

      $legend.append(summary);
    });
  }
};

})(jQuery);
;
//
// Note: This file depends on the jQuery library.
//

// Module pattern:
// http://yuiblog.com/blog/2007/06/12/module-pattern/
var FORMALIZE = (function($, window, document, undefined) {
	// Private constants.
	var PLACEHOLDER_SUPPORTED = 'placeholder' in document.createElement('input');
	var AUTOFOCUS_SUPPORTED = 'autofocus' in document.createElement('input');
	var WEBKIT = 'webkitAppearance' in document.createElement('select').style;
	var IE6 = !!($.browser.msie && parseInt($.browser.version, 10) === 6);
	var IE7 = !!($.browser.msie && parseInt($.browser.version, 10) === 7);

	// Expose innards of FORMALIZE.
	return {
		// FORMALIZE.go
		go: function() {
			for (var i in FORMALIZE.init) {
				FORMALIZE.init[i]();
			}
		},
		// FORMALIZE.init
		init: {
			// FORMALIZE.init.detect_webkit
			detect_webkit: function() {
				if (!WEBKIT) {
					return;
				}

				// Tweaks for Safari + Chrome.
				$('html').addClass('is_webkit');
			},
			// FORMALIZE.init.full_input_size
			full_input_size: function() {
				if (!IE7 || !$('textarea, input.input_full').length) {
					return;
				}

				// This fixes width: 100% on <textarea> and class="input_full".
				// It ensures that form elements don't go wider than container.
				$('textarea, input.input_full').wrap('<span class="input_full_wrap"></span>');
			},
			// FORMALIZE.init.ie6_skin_inputs
			ie6_skin_inputs: function() {
				// Test for Internet Explorer 6.
				if (!IE6 || !$('input, select, textarea').length) {
					// Exit if the browser is not IE6,
					// or if no form elements exist.
					return;
				}

				// For <input type="submit" />, etc.
				var button_regex = /button|submit|reset/;

				// For <input type="text" />, etc.
				var type_regex = /date|datetime|datetime-local|email|month|number|password|range|search|tel|text|time|url|week/;

				$('input').each(function() {
					var el = $(this);

					// Is it a button?
					if (this.getAttribute('type').match(button_regex)) {
						el.addClass('ie6_button');

						/* Is it disabled? */
						if (this.disabled) {
							el.addClass('ie6_button_disabled');
						}
					}
					// Or is it a textual input?
					else if (this.getAttribute('type').match(type_regex)) {
						el.addClass('ie6_input');

						/* Is it disabled? */
						if (this.disabled) {
							el.addClass('ie6_input_disabled');
						}
					}
				});

				$('textarea, select').each(function() {
					/* Is it disabled? */
					if (this.disabled) {
						$(this).addClass('ie6_input_disabled');
					}
				});
			},
			// FORMALIZE.init.autofocus
			autofocus: function() {
				if (AUTOFOCUS_SUPPORTED || !$(':input[autofocus]').length) {
					return;
				}

				$(':input[autofocus]:visible:first').focus();
			},
			// FORMALIZE.init.placeholder
			placeholder: function() {
				if (PLACEHOLDER_SUPPORTED || !$(':input[placeholder]').length) {
					// Exit if placeholder is supported natively,
					// or if page does not have any placeholder.
					return;
				}

				FORMALIZE.misc.add_placeholder();

				$(':input[placeholder]').each(function() {
					var el = $(this);
					var text = el.attr('placeholder');

					el.focus(function() {
						if (el.val() === text) {
							el.val('').removeClass('placeholder_text');
						}
					}).blur(function() {
						FORMALIZE.misc.add_placeholder();
					});

					// Prevent <form> from accidentally
					// submitting the placeholder text.
					el.closest('form').submit(function() {
						if (el.val() === text) {
							el.val('').removeClass('placeholder_text');
						}
					}).bind('reset', function() {
						setTimeout(FORMALIZE.misc.add_placeholder, 50);
					});
				});
			}
		},
		// FORMALIZE.misc
		misc: {
			// FORMALIZE.misc.add_placeholder
			add_placeholder: function() {
				if (PLACEHOLDER_SUPPORTED || !$(':input[placeholder]').length) {
					// Exit if placeholder is supported natively,
					// or if page does not have any placeholder.
					return;
				}

				$(':input[placeholder]').each(function() {
					var el = $(this);
					var text = el.attr('placeholder');

					if (!el.val() || el.val() === text) {
						el.val(text).addClass('placeholder_text');
					}
				});
			}
		}
	};
// Alias jQuery, window, document.
})(jQuery, this, this.document);

// Automatically calls all functions in FORMALIZE.init
jQuery(document).ready(function() {
	FORMALIZE.go();
});;

