jQuery.easing.easeOutQuart = function (x, t, b, c, d) {
	return -c * ((t=t/d-1)*t*t*t - 1) + b;
};

$(document).ready(function() {
	
// Makes Every link automatically open new window
$(".slideshow a").attr('target', '_blank');

	
// Grab Movie Description

$(".slideshow img").hover(
  function () {
	
		
	// Mark the thumbnail as selected
    $(".slideshow img").removeClass("selected");
    $(this).addClass("selected");
	
	// Get the slideshow id in an non-elegant way :-(
	var currentId = $(this).parent().parent().parent().parent().attr('id');
	
	// Grab movie title & description from the img title and alt tags
	var title = $(this).attr("title");
	var description = $(this).attr("alt");
	
	// Change the Movie Title & Description
    $("#" + currentId + " .movie_description h4").text(title);
    $("#" + currentId + " .movie_description p.description").text(description);

	// Unhide the description
	$("#" + currentId +' .movie_description').removeClass('hidden');
	
  }

);
});

// Scroll


jQuery(function( $ ){
	
	$('.slideshow_container').serialScroll({
		target:'.slideshow',
		items:'.slides a',
		event:'click',
		prev:'.buttons a.prev',
		next:'.buttons a.next',
		offset:0, //when scrolling to photo, stop 230 before reaching it (from the left)
		duration:800,
		stop:false,
		queue:false,
		constant:false,
		lock:true,
		jump:false,
		cycle:false,
		start:0,
	});
});








