/* package-version: 2010-07-19-A-axa-direct-2.2 */
function selectTabs()
{
    $("#axaDirectSite .top").css('display', 'none');
	_Box1 = $('#axaDirectSite .tabBox1');
	_Box2 = $('#axaDirectSite .tabBox2');
    _Box3 = $('#axaDirectSite .tabBox3');
	
	_showBox1 = $('#showAxaDirect');
	_showBox2 = $('#showNaszaOferta');
    _showBox3 = $('#showKluczoweOsoby');
	
	function _init() {
		_Box1.show();
		_Box2.hide();
        _Box3.hide();
		
		_showBox1.unbind();
		_showBox1.click(function() {
			_Box1.show();
			_Box2.hide();
            _Box3.hide();
			
			if(!$("#tabs").hasClass('tab1')) {
				$("#tabs").addClass('tab1');
			}
			if($("#tabs").hasClass('tab2')) {
				$("#tabs").removeClass('tab2');
			}
			if($("#tabs").hasClass('tab3')) {
				$("#tabs").removeClass('tab3');
			}
			
			return false;
		});
		
		_showBox2.unbind();
		_showBox2.click(function() {
			_Box1.hide();
			_Box2.show();
            _Box3.hide();
			
			if($("#tabs").hasClass('tab1')) {
				$("#tabs").removeClass('tab1');
			}
			if(!$("#tabs").hasClass('tab2')) {
				$("#tabs").addClass('tab2');
			}
			if($("#tabs").hasClass('tab3')) {
				$("#tabs").removeClass('tab3');
			}
			
			return false;
		});

		_showBox3.unbind();
		_showBox3.click(function() {
			_Box1.hide();
			_Box2.hide();
            _Box3.show();
			
			if($("#tabs").hasClass('tab1')) {
				$("#tabs").removeClass('tab1');
			}
			if($("#tabs").hasClass('tab2')) {
				$("#tabs").removeClass('tab2');
			}
			if(!$("#tabs").hasClass('tab3')) {
				$("#tabs").addClass('tab3');
			}
			
			return false;
		});
	}
	
	
	_init();
}

$(document).ready(function(){
	selectTabs();
});
