function isIE()

      {

      return /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent);

      }



$(document).ready(function(){

	

	$(".node-1").css('display','none');

	

	if(!isIE()){

		$(".node-0").click(function(){

			$(".node-0").not(this).children().not('span').stop().slideUp(400);

			$(this).children().stop().slideDown(400);

		});

	} else {

		$(".node-0").click(function(){

			$(".node-0").not(this).children().not('span').css('display','none').css('height','0');

			$(this).children().css('display','block').css('height','100%');

		});

	}

		//underline node

		$(".node span").hover(function(){

			$(this).css('text-decoration','underline');

			$(".node-2").css('text-decoration','none');

		},function(){

			$(this).not('.node-1').css('text-decoration','none');

		});

		

		$('.node1').click(function(){

			$('.node2').animate({height:'100%'},400);

		});

		

		//url parse

		

		var path = location.pathname;

		

		if(path.indexOf('zarzad')!= -1 || path.indexOf('profil_strategia')!= -1 || path.indexOf('grupa_spaceone')!= -1 || path.indexOf('mecenat')!= -1 || path.indexOf('partnerzy')!= -1 || path.indexOf('klienci')!= -1 || path.indexOf('realizacje')!= -1 || path.indexOf('kontakt')!= -1){

			if(!isIE())	$("#node-01").children().stop().slideDown(400);

			if(isIE()) $("#node-01").children().css('display','block').css('height','100%');

		}

		

		if(path.indexOf('obsluga_informatyczna')!= -1 || path.indexOf('outsourcing')!= -1 || path.indexOf('inegracja_systemow')!= -1 || path.indexOf('infrastruktura')!= -1 || path.indexOf('rekrutacja')!= -1 || path.indexOf('szkolenia')!= -1 || path.indexOf('wynajem_sprzetu')!= -1){

			if(!isIE())	$("#node-02").children().stop().slideDown(400);

			if(isIE()) $("#node-02").children().css('display','block').css('height','100%');

		}

		

		if(path.indexOf('oferta')!= -1 || path.indexOf('zespol')!= -1 || path.indexOf('wdrozenia')!= -1 ){

			if(!isIE())	$("#node-03").children().stop().slideDown(400);

			if(isIE()) $("#node-03").children().css('display','block').css('height','100%');

		}

		

		if(path.indexOf('sklep')!= -1){

			if(!isIE())	$("#node-04").children().stop().slideDown(400);

			if(isIE()) $("#node-04").children().css('display','block').css('height','100%');

		}

});
