

/**
 * Utility method that know which location the short sea and long sea
 * bookings are. Depending on the route chosen it knows to show or hide
 * the one liner comment about the sailing frequency.
 */
function showHideRouteOneLiner(element){
	//$('#outRoute').trigger('change');
	var $selected = element.attr('index');
	if ($selected == 1 || $selected == 2 || $selected == 5 || $selected == 6 ) {
		$('#OutOneSailing').show(); 
		$('#OutOneSailingWC').hide();
	} else if ($selected == 3 || $selected == 7) {
		$('#OutOneSailingWC').show();
		$('#OutOneSailing').hide();
	} else {
		$('#OutOneSailingWC').hide();
		$('#OutOneSailing').hide();
	}	
}

function initMainTabs() {
	// top nav button states
	jQuery('#TopNav li').hover(
		function() {
			if(jQuery(this).attr('class') != 'Current Selected') {
				jQuery(this).css({'background-position': 'right center'});
				jQuery(this).children('a').css({'background-position': 'left center'});
			}
		},
		function(){
			if(jQuery(this).attr('class') != 'Current Selected') {
				jQuery(this).css({'background-position': 'right top'});
				jQuery(this).children('a').css({'background-position': 'left top'});
			}
		}
	);

	jQuery('#TopNav li').mousedown(function() {
		if(jQuery(this).attr('class') != 'Current Selected') {
			jQuery(this).css({'background-position': 'right bottom'});
			jQuery(this).children('a').css({'background-position': 'left bottom'});
		}
	});

	jQuery('#TopNav li').mouseup(function() {
			if(jQuery(this).attr('class') != 'Current Selected') {
			jQuery(this).css({'background-position': 'right top'});
			jQuery(this).children('a').css({'background-position': 'left top'});
		}
	});
	
}

		
		

