$(document).ready(function() {
						   
	/* Binding Events to the slides */
	$('.slide')
		.bind('open', function(){
			if(! $(this).hasClass('open')){
				$(this).next().trigger('open');
				$(this).addClass('open');
				$(this).animate({right: "-=410px"});
			}
			else{
				$(this).prev().trigger('close');
			}
			$(this).siblings().removeClass('active');
			$(this).addClass('active');
	})
	.bind('close', function(){
		if($(this).hasClass('open')){
			$(this).removeClass('open');
			$(this).animate({right: "+=410px"});
			$(this).prev().trigger('close');
		}
	});
		
	/* Binding Events to the Slide Contents */
	$('.slidecontent').bind('show', function(){
		$('.slidecontent').removeClass('open');
		$(this).addClass('open');
	});

	/* Triggering from the buttons */
	$('.slidebutton').click(function(){
		$(this).parent().trigger('open');
		$('#content-' + $(this).parent().attr('id')).trigger('show');
	});
	/* Will open slide 4 first - Debt */
	//$("#slide-1 .slidebutton").trigger("click");
});
	

