$.fn.delay = function(time, callback){
    // Empty function:
    jQuery.fx.step.delay = function(){};
    // Return meaningless animation, (will be added to queue)
    return this.animate({delay:1}, time, callback);
}
$(function() {
    $('td pre code').each(function() {
        eval($(this).text());
    });
});
function onAfter(curr, next, opts) {
    var index = opts.currSlide;
    $('#prev')[index == 0 ? 'hide' : 'show']();
    $('#next')[index == opts.slideCount - 1 ? 'hide' : 'show']();
}

$(document).ready(function() {
	$('#zoom-btn').hover(function() {
		$('#zoom-img').fadeIn();
	}, function() {
		$('#zoom-img').fadeOut();
	});
	$('#cust-serv ul ul').css({display: "none"});
	$("#cust-serv li a").click(function () {
		$(this).siblings('ul').slideToggle("slow");
		return false;
	});
	$('#show').hide();
	$('#hide').click(function () {		
		$('h1#logo').animate({'opacity':'0'}, 200);
		$('#nav').delay(200).animate({'opacity':'0'}, 200);
		$('#main, #features, #content').delay(400).animate({'opacity':'0'}, 200);
		$(this).hide();
		$('#show').show();
		$('#features img').delay(600).hide();
	});
	$('#show').click(function () {
		$('h1#logo').animate({'opacity':'1'}, 200);
		$('#nav').delay(200).animate({'opacity':'1'}, 200);
		$('#main, #features, #content').delay(400).animate({'opacity':'1'}, 200);
		$(this).hide();
		$('#hide').show();
		$('#features img').delay(600).show();
	});
	
});