
var dynLoaded=false;var __$;var __jQuery;if(typeof($)!='undefined'){__$=$;}
if(typeof(jQuery)!='undefined'){__jQuery=jQuery;}
load=function(){load.getScript("http://static.hotel.cz/js/jquery/jquery-1.4.4.js?1");load.tryReady(0);}
load.getScript=function(filename){var script=document.createElement('script')
script.setAttribute("type","text/javascript")
script.setAttribute("src",filename)
if(typeof script!="undefined")
document.getElementsByTagName("head")[0].appendChild(script)}
load.tryReady=function(time_elapsed){if(typeof jQuery=="undefined"){if(time_elapsed<=10000){setTimeout("load.tryReady("+(time_elapsed+200)+")",200);}else{}}else{dynLoaded=true;if(null!==document.getElementById('hotelcz-mad')){widget_init();}}}
if(typeof(jQuery)=='undefined'){load();}else{widget_init();}
function displayRw(seoName,width,height,showtitle,titlecol,fontcol,fontsmallcol,fontsize,minrating,revimage,type,hotelcz,border,bordercol,hotelczlogo,rotatetwo,displayDate,isSpa){var my_jQuery=jQuery=jQuery.noConflict(true);APIURL='http://www.hotel.cz/ajax/review-widget/seoName/'+seoName+'/width/'+width+'/height/'+height+'/showtitle/'+showtitle+'/titlecol/'+titlecol+'/fontcol/'+fontcol+'/fontsmallcol/'+fontsmallcol+'/fontsize/'+fontsize+'/minrating/'+minrating+'/revimage/'+revimage+'/type/'+type+'/hotelcz/'+hotelcz+'/border/'+border+'/bordercol/'+bordercol+'/hotelczlogo/'+hotelczlogo+'/displayDate/'+displayDate+'/isSpa/'+isSpa+'/';my_jQuery('<div id="hotelcz-revwidget-body"></div>').insertAfter('#hotelrevw');my_jQuery.ajax({dataType:'jsonp',jsonp:'jsonp_callback',url:APIURL,success:function(data){my_jQuery('#hotelcz-revwidget-body').html('');my_jQuery('#hotelcz-revwidget-body').append(data.widgethtml);hczwrap(rotatetwo);}});var hcz_headline_count;var hcz_headline_interval;var hcz_old_headline=0;var hcz_current_headline=0;var hcz_second_headline=1;var hcz_rotateTwo=0;var hcz_rotateInterval=130;var hcz_resuming=0;if(width<200){hcz_rotateInterval=hcz_rotateInterval+200-width;}
function hczwrap(rotatetwo){hcz_rotateTwo=rotatetwo;hcz_headline_count=my_jQuery("div.hotelcz-revwidget-review").size();my_jQuery("div.hotelcz-revwidget-review:eq("+hcz_current_headline+")").css('top','5px');if(1==hcz_rotateTwo){my_jQuery("div.hotelcz-revwidget-review:eq("+hcz_second_headline+")").css('top',hcz_rotateInterval+'px');}
hcz_headline_interval=setInterval(headline_rotate,7000);}
function hcz_resume(){hcz_headline_interval=setInterval(headline_rotate,7000);headline_rotate(hcz_rotateTwo);hcz_resuming=0;}
function headline_rotate(){if(1!=hcz_rotateTwo){hcz_current_headline=(hcz_old_headline+1)%hcz_headline_count;my_jQuery("div.hotelcz-revwidget-review:eq("+hcz_old_headline+")").animate({top:-1205},"slow",function(){my_jQuery(this).css('top','1210px');});my_jQuery("div.hotelcz-revwidget-review:eq("+hcz_current_headline+")").show().animate({top:5},"slow");hcz_old_headline=hcz_current_headline;}else{hcz_current_headline=(hcz_old_headline+1)%hcz_headline_count;hcz_second_headline=(hcz_current_headline+1)%hcz_headline_count;my_jQuery("div.hotelcz-revwidget-review:eq("+hcz_old_headline+")").animate({top:-1205},"slow",function(){my_jQuery(this).css('top','1210px');});my_jQuery("div.hotelcz-revwidget-review:eq("+hcz_current_headline+")").show().animate({top:5},"slow");my_jQuery("div.hotelcz-revwidget-review:eq("+hcz_second_headline+")").show().animate({top:hcz_rotateInterval},"slow");hcz_old_headline=hcz_current_headline;}}}
function widget_init(){if(typeof(_hrwparam['displayDate'])=='undefined'){_hrwparam['displayDate']=1;}
if(typeof(_hrwparam['isSpa'])=='undefined'){_hrwparam['isSpa']=0;}
if((typeof(_hrwparam)!='undefined')&&(typeof(_hrwparam['seoName'])!='undefined')){displayRw(_hrwparam['seoName'],_hrwparam['width'],_hrwparam['height'],_hrwparam['showtitle'],_hrwparam['titlecol'],_hrwparam['fontcol'],_hrwparam['fontsmallcol'],_hrwparam['fontsize'],_hrwparam['minrating'],_hrwparam['revimage'],_hrwparam['type'],_hrwparam['hotelcz'],_hrwparam['border'],_hrwparam['bordercol'],_hrwparam['hotelczlogo'],_hrwparam['rotatetwo'],_hrwparam['displayDate'],_hrwparam['isSpa']);}
if(typeof(__$)!="undefined"){$=__$;}
if(typeof(__jQuery)!="undefined"){jQuery=__jQuery;}}
