﻿$(document).ready(function() {
    $(".fade-bar").delay(8000).fadeOut(400);

    /* Start - Input Mask */
    $(".inputtype_date").mask("99/99/9999");
    $(".inputtype_phone").mask("(999) 999-99-99");
    $(".inputtype_credit-card").mask("9999-9999-9999-9999");
    $(".inputtype_cvv").mask("999");
    $(".inputtype_zip").mask("99999");
    $(".inputtype_taxnumber").mask("9999999999");

    $(".inputtype_tckimlik").mask("99999999999");

    /* End - Input Mask */

    //    $(".toggler").click(function() {
    //        var className = $(this).attr("rel");
    //        $("." + className).toggle();
    //        return false;
    //    });

    $(".submitButtonLoader").live("click", function() {
        $(this).hide().next().removeClass("hidden").css("margin-top", "5px").show();
    });

    $(".chkShowBilling").click(function() {
        $(".pnlBilling").toggle();
    });

    $("a.toggler").each(function(index) {
        var id = $(this).attr("rel");
        $(id).hide();
    });

    $("a.toggler").click(function() {
        var id = $(this).attr("rel");
        $(id).toggle();
        return false;
    });

    $(".btnChangePassengerCount").click(function() {
        $(".passengerInfo").hide();
        $(".fares").hide();
    });

    $('.pulse').pulse({
        opacity: [0.3, 1]
    }, {
        times: 3
    });

    $(".tooltip").tipsy({ gravity: 's', live: true });
    $(".tooltipN").tipsy({ gravity: 'n', live: true });
    $(".tooltipW").tipsy({ gravity: 'w', live: true });
    $(".tooltipE").tipsy({ gravity: 'e', live: true });

    $('.price').numeric({ allow: "., " });
    $('.email').alphanumeric({ allow: ".@_-" });
    $('.alphanumeric').alphanumeric({ allow: ".,-_()/*@ " });
    $('.address').alphanumeric({ allow: ".-_/\\: " });
    $('.alpha').alpha({ allow: " " });
    $('.alphaWithNoSpace').alpha();
    $('.numeric').numeric();

});
