var err=new Array();function f_cerr(){}function submitenter(c,b){var a;if(window.event){a=window.event.keyCode}else{if(b){a=b.which}else{return true}}if(a==13){c.form.submit();return false}else{return true}}function rloy(b,a){var c=document.getElementById(b);if(c){c.style.backgroundColor="#EEF"}if(a){window.location.href=a}return false}function RunFlash(f,e,d,b,a,c,g){document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+e+'" height="'+d+'" id="'+c+'" align="middle">\n');document.write('<param name="allowScriptAccess" value="always" />\n');document.write("<param name='movie' value='"+f+"' /> \n");document.write("<param name='quality' value='high' /> \n");document.write("<param name='bgcolor' value='"+b+"' /> \n");document.write("<param name='menu' value='true' /> \n");document.write("<param name='flashvars' value='"+g+"' /> \n");if(a=="transparent"||a=="opaque"){document.write("<param name='wmode' value='"+a+"' /> \n");document.write("<embed src='"+f+"' menu='true' quality='high' wmode='"+a+"' bgcolor='"+b+"' width='"+e+"' height='"+d+"' name='"+c+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' flashvars='"+g+"' />\n")}else{document.write("<embed src='"+f+"' menu='true' quality='high' bgcolor='"+b+"' width='"+e+"' height='"+d+"' name='"+c+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' flashvars='"+g+"' />\n")}document.write("</object>\n")}String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};function tval(a){a.value=a.value.trim();return(true)}function D(a){try{console.log("DEBUG:"+a)}catch(b){}}function reload_saved(){var a=window.location.href.replace(/#.*/,"");window.location.href=a}var img_url="http://images3.cinemaki.com";function replace_src_ie8(b,a){if(!b.complete||b.naturalWidth==0){b.src=a}}function replace_missing_images_ie8(){}function replace_missing_images_webkit(){}var cmp_done=0;var s_done=0;var c_done=0;function content_refresh(){$(".close").click(function(){hideAll()});$(".hoverable,.linkalike").hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")});$(".adj > button").click(function(){if($(".adj").filter(".sel").length>2){$(".adj").filter(".sel").eq(0).removeClass("sel")}$(this).toggleClass("sel")});set_star_rating();login_menu();$("#act1").click(function(){if($(this).hasClass("disabled")){reload_saved();return}$(this).addClass("disabled");$("#form1").ajaxSubmit(function(c){facebook_before_post($("#form1 #comment").val(),reload_saved)})});$("#act2").click(function(){if($(this).hasClass("disabled")){reload_saved();return}$(this).addClass("disabled");$("#form2").ajaxSubmit(function(c){reload_saved()})});if(location.href.match(/\/sche\/(\d+)/)&&!s_done){s_done=1;$("#bts2_"+RegExp.$1).filter(":not(.sel)").click()}if(location.href.match(/#cmp/)&&!cmp_done){cmp_done=1;$("#cmp").click()}if($("#show_login").length>0&&!c_done){c_done=1;login()}var a=$(document.createElement("div"));a.attr("id","kisinfopopup");a.attr("class","kisinfosmall");a.html("");a.css({position:"absolute",display:"none",marginLeft:0,marginTop:0,top:0,left:0});$("body").append(a);a.hover(function(){},function(){$(this).fadeOut("fast")});var b=$(document.createElement("div"));b.attr("id","kisinfopopuplist");b.attr("class","kisinfolist");b.html("");b.css({position:"absolute",display:"none",marginLeft:0,marginTop:0,top:0,left:0});$("body").append(b);b.hover(function(){},function(){$(this).fadeOut("fast")});$("div.img_container, div.extra").hover(function(){var e=$(this);var g=e.find("div.kisinfosmall").html();var d=$("#kisinfopopup");d.html(g);var f=e.offset();d.css({top:f.top,left:f.left});d.fadeIn("slow")})}function facebook_before_post(a,b){if(a.length>5&&CK.fb_id){facebook_prompt_permission("publish_stream, offline_access, email",b)}else{b()}b()}function set_star_rating(){$(".rate :input.star").rating({required:1,callback:function(c,a){if(c){$(this).closest(".qual_small").addClass("sel").find(".set-text").html(this.title).end().closest(".qual_small").find(".appear-on-rate").removeClass("dni").end().closest(".qual_small").parent().find(".but").removeClass("sel").end();$(this).closest(".qual_small").find(".disappear-on-rate").addClass("dni");var e="/"+this.id.replace(/-/g,"/");var f=new Date();var b="/setmq"+e+"?dum="+f.getTime();$.get(b)}else{$(this).closest(".qual_small").find(".hover-text").html("&nbsp;")}},focus:function(b,a){$(this).closest(".qual_small").find(".hover-text").html(this.title).end().closest(".qual_small").find(".toggle-on-hover").toggleClass("dn")},blur:function(b,a){$(this).closest(".qual_small").find(".hover-text").html("&nbsp;").end().closest(".qual_small").find(".toggle-on-hover").toggleClass("dn")}})}var added_fns=new Object();function add_content_refresh(b,a){if(a){if(added_fns[a]){return}added_fns[a]=1}var c=content_refresh;content_refresh=function(){b();c()}}$(function(){content_refresh();$("#amessage").hide()});function ajax_message(a){if(a){$("#amessage").html(a).fadeIn()}else{$("#amessage").fadeOut()}}var MaskVisible=0;function hideAll(){$("#mask").css({visibility:"hidden",opacity:0});$("#amessage, #loginbox, #funbox, #gallerybox, #videotrailer").fadeOut("fast");$(".pa").fadeOut("fast");if(s_done==0){$("#umsg_arg, .umsg_container").slideUp()}$("object").show();$("select").show();MaskVisible=0}function showMask(){if(MaskVisible==0){$("#mask").css({visibility:"visible",backgroundColor:"black",height:$(document).height()+"px",width:$(document).width()+"px",opacity:0.01}).animate({opacity:0.6},"fast").click(function(){hideAll()});$("object").hide();$("select").hide();MaskVisible=1}}function areq(c,b,f,a){if(typeof(a)=="undefined"){hideAll()}if(f){$("#"+f).addClass("working")}var e=new Date();$.ajax({type:"GET",url:c+"?dum="+e.getTime(),success:function(d){if(f){$("#"+f).removeClass("working")}b(d,f);content_refresh()},error:function(d){if(d&&d.status==401){if(f){$("#"+f).removeClass("working")}login()}else{ajax_message("_'Tiempo de espera agotado. Por favor intente nuevamente.'")}}})}function show_box(a,b){$("#"+b).html(a).css({top:$(window).scrollTop()+$(window).height()/2}).fadeIn();append_button_close(b);content_refresh()}function append_button_close(a){if($("#"+a).children("#closebutton").length<=0){$("#"+a).append("<div id='closebutton' onclick='javascript:hideAll()'>&nbsp;</div>");$("#closebutton").css("left",$("#"+a).width()+2)}}function ajax_step(d,b,c,a,f,e){ajax_step_withlogin(d,b,c,a,f,e)}function login(a){showMask();var c=(typeof a=="undefined")?url64:a;var b=0;if(location.href.match(/\/p\//)){b=2}else{if(location.href.match(/\/t\//)){b=1}}ajax_step_withlogin(null,"/login/ajax/from/"+c+"/t/"+b)}function ajax_step_withlogin(f,c,e,a,i,h){if(!c){return}if(typeof(h)=="undefined"){h="loginbox"}if(c=="reload"){window.location.href=window.location.href+"?mg=600";return}showMask();var b;var g=new Date();$.ajax({type:"GET",url:c+"?dum="+g.getTime(),success:function(d){if(e){e()}if(f){f+="?dum="+g.getTime(),ajax_message("Saving...");b=$.get(f,a);ajax_message()}show_box(d,h);if(i){i()}},error:function(d){if(d&&d.status==401){login()}else{ajax_message("Timeout... please try again")}}})}function ajax_replace_withlogin(e,b,a){if(!b){return}var c=new Date();$.ajax({type:"GET",url:b+"?dum="+c.getTime(),success:function(d){if("reload"==true){window.location.href=window.location.href+"?mg=600";return}else{replace_me(d,e)}},error:function(d){if(d&&d.status==401){showMask();login()}else{ajax_message("Tiempo de espera agotado. Por favor intente nuevamente")}}})}function replace_me(a,b){$(".destroyable:has(#"+b+")").fadeOut("slow");$("#"+b).fadeOut("normal",function(){$(this).replaceWith(a).fadeIn();set_star_rating()})}function replace_parent(a,b){$(".destroyable:has(#"+b+")").fadeOut("slow");$("#"+b).parent().replaceWith(a);$("."+b).parent().replaceWith(a)}function after_word(c){if(c){$(".adj button").removeClass("sel");var b=c.split(",");for(var d=0;d<b.length;d++){var a=b[d];$("button#w_"+a).addClass("sel")}}}function load_ajax_form(){$.getScript("/js/jquery.form.js")}jQuery.fn.ajaxSubmit=function(b){var a={};this.find("input[type=text], input[type=password], input[type=hidden], input[checked], option[selected], textarea").filter(":enabled").each(function(){a[this.name||this.id||this.parentNode.name||this.parentNode.id]=this.value});$.post(this.attr("action")+"?call=ajax",a,b);return this};var is_initialized=false;CK=new Object();function _noCK(){return;(typeof CK=="undefined"||typeof CK.fb_api_key=="undefined")?1:0}function fb_logout(b){if(_noCK()){return true}try{if(FB.getSession()){FB.logout(function(){window.location.href=CK.fb_signout_cb;return});return(false)}}catch(a){return(true)}return(true)}function toggle(b,a){$("#"+b).toggle("normal",function(){if(typeof a!="undefined"){$(a).focus()}});return(false)}function submit_reply(a){$("#ajax_form_"+a).fadeOut("fast");$("#ajax_form_"+a).ajaxSubmit(function(b){replace_me(b,"reply_"+a)});return(false)}var timeout=500;var closetimer=0;var ddmenuitem=0;function jsddm_open(){jsddm_canceltimer();jsddm_close();ddmenuitem=$(this).find(".i").css("visibility","visible")}function jsddm_close(){if(ddmenuitem){ddmenuitem.css("visibility","hidden")}}function jsddm_timer(){closetimer=window.setTimeout(jsddm_close,timeout)}function jsddm_canceltimer(){if(closetimer){window.clearTimeout(closetimer);closetimer=null}}$(document).ready(function(){$("#smenu").bind("mouseover",jsddm_open);$("#smenu").bind("mouseout",jsddm_timer)});document.onclick=jsddm_close;var gallery_plugin_loaded=0;function load_gallery_plugin(b,a){id="gallerybox";if(gallery_plugin_loaded==0){gallery_plugin_loaded=1;Galleria.loadTheme("/common/galleria/classic/galleria.classic.js?1=1");$("#"+id).galleria({data_source:b,image_position:"middle",image_crop:false,})}$("#"+id).galleria({show:a,});showMask();$("#"+id).show()}function load_video_trailer(a){showMask();id="videotrailer";$("#"+id).html('<center><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/'+a+'&hl=en&fs=1&autoplay=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/'+a+'&hl=en&fs=1&autoplay=1" type="application/x-shockwave-flash" allowfullscreen="true" width="640" height="385"></embed></object></center>');append_button_close(id);$("#"+id).show()}function login_menu(){$("#login-menu div.c").hide();$("#login-menu #sel").show();$("#login-menu li>a").click(function(){var a=$(this).next();if(a.is(":visible")){return false}if(!a.is(":visible")){$("#login-menu div.c:visible").slideUp("normal");a.slideDown("normal");return false}})};