/**
 * Wies & Hertzog
 * 
 * @version: 1.0 (30.12.2009)
 *
 * @author: tha infamous Kemar
 *
 */

(function(){
	$(document).ready(function() {
		$('h2.toggle').toggleItems();
	});
})();


/**
 * toggleItems
 */
jQuery.fn.toggleItems = function() {
	if (this.length) {
		var h2s = $(this);
		h2s
			.wrapInner('<a href="#"></a>')
			.css({'cursor': 'pointer'})
			.next('div').hide().end()
			.each(function(i) {
				$(this).click(function(ev){
					$(this).toggleClass('toggle-down').next('div').toggle('fast');
					ev.preventDefault();
				});
			});
	};
	return this;
}

