﻿
   
              function RefreshImage(valImageId) {
            var objImage = document.getElementById(valImageId)
            if (objImage == undefined) {
                return;
            }
            var now = new Date();
            objImage.src = objImage.src.split('?')[0] + '?x=' + now.toUTCString();
        }
      

	function odaseyet(odatipi,i){
		switch (odatipi)
	{
	case 'Çift kişilik': 
	$('#oda'+i+' tr.single').show("slow");
	$('#oda'+i+' tr.double').show("slow");
	$('#oda'+i+' tr.triple').hide();
	break;
		case 'Tek kişilik': 
	$('#oda'+i+' tr.single').show("slow");
	$('#oda'+i+' tr.double').hide("slow");
	$('#oda'+i+' tr.triple').hide("slow");
	break;
	
	
	case 'Çift kişilik + 1 Çocuk': 
	case 'Üç kişilik': 
	$('#oda'+i+' tr.single').show("slow");
	$('#oda'+i+' tr.double').show("slow");
	$('#oda'+i+' tr.triple').show("slow");
	break;
	
	
	default:}
	}	



	$(document).ready(function(){


  $('.faceshare').click(function (){ 
 var url = window.location.href;
window.open('http://www.facebook.com/sharer.php?u='+url,'_blank');

});
	
	$('input.tarih').Takvim({ event: "focus", Time: 500, Opacity: false }); 
  $("#listele img").lazyload(
  {
  //threshold : 200,
  placeholder : "/img/grey.gif",
  effect : "fadeIn"


  
  }
  
  
  );
  	
		$('a.logo').pngFix( );
			$("a[rel='example4']").colorbox({slideshow:true});
		var sudoSlider = $("#haberslide").sudoSlider({
		numeric:false,
		vertical:true,
		fade:true,
		crossFade:false,
		continuous:true });
		
		
	
			$('select.odatipim').change(function (){
			var odatipi=$(this).val();
			var i=$(this).attr('name');
			i=i.replace("_tip","");
			i=i.replace("oda","");
			odaseyet(odatipi,i);
			});
		
		
			$('select#oda_sayisi').change(function (){
			var deger=$(this).val();
			var i=1;
			for (i=1;i<=6;i++)
			{
			if(i<=deger)
						{
				$('#oda'+i).show("fast");
				var odatipi=$('select[name="oda'+i+'_tip"]').val();
				odaseyet(odatipi,i);
						}	
				
				else
						{
				$('#oda'+i).hide();
						}

			}
			
           	$('div#odalar').css("display","block");
			
			});
             
		
		
	
		
		
	});
    $(window).load(function() {
    
	   $('select#oda_sayisi').change();         	
       $('#anaslide').nivoSlider();

        
    });

      $(function(){
      
	 $("input.dog_tar").mask("99/99/9999");
	 $("input.telefon").mask("(999) 999-9999");


        $('.scroll').scrollbar();
        
        $('#detaytab').tabs({ event: 'click' }).find('a').click(function() {
                    return false;
            });
            
	    $('ul#items').easyPaginate({
		    step:3
	    });
        
                
                
   		
                
                
      })
      
      
      
      
      
      
      
 


