 jQuery().ready(function(){
  // simple accordion
  jQuery('#list1a').accordion();
  jQuery('#list1b').accordion({
   autoheight: false
  });
  
  
  if ( jQuery("img[usemap='zoom']").length > 0 )
	{
		jQuery("img[usemap='zoom']").parent().fancybox({
			'overlayOpacity'	:	0.8,
			'zoomSpeedIn'		:	500,
			'zoomSpeedOut'		:	500
		});
	}
	
	
	
	if ( jQuery("a.zoom").length > 0 )
	{
		jQuery("a.zoom").fancybox({
			'overlayOpacity'	:	0.8,
			'zoomSpeedIn'		:	500,
			'zoomSpeedOut'		:	500
		});
	}
  
  // 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('#list1a, #list1b');
  
  jQuery('#switch select').change(function() {
   accordions.accordion("activate", this.selectedIndex-1 );
  });
  jQuery('#close').click(function() {
   accordions.accordion("activate", -1);
  });
  jQuery('#switch2').change(function() {
   accordions.accordion("activate", this.value);
  });
  jQuery('#enable').click(function() {
   accordions.accordion("enable");
  });
  jQuery('#disable').click(function() {
   accordions.accordion("disable");
  });
  jQuery('#remove').click(function() {
   accordions.accordion("destroy");
   wizardButtons.unbind("click");
  });
 });

