// JavaScript Document
$(document).ready( function() {
	
	var eventDate = new Date(2011, 10-1, 18); //Event Date for countdown culculation
	
	$('#countdown_display').countdown({until: eventDate, format: 'd', layout: '{dn}'});
	
	//code for fading testimonials
	var quotes = new Array();
	quotes[0] = "Gain real insight into how video delivery across mobile devices is actually affecting operator profit margins and network infrastructure and how the ecosystem should be responding from Stephen Bye, CTO, Sprint<p></p>";
	quotes[1] = "Join Kelly Wearmouth, Head of Content Partnerships at O2 Media to understand how to perfect personalised consumer packages and recognise revenue opportunities by implementing a 'customer-centric' approach <p></p>";
	quotes[2] = "Hear how Telefonica has been responding to the demand for a 3 screen service; how they are overcoming obstacles to controlling and securing content across a range of devices, and whether they think the consumer's content choice and viewing behaviour should be controlled<p></p>";
	quotes[3] = "Discover how BskyB identifies viable revenue streams in mobile video and the payment models they choose to succeed with<p></p>";
	quotes[4] = "Do you know what an 'end-to-end video experience' is and how to create multiple revenue streams from it? Hear how Berkin Toktas, Head of Digital TV, Turkcell does it!<p></p>"; 
	quotes[5] = "Learn how to seamlessly connect the home; analysing cloud solutions and how to achieve high quality content conversion with Martin Conan, Head of Display Delivery Devices at France Telecom Orange<p></p>"; 
	quotes[6] = "Plan your distribution strategy with Amelia Gammon, VP International Mobile, Fox Digital Entertainment when extending your content reach - where to partner, who to partner with and the benefits content providers see in having multiple touch points in the ecosystem<p></p>"; 	
	quotes[7] = "Assess the application threat - what developments have been made in cross device implementation using web technologies and will the future see OEMs and operators going head to head for content?<p></p>"; 	
	
	var counter = 0;
	setInterval(function() {
		$("#testimonial-inner").fadeOut('2000', function() {
			$("#testimonial-inner").html(quotes[counter]);
		});
		if(counter == 7) {
			counter = 0;
		}
		counter++;
		/* Comes last to keep it in this state for 3000ms */
		$("#testimonial-inner").fadeIn('2000');
	}, 5000);
	
	$('#live_twitter_box').getSearchTweets({
		url:basepath+'/js/getSearchTweets/php/getTweet.php',
		search:'#MVID',
		resultType:'recent',
		display:3,
		listMargin:8,
		showAvatar:true,
		tag:'ol'
	});
});
