﻿function initCity(){menuapp();simpleMoreopt();boxes();$(".btn-eq").click(function(){$(this).parent().parent().parent().parent().find("div.apartment-equipment").slideToggle("normal","easeOutExpo");if($(this).is(".btn-eq-active")){$(this).removeClass("btn-eq-active");}else{$(this).addClass("btn-eq-active");}return true;});$.mylist("");calendar("#fcal-arr","cal.png",0);calendar("#fcal-go","cal.png",0);automatComments(5000);}var intervalTime=0;var tempor=null;var totalComments=0;var totalComments2=0;function changeComment(){$("#reviews_content_col .hreview:first").clone().appendTo("#reviews_content_col2");$("#reviews_content_col .hreview:first").slideUp("10000",function(){$("#reviews_content_col .hreview:first").remove();$("#reviews_content_col2 .hreview:first").addClass("hreview_anim_hide");$("#reviews_content_col2 .hreview:first .rating").addClass("hreview_anim_hide");$("#reviews_content_col2 .hreview:first").clone().appendTo("#reviews_content_col");$("#reviews_content_col .hreview:last").fadeIn("15000",function(){$(this).removeClass("hreview_anim_hide");$("#reviews_content_col .hreview:last .rating").fadeIn("15000",function(){$(this).removeClass("hreview_anim_hide");});$("#reviews_content_col2 .hreview:first").remove();});});}function reset(){counterAnim=0;fin=false;}function automatComments(seg){intervalTime=parseInt(seg);reset();totalComments=$("#reviews_content_col > .hreview").size();totalComments2=$("#reviews_content_col2 > .hreview").size();if(totalComments==3&&totalComments2>0){if(isNaN(intervalTime)||intervalTime<=0){alert("Error en el tiempo");}else{tempor=setTimeout("nextComment()",intervalTime);}}}function stopComments(){clearTimeout(tempor);}function nextComment(){changeComment();tempor=setTimeout("nextComment()",intervalTime);}
