	$(function () {
		$('.notes').each(function(i) {
			var distance = 10;
			var time = 50;
			var hideDelay = 50;
			var hideDelayTimer = null;					
			var beingShown = false;
			var shown = false;
			var trigger = $('span', this);
			var info = $('.float', this).css('opacity', 0);
			
			$([trigger.get(0), info.get(0)]).mouseover(function () {
				if (hideDelayTimer) clearTimeout(hideDelayTimer);
				if (beingShown || shown) {
					// don't trigger the animation again
					return;
				} else {
					// reset position of info box
					beingShown = true;
					info.css({left: -10, top: -10, display: 'block'}).animate({ opacity: 1 }, time, 'swing', function() { beingShown = false; shown = true; });
				}
				return false;
			}).mouseout(function () {
				if (hideDelayTimer) clearTimeout(hideDelayTimer);
				hideDelayTimer = setTimeout(function () {
				hideDelayTimer = null;
				info.animate({ opacity: 0 }, time, 'swing', function () { shown = false; info.css('display', 'none'); }); }, hideDelay);
				return false;
			});
		});
		

		
		$('#nav li').each(function(i) {
			var distance = 10;
			var time = 50;
			var hideDelay = 50;
			var lefto;
			var hideDelayTimer = null;					
			var beingShown = false;
			var shown = false;
			var trigger = $('.selectnav', this);
			var info = $('.subnav', this).css('opacity', 0);
			if (trigger.text() == 'Sport') { lefto = 0; }  
			if (trigger.text() == 'Theatre') { lefto = 8; }
			if (trigger.text() == 'Concert') { lefto = 9; }
			$([trigger.get(0), info.get(0)]).mouseover(function () {
				if (hideDelayTimer) clearTimeout(hideDelayTimer);
				if (beingShown || shown) {
					// don't trigger the animation again
					return;
				} else {
					// reset position of info box
					beingShown = true;
					info.css({left: lefto, top: -10, display: 'block'}).animate({ opacity: 1 }, time, 'swing', function() { beingShown = false; shown = true; });
				}
				return false;
			}).mouseout(function () {
				if (hideDelayTimer) clearTimeout(hideDelayTimer);
				hideDelayTimer = setTimeout(function () {
				hideDelayTimer = null;
				info.animate({ opacity: 0 }, time, 'swing', function () { shown = false; info.css('display', 'none'); }); }, hideDelay);
				return false;
			});
		});
		
		if(window.ActiveXObject){ 
			$(function() { $.getScript("http://www.ticketexchanger.com/jschanger/supersleight-jq.js", function() { $(".ta").supersleight(); }); });
		}
		
		$('#EventSearch').focus(function () {
         	$(this).val(""); $(this).addClass("foc");
    	});

		var $height_scroll=$('.hyebox').innerHeight();
		$('.more').toggle(function() { 
			var $height_div=$(this).parent().prev('.hyebox').children('ul').innerHeight();
			$(this).parent().prev('.hyebox').animate({ height: $height_div+'px' }, 400);
			$(this).text('Less'); $(this).css('background-image', 'url(../images/row_blue_less.gif)');
		},function(){ 	
			$(this).parent().prev('.hyebox').animate({ height: $height_scroll+'px' }, 400);
			$(this).text('More'); $(this).css('background-image', 'url(../images/row_blue_more.gif)');
		});
		
		

    });
