$(document).ready(function(){
	$('.elements .child').hide();
	
	if (getQuerystring('where')) {
		var get = getQuerystring('where');
		var tab = new Array();
		tab = get.split('_');
		$('a#' + tab[1] + '_' + tab[2]).addClass("active");
		$('a#' + tab[1] + '_' + tab[2]).next().show();
		//var num = tab[2]-1;
		num = tab[3];
		//$('a.' + tab[1] + ':eq(' + num +')').addClass("hover");
		$('ul.'+ tab[2] +' li a.' + tab[1] + '_' + num + '').addClass("hover");
		
		
		
	}
	
	$('.elements .parent a').click(function(){
		$('.elements .a-strong').removeClass("active");
		
		if($(this).siblings('.elements .child').is(':hidden')){
			$(this).addClass("active");
			$('.elements .child').slideUp('slow');
			$(this).siblings('.elements .child').slideDown('slow');
		}else{
			$(this).siblings('.elements .child').slideUp('slow');
		}
		
		if($(this).siblings('.elements .child').length){
			
			return false;
		}
		
		
		
	/*$('.parent').click(function(){
	
		var id = $(this).attr('id');
		if($('.'+ id +':parent').is(':hidden')){
		$('.a-normal:parent').slideUp();
		$('.'+ id).slideDown(); 
		}else{
			$('.'+ id +':parent').slideUp(); 
		}
		
		if($('.' + id).length){
		return false;
		}*/
	});
});


