function equalize(){ }
		
$(document)
.ready(
	function(){
		
		$("a.itinerary").fancybox();
		
		$("a[rel='gallery']").fancybox({
			'transitionIn'		: 'none',
			'transitionOut'		: 'none'
		});
		
		/*	Top Level Navigation */
		$("#navigation a.roll").each(function(){
			var alink = $(this);
			var image = $(alink).children("img");
			var imgsrc = $(image).attr("src"); 
			var on = imgsrc.replace(/.png$/gi,"_ON.png");
			var over = imgsrc.replace(/.png$/gi,"_UP.png");
			var off = imgsrc.replace(/_UP.png$/gi,".png");
			var activeSection = $('#navigation').attr('class');
			
			if ( activeSection == alink.attr('id') ){				
				$(image).attr("src",on);
			} else {
				$(image).attr("src",off);
				$(alink).mouseover(function(){
					$(image).attr("src",over);
				}).mouseout(function(){
					$(image).attr("src",off);
				});
			}
		});
		
		
		
		function setToolTips(){
			if ( $(":input[title]").length != 0 ){
				$('body').append("<div class='tooltipvert'></div><div class='tooltip1'></div><div class='tooltip2'></div><div class='tooltip3'></div><div class='tooltip4'></div>");
			}
			
			$(":input[title]")
				.each(function(){
					var ln = $(this).attr('title').length;
					var sz = 1;
					if (ln > 25) { sz = 2; }
					if (ln > 50) { sz = 3; }
					if (ln > 80) { sz = 4; }
					$(this).tooltip({	
						position: "center right",	
						offset: [0, 0],	
						effect: 'slide', 
						direction: 'right',
						slideFade: true,
						slideOffset: 10 ,
						opacity: 1,	
						delay: 10,
						tip: '.tooltip' + sz	
					}).dynamic( { 
							left: { 					 
								direction: 'left', 						 
								bounce: true 
							},
							top: { 					 
								direction: 'up', 						 
								bounce: true 
							},
							bottom: { 					 
								direction: 'down', 						 
								bounce: true 
							},
							right: { 					 
								direction: 'right', 						 
								bounce: true 
							} 
						});
			});
		}
		
	
		$.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; 
		} 
		
		$.easing.bounceEaseOut = function(p, t, b, c, d) {
			if ( (t/=d) < (1/2.75) ) { return c*(7.5625*t*t) + b; } 
			else if ( t < (2/2.75) ) { return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; }
			else if ( t < (2.5/2.75) ) { return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; }
			else { return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; }
		};
		
		
		$.easing.easeInOutElastic = function (x, t, b, c, d) {
			var s=1.70158;
			var p=0;
			var a=c;
			if (t==0) return b;
			if ((t/=d/2)==2) return b+c;
			if (!p) p=d*(.3*1.5);
			if (a < Math.abs) { a=c; var s=p/4; }
			else var s = p/(2*Math.PI) * Math.asin (c/a);
			if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
			return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
		}
		
		$.easing.easeInElastic = function (x, t, b, c, d) {
			var s=1.70158;
			var p=0;
			var a=c;
			if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
			if (a < Math.abs) { a=c; var s=p/4; }
			else var s = p/(2*Math.PI) * Math.asin (c/a);
			return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
		}
		
		$.easing.easeOutElastic = function (x, t, b, c, d) {
			var s=1.70158;
			var p=0;
			var a=c;
			if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
			if (a < Math.abs) { a=c; var s=p/4; }
			else var s = p/(2*Math.PI) * Math.asin (c/a);
			return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
		}
		
		
		$.tools.tooltip.addEffect("bouncy", 		 
			function(done) { 
				this.getTip().animate({top: '+=15'}, 500, 'bouncy', done).show(); 
			}, 		 
			function(done) { 
				this.getTip().animate({top: '-=15'}, 500, 'bouncy', function()  { 
					$(this).hide(); 
					done.call(); 
				}); 
			} 
		);

		
		$(".verttip").tooltip({ tip: 'div.tooltipvert' });
		
		setToolTips();
		
	
});
