﻿$(document).ready(function() {

	$("#slider1").easySlider({
		auto: true,
		continuous: true,
		vertical : true,
		prevId: 'prevBtn1',
		nextId: 'nextBtn1',	
		controlsShow : false,
		pause:	5000
	});
	
	$("#slider2").easySlider({
		auto: true,
		continuous: true,
		vertical : true,
		prevId: 'prevBtn2',
		nextId: 'nextBtn2',	
		controlsShow : false,
		pause:	5000
	});

	$('#header-text div').css('opacity', 0.7);
	$('.first').css('opacity', 0.0);
	$('.third').css('opacity', 0.1);
	
	$('.second div').css('opacity', 1);
	$('.first').animate({left: '0px', 'top': '132px', 'opacity' :'1', 'font-size': '55px'}, 6000);
	$('.first').animate({left: '200px', 'top': '132px', 'opacity' :'0', 'font-size': '55px'}, 1000);
	
	$('.second .a').delay(7000).show(1000);
	$('.second .b').delay(7200).show(1000);
	$('.second .c').delay(7400).show(1000);
	$('.second .a').delay(3500).animate({bottom: '30px', 'opacity' :'0'}, 300);
	$('.second .b').delay(3800).animate({bottom: '30px', 'opacity' :'0'}, 300);
	$('.second .c').delay(4100).animate({bottom: '30px', 'opacity' :'0'}, 300);
	
	
	$('.third').delay(13000).animate({bottom: '150px', left: '180px', 'opacity' :'1'}, 2000);
	$('.third').delay(2000).animate({top: '125px', 'opacity' :'0'}, 1000);
	
	$('.fourth').delay(16000).animate({bottom: '150px', left: '-600px', 'opacity' :'1'}, 2000);
	$('.fourth').delay(2000).animate({top: '125px', 'opacity' :'0'}, 1000);

	$('.fifth .a').delay(18800).show(1000);
	$('.fifth .b').delay(19000).show(1000);
	$('.fifth .c').delay(19200).show(1000);
	$('.fifth .a').delay(3500).animate({top: '30px', 'opacity' :'0'}, 300);
	$('.fifth .b').delay(3800).animate({top: '30px', 'opacity' :'0'}, 300);
	$('.fifth .c').delay(4100).animate({top: '30px', 'opacity' :'0'}, 300);
	
	$('#header-images').crossSlide({
	  fade: 1
	}, [
	  {
		src:  '/design/cefam/images/header_01.jpg',
		alt:  '',
		from: '100% 80% 1.0x',
		to:   '100% 0% 1.3x',
		time: 10
	  }, {
		src:  '/design/cefam/images/header_02.jpg',
		alt:  '',
		from: 'top left',
		to:   'bottom right 1.0x',
		time: 20
	  }, {
		src:  '/design/cefam/images/header_03.jpg',
		alt:  '',
		from: '100% 80% 1.0x',
		to:   '80% 0% 1.0x',
		time: 20
	  }, {
		src:  '/design/cefam/images/header_04.jpg',
		alt:  '',
		from: '100% 50% 1.0x',
		to:   '0% 100% 1.0x',
		time: 20
	  }, {
		src:  '/design/cefam/images/header_05.jpg',
		alt:  '',
		from: '100% 80% 1.0x',
		to:   '80% 0% 1.0x',
		time: 20
	  }
	], function() {});
});
