Jetabroad.AffiliateId = 'MONDO';

Jetabroad.SearchButtonUri = 'spacer.gif';

Jetabroad.Uri = 'http://www.jetabroad.co.nz';

//Jetabroad.originalPC = Jetabroad.PopulateCannonball;
//Jetabroad.PopulateCannonball = function(a) { debugger; Jetabroad.originalPC(a); }

Jetabroad.RenderCannonball('cannonballForm');



jQuery('label[for="jcMultiCityRadioButton"]').hide ();
jQuery("#cannonballForm").attr("target","_blank");

jQuery('#jcPassengersPanel').prepend('<span class="pax">Traveller</span>');
jQuery('label[for="jcDepartFromTextBox"]').text("From");
jQuery('label[for="jcArriveIntoTextBox"]').text("To");

jQuery('#jcDepartFromError').html('Enter a departure city');
jQuery('#jcArriveIntoError').html('Enter an arrival city');
jQuery('#jcDepartFromTextBox').click(function(){
	jQuery('#jcDepartFromError').css('display','none');
	jQuery('#jcDepartFromTextBox').focus();
});

jQuery('#jcArriveIntoTextBox').click(function(){
	jQuery('#jcArriveIntoError').css('display','none');
	jQuery('#jcArriveIntoTextBox').focus();
});

jQuery('#jcDepartFromTextBox').focus(function(){
	jQuery('#jcDepartFromError').css('display','none');
	
});

jQuery('#jcArriveIntoTextBox').focus(function(){
	jQuery('#jcArriveIntoError').css('display','none');
	
});

jQuery('#jcDepartFromError').click(function(){
	jQuery('#jcDepartFromError').css('display','none');
	jQuery('#jcDepartFromTextBox').focus();
});

jQuery('#jcArriveIntoError').click(function(){
	jQuery('#jcArriveIntoError').css('display','none');
	jQuery('#jcArriveIntoTextBox').focus();
});


/*
function simple_tooltip(target_items, name,x, y){
 jQuery(target_items).each(function(i){
							   
		jQuery("#jcFlightSearchPanel").append("<div class='"+name+"' id='"+name+i+"'><p class='jcTxt'>"+$(this).attr('title')+"</p></div>");
		var my_tooltip = jQuery("#"+name+i);

		$(this).removeAttr("title").mouseover(function(){
				my_tooltip.css({opacity:0.9, display:"none"}).fadeIn(400);
		}).mousemove(function(kmouse){
				my_tooltip.css({left:x, top:y});
		}).mouseout(function(){
				my_tooltip.fadeOut(400);
		});
	});
}
*/

jQuery('#jcCurrencyDropDownList').attr("name","currency1");

jQuery('label[for="jcMultiCityRadioButton"]').after('<span class="multibg"><a href="http://www.jetabroad.co.nz/?utm_source=aff_MONDO&utm_medium=multiflightsearch&utm_campaign=jetabroad" target="_blank" id="jc_multilink" title="Click to search and book multi-city flights or flights with stopover in either or both directions">Multi-city</a></span><input type="hidden" name="currency" value="NZD - New Zealand Dollar" />');
	
	jQuery('label[for="jcChildCountDropDownList"]').attr("title","*A child is 2-11 yrs (unless otherwise specified)");
	jQuery('label[for="jcInfantCountDropDownList"]').attr("title","*An infant is below 2 years at the time of return");
	 //simple_tooltip('label[for="jcChildCountDropDownList"]',"jctooltip",0,218);
	 //simple_tooltip('label[for="jcInfantCountDropDownList"]',"jctooltip2",0,218);






