// clear fields script function clearText(field){ if (field.defaultValue == field.value) field.value = ''; else if (field.value == '') field.value = field.defaultValue; } // web fares expand effect SSS_faq = { init : function() { if (this.opentop){ $('div.webFareHolder .mid').filter(':first').find('.switch').slideToggle(0); } $('div.webFareHolder .mid .switch .town a').click(function() { SSS_faq.toggle(this) }); }, toggle : function(elt) { //$(elt).toggleClass('active'); $(elt).parent().parent().parent().find('.switch').slideToggle(300); }, opentop : true } function equalHeight(group) { tallest = 0; group.each(function() { thisHeight = $(this).height(); if(thisHeight > tallest) { tallest = thisHeight; } }); group.height(tallest); } /*BEGIN : BANNER CAROUSEL FUNCTIONS*/ function carousel_initCallback(carousel){ carousel.clip.hover(function() {carousel.stopAuto();}, function() {carousel.startAuto();}); }; function carousel_itemVisibleInCallback(carousel, item, i, state, evt){ //if (i==3){$('FORCE_ERROR').FORCE_ERROR.html} carousel_itemList = $(carousel.options.dataSelector); var iIndex = carousel.index(i, carousel_itemList.length); carousel.add(i, carousel_itemList.eq(iIndex - 1).html()); }; function carousel_itemVisibleOutCallback(carousel, item, i, state, evt){ carousel.remove(i); }; /*END : BANNER CAROUSEL FUNCTIONS*/ $(document).ready(function() { //if($.browser.msie && $.browser.version=="6.0"){ //} else { $('.dropdownFrom,.dropdownTo,.dayFrom,.dayTo,.dropdownClass,.adults,.kids1,.kids2,.infants,.departure,.departureDay,.checkInDay,.checkInMonth,.checkOutDay,.checkOutMonth,.countryRental,.countryRental1,.pickUpDay,.pickUpMonth,.pickUpYear,.pickUpHrs,.pickUpMins,.returnDay,.returnMonth,.returnYear,.returnHrs,.returnMins,.realTimeAirport,.searchDate,.searchTime,.scheduleFrom,.scheduleTo,.scheduleDay,.scheduleMonth,.OfficesperCountry,.OfficesperCity').sSelect(); //}; //$('#homeBooking').tabs({fxFade: true,fxSpeed: 'fast'}); $('.ffpMiles').tabs({fxFade: true,fxSpeed: 'fast'}); $('.earn').tabs({fxFade: true,fxSpeed: 'fast'}); $('.redeem').tabs({fxFade: true,fxSpeed: 'fast'}); var lang = 'el'; if(lang=='en') lang = 'en'; $('.dateFrom, .dateTo').datepicker($.extend({beforeShow: customRange,numberOfMonths: 2,duration: '',showOn: 'both',buttonImageOnly: true, buttonImage: '/OlympicAir/_gfx/date_ico.gif',dateFormat: 'dd/mm/yy'}, $.datepick.regional[lang])); $('.dateFrommiles, .dateTomiles').datepicker($.extend({numberOfMonths: 2, maxDate: '-2d', duration: '',showOn: 'both',buttonImageOnly: true, buttonImage: '/OlympicAir/_gfx/date_ico.gif',dateFormat: 'dd/mm/yy'}, $.datepick.regional[lang])); $('.dateRedeemMiles').datepicker($.extend({numberOfMonths: 2, minDate: '+1d', defaultDate: '+1d', duration: '',showOn: 'both',buttonImageOnly: true, buttonImage: '/OlympicAir/_gfx/date_ico.gif',dateFormat: 'dd/mm/yy'}, $.datepick.regional[lang])); equalHeight($(".webfaresBox .description .text")); equalHeight($(".serviceBox .description")); equalHeight($(".offersBox .description")); equalHeight($(".offersBox .descriptionIn .text")); $(".toggle").click(function () { $(this).parent().parent().find('.text').slideToggle(10); $(this).toggle(10); }); SSS_faq.init(); //ffp step2 company fields show / hide //$(".comp").hide() $(".round").hide() $(".business").click( function () { $(".comp").show() }); $(".home").click( function () { $(".comp").hide() }); $(".english").click( function () { $(".lang").hide() }); $(".greek").click( function () { $(".lang").show() }); $(".oneWay").click( function () { $(".round").hide() }); $(".roundTrip").click( function () { $(".round").show() }); $(".weatherToggle").click( function () { $(".weatherReport").slideToggle('slow'); }); }); function customRange(input) { return {minDate: (input.id == 'txtDateTo' ? ($('.dateFrom').datepicker('getDate')!=null?$('.dateFrom').datepicker('getDate'):-1) : 0) }; }