
function showOption() {
	return document.getElementById('option').style.display = 'block';
}

function closeOption() {
	return document.getElementById('option').style.display = 'none';
}

function newWindow(url, width, height) {
		newwindow = window.open(url, 'editor', 'statusbar=0, toolbar=0, scrollbars=1, resizeable=1, width='+ width +', height='+ height +'');
	if (window.focus) { newwindow.focus(); }
	return false;
}


/*
 * JQUERY FUNCTIONS
 */
	
	jQuery(function( $ ){
		
		// simple accordion
		jQuery('#editor').accordion({
			header: 'div.acc-container'
			});
		
		// bind to change event of select to control first and seconds accordion
		// similar to tab's plugin triggerTab(), without an extra method
		var accordions = jQuery('#editor-view, #editor-add');
		
		jQuery('#switch select').change(function() {
			accordions.accordion("activate", this.selectedIndex-1 );
		});
		
		
		$('#options-onAfterFirst').click(function(){//onAfterFirst exists only when queuing
			reset_o(); $paneOptions.scrollTo( 'li:eq(15)', 1600, { 
				queue:true,
				onAfterFirst:function(){
					$('#options-message').text('Got there horizontally!');
				},
				onAfter:function(){
					$('#options-message').text('Got there vertically!');
				}
			});
		});
	});
