
 $(document).ready(function() {

	// Parameters
	var lowHeight = 300;
	var highHeight = 500;
	var navDuration = 650; //time in miliseconds
    var jumpHeight = "200px";
	var initialHeight = "30px";

	// Initialise
	
	

	// Loop main images
	$('#pics').cycle({ 
		fx:    'fade', 
		timeout: 15000,
		random: 1,
		speed:  2500, 
		delay:  -7000 
	});
	


	// Loop contact details
	$('#contact').cycle({ 
		fx:     'scrollDown', 
		timeout: 5000, 
		delay:  -2000,
		pause: 1
	});

	// Loop Open Source pics
	$('#opensourcepics').cycle({ 
		fx:     'fade'  
	});

	// Loop Success Stories
	$('#ss').cycle({ 
		fx:    'scrollDown', 
		sync:   0,
		timeout: 6000 
	});

	// Loop Services
	$('#services').cycle({ 
		fx:    'scrollDown', 
		sync:   0, 
		delay: -2000 
	});

	// Events
	
	// Hide the colour block paras
	$('.block div').hide();

	// Show modals
	$('#modalshowwcm').click(function (e) {
		e.preventDefault();
		$('#modalwcm').modal();
	});
	$('#modalshowosi').click(function (e) {
		e.preventDefault();
		$('#modalosi').modal();
	});

	// Raise the coloured blocks
	$('.block').hover(function() {
		$(this).height(highHeight)
		$(this).children("div").fadeIn(navDuration);


		$(this).stop().animate({ top : "-="+jumpHeight }, navDuration);            
			}, function() {
				$(this).children("div").fadeOut(navDuration);
				$(this).stop().animate({ top : initialHeight }, navDuration, function(){
				$(this).height(lowHeight);
			});
		});
 	});

