$(function ()
{
	
	// refine box
	$('.select h3').click( function(elem)
	{
		//$(this).parent('.select').children('.info').toggle(100);
		$(this).parent('.select').children('ul').toggle(100);
		
	});
	
	$('.select h3').toggle(
			
		function () {
			$(this).parent('.select').addClass("open");
			
				var zIndexNumber = 1000;
	            $('div').each(function() {
	                //if ($(this).attr("class") != 'pics media' && $(this).attr("class") != 'span-3 last meta')// && $(this).attr("class").indexOf('result-item') == -1
	                //{
	                    $(this).css('zIndexOld', $(this).css('zIndex'));
		                $(this).css('zIndex', zIndexNumber);
		                zIndexNumber -= 10;
		            //}
	            });
		},
		
		function () {
			$(this).parent('.select').removeClass("open");
			
				//var zIndexNumber = 1000;
	            $('div').each(function() {
		                $(this).css('zIndex', $(this).css('zIndexOld'));
		                //zIndexNumber -= 10;
	            });
		}
	);
	
	
	
//	$('.box-shadow h2').click( function(elem)
//	{
//		//$(this).parent('.box-shadow').children('h2').toggle();
//		$(this).parent('.box-shadow').children('p').toggle(100);
//		$(this).parent('.box-shadow').children('.taxonomy').toggle(100);
//	});
//	
//	$('.box-shadow div').toggle(
//			
//		function () {
//			$(this).parent('.taxonomy').addClass("open");
//		},
//		
//		function () {
//			$(this).parent('.taxonomy').removeClass("open");
//		}
//	);
});

