$(document).ready(function() {
 // hides the slickbox as soon as the DOM is ready
 // (a little sooner than page load)
  $('#regio').hide();
 // shows the slickbox on clicking the noted link
  $('a#slick-show').click(function() {
	$('#regio').show('slow');
	return false;
  });
 // hides the slickbox on clicking the noted link
  $('a#slick-hide').click(function() {
	$('#regio').hide('fast');
	return false;
  });
 // toggles the slickbox on clicking the noted link
  $('a#slick-toggle').click(function() {
	$('#regio').toggle(400);
	return false;
  });
});

jQuery().ready(function(){

// highly customized accordion
jQuery('#list2').accordion({
    event: 'mouseover',
    active: '.selected',
    selectedClass: 'active',
    header: "dt"
}).bind("change.ui-accordion", function(event, ui) {
    jQuery('<div>' + ui.oldHeader.text() + ' hidden, ' + ui.newHeader.text() + ' shown</div>').appendTo('#log');
});

jQuery('#list3').accordion({
    event: 'mouseover',
    active: '.selected',
    selectedClass: 'active',
    header: "dt"
}).bind("change.ui-accordion", function(event, ui) {
    jQuery('<div>' + ui.oldHeader.text() + ' hidden, ' + ui.newHeader.text() + ' shown</div>').appendTo('#log');
});


var wizard = $("#wizard").accordion({
    header: '.title',
    event: false
});

var wizardButtons = $([]);
$("div.title", wizard).each(function(index) {
    wizardButtons = wizardButtons.add($(this)
    .next()
    .children(":button")
    .filter(".next, .previous")
    .click(function() {
        wizard.accordion("activate", index + ($(this).is(".next") ? 1 : -1))
    }));
});

// 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, #list2, #list3, #navigation, #wizard');

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");
});
});

	$(function() {

		$('#container-1').tabs();
		$('#container-2').tabs(2);
		$('#container-3').tabs({ fxSlide: true });
		$('#container-4').tabs({ fxFade: true, fxSpeed: 'fast' });
		$('#container-5').tabs({ fxSlide: true, fxFade: true, fxSpeed: 'normal' });
		$('#container-6').tabs({
			fxFade: true,
			fxSpeed: 'fast',
			onClick: function() {
				alert('onClick');
			},
			onHide: function() {
				alert('onHide');
			},
			onShow: function() {
				alert('onShow');
			}
		});
		$('#container-7').tabs({ fxAutoHeight: true });
		$('#container-8').tabs({ fxShow: { height: 'show', opacity: 'show' }, fxSpeed: 'normal' });
		$('#container-9').tabs({ remote: true });
		$('#container-10').tabs();
		$('#container-11').tabs({ disabled: [3] });

		$('<p><a href="#">Disable third tab<\/a><\/p>').prependTo('#fragment-28').find('a').click(function() {
			$(this).parents('div').eq(1).disableTab(3);
			return false;
		});
		$('<p><a href="#">Activate third tab<\/a><\/p>').prependTo('#fragment-28').find('a').click(function() {
			$(this).parents('div').eq(1).triggerTab(3);
			return false;
		});
		$('<p><a href="#">Enable third tab<\/a><\/p>').prependTo('#fragment-28').find('a').click(function() {
			$(this).parents('div').eq(1).enableTab(3);
			return false;
		});

	});