function asd($mbg, $current, $currentmax) { $current=$current+1; if ($current>$currentmax) $current =0; $('#theme').css("background-image", $mbg[$current]).show( 'slide', { direction: "left" }, 300 ); } $(function() { $.post("call.auth.php", {lang: 'ru'}, function(data){ if(data!=false) { $('#user_area').html(data); } }); //$( "#tabs" ).tabs(); //$( "#tabs" ).removeClass( "ui-corner-all"); $( ".butt" ).addClass( "ui-corner-all"); $('.slider').mobilyslider({ content: '.sliderContent', children: 'div', bullets: false, arrowsHide: true, arrows: false, transition: 'fade', animationSpeed: 800, autoplay: true, autoplaySpeed: 3000 }); var $mbg = []; $mbg[0] = "url(themes/theme1_ru.jpg)"; $mbg[1] = "url(themes/theme2_ru.jpg)"; $mbg[2] = "url(themes/theme3_ru.jpg)"; $mbg[3] = "url(themes/theme4_ru.jpg)"; $current = 0; $currentmax = 3; //setInterval('asd("'+$mbg+'", "'+$current+'", "'+$currentmax+'")', 5000); setInterval(function(){ $current=$current+1; if ($current>$currentmax) $current =0; $('#theme').css("background-image", $mbg[$current]).show( 'slide', { direction: "left" }, 300 ); }, 5000); $('#bg-left').click(function() { $current=$current-1; if ($current<0) $current = $currentmax; $('#theme').css("background-image", $mbg[$current]).show( 'slide', { direction: "right" }, 300 ); }); $('#bg-right').click(function() { $current=$current+1; if ($current>$currentmax) $current =0; $('#theme').css("background-image", $mbg[$current]).show( 'slide', { direction: "left" }, 300 ); }); }); function lookup(inputString1) { if (inputString1) $('#city').val()=inputString1; waitForIt(); $.post("call.list.php", {title: ""+$('#title').val()+"", city: ""+$('#city').val()+""}, function(data){ if(data.length >0) { $('#hotels').html(data); } else noData(); }); } // lookup function waitForIt() { $('#hotels').html('