//Plugin to add text to an input field that disappears on focus 
$(document).ready(function() {
	
	$(document).pngFix();
	
	$(function() {
	
	$('.tabNavigation').tabs({ fxFade: true, fxSpeed: 'fast' });	
	});
	
	var zindex = 0;
	$("#largeTabs a").mouseenter(function() {									  
			$(this).parent().find(".popTab").show("slide", { direction: "right" }, 200);
			zindex = $(this).parent().css("z-index");
			$(this).parent().css({'z-index': '100'});
	});
	
	$("#largeTabs a").mouseleave(function() {
		$(this).parent().css({'z-index': zindex});
		$(this).parent().find(".popTab").hide("slide", { direction: "right" }, 200);

	});

function formatText(index, panel) {
	  return index + "";
	}
	
/* Initialise slider panel IF it exists on the page */
	if ( $(".panelSlider").length > 0 ) {
		$('body').append("<script type='text/javascript' src='scripts/jquery.anythingslider.js'></script>" + "<script type='text/javascript' src='scripts/jquery.easing.1.2.js'></script>");
		$(function () {
			$('.panelSlider').anythingSlider({
				easing: "swing",        		// Anything other than "linear" or "swing" requires the easing plugin
				autoPlay: true,                 		// This turns off the entire FUNCTIONALY, not just if it starts running or not.
				delay: 12000,                    		// How long between slide transitions in AutoPlay mode
				startStopped: false,            		// If autoPlay is on, this can force it to start stopped
				animationTime: 900,             		// How long the slide transition takes
				hashTags: true,                 		// Should links change the hashtag in the URL?
				buildNavigation: true,          		// If true, builds and list of anchor links to link to each slide
				pauseOnHover: true,             		// If true, and autoPlay is enabled, the show will pause on hover
				startText: "Go",             			// Start text
				stopText: "Stop",               		// Stop text
				navigationFormatter: formatText      	// Details at the top of the file on this use (advanced use)
			});
			$("#slide-jump").click(function(){
				$('.panelSlider').anythingSlider(6);
			});
		});
	};
				   
	//$('input[ID=keyword]').inputFieldText('Find your perfect experience here!');
	//$('input[name=airfieldSearch]').inputFieldText('Enter postcode / town / city');
	
	//$('input[name=DeliveryName]').inputFieldText('e.g John Smith');
	//$('input[name=Address1]').inputFieldText('e.g 123 ABC Lane');
	//$('input[name=Address2]').inputFieldText('e.g Essex');
	//$('input[name=City]').inputFieldText('e.g Townsville');
	//$('input[name=Postcode]').inputFieldText('e.g SS6 8HK');
	//$('input[name=AtendeeName]').inputFieldText('e.g John Smith');
});