(function() { var jQuery = null; var jCorner = null; if (!jQuery || window.jQuery.fn.jquery < '1.4.2') { var script_tag = document.createElement ('script'); script_tag.setAttribute ("type","text/javascript"); script_tag.setAttribute ("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"); script_tag.onload = loadJQueryCorner; script_tag.onreadystatechange = function () { // Same thing but for IE if (this.readyState == 'complete' || this.readyState == 'loaded') { loadJQueryCorner(); } }; // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); } else { // The jQuery version on the window is the one we want to use jQuery = window.jQuery; loadJQueryCorner(); } function loadJQueryCorner() { if (!jCorner) { var script_tag = document.createElement ('script'); script_tag.setAttribute ("type","text/javascript"); script_tag.setAttribute ("src", "http://www.tourradar.com/include/js/jquery-corner.js"); script_tag.onload = scriptLoadHandler; script_tag.onreadystatechange = function () { // Same thing but for IE if (this.readyState == 'complete' || this.readyState == 'loaded') { scriptLoadHandler(); } }; // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); } else { // The jQuery version on the window is the one we want to use jCorner = window.jQuery.fn.corner; jQuery.fn.corner = window.jQuery.fn.corner; scriptLoadHandler(); } } function scriptLoadHandler() { // Restore $ and window.jQuery to their previous values and store the // new jQuery in our local jQuery variable jQuery = window.jQuery.noConflict(true); // Call our main function main(); } function main() { jQuery(document).ready (function ($) { $('#trys_code_1208_823cae557322').append ('Loading...'); $.getJSON ('http://www.tourradar.com/index.php?c=iframes&m=your_site&user=1208&code=823cae557322&callback=?', function (data) { if (data.status == 'OK') { $('#trys_code_1208_823cae557322 #trys-loading').remove(); $('#trys_code_1208_823cae557322').append (''); $('#trys_code_1208_823cae557322').append ('
'); for (var i = 0; i < data.reviews.length; i ++) { var review = data.reviews[i]; $('#trys_code_1208_823cae557322 #trys_content').append ('
' + review.reviewer + ': ' + review.comments + ' more
Rated ' + (review.overall ? review.overall + ' out of 5 - ' : '') + review.distance + '
'); } var external_styles = {'width': 'auto', 'height': 'auto', 'background': 'none', 'border': 'none', 'text-align': 'left'/*, 'margin': 'auto', 'padding': '0', 'color': ''*/}; for (var i in external_styles) { $('#trys_code_1208_823cae557322 *'). css (i, external_styles[i]); } $('#trys_code_1208_823cae557322 #trys_plugin table:eq(0)').css ('width', '100%'); $('#trys_code_1208_823cae557322 #trys_plugin table:eq(0)').css ('border', 'none'); $('#trys_code_1208_823cae557322 #trys_plugin table:eq(0) td:eq(1)').css ('float', 'right'); $('#trys_code_1208_823cae557322').css ('display', 'none'); $('#trys_code_1208_823cae557322 #trys_plugin').corner ('round 5px'); $('#trys_code_1208_823cae557322 #trys_content').corner ('round 5px'); $('#trys_code_1208_823cae557322 #trys_plugin').width (parseInt (data.params.width)); $('#trys_code_1208_823cae557322 #trys_plugin').css ('background', data.params.shell_bg); $('#trys_code_1208_823cae557322 #trys_content').css ('background', data.params.tweet_bg); $('#trys_code_1208_823cae557322 #trys_plugin *').css ('font-family', data.params.font); $('#trys_code_1208_823cae557322 #trys_title a').css ('color', data.params.shell_text); $('#trys_code_1208_823cae557322 #trys_profile a').css ('color', data.params.shell_text); $('#trys_code_1208_823cae557322 .trys_review').css ('color', data.params.tweet_text); $('#trys_code_1208_823cae557322 .trys_review').css ('border-bottom', data.params.tweet_text + ' 1px dotted'); $('#trys_code_1208_823cae557322 .trys_last').css ('border-bottom', 'none'); $('#trys_code_1208_823cae557322 .trys_review a').css ('color', data.params.links); $('#trys_code_1208_823cae557322').css ('display', 'block'); $('#trys_code_1208_823cae557322 .trys_rating').css ('font-size', '10px').css ('margin-top', '5px'); } else { alert ('TourRadar widget cannot be loaded.'); } }); return false; }); } })();