
//
function toggleVacancy( me ){
	var triggerElem = $(me);
	var docsElem  = $( '#'+triggerElem.attr('targ') );			
	var vacElem = docsElem.parent();
		//vacElem.css( 'backgroundColor', 'red' );
	
	//
	if ( vacElem.attr('state') == 'closed' || vacElem.attr('state') == null ){
		//alert('Opening');
		vacElem.attr('state', 'open');
		resizeToFit( vacElem );
	} else {
		//alert('Closing');
		vacElem.attr('state', 'closed');
		resizeToSize( vacElem, 55 );
	}
}

//
function resizeToFit( me ){
	var h = 0;
	me = $(me);
	
	var children = $('#' + me.attr('id') + ' > *');
	for ( var i = 0; i< children.length; i++){
		h += $(children.get(i)).outerHeight() ;
	}
	
	me.height( h );
}


//
function resizeToSize( me, size ){
	me = $(me);
	me.height( size );
}

//	<!-- vtle assist tutorial page script
function enlargeVideo(  ){
	$('#beforeAfterSection').css( 'display', 'none' );
	$('#enlargeVideo').css( 'display', 'none' );
	
	$('#FLVPlayer_1').css( 'width',  '870px' );
	$('#FLVPlayer_1').css( 'height', '636px' );
	
	$('#FLVPlayer_2').css( 'width',  '870px' );
	$('#FLVPlayer_2').css( 'height', '636px' );
	
	$('#vidHolder').css( 'width',  '700px' );
	$('#vidHolder').css( 'height', '640px' );
	
	$('#author_sidebar').css( 'display',  'none' );
	$('#author_sidebar').css( 'dusplay',  'none' );
	
	//$(window)._scrollable().scrollTo( {top:100} );
}


