﻿//making orignal

function setHeight(){
	$('.d-section').css('height','0px');
	$('.d-section').css('overflow','hidden');
	$('.hide-detail').css('display','none');
	$('.show-detail').css('display','block');
}

function showHideDetail(index){
	var VarUsrAgt = navigator.userAgent.toLowerCase();
	$hideArray = $('.inner').children('.hide-detail');
	$showArray = $('.inner').children('.show-detail');
	$cildArray = $('.inner').children('.d-section');
	if($($cildArray[index]).height() > 0){
		if(VarUsrAgt.indexOf("safari/5") != -1){
			$($cildArray[index]).css({height:"0px", overflow:"hidden"});
		}else{
			$($cildArray[index]).animate({height:"0px"},300);
		}
		$($hideArray[index]).css('display','none');
		$($showArray[index]).css('display','block');
	}else{
		$($cildArray[index]).animate({height:$($cildArray[index]).find('.box').height() + 30 + "px"},300);
		
		$($hideArray[index]).css('display','block');
		$($showArray[index]).css('display','none');
	}
}

