﻿Ext.ns('I');

I.hideFirstCat = function() {
	try {
		var el = Ext.query('.column_left .sm_block .header_main:first');
		el = Ext.get(el[0]);
		var el2 = el.parent().next();
		el2.setVisibilityMode(Ext.Element.DISPLAY).hide();
		
		var el3 = el.createChild({
			tag: 'div'
			,style: {
				 'position': 'absolute'
				,'background-image': 'url(/i/16_icons/bullet_arrow_up.png)'
				,'background-repeat': 'no-repeat'
				,'background-position': 'center center'
				,'width': '16px'
				,'height': '16px'
			}
		}).setXY([el.getX(), el.getY() + 1]);
		el.setStyle({
			cursor: 'pointer'
			,'-moz-user-select': 'none'
			,'padding-left': '16px'
		}).on('click', function(e, t) {
			if(el2.isVisible()) {
				el2.hide(true);
				el3.setStyle({
					'background-image': 'url(/i/16_icons/bullet_arrow_up.png)'
				});
			}
			else {
				el2.show(true);
				el3.setStyle({
					'background-image': 'url(/i/16_icons/bullet_arrow_down.png)'
				});
			}
		}, this);
		
	}
	catch(e) {}
}

Ext.onReady(function() {
	I.hideFirstCat();
	
	
});
