//
// Prototype Landing Page Javascript
//
// See Documentation for more info
//

// Sets Cufon Replacement
Cufon.replace('h1, h2, h3, h4, h5, h6');

// jQuery
$(document).ready(function() {
	if($.support.opacity) {
	$('.fade, .demobutton, .signupbutton').hover(
		function() {
			$(this).stop().animate({opacity:0.8, filter: ''},"fast");
		},
		function() {
			$(this).stop().animate({opacity:1, filter: ''},"fast");
	});
	
	// Gallery Colorbox
	$("a[rel='gallery']").colorbox();
	
	// Toggle
	$(".toggle_content").hide();
	   $(".toggle_title").click(function(){
	   $(this).toggleClass("toggle-true").next().slideToggle("slow");
	   });
	   
	// Testimonials
	$('#testimonials .slide');
	setInterval(function(){
		$('#testimonials .slide').filter(':visible').fadeOut(3000,function(){
			if($(this).next('li.slide').size()){
				$(this).next().fadeIn(1000);
			}
			else{
				$('#testimonials .slide').eq(0).fadeIn(1000);
			}
		});
	},5000);	 
	}	
});

//Twitter
getTwitters('tweets', { 
  id: 'envato', // Change this to your twitter username
  count: 1, 
  enableLinks: true, 
  ignoreReplies: true, 
  clearContents: true,
  template: '"%text%" <a href="http://twitter.com/%user_screen_name%/statuses/%id_str%/">%time%</a>'
});
