english/libraries/joomla/html/html/behavior.php
/**
	 * Add unobtrusive javascript support for submenu switcher support in
	 * Global Configuration and System Information.
	 *
	 * @return  void
	 * @since   11.1
	 */
Add unobtrusive javascript support for submenu switcher support in
Global Configuration and System Information.


Add unobtrusive javascript support for submenu switcher support in Global Configuration and System Information .
public static function switcher()
	{
		static $loaded = false;
		if ($loaded) {
			return;
		}
		self::framework();
		$uncompressed = JFactory::getConfig()->get('debug') ? '-uncompressed' : '';
		JHtml::_('script', 'system/switcher'.$uncompressed.'.js', true, true);
		$script = "
			document.switcher = null;
			window.addEvent('domready', function(){
				toggler = document.id('submenu');
				element = document.id('config-document');
				if (element) {
					document.switcher = new JSwitcher(toggler, element, {cookieName: toggler.getProperty('class')});
				}
			});";
		JFactory::getDocument()->addScriptDeclaration($script);
		$loaded = true;
	}
public static function switcher ( ) { static $ loaded = false ; if ( $ loaded ) { return ; } self :: framework ( ) ; $ uncompressed = JFactory :: getConfig ( ) -> get ( 'debug' ) ? '-uncompressed' : '' ; JHtml :: _ ( 'script' , 'system/switcher' . $ uncompressed . '.js' , true , true ) ; $ script = " 
			document.switcher = null;
			window.addEvent('domready', function(){
				toggler = document.id('submenu');
				element = document.id('config-document');
				if (element) {
					document.switcher = new JSwitcher(toggler, element, {cookieName: toggler.getProperty('class')});
				}
			}); " ; JFactory :: getDocument ( ) -> addScriptDeclaration ( $ script ) ; $ loaded = true ; }
Add unobtrusive javascript support for submenu switcher support in
 Global Configuration and System Information.
Add unobtrusive javascript support for submenu switcher support in Global Configuration and System Information .
// Only load once // Include MooTools framework