// Easing equation, borrowed from jQuery easing plugin
// http://gsgd.co.uk/sandbox/jquery/easing/
jQuery.easing.easeOutQuart = function (x, t, b, c, d) {
	return -c * ((t=t/d-1)*t*t*t - 1) + b;
};

$(document).ready(function(){
	windowHeight();
	$(window).resize(function(){
		windowHeight();
	});
	
	var cycle = $('div.cycle').length;
	if (cycle == 1) {
		$('div#lens').cycle({
			fx:     'fade', 
		    speed:  'fast', 
		    timeout: 0, 
		    next:   '.next, div.cycle img', 
		    prev:   '.prev',
		    pager:	'#index span'
		});
	}
	
	var cycle = $('img.wp-post-image').length;
	if (cycle == 1) {
		$('div#film-speed-scale img.wp-post-image').maxImage({
			verticalAlign: 'top',
			horizontalAlign: 'center',
			maxFollows: 'height',
			isBackground: true
			
		});
	}
});
$(window).load(function() {
     $('div#film-speed-scale').fadeIn(600);
});
function windowHeight() {
	$('div#film-speed-scale').height($(window).height());
}
