'),$("#form-upload input[name='file']").trigger("click"),"undefined"!=typeof timer&&clearInterval(timer),timer=setInterval(function(){""!=$("#form-upload input[name='file']").val()&&(clearInterval(timer),$.ajax({url:"index.php?route=tool/upload",type:"post",dataType:"json",data:new FormData($("#form-upload")[0]),cache:!1,contentType:!1,processData:!1,beforeSend:function(){$(e).button("loading")},complete:function(){$(e).button("reset")},success:function(t){$(".text-danger").remove(),$("#bcheckout").removeClass("hidden"),t.error&&$(e).parent().find("input").after('
'+t.error+"
"),t.success&&(alert(t.success),$(e).parent().find("input").val(t.code))},error:function(e,t,r){alert(r+"\r\n"+e.statusText+"\r\n"+e.responseText)}}))},500)}),$("#review").delegate(".pagination a","click",function(e){e.preventDefault(),$("#review").fadeOut("slow"),$("#review").load(this.href),$("#review").fadeIn("slow")}),$("#button-review").on("click",function(){$.ajax({url:"index.php?route=product/product/write&product_id=322&form_id=61",type:"post",dataType:"json",data:$("#form-review").serialize(),beforeSend:function(){$("#button-review").button("loading")},complete:function(){$("#button-review").button("reset")},success:function(e){$(".alert-dismissible").remove(),e.error&&$("#review").after(' '+e.error+"
"),e.success&&($("#review").after(' '+e.success+"
"),$("input[name='name']").val(""),$("textarea[name='text']").val(""),$("input[name='rating']:checked").prop("checked",!1))}})});