/**
 * Insert all your JS Functions
 */

jQuery(document).ready(function($){
	
	// Initialize Slider
	var slides = $('.slide');// check wether there is more than one slide
	if (slides.length > 1) { // if true
		$('.slideshow') // activate slider
		.before('<ul id="slider_controls">')
		.cycle({
			fx: 'fade',
			speed: 3500,
			random: 0,
			timeout: 7000,
			pager: '#slider_controls',
			startingSlide: 0,
			activePagerClass: 'active-slide',
			pagerAnchorBuilder: function(idx, slide) { 
			        return '<li><a href="#"></a></li>'; 
			} 
		});
	}
	
	
	// Initialize Quotations
	var quotations = $('.cite.preview'); // check wether there is more than one slide
	if (quotations.length > 1) { // if true
		$('.scrollUp') // activate slider
		.cycle({
			fx: 'scrollVert',
			speed: 3500,
			timeout: 7000,
			next:   '#next', 
			prev:   '#prev',
			height: '90'
		});
		
		$('#feedback_controller').addClass('js');
	}
	
	
	$('table.ezv').find('img').each(function() {
		var jqImg = $(this);
		jqImg.attr('src', jqImg.attr('src') + '?' + (1000 + parseInt(Math.random() * (99999999999-1000+1))));
		
	});
	
    
});
