<?php
echo $this->form;

$this->inlineScript()
    // ->appendFile( $this->baseUrl( '/resources/library/scripts/tiny_mce/plugins/filemanager/js/mcfilemanager.js' ) ) 
     ->captureStart(); ?>
     


jQuery( document ).ready( function () {
	
	$('select#targetType').on('change',function ( e ) {
		// fix : mvc must equal page
		$el = $(this);
		$target = $el.attr('value');

		
		$el.parents( '.control-group' ).siblings( '.control-group' ).each( function( ) {
			var $s = $( this );
			if ( $s.find('#' + $target ).length > 0 ) {
				$s.show();
			} else {
				$s.hide();
			}
		} );
	}).trigger('change');
        
} );
<?php $this->inlineScript()->captureEnd();