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: 'lv'}, 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_lv.jpg)"; $mbg[1] = "url(themes/theme2_lv.jpg)"; $mbg[2] = "url(themes/theme3_lv.jpg)"; $mbg[3] = "url(themes/theme4_lv.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('
  Loading...
'); } function noData() { $('#hotels').html('
No data.
'); } function clear_err() { $('#pass').val(''); $('#err_login').hide(); } function userLogin() { $('#err_login').hide(); if($('#pass').val() == '') {$('#err_login').show(); return false;} $('#wt').show(); $.post("call.login.php", {pass: ""+$('#pass').val()+"", lang: 'lv'}, function(data){ if(data!="klaida") { $('#user_area').html(data); location.reload(); } else { $('#err_login').show(); $('#wt').hide(); } }); } // user login function userLogout() { $('#wt').show(); $.post("call.logout.php?lang=lv", {}, function(data){ $('#user_area').html(data); location.reload(); }); } // user login