// JavaScript Document
jQuery().ready(function($) {
	if(!($.browser.msie && $.browser.version == "6.0")) { 
  		$('#navRight').width($('#nav').width() - $('#Menu1').width());
	}
	$.easing.bouncy = function (x, t, b, c, d) {
	    var s = 1.70158;
	    if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
    	return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
	}

	// create custom tooltip effect for jQuery Tooltip
	$.tools.tooltip.addEffect("bouncy",
	
		// opening animation
		function(done) {
			this.getTip().animate({top: '+=15'}, 500, 'bouncy', done).show();
		},
	
		// closing animation
		function(done) {
			this.getTip().animate({top: '-=15'}, 500, 'bouncy', function()  {
				$(this).hide();
				done.call();
			});
		}
	);
	$("a[rel*='lightbox']").fancybox();
	$("a[rel*='lightboxFixedSize']").fancybox({width:640,height:426,autoDimensions:false});
	$("a.specialTracking").attr('onClick', function() {
		return 'pageTracker._trackPageview(' + this.href + ');'
	});
	
	$.localScroll();
	$('.startNowLnk').corner('5px');
	$('.startNowLnkBig').corner('5px');
	$('.loginLink').corner('5px');
	$('input.action').corner('5px');
	$(".pricingTable img.tip[title]").tooltip({effect: 'bouncy'});
	$('#slideshow').cycle({
        fx:     'scrollLeft',
        speed:  'slow',
        timeout: 10000,
        pager:  '#slideshowNav',
		pause: 1,
		pauseOnPagerHover: 1
    });
});

function showDetails(node) {
	var newNode = unescape(node);
	if (jQuery("#appDetails").is(":hidden")) {
		jQuery("#appDetails").html(newNode).slideDown(1000);
	} else {
		jQuery("#appDetails").slideUp(500, function() {
			jQuery("#appDetails").html(newNode).slideDown(1000);
		})
	}
}