// JavaScript Document

/* ###################################################### */
/* ###################################################### */
/* ####            EASYBURNER JAVASCRIPT             #### */
/* ####                 may 4, 2011                  #### */
/* ####                                              #### */
/* ####                                              #### */
/* ###################################################### */
/* ###################################################### */
/* ####                                              #### */
/* ####                Author : M. Franck            #### */
/* ###################################################### */
/* ###################################################### */




/* ######################### */
/*    JQuery Bullz Toggle    */
/* ######################### */
jQuery('h2.tog').click(function () {
	jQuery(this).next('div.togcont').toggle(100);
	});
	
	jQuery('h2.tog').toggle(
	function () { jQuery(this).addClass('bounce'); },
	function () { jQuery(this).removeClass('bounce');; }
	);
	
/* ########################### */
/*    JQuery Bullz LnkSlide    */
/* ########################### */
jQuery('.txtlist li').hover(function(){
  jQuery(this).stop().animate({ paddingLeft: "10px" }, 300);
}, function(){
    jQuery(this).stop().animate({ paddingLeft: "5px" }, 150); 
});
/* ####################################### */
/*     JQuery Bullz SocialButton Slide     */
/* ####################################### */
jQuery('.sociallnk li').hover(function(){
  jQuery(this).stop().animate({ paddingLeft: "30px" }, 300);
}, function(){
    jQuery(this).stop().animate({ paddingLeft: "10px" }, 150); 
});

/* ################################ */
/*    JQuery Easing Fade Buttons    */
/* ################################ */
$(document).ready(function() {
	$('#watchthis').append('<span class="hover"></span>').each(function () {
	  	var $span = $('> span.hover', this).css('opacity', 0);
	  	$(this).hover(function () {
	    	$span.stop().fadeTo(500, 1);
	 	}, function () {
	  $span.stop().fadeTo(500, 0);
	  	});
	});
});


/* ############################## */
/*    JQuery Transitions Cycle    */
/* ############################## */
$(document).ready(function(){	
	// Hiding all the testimonials, except for the first one.
	$('#testimonials li').hide().eq(0).show();	
	// A self executing function that loops through the testimonials:
	(function showNextTestimonial(){		
		// Wait for 7.5 seconds and hide the currently visible testimonial:
		$('#testimonials li:visible').delay(7500).fadeOut('slow',function(){			
			// Move it to the back:
			$(this).appendTo('#testimonials ul');			
			// Show the next testimonial:
			$('#testimonials li:first').fadeIn('slow',function(){				
				// Call the function again:
				showNextTestimonial();
			});
		});
	})();
	
});

