// File        : index.js
// Type        : JavaScript
// Description : Basic settings slide show index
// Editor      : Notepad++ (from http://notepad-plus-plus.org/)
// Warning     : Do not change unless you are very sure of what you are doing, make a backup first

$(document).ready(function(){

	/* show or hide gadget */
	$('a[rel="hide_block"]').click(function(){
		if ($(this).parent('div').parent('div').children('div.java_content').css('height')=='auto') {
			$(this).css('background-image','url(images/gadget_dropup.gif)');
		} else {
			$(this).css('background-image','url(images/gadget_dropdown.gif)');
		}
		$(this).parent('div').parent('div').children('div.java_content').slideToggle();
		return false;
	});
	
	$('#slideshow').cycle({
		fx:     'fade',
		speed:  'slow',
		// This determines the rate at which the slides are changed, original setting: 8000 (=8000ms=8 seconds)
		timeout: 5000,
		pager:  '#slider_nav',
		pagerAnchorBuilder: function(idx, slide) {
			// return sel string for existing anchor
			return '#slider_nav li:eq(' + (idx) + ') a';
		}
	});


});

