Coach Jay Pedestal Routine Pdf
Download https://shoxet.com/2t1RCN
DOWNLOAD THE COACH USA APP TODAY!'); } // Check for sidebar search: If sidebar, add the small-widget class let smallWidget = false; if (($theForm.width() < 400) && (jQuery(window).width() > 991)) { smallWidget = true; jQuery('#block-cusa-coachusawebservices-scheduled-services').addClass('small-widget'); jQuery('.region-masthead__search-form.small-widget, .coach_wrapper, .coach_inner_wrapper').addClass('small-widget'); $theWidget.addClass('small-widget'); jQuery('.alert-notification-block').css('margin','24px 0 0 0'); } jQuery('.form-item-destinationstate').prepend('Service Advisory'); if (smallWidget) jQuery('.service-advisory-link').addClass('small-widget'); jQuery('.service-advisory-link').on('click', function (e) { document.location = '/service-advisories'; }); // Prevent form submission when Purchase button clicked jQuery('#fares-submit').click(function (e) { e.preventDefault(); document.location = purchaseURL; }); // Add submit function to Schedules button when clicked jQuery('#schedule-submit').click(function (e) { e.preventDefault(); // Add 3 query string parameters to Schedules button if fares exist if (purchaseURL.search('origin_fare_zone') >= 0) { const queryString = purchaseURL.substring( purchaseURL.indexOf('?') + 1 ); const theInputs = parseQueryString(queryString); // Add new parameter to indicate new format jQuery('', { type: 'hidden', id: 'nt', name: 'nt', value: '1' }).prependTo($theForm); for (let i = theInputs.length - 1; i >= 0; i--) { const arrVals = theInputs[i].split('='); jQuery('', { type: 'hidden', id: arrVals[0], name: arrVals[0], value: arrVals[1] }).prependTo($theForm); } setTimeout(function() { $theForm.submit(); }, 250); } else { $theForm.submit(); } }); jQuery('#coach-purchase-div, #coach-schedule-div').css('display', 'none'); const $submitButton = jQuery('#edit-submit'); $submitButton.prop("disabled", true); jQuery('#edit-originstate, #edit-origincity, #edit-destinationstate, #edit-destinationcity').on('change', function (e) { jQuery('#coach-purchase-div, #coach-schedule-div').css('display', 'none'); $theWidget.css('display', 'none'); $submitButton.css('display', 'block'); $submitButton.prop('disabled', true); arrOriginFareZones.length = 0; arrDestFareZones.length = 0; agentOperators = []; if (jQuery('#edit-destinationcity').val() !== '') { checkFares(); } }); function showPurchaseButton() { let showButton = false; const oVal = jQuery("input[name='fz-selects']:checked").val(); const dVal = jQuery("input[name='fz-selects2']:checked").val(); if ((lengthOriginFareZones === 1) && (lengthDestFareZones === 1)) { showButton = true; } else if ((lengthOriginFareZones > 1) && (lengthDestFareZones === 1)) { if (oVal) showButton = true; } else if ((lengthOriginFareZones === 1) && (lengthDestFareZones > 1)) { if (dVal) showButton = true; } else if ((lengthOriginFareZones > 1) && (lengthDestFareZones > 1)) { if (oVal && dVal) showButton = true; } if (showButton) { jQuery('#edit-submit').css('display','none'); jQuery('#coach-purchase-div').css('display','block'); jQuery('#coach-schedule-div').css('display','block').css('margin-top','20px'); } else { jQuery('#coach-purchase-div').css('display', 'none'); jQuery('#coach_ticket_fare').remove('#origin-farezones'); jQuery('#coach_ticket_fare').remove('#dest-farezones'); } } // Needed for IE11 as IE11 does not support .find function findItem(theArr, theItem) { for (let c = 0; c < theArr.length; c++) { if (theArr[c] === theItem) return true; } return false; } function findFarezone(theArr, theItem) { for (let c = 0; c < theArr.length; c++) { if (theArr[c].fare_zone === theItem) return true; } return false; } function checkFares() { "use strict"; let oCity = jQuery('#edit-origincity').val(); let originCity = oCity.toUpperCase().replace(/\s/g, ""); originCity = originCity.replace('NEWARKLIBERTYAIRPORT','NEWARKLIBERTYINTERNATIONALAIRPORT'); let dCity = jQuery('#edit-destinationcity').val(); let destCity = dCity.toUpperCase().replace(/\s/g, ""); destCity = destCity.replace('NEWARKLIBERTYAIRPORT','NEWARKLIBERTYINTERNATIONALAIRPORT'); const originState = jQuery('#edit-originstate').val(); const destState = jQuery('#edit-destinationstate').val(); const theURL = encodeURI(apiURL + 'fare/byOd?originState=' + originState + '&originCity=' + originCity + '&destinationState=' + destState + '&destinationCity=' + destCity); if ((theHost !== 'uat') && (theHost !== 'prod')) { console.log(originState, originCity, destState, destCity); console.log(theURL); } // Get fares data and process jQuery.ajax({ type: 'GET', url: theURL, dataType: 'json', headers: {'x-api-key': apiKey}, success: function (data) { if ((theHost !== 'uat') && (theHost !== 'prod')) { console.log("fares api success"); console.log(data); } // Remove Woodbury Common fares if ((originCity === 'WOODBURYCOMMON') || (destCity === 'WOODBURYCOMMON')) { if (typeof data.orbitResponse !== 'undefined') { data.orbitResponse = []; } } // Remove filtered fares if (onlyShortline || onlyRockland) { let orbitResponse = []; if (typeof data.orbitResponse !== 'undefined') { if (data.orbitResponse.length > 0) { if (onlyShortline) { orbitResponse = data.orbitResponse.filter(function (elm) { return elm.operatorCode === 'HTL'; }); } else if (onlyRockland) { orbitResponse = data.orbitResponse.filter(function (elm) { return elm.operatorCode === 'RCK'; }); } data.orbitResponse = JSON.parse(JSON.stringify(orbitResponse)); } } } if (typeof data.orbitResponse !== 'undefined') { if (data.orbitResponse.length > 0) { arrOriginFareZones.length = 0; arrDestFareZones.length = 0; jQuery('#edit-submit').css('display', 'none'); for (let c = 0; c < data.orbitResponse.length; c++) { if (typeof data.orbitResponse[c].operatorCode !== 'undefined') { // Add operator name and code to list of operators if (typeof agentOperators[data.orbitResponse[c].operatorCode] === 'undefined') { agentOperators[data.orbitResponse[c].operatorCode] = data.orbitResponse[c].operatorName; } } if (typeof data.orbitResponse[c].originFareZone !== 'undefined') { if (!findFarezone(arrOriginFareZones, data.orbitResponse[c].originFareZone)) { arrOriginFareZones.push({ fare_zone: data.orbitResponse[c].originFareZone, operator_code: data.orbitResponse[c].operatorCode }); } if (!findFarezone(arrDestFareZones, data.orbitResponse[c].destinationFareZone)) { arrDestFareZones.push({ fare_zone: data.orbitResponse[c].destinationFareZone, operator_code: data.orbitResponse[c].operatorCode }); } } } if ((theHost !== 'uat') && (theHost !== 'prod')) { console.log('FARE ZONES', arrOriginFareZones, arrDestFareZones); console.log('OPERATORS', agentOperators, Object.keys(agentOperators).length); } purchaseURL = basePurchaseURL + '?origin_fare_zone=' + arrOriginFareZones[0].fare_zone + '&destination_fare_zone=' + arrDestFareZones[0].fare_zone + '&operator_code=' + arrOriginFareZones[0].operator_code + '&partner_code=CUSA'; let o_index = 0; let d_index = 0; let op_key = ''; showOriginFareZones = (arrOriginFareZones.length > 1); showDestFareZones = (arrDestFareZones.length > 1); lengthOriginFareZones = arrOriginFareZones.length; lengthDestFareZones = arrDestFareZones.length; jQuery('#coach_ticket_fare').append(''); jQuery('#coach_ticket_fare').append(''); jQuery('#operator_selector').html(''); jQuery('#farezone_selector').html(''); if (smallWidget) { jQuery('#farezone_selector').addClass('small-widget'); jQuery('#operator_selector').addClass('small-widget'); jQuery('#op_instructions').addClass('small-widget'); jQuery('#fare_instructions').addClass('small-widget'); } if (Object.keys(agentOperators).length > 1) { $theWidget.css('display', 'block'); jQuery('#farezone_selector').css('display', 'none'); jQuery('#op_instructions').html('Choose your operator and route'); jQuery('#operator_selector').append(''); const $sOp = (jQuery('#select-operator')); if (smallWidget) $sOp.addClass('small-widget'); let agentIndex = 0; for (let [key, value] of Object.entries(agentOperators)) { $sOp.append('' + value + ''); agentIndex++; } if (smallWidget) jQuery('.farezone').addClass('small-widget'); jQuery("input[type=radio][name='op-selects']").change(function () { op_key = jQuery("input[name='op-selects']:checked").val(); lengthOriginFareZones = 0; for (let k = 0; k < arrOriginFareZones.length; k++) { if (op_key === arrOriginFareZones[k].operator_code) { lengthOriginFareZones++; o_index = k; } } lengthDestFareZones = 0; for (let k = 0; k < arrDestFareZones.length; k++) { if (op_key === arrDestFareZones[k].operator_code) { lengthDestFareZones++; d_index = k; } } purchaseURL = basePurchaseURL + '?origin_fare_zone=' + arrOriginFareZones[o_index].fare_zone + '&destination_fare_zone=' + arrDestFareZones[d_index].fare_zone + '&operator_code=' + op_key + '&partner_code=CUSA'; showOriginFareZones = (lengthOriginFareZones > 1); showDestFareZones = (lengthDestFareZones > 1); if (showOriginFareZones || showDestFareZones) { jQuery('#farezone_selector').css('display', 'block'); renderFareZones(); } else { jQuery('#farezone_selector').css('display', 'none'); } showPurchaseButton(); }); } else { renderFareZones(); } function renderFareZones() { if (showOriginFareZones || showDestFareZones) { jQuery('#farezone_selector').html(''); $theWidget.css('display', 'block'); if (showOriginFareZones && (lengthDestFareZones === 1)) { jQuery('#fare_instructions').html('Choose your origin fare zone'); } else if ((lengthOriginFareZones === 1) && showDestFareZones) { jQuery('#fare_instructions').html('Choose your destination fare zone'); } else if (showOriginFareZones && showDestFareZones) { jQuery('#fare_instructions').html('Choose your origin and destination fare zones'); } if (showOriginFareZones) { jQuery('#farezone_selector').append(''); const $oFz = (jQuery('#origin-farezones')); if (smallWidget) $oFz.addClass('small-widget'); for (let f = 0; f < arrOriginFareZones.length; f++) { if ((op_key === '') || (op_key === arrOriginFareZones[f].operator_code)) { let theLabel = oCity + ' - ' + arrOriginFareZones[f].fare_zone; if (typeof friendlyFZs[arrOriginFareZones[f].fare_zone] !== 'undefined') theLabel = friendlyFZs[arrOriginFareZones[f].fare_zone].toUpperCase(); $oFz.append('' + theLabel + ''); } } if (smallWidget) jQuery('.farezone').addClass('small-widget'); jQuery('input[type=radio][name=fz-selects]').change(function () { o_index = jQuery("input[name='fz-selects']:checked").val(); showPurchaseButton(); purchaseURL = basePurchaseURL + '?origin_fare_zone=' + arrOriginFareZones[o_index].fare_zone + '&destination_fare_zone=' + arrDestFareZones[d_index].fare_zone + '&operator_code=' + arrOriginFareZones[o_index].operator_code + '&partner_code=CUSA'; jQuery("#purchase-href").attr("href", purchaseURL); }); } if (showDestFareZones) { jQuery('#farezone_selector').append(''); const $dFz = (jQuery('#dest-farezones')); if (smallWidget) $dFz.addClass('small-widget'); for (let f = 0; f < arrDestFareZones.length; f++) { if ((op_key === '') || (op_key === arrDestFareZones[f].operator_code)) { let theLabel = dCity + ' - ' + arrDestFareZones[f].fare_zone; if (typeof friendlyFZs[arrDestFareZones[f].fare_zone] !== 'undefined') theLabel = friendlyFZs[arrDestFareZones[f].fare_zone].toUpperCase(); $dFz.append('' + theLabel + ''); } } if (smallWidget) jQuery('.farezone').addClass('small-widget'); jQuery('input[type=radio][name=fz-selects2]').change(function () { d_index = jQuery("input[name='fz-selects2']:checked").val(); showPurchaseButton(); purchaseURL = basePurchaseURL + '?origin_fare_zone=' + arrOriginFareZones[o_index].fare_zone + '&destination_fare_zone=' + arrDestFareZones[d_index].fare_zone + '&operator_code=' + arrOriginFareZones[o_index].operator_code + '&partner_code=CUSA'; jQuery("#purchase-href").attr("href", purchaseURL); }); } } } // If block below does not execute with operator selector if ((lengthOriginFareZones === 1) && (lengthDestFareZones === 1)) { jQuery('#coach-purchase-div').css('display', 'block'); jQuery('#coach-schedule-div').css('display', 'block').css('margin-top', '20px'); purchaseURL = basePurchaseURL + '?origin_fare_zone=' + arrOriginFareZones[0].fare_zone + '&destination_fare_zone=' + arrDestFareZones[0].fare_zone + '&operator_code=' + arrOriginFareZones[0].operator_code + '&partner_code=CUSA'; jQuery("#purchase-href").attr("href", purchaseURL); } else if ((lengthOriginFareZones > 1) && (lengthDestFareZones > 1)) { jQuery('#origin-farezones').css('float', 'left'); jQuery('#dest-farezones').css('float', 'right'); } } else { jQuery('#coach-purchase-div').css('display', 'none'); jQuery('#coach-schedule-div').css('display', 'block').css('margin-top', '0'); $submitButton.css('display', 'none'); } } }, error: function (xhr) { // if error occured console.log(xhr.statusText + ' ' + xhr.responseText); }, complete: function () { } }); } } }; if ( document.readyState === "complete" || (document.readyState !== "loading" && !document.documentElement.doScroll) ) { theCallback(); } else { document.addEventListener("DOMContentLoaded", theCallback); }//--> Coach USA Van Galder Chicago Airport Bus Schedule 2b1af7f3a8