// MARBLE CAKE
// Mutable Size
// Version 1.0.1(2009-09-29 - 20100227)

function MCMSrefreshSize(parent, child, mode){
	if(mode != 'width'){
		parent.style.height = child.offsetHeight + 'px';
	}
	if(mode != 'height'){
		parent.style.width = child.offsetWidth + 'px';
	}
}

function MCMSrefreshSizeById(parent, child, mode){
	MCMSrefreshSize(document.getElementById(parent), document.getElementById(child), mode);
}

function SetMCMSparent(parent, child, mode){	
	parent.style.overflow = 'hidden';
	parent.style.WebkitTransitionProperty = 'width, height';
	parent.style.WebkitTransitionDuration = '0.25s, 0.25s';
	parent.style.WebkitTransitionTimingFunction = 'ease-in-out, ease-in-out';
	
	parent.style.MozTransitionProperty = 'width, height';
	parent.style.MozTransitionDuration = '0.25s, 0.25s';
	parent.style.MozTransitionTimingFunction = 'ease-in-out, ease-in-out';
	
	parent.style.OTransitionProperty = 'width, height';
	parent.style.OTransitionDuration = '0.25s, 0.25s';
	parent.style.OTransitionTimingFunction = 'ease-in-out, ease-in-out';
	
	parent.style.transitionProperty = 'width, height';
	parent.style.transitionDuration = '0.25s, 0.25s';
	parent.style.transitionTimingFunction = 'ease-in-out, ease-in-out';
}

function SetMCMSparentById(parent, child, mode){
	SetMCMSparent(document.getElementById(parent), document.getElementById(child), mode);
}


//----------------------------