function MakeBestTours(tours_html) { var tours_rows = []; var td_html = null; var rows_html = ''; $(tours_html).find("table:eq(0) td:eq(1) h4").remove(); if (tours_html) td_html = $(tours_html).find("table:eq(0) td:eq(1)").html(); if(td_html) { if($.browser.msie) tours_rows = td_html.split(''); else tours_rows = td_html.split(''); /* ---------------------------------------------------------------------------- */ for(i=0; i([^<]*)<\/b>/i,''); rows_html += ""+tours_rows[i].replace(/[^<]*<\/b>/ig,'')+""+price[1]+""; } rows_html = ""+ "Название тураСтоимость"+ rows_html+ ""; //alert(rows_html); $('#best_content').html(rows_html); /* ---------------------------------------------------------------------------- */ } else $('#best_content').html(tours_html); } $(document).ready(function(){ chkBanResize(); $('a.hotel_link, a.table-hotel-content-a').each(function(){ decoded = decode(this.title); this.href = decoded; this.title = decoded; this.innerHTML = decoded; }); var tmp = document.getElementById('weatherBlock'); if (tmp) { $.get('/get_weather.php', { cid: tmp.getAttribute('cid') } , function(data) { $('#weatherBlock').html(data); }); } }); $(window).resize(function(){ chkBanResize(); }); function chkBanResize() { var tmp = document.getElementById('bantbl'); if (tmp) tmp.rows[0].cells[1].style.display = ($(window).width() > 1255) ? '' : 'none'; } function decode(s) { symBase = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; result = ""; for( cur = 0; cur < s.length; cur += 4 ) { var c = new Array(4), nextChar; for( curC = 0; curC < 4; curC++) { curChar = s.substring(curC + cur, curC + cur + 1); if( '=' == curChar) c[curC] = 0; else c[curC] = symBase.indexOf(curChar); } result += String.fromCharCode(((c[0] << 2) % 256) | (c[1] >> 4)); result += String.fromCharCode(((c[1] << 4) % 256) | (c[2] >> 2)); result += String.fromCharCode(((c[2] << 6) % 256) | c[3]); } return result; }