jQuery(document).ready(function(){
	//only needed for the demo page
	demopage_switchslider(); 			
	
	//activate the lightbox
	jQuery('a[href$=jpg], a[href$=png], a[href$=gif], a[href$=jpeg]').prettyPhoto({theme: "light_square"});
	
	
	// here you can see the slide options I used in the demo page. depending on the id of the slider a different setup gets activated
	jQuery('#frontpage-slider').aviaSlider({	
		blockSize: {height: 40, width:40},
		transition: 'slide',
		// display: 'all',
		display: 'random',
		betweenBlockDelay:15,
		animationSpeed: 75,
		transitionOrder: ['diagonaltop', 'diagonalbottom','topleft', 'bottomright', 'random']
	});
	
	
	jQuery('#diagonal-blocks').aviaSlider({	blockSize: {height: 80, width:80},
		transition: 'slide',
		display: 'diagonaltop',
		switchMovement: true
	});	
	
	
	jQuery('#winding-blocks').aviaSlider({	blockSize: {height: 80, width:80},
		transition: 'slide',
		display: 'topleft',
		switchMovement: true
	});								
	
	jQuery('#randomized-blocks').aviaSlider({	blockSize: {height: 80, width:80},
		transition: 'slide',
		display: 'random'
	});
	
	
	jQuery('#fading_curtain').aviaSlider({	blockSize: {height: 'full', width:40},
		display: 'topleft',
		transition: 'fade',
		betweenBlockDelay:150,
		animationSpeed: 600,
		switchMovement: true
	});
	
	jQuery('#fading-top-curtain').aviaSlider({	
		blockSize: {height: 40, width:'full'},
		display: 'topleft',
		transition: 'fade',
		betweenBlockDelay:150,
		animationSpeed: 600,
		switchMovement: true
	});	
							
	jQuery('#fullwidth-fade-slider').aviaSlider();
	
	
	jQuery('#direction-fade-slider').aviaSlider({
		blockSize: {height: 3, width:'full'},
		display: 'topleft',
		transition: 'fade',
		betweenBlockDelay:10,
		animationSpeed: 400,
		switchMovement: true
	});

	jQuery('#droping-curtain').aviaSlider({	blockSize: {height: 'full', width:40},
		display: 'topleft',
		transition: 'drop',
		betweenBlockDelay:80,
		animationSpeed: 800,
		switchMovement: true,
		slideControlls: 'items',
		appendControlls: '.aviaslider'
	});	
});

// the following stuff is only for the demo page to switch sliders
function demopage_switchslider() {
	var param = window.location.href.substring(window.location.href.indexOf('?')+8);
	if(param != undefined && param != '' && window.location.href.indexOf('?') > 0) {
		jQuery('.aviaslider').attr('id',param); //change the id of the slideshow depending on the url, so another slideshow gets applied
	}
}



