if (jQuery){ (function($){ 

	var _components = {};

	// Define modules using this: $.modular( { module: function } );
	$.modular = function(what) { 
      $.extend(_components, what);
	    return this;
	};

	// Apply modules using this: $("selector").can_has().module();
	$.fn.can_has = function() {
   	$.extend(this, _components);
      return this;
	};

   /* MODULE DEFINITIONS */

   $.modular({
      subscription: function($element, event, callback){
         var $this = $(this);
         $element.bind(event, function(e){ callback.apply($this, [e]); });
         return $this;
      },

      
      /* BEGIN DROPDOWN / SELECT MENUS */
      dropdown: function(params){
         var $this = $(this),
             $h4 = $this.children("h4"),
             $ul = $this.children("ul"),
             $li = $ul.children("li")
         
         $li.hover( 
            function(){ $(this).addClass("hover") },
            function(){ $(this).removeClass("hover") }
         ).click( function(){ 
            $h4.text($(this).text()); 
            $(this).children("a:eq(0)").click(); 
         });
         
         $().click(function(e){ 
            if (e.target != $h4[0]) $ul.hide();
            else $ul.toggle(); 
         } )
      },
      /* END DROPDOWN / SELECT MENUS */
      
      /* BEGIN SELECT MODULE */
      selectmodule: function(){
         var $this = $(this),
             $selectHead = $this.find(".selectHead"),
             $header = $selectHead.children("h4"),
             $headerAnchor = $header.children("a"),
             $selectBody = $this.find(".selectBody"),
             $li = $selectBody.find("ul > li");
         
         $li.hover( 
            function(){ $(this).addClass("hover") },
            function(){ $(this).removeClass("hover") }
         )
            .bind("click.selectmodule", function(){ $headerAnchor.text($(this).text()) });
            
         $().bind("click.selectmodule", function(e){
            if ((e.target == $selectHead[0]) || (e.target == $header[0]) || (e.target == $headerAnchor[0])) {
               $selectBody.toggle();
               e.preventDefault();
               e.stopPropagation();
            }
            else $selectBody.hide();
         })
      }
      /* END SELECT MODULE */





     
	})

	/* END MODULE DEFINITIONS */
  
})(jQuery) }


/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 * 
 * Copyright (c) 2007 George Smith
 * Licensed under the MIT License:
 *   http://www.opensource.org/licenses/mit-license.php
 */
jQuery.extend( jQuery.easing,{
	easeInQuad: function (x, t, b, c, d) { return c*(t/=d)*t + b; },
	easeOutQuad: function (x, t, b, c, d) { return -c *(t/=d)*(t-2) + b; }
});




//This credit must stay intact
//Script by http://www.java-Scripts.net and http://wsabstract.com
 function doClear(theText) {
     if (theText.value == theText.defaultValue) {
         theText.value = ""
     }
 }



