$j(function(){
	
	// Setup font resizer
	$j('#layer-page').fontresizer({excluded: '#layer-menu-main,#layer-footer'});	
	
	// Overlabel
	$j('label.overlabel').overlabel(); 
	
	// Initialise collapsible toggle 				
	$j('a.toggle-item').click(function(){
	
		if($j(this).hasClass('collapse')) {
			$j(this).removeClass('collapse');
			$j('#'+$j(this).attr('rel')).show();
			// Toggle Hide/Show wordings
			$j('span.expand', this).hide();	
			$j('span.collapse', this).show();
		} else {
			$j(this).addClass('collapse');
			$j('#'+$j(this).attr('rel')).hide();
			// Toggle Hide/Show wordings
			$j('span.expand', this).show();	
			$j('span.collapse', this).hide();				
		}		
		return false;
	});		
	
	// Hide default wordings 
	$j('a.toggle-item').each(function(){
		var toggleItem = $j('#'+$j(this).attr('rel'));
		if(toggleItem.hasClass('hidden')){
			toggleItem.removeClass('hidden');
			
			$j(this).addClass('collapse');
			toggleItem.hide();
			$j('span.collapse', this).hide();
		}
		else {
			
			$j('span.expand', this).hide();
		}
	});	
	
});	
