/**
* Steuerscript fuer http://www.stadtwerke-leinefelde.de/
*
* <i-D> internet & Design GmbH & Co. KG
* Erfurter Str. 35
* 99423 Weimar
* Deutschland
* Fon:     03643 7785 0
* Fax:     03643 7785 29
* E-Mail:  office@i-d.de
* Web:     http://www.i.d.de/
*
* @author Niels Bobogk <niels@i-d.de>
* @copy 2009 <i-D> internet & Design GmbH & Co. KG
*/ 

iD.loadModule('iD.DropDown');
iD.loadModule('iD.Toolbox');

iD.loadCss('/css/script-only.css');

/**
* Startprozedur; erzeugt alle erforderlichen Controls
*/
SWL = {
	// sammelt alle dropdowns der Seite
	DropDowns: [],
	
	/**
	* Initialisierung der einzelnen Controls
	*/
	init: function() {
	
		// Dropdowns		
		$$('select.iD_DropDown').each( function(elem) {
			SWL.DropDowns.push(new iD.DropDown(elem));
		});

		// Suchbox
		iD.Toolbox.searchBox($('txtSearch'));
		
		// ggf. CollapsePanels
		this.colPans = $$('.iD_CollapsePanel');
		if (this.colPans.length > 0) {
			iD.loadModule('iD.CollapsePanel');
			
			for (var i = 0; i < this.colPans.length; i++) {
				this.colPans[i] = new iD.CollapsePanel(this.colPans[i]);	
			}	
		}
	}
}

document.observe("dom:loaded", SWL.init);


