<h4 class="title">
	%%LNG_ProductReviews%%
	<button style="display: %%GLOBAL_comentLogados%%;" type="button" onclick="show_product_review_form(); return false;" class="btn btn-primary pull-right">%%LNG_WriteYourOwnProductReview%%</button>
	<button style="display: %%GLOBAL_comenttext%%;" type="button" id="new-board-btn" class="btn btn-primary pull-right"><a href="%%GLOBAL_ShopPath%%/login.php" class="add-cart-text" style="color: #fff;">Loga-se em sua conta para comentar sobre esse produto!</a></button>
</h4>

<br class="Clear" />
<div class="BlockContent">
	%%GLOBAL_ProductReviewFlashMessages%%
	<a id="write_review"></a>
	<script type="text/javascript">
		lang.ReviewNoRating = "%%LNG_ReviewNoRating%%";
		lang.ReviewNoTitle = "%%LNG_ReviewNoTitle%%";
		lang.ReviewNoName = "Por favor, informe um Nome para o seu comentário.";
		lang.ReviewNoText = "%%LNG_ReviewNoText%%";
		lang.ReviewNoCaptcha = "%%LNG_NoCaptcha%%";
	</script>
	<div style="display: %%GLOBAL_comentLogados%%;">
		<form action="%%GLOBAL_ShopPath%%/postreview.php" style="display: none;" method="post" class="ProductReviewForm" id="rating_box" onsubmit="return check_product_review_form();">
			<script src="https://www.google.com/recaptcha/api.js?render=%%GLOBAL_SiteKey%%"></script>
			<input type="hidden" name="action" value="post_review" />
			<input type="hidden" name="product_id" value="%%GLOBAL_ProductId%%" />
			<input type="hidden" id="token" name="token">
			<div class="primari-box registered-account">
				<h3 class="box-subheading">%%LNG_WriteYourOwnReview%%</h3>
				<div class="form-content">
					<div class="form-group primary-form-group">
						<label for="login_email">%%LNG_HowRateProduct%%</label>
						<select name="revrating" class="form-control unicase-form-control text-input" id="revrating">
							<option value="">&nbsp;</option>
							<option value="5" %%GLOBAL_ReviewRating5%%>%%LNG_Rate5Stars%%</option>
							<option value="4" %%GLOBAL_ReviewRating4%%>%%LNG_Rate4Stars%%</option>
							<option value="3" %%GLOBAL_ReviewRating3%%>%%LNG_Rate3Stars%%</option>
							<option value="2" %%GLOBAL_ReviewRating2%%>%%LNG_Rate2Stars%%</option>
							<option value="1" %%GLOBAL_ReviewRating1%%>%%LNG_Rate1Star%%</option>
						</select>
					</div>

					<div class="form-group primary-form-group">
						<label for="login_email">%%LNG_WriteAHeadline%%</label>
						<input name="revtitle" id="revtitle" type="text" class="form-control unicase-form-control text-input" value="%%GLOBAL_RevTitle%%" />
						
					</div>

					<div class="form-group primary-form-group">
						<label for="login_email">%%LNG_WriteYourReview%%</label>
						<textarea name="revtext" id="revtext" class="form-control unicase-form-control text-input" style="height: 150px;" rows="8" cols="50">%%GLOBAL_RevText%%</textarea>
					</div>

					<div class="form-group primary-form-group">
						<label for="login_email">4. Informe seu nome:</label>
						<input name="revfromname" id="revfromname" type="text" class="form-control unicase-form-control text-input" value="%%GLOBAL_RevFromName%%" />
					</div>

					<div class="form-group primary-form-group" style="display: %%GLOBAL_HideReviewCaptcha%%">
						<label for="login_email">%%LNG_EnterTheCodeBelow%%</label>
						<input name="captcha" id="captcha" type="text" class="form-control unicase-form-control text-input" style="width: 110px;" />
						<div style="margin-top: 3px;">
							%%GLOBAL_CaptchaImage%%
						</div>
					</div>

					<div class="submit-button">
						<input type="submit" value="%%LNG_SaveMyReview%%" class="btn btn-primary" />
					</div>
				</div>
			</div>
		</form>
	</div>
	<br>
	<div class="alert alert-info" role="alert" style="display: %%GLOBAL_HideNoReviewsMessage%%">%%GLOBAL_NoReviews%%</div>
	%%GLOBAL_ProductReviewPaging%%
	%%GLOBAL_ProductReviewList%%
	%%GLOBAL_ProductReviewPaging%%
	<script type="text/javascript">
	//<![CDATA[
	var HideReviewCaptcha = "%%GLOBAL_HideReviewCaptcha%%";

	// Should we automatically open the review form?
	if("%%GLOBAL_AutoShowReviewForm%%" == "1") {
		show_product_review_form();
		/*window.onload = function(){
            document.getElementById('comentario').click();
        }*/
	}

	if("%%GLOBAL_JumpToReviews%%" == "1") {
		jump_to_product_reviews();
	}
	//]]>
	</script>
	<script>
		var interval = setInterval(function(){
		  if(window.grecaptcha){
		        grecaptcha.ready(function() {
		       grecaptcha.execute('%%GLOBAL_SiteKey%%', {action: 'homepage'}).then(function(token) {
		          // console.log(token);
		          document.getElementById("token").value = token;
		       });
		       // refresh token every minute to prevent expiration
		       setInterval(function(){
		         grecaptcha.execute('%%GLOBAL_SiteKey%%', {action: 'homepage'}).then(function(token) {
		           console.log( 'refreshed token:', token );
		           document.getElementById("token").value = token;
		         });
		       }, 60000);

		     });
		    clearInterval(interval);
		  }
		}, 100);
	</script>
	<hr style="%%GLOBAL_HideSectionSeparator%%" class="Clear ProductSectionSeparator" />
</div>