/* NAVIGATOR */ $(document).ready(function() { $("#searcher .nav-tabs > li").click(function () { $("#searcher .nav-tabs > li").removeClass("active"); $(this).addClass("active"); var id = $(this).attr("id"); $("#searcher .contents > div").css("display", "none"); $("#searcher .contents > ." + id + "").css("display", "block"); }); }); /* NAVIGATOR */ /* TYPEAHEAD */ $(function () { $.getJSON('modules/searcher/hjson.php') .done(function (data) { $('#hotels').typeahead({ source: data }); }); $.getJSON('modules/searcher/tjson.php') .done(function (data) { $('#tours').typeahead({ source: data }); }); }); /* TYPEAHEAD */ /* TURKISH CHARACTERS */ $(document).ready(function() { $('#tours').keyup(function() { $(this).val($(this).val().substr(0,1).replace("ı", "I") + $(this).val().substr(1)); $(this).val($(this).val().substr(0,1).replace("i", "İ") + $(this).val().substr(1)); }); $('#hotels').keyup(function() { $(this).val($(this).val().substr(0,1).replace("ı", "I") + $(this).val().substr(1)); $(this).val($(this).val().substr(0,1).replace("i", "İ") + $(this).val().substr(1)); }); }); /* TURKISH CHARACTERS */