(function ($) {
  Drupal.behaviors.manipulateFormElements = {
    attach: function(context, settings) {
    // give the login form some love
    $('#user-login-form .login-submit-link').click(function(){
    	$('#user-login-form').submit();
    	return false;
    });
    }
  };
  Drupal.behaviors.correctActiveTrails = {
    attach: function(context, settings) {
      // fix menus that don't respect active trail because drupal links are stoopid
    $('#region-menu ul li.active').parents('li').addClass('active-trail');
    }
  };
})(jQuery);
;

// Checks the browser and adds classes to the body to reflect it.

(
function ($)
{

$.browserDetect  =
  { userAgent:	navigator.userAgent.toLowerCase()
  , type:	'unknown'
  , n_version:	''
  , getParts:	function (type, name, no_version)
    {
      var ind = $.browserDetect.userAgent.indexOf(name)
	, len = name.length
	;
      $.browserDetect.type	= type;

      if (!no_version)
      {
	$.browserDetect.n_version  = 
		      $.browserDetect.userAgent.substring(ind + len);

	$.browserDetect.n_version =
			      $.browserDetect.n_version.substring(0,1);
      }
    }
  , detector: function ()
    {
      if ($.browserDetect.type)
      {
	$('body').addClass($.browserDetect.type);

	if ($.browserDetect.n_version)
	{
	  $('body').addClass('' + $.browserDetect.type +
				  $.browserDetect.n_version);
	}
      }
    }
  };

// jQuery browser tests currently exclude chrome
//
$.browser.chrome = /chrome/.test(navigator.userAgent.toLowerCase()); 

if ($.browser.msie) // Is this a version of IE?
{
  $.browserDetect.getParts('browserIE', 'msie ');
}
else if ($.browser.chrome) // Is this a version of Chrome?
{
  $.browserDetect.getParts('browserChrome', 'chrome/');

  // If it is chrome then jQuery might think it's safari so we have to
  // tell jQuery that it isn't
  //
  $.browser.safari = false;
}
else if ($.browser.safari) // Is this a version of Safari?
{
  $.browserDetect.getParts('browserSafari', 'version/');
}
else if ($.browser.mozilla) // Is this a version of Mozilla?
{
  // Is it Firefox?
  //
  if (navigator.userAgent.toLowerCase().indexOf('firefox') != -1)
  {
    $.browserDetect.getParts('browserFirefox', 'firefox/');
  }
  else // If not then it must be another Mozilla
  {
    $.browserDetect.getParts('browserMozilla', '', true);
  }
}
if ($.browser.opera) // Is this a version of Opera?
{
  $.browserDetect.getParts('browserOpera', '', true);
}

$(document).ready($.browserDetect.detector);

}
)(jQuery);
;
// $Id: ruxisa.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.ZoomUp = 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.
  */
  var imgpopup	= { autoOpen: false
		  , show:     'blind'
		  , width:    480
		  , modal:    true
		  , hide:     'explode'
		  , closeText:''
		  , top:      10
		  , left:     400
		  }
    ;

  /*  
  ** module state:
  */
  var built = { }
    ;

  /*  
  ** 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.ZoomUp.translations[]

      /*
      ** public method Ticode.ZoomUp.popZU() -- Method setus up jquery 
      **                                          dialog imageing.
      */
    , popZU: function ()
      {
	var a	  = $(this)
	  , link  = null
	  ;
	link  = $(a).attr('href');

	if (!built[link])
	{
	  var box = $('<div />')
	    , ac  = $('<a />')
	    , img = $('<img />')
	    ;
	  $(img)  .attr('src', link);
	  $(ac)	  .append(img);
	  $(box)  .append(ac);
	  $(box)  .dialog(imgpopup);

	  var popup = function ()
	      {
		$(box).dialog('open');

		return false;
	      }
	    , closer = function ()
	      {
		$(box).dialog('close');

		return false;
	      }
	    ;
	  $(this) .click(popup);
	  $(ac)	  .click(closer);

	  built[link] = 1;
	}
      }
    };
      /*
      ** 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.zoomup =
{
  attach: function(context, settings)
  {
    // first we init the hs and then create other attached behaviors
    //
    $('a.zoomup', context)	.once('zoomup-prep', Ticode.ZoomUp.popZU);
  }
};

}
)(jQuery);
;
// $Id: enright.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.Enright960 = 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.Enright960.translations[]

      /*
      ** public method Ticode.Enright960.image_fix() -
      **
      **      Fixing align on images.  The attribute align is being
      **      overriden by reset.css.  This is not terribly bad, but
      **      some browsers are not working correctly and we need to
      **      provide some fix for them (IE7).
      */
    , image_fix: function ( )
      {
	$('img[align="right"]').addClass('right-align');
	$('img[align="left"]').addClass('left-align');
      }

    };
      /*
      ** 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.Enright960 =
{
  attach: function(context, settings)
  {
    // first we init the hs and then create other attached behaviors
    //
    $('body', context)
		    .once('enright', Ticode.Enright960.image_fix);
  }
};

}
)(jQuery);
;

