function waitingDialogOpen(){ $("#dialogw").dialog({ //başlığı gizle dialogClass : "no-titlebar", width : 400, height : 100, modal : true, draggable : false, resizable : false, closeOnEscape: false, closeText : 'hide' }); $("#dialogw").html("
Lütfen bekleyiniz...
"); } function waitingDialogClose(){ $("#dialogw").dialog("close"); } function mesaj_modal(metin){ var dialogWidth = 400; var dialogHeight = 175; $("#dialog").html(metin); $("#dialog").dialog({ width : dialogWidth, height : dialogHeight, modal : true, draggable : false, resizable : false, open : function() { $('.ui-widget-overlay').bind('click', function() { $('#dialog').dialog('close'); }); }, buttons : { "Tamam": function() { $( this ).dialog( "close" ); } } }); $('#dialog').parent().css('position', 'fixed'); $('#dialog').parent().css('top', '50%'); $('#dialog').parent().css('left', '50%'); $('#dialog').parent().css('margin-top', -(dialogHeight/2)); $('#dialog').parent().css('margin-left', -(dialogWidth/2)); } function validateEmail(email){ var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; return (filter.test(email)); } $(window).load(function() { }); $(function(){ // Bind an event to window.onhashchange that, when the history state changes, gets the url from the hash and displays either our cached content or fetches new content to be displayed. $(window).bind('hashchange', function(e) { var url = $.param.fragment(); // Get the hash (fragment) as a string, with any leading # removed. Note that in jQuery 1.4, you should use e.fragment instead of $.param.fragment(). if (url=="") url="anasayfa"; if (url){ var pathArray = url.split('-'); if (pathArray[1] > 0){ $('.menu_sol_active').removeClass('menu_sol_active'); // Remove .menu_sol_active class from any previously "current" link(s). url && $('.menu_sol a[href="#odalarimiz"]').addClass('menu_sol_active'); // Add .menu_sol_active class to "current" nav link(s), only if url isn't empty. url="odadetay"; url = url + '.php?cat=' + pathArray[1]; }else{ $('.menu_sol_active').removeClass('menu_sol_active'); // Remove .menu_sol_active class from any previously "current" link(s). url && $('.menu_sol a[href="#' + url + '"]').addClass('menu_sol_active'); // Add .menu_sol_active class to "current" nav link(s), only if url isn't empty. url = url + '.php' } $.ajax({ type : 'post', url : url, timeout : 15000, cache : false, beforeSend : function() { waitingDialogOpen(); }, success : function(html){ waitingDialogClose(); $('.page_container').html(html).hide().fadeIn('slow'); }, error : function( objAJAXRequest, strError ){ waitingDialogClose(); mesaj_modal('Teknik hata oluştu. Lütfen yeniden deneyin. ' + strError); } }); } }); $(window).trigger('hashchange'); // Since the event is only triggered when the hash changes, we need to trigger the event now, to handle the hash the page may have loaded with. }); $(document).ready(function () { // fix youtube z-index $('iframe[src^="//www.youtube.com/embed"]').each(function(){ var url = $(this).attr("src"); var separator = (url.indexOf('?') > 0) ? '&' : '?'; $(this).attr('src', url + separator + 'wmode=transparent'); }); }); $(document).ready(function () { if ($(".zslider").length){ $(".zslider").zslider(); } TweenLite.to('.logo_container', 0.8, {left:0, opacity:1, ease:Cubic.easeOut, delay:5, onComplete:function(){ //TweenLite.to('.rezervasyon', 0.8, {right:110, opacity:1, ease:Cubic.easeOut, delay:0.5}); TweenLite.to('.menu_container', 0.8, {left:0, opacity:1, ease:Cubic.easeOut, delay:0.5, onComplete:function(){ TweenLite.to('.footer', 0.8, {bottom:'0', opacity:1, ease:Cubic.easeOut, delay:0.3}); /* TweenLite.to('.giris_logo_top', 0.5, {opacity:1, ease:Cubic.easeOut, delay:1, onComplete:function(){ TweenLite.to('.giris_bar_alt', 0.5, {bottom:'0', opacity:1, ease:Cubic.easeOut, delay:1}); }}); */ }}); }}); $("#t_checkinotel").datepicker({ dateFormat:"dd.mm.yy", showButtonPanel: true, onSelect: function(selectedDate) { var date = $(this).datepicker('getDate'); $("#t_checkoutotel").datepicker('option', 'minDate', date); // Reset minimum date date.setDate(date.getDate() + 1); // Add 1 days $("#t_checkoutotel").datepicker('setDate', date); // Set as default } }); var date = new Date(); date.setDate(date.getDate() + 0); // Add 0 days $("#t_checkinotel").datepicker("option", "minDate", date ); $("#t_checkoutotel").datepicker({ dateFormat:"dd.mm.yy", showButtonPanel: true, onSelect: function(selectedDate) { $("#t_checkinotel").datepicker('option', 'maxDate', $(this).datepicker('getDate')); // Reset maximum date } }); var date = new Date(); date.setDate(date.getDate() + 1); // Add 1 days $("#t_checkoutotel").datepicker("option", "minDate", date ); //colorbox $(".videolar").colorbox({iframe:true, innerWidth:425, innerHeight:344}); $(".outside").colorbox({innerWidth:"90%", height:"90%", iframe:true, opacity: 0.5}); if ($("a.colorbox, .resimler, a[rel='resimler'], a[rel^='resimler']").length>0) { $("a.colorbox, .resimler, a[rel='resimler'], a[rel^='resimler']").each(function(){ //alert($(this).attr("rel")); $(this).colorbox({ maxHeight:"90%", maxHeight:"90%", rel:$(this).attr("rel"), current: "resim {current} / {total}", previous: "« önceki", next: "sonraki »", close: "x Kapat", onComplete : function() { //$(this).colorbox.resize(); } }); }); } }); $(document).ready(function(){ if ($("#jquery_jplayer_2").length){ var Playlist = function(instance, playlist, options) { var self = this; this.instance = instance; // String: To associate specific HTML with this playlist this.playlist = playlist; // Array of Objects: The playlist this.options = options; // Object: The jPlayer constructor options for this playlist this.current = 0; this.cssId = { jPlayer: "jquery_jplayer_", interface: "jp_interface_", playlist: "jp_playlist_" }; this.cssSelector = {}; $.each(this.cssId, function(entity, id) { self.cssSelector[entity] = "#" + id + self.instance; }); if(!this.options.cssSelectorAncestor) this.options.cssSelectorAncestor = this.cssSelector.interface; $(this.cssSelector.jPlayer).jPlayer(this.options); $(this.cssSelector.interface + " .jp-previous").click(function() { self.playlistPrev(); $(this).blur(); return false; }); $(this.cssSelector.interface + " .jp-next").click(function() { self.playlistNext(); $(this).blur(); return false; }); }; Playlist.prototype = { displayPlaylist: function() { var self = this; $(this.cssSelector.playlist + " ul").empty(); for (i=0; i < this.playlist.length; i++) { var listItem = (i === this.playlist.length-1) ? "
  • " : "
  • "; listItem += ""+ this.playlist[i].name +""; // Create links to free media if(this.playlist[i].free) { var first = true; listItem += "
    ("; $.each(this.playlist[i], function(property,value) { if($.jPlayer.prototype.format[property]) { // Check property is a media format. if(first) first = false; else listItem += " | "; listItem += "" + property + ""; } }); listItem += ")"; } listItem += "
  • "; // Associate playlist items with their media $(this.cssSelector.playlist + " ul").append(listItem); $(this.cssSelector.playlist + "_item_" + i).data("index", i).click(function() { var index = $(this).data("index"); if(self.current !== index) self.playlistChange(index); else $(self.cssSelector.jPlayer).jPlayer("play"); $(this).blur(); return false; }); // Disable free media links to force access via right click if(this.playlist[i].free) { $.each(this.playlist[i], function(property,value) { if($.jPlayer.prototype.format[property]) { // Check property is a media format. $(self.cssSelector.playlist + "_item_" + i + "_" + property).data("index", i).click(function() { var index = $(this).data("index"); $(self.cssSelector.playlist + "_item_" + index).click(); $(this).blur(); return false; }); } }); } } }, playlistInit: function(autoplay) { if(autoplay) this.playlistChange(this.current); else this.playlistConfig(this.current); }, playlistConfig: function(index) { $(this.cssSelector.playlist + "_item_" + this.current).removeClass("jp-playlist-current").parent().removeClass("jp-playlist-current"); $(this.cssSelector.playlist + "_item_" + index).addClass("jp-playlist-current").parent().addClass("jp-playlist-current"); this.current = index; $(this.cssSelector.jPlayer).jPlayer("setMedia", this.playlist[this.current]); }, playlistChange: function(index) { this.playlistConfig(index); $(this.cssSelector.jPlayer).jPlayer("play"); }, playlistNext: function() { var index = (this.current + 1 < this.playlist.length) ? this.current + 1 : 0; this.playlistChange(index); }, playlistPrev: function() { var index = (this.current - 1 >= 0) ? this.current - 1 : this.playlist.length - 1; this.playlistChange(index); } }; var audioPlaylist = new Playlist("2", [ { name:"bir", mp3:"../dosyalar/images/site/mp3/1.mp3", oga:"../dosyalar/images/site/mp3/1.ogg" } ], { ready: function() { audioPlaylist.displayPlaylist(); audioPlaylist.playlistInit(true); // Parameter is a boolean for autoplay. }, ended: function() { audioPlaylist.playlistNext(true); }, play: function() { $(this).jPlayer("pauseOthers"); }, swfPath: "js", supplied: "oga, mp3" }); } });