<commit_before><% if @plain %>
<div class="poptitle" data-sku='<%= @product.sku %>'>
<%# These are used in the application javascript "show" and "compare" pages' logic. %>
	<a href="#" id="tab_selected" class="fetch tab" data-tab="info_content"><%=t('products.show.productinfo')%></a>
	<div class="tabspacer"></div>
	<a href="#" class="fetch tab" data-tab="specs_content"><%=t('products.show.specifications')%></a>
	<div class="tabspacer"></div>
	<a href="#" class="fetch tab" data-tab="reviews_content"><%=t('products.show.reviews')%></a>
	<%= link_to "close", :class => "bb_quickview_close" do %>
		<%=t('products.compare.closewindow')%> <%= image_tag("closepopup.png") %>
	<% end %>
</div>
<% else %>
<% self.title = "#{@allspecs["title#{fr?}"] || @product.title }" %>
<div class="content">
<a href="/" id="browseother"></a>
<% end %>
<div id="info_container">
	<h1><%= @allspecs["title#{fr?}"] || @product.title%></h1>
	<h5 style="margin: 0"><%=t('products.show.webcode')+": #{@product.sku}, "+t('products.show.model')+": #{@product.mpn}"%></h5> 
<div id="info_content" class="tabbed_content">
    	<div id="galleria" style="width: 500px; height: 300px;margin-left: -10px;">
    		<!-- What follows is a Best Buy-specific hack, put in to get "additional media" out prior to a consultation meeting with them

    	    on whether or not we should invest the time to significantly complicate Firehose -->
    	    <% if @s.product_type == "camera_bestbuy" %>
				
    	        <% additional_media = ActiveSupport::JSON.decode(@allspecs["additionalMedia"].gsub("=>",":")) %>
    	        <% additional_media.each do |a| %>
    	            <%= image_tag("http://www.bestbuy.ca" + a["url"].gsub("500x500", "300x300"), :size => "300x300", :alt => "", :style => "display: none;")  if a["url"] %>
    	        <% end %>
			<% end %>
    	</div>
		<div class="mainprodimg" <%= "style='display:none'" if @s.product_type == "camera_bestbuy" %>>
			<% if @allspecs["imglurl"] %>
    			<%= image_tag(@allspecs["imglurl"], :size => "300x300", :alt => "") %>
    		<% else %>
    			<br><br><%=t('products.show.noimage')%>
    		<% end %>
		</div>
	 <% if @s.product_type == "camera_bestbuy" && !(@siblings.blank?) %>
		<div style="display:none;" id="bestbuy_sibling_images"><span style="line-height:47px; float:left"><%=t('products.show.othercolors')%></span>
			<% @siblings.sort{|p| p.sibling_id}.each do |sib_id_and_imgsurl| %>  
    			<% unless sib_id_and_imgsurl.sibling_id == @product.id %>
    			    <% sib_product = Product.cached(sib_id_and_imgsurl.sibling_id)%> 
    			    <%= link_to product_path(:name => sib_product.descurl, :id => sib_product.id), :'data-id' => sib_product.id, :class => "easylink", :title => "Click for product specifications" do %>
    				    <%= image_tag(sib_id_and_imgsurl.value, {:width => "40px", :height => "40px"}) %>
				    <% end %>
    			<% else %>
    			   <%= image_tag(@allspecs["imgsurl"])%>
    			<% end %>
			<% end %>
		</div>
	 <%end%>	
		
    	<% save = [] %>
		<% (@s.continuous["show"]+@s.categorical["show"]+@s.binary["show"]).each_with_index do |f_name, i| %>
		    <% next if f_name == "price" %>
			<% f = @allspecs[f_name] %>
			<% if !f.nil? %>
				 	<% save[i] = '<span class="detail_label">' + (t 'products.'+ f_name) + ': </span>' + (f_name == 'price' ? "$" : "" ) + number_with_delimiter(((@product.display(f_name, f)).split('*').each(&:strip).uniq.join(" "))) + ' ' + (f_name == "price" ? "" : t('products.'+ f_name+'unit', :default => '')) %>
			<% end %>
		<% end %>
		<%# raw save.compact.join(", ") %>
	    <div class="shortdesc"><%= raw @allspecs["shortDescription#{fr?}"] %></div>
    </div>
    <div id="specs_content" class="tabbed_content" style="display: none;"><%=t('products.show.loading')%></div>
	<div id="reviews_content" class="tabbed_content" style="display: none;"><%=t('products.show.loading')%></div>
	<div id="features">
		<div class="left" style="width:285px">
    	    <div class="bbfeatures"><%= image_tag "best_buy_free_shipping.gif" %><%=t('products.show.freeshipping', :amount =>"$20")%></div>
    	    <div class="bbfeatures"><%= image_tag "best_buy_instore_pickup.gif" %><%=t('products.show.instorepickup')%></div>
    	    <div class="bbfeatures"><%= image_tag "best_buy_rewards_card.gif" %><%=t('products.show.rewardprog')%></div>
			<div id="fb-root"></div>
			<script>
			if (!(jQuery.browser.msie && jQuery.browser.version == "6.0")) {
			  window.fbAsyncInit = function() {
			    FB.init({appId: '191247887553933', status: true, cookie: true,
			             xfbml: true, channelUrl: 'http://example.com/channel.html'});
			  };
			  (function() {
			    var e = document.createElement('script'); e.async = true;
			    e.src = document.location.protocol + "<%=raw t('products.show.fbconnecturl')%>";
			    document.getElementById('fb-root').appendChild(e);
			  })();
			}
			</script>
			<script src=<%=raw "http:"+t('products.show.fbconnecturl')+"#xfbml=1"%>></script><div class='facebook-like'><fb:like href=<%=@prod_url%> show_faces="false" width="300" font="arial"></fb:like></div>
        </div>
        <div class="right" style="width:160px">
    		<% if @allspecs["onsale"] %>
    		<div style="font-size: 1.2em; height: 20px;"><span class="left"><%=t('products.show.regularprice')%>:</span><span class="right"><%= number_to_currency(@allspecs["price"]) %></span></div>
    	    <div style="color: #f00; font-size: 1.3em; font-weight: bold;height: 20px;"><span class="left"><%=t('products.show.saleprice')%>:</span><span class="right"><%= number_to_currency(@allspecs["saleprice"]) %></span></div>
    	    <div style = "clear: both;margin-bottom: 5px;height: 18px;"><span class="left"><%=t('products.show.saleends')%>:</span><span class="right"><%=  fr?.empty? ? @allspecs["saleEndDate"][/^(\w|\/)+/] : @allspecs["saleEndDate"][/^(\w|\/)+/].gsub("/", "-") %></span></div>
    		<% else %>
    		<div style="font-size: 1.5em; height: 20px;"><span class="left"><%=t('products.show.ourprice')%></span><span class="right"><%= number_with_delimiter(@allspecs["price"]) %></span></div>
    		<% end %>
    		<div class="left" style="height: 18px;"><a href="http://www.bestbuy.ca/en-CA/help/what-is-your-lowest-price-guarantee/hc1001.aspx?path=27eeec1b59d42df5dfc298ab6993d9dfen15&HelpTitleId=HC1001" class="popup-link"><%=t('products.show.lowestprice')%></a></div>
    		<div class="pricespacer"></div>
    	    <div class="buttons"><%= link_to image_tag("bestbuy_addtocart#{fr?}.gif"), "http://www.bestbuy.ca/order/addtocart.ashx?accessories=#{@product.sku}", {:'data-sku' => @product.sku, :class => 'addtocart', :'data-name' => @product.small_title} %></div>
    	    <div class="buttons"><%= link_to image_tag("bestbuy_compare#{fr?}.gif"), "#", {:id => 'add_compare', :'data-id' => @product.id, :'data-name' => @product.small_title} %></div>
			<div class="buttons"><%= link_to image_tag("learnmore#{fr?}.png"), @prod_url, :title => "Go to product detail page", :'data-sku' => @product.sku, :class => 'bestbuy_pdp', :'data-name' => @product.small_title %></div>
        </div>
		<div class="spacer"> </div>
	</div>
	<div class="spacer">&nbsp;</div>
</div>

<% if !@plain %><div style="clear: both;"></div></div><% end %><commit_msg>Sale end is in proper format<commit_after><% if @plain %>
<div class="poptitle" data-sku='<%= @product.sku %>'>
<%# These are used in the application javascript "show" and "compare" pages' logic. %>
	<a href="#" id="tab_selected" class="fetch tab" data-tab="info_content"><%=t('products.show.productinfo')%></a>
	<div class="tabspacer"></div>
	<a href="#" class="fetch tab" data-tab="specs_content"><%=t('products.show.specifications')%></a>
	<div class="tabspacer"></div>
	<a href="#" class="fetch tab" data-tab="reviews_content"><%=t('products.show.reviews')%></a>
	<%= link_to "close", :class => "bb_quickview_close" do %>
		<%=t('products.compare.closewindow')%> <%= image_tag("closepopup.png") %>
	<% end %>
</div>
<% else %>
<% self.title = "#{@allspecs["title#{fr?}"] || @product.title }" %>
<div class="content">
<a href="/" id="browseother"></a>
<% end %>
<div id="info_container">
	<h1><%= @allspecs["title#{fr?}"] || @product.title%></h1>
	<h5 style="margin: 0"><%=t('products.show.webcode')+": #{@product.sku}, "+t('products.show.model')+": #{@product.mpn}"%></h5> 
<div id="info_content" class="tabbed_content">
    	<div id="galleria" style="width: 500px; height: 300px;margin-left: -10px;">
    		<!-- What follows is a Best Buy-specific hack, put in to get "additional media" out prior to a consultation meeting with them

    	    on whether or not we should invest the time to significantly complicate Firehose -->
    	    <% if @s.product_type == "camera_bestbuy" %>
				
    	        <% additional_media = ActiveSupport::JSON.decode(@allspecs["additionalMedia"].gsub("=>",":")) %>
    	        <% additional_media.each do |a| %>
    	            <%= image_tag("http://www.bestbuy.ca" + a["url"].gsub("500x500", "300x300"), :size => "300x300", :alt => "", :style => "display: none;")  if a["url"] %>
    	        <% end %>
			<% end %>
    	</div>
		<div class="mainprodimg" <%= "style='display:none'" if @s.product_type == "camera_bestbuy" %>>
			<% if @allspecs["imglurl"] %>
    			<%= image_tag(@allspecs["imglurl"], :size => "300x300", :alt => "") %>
    		<% else %>
    			<br><br><%=t('products.show.noimage')%>
    		<% end %>
		</div>
	 <% if @s.product_type == "camera_bestbuy" && !(@siblings.blank?) %>
		<div style="display:none;" id="bestbuy_sibling_images"><span style="line-height:47px; float:left"><%=t('products.show.othercolors')%></span>
			<% @siblings.sort{|p| p.sibling_id}.each do |sib_id_and_imgsurl| %>  
    			<% unless sib_id_and_imgsurl.sibling_id == @product.id %>
    			    <% sib_product = Product.cached(sib_id_and_imgsurl.sibling_id)%> 
    			    <%= link_to product_path(:name => sib_product.descurl, :id => sib_product.id), :'data-id' => sib_product.id, :class => "easylink", :title => "Click for product specifications" do %>
    				    <%= image_tag(sib_id_and_imgsurl.value, {:width => "40px", :height => "40px"}) %>
				    <% end %>
    			<% else %>
    			   <%= image_tag(@allspecs["imgsurl"])%>
    			<% end %>
			<% end %>
		</div>
	 <%end%>	
		
    	<% save = [] %>
		<% (@s.continuous["show"]+@s.categorical["show"]+@s.binary["show"]).each_with_index do |f_name, i| %>
		    <% next if f_name == "price" %>
			<% f = @allspecs[f_name] %>
			<% if !f.nil? %>
				 	<% save[i] = '<span class="detail_label">' + (t 'products.'+ f_name) + ': </span>' + (f_name == 'price' ? "$" : "" ) + number_with_delimiter(((@product.display(f_name, f)).split('*').each(&:strip).uniq.join(" "))) + ' ' + (f_name == "price" ? "" : t('products.'+ f_name+'unit', :default => '')) %>
			<% end %>
		<% end %>
		<%# raw save.compact.join(", ") %>
	    <div class="shortdesc"><%= raw @allspecs["shortDescription#{fr?}"] %></div>
    </div>
    <div id="specs_content" class="tabbed_content" style="display: none;"><%=t('products.show.loading')%></div>
	<div id="reviews_content" class="tabbed_content" style="display: none;"><%=t('products.show.loading')%></div>
	<div id="features">
		<div class="left" style="width:285px">
    	    <div class="bbfeatures"><%= image_tag "best_buy_free_shipping.gif" %><%=t('products.show.freeshipping', :amount =>"$20")%></div>
    	    <div class="bbfeatures"><%= image_tag "best_buy_instore_pickup.gif" %><%=t('products.show.instorepickup')%></div>
    	    <div class="bbfeatures"><%= image_tag "best_buy_rewards_card.gif" %><%=t('products.show.rewardprog')%></div>
			<div id="fb-root"></div>
			<script>
			if (!(jQuery.browser.msie && jQuery.browser.version == "6.0")) {
			  window.fbAsyncInit = function() {
			    FB.init({appId: '191247887553933', status: true, cookie: true,
			             xfbml: true, channelUrl: 'http://example.com/channel.html'});
			  };
			  (function() {
			    var e = document.createElement('script'); e.async = true;
			    e.src = document.location.protocol + "<%=raw t('products.show.fbconnecturl')%>";
			    document.getElementById('fb-root').appendChild(e);
			  })();
			}
			</script>
			<script src=<%=raw "http:"+t('products.show.fbconnecturl')+"#xfbml=1"%>></script><div class='facebook-like'><fb:like href=<%=@prod_url%> show_faces="false" width="300" font="arial"></fb:like></div>
        </div>
        <div class="right" style="width:160px">
    		<% if @allspecs["onsale"] %>
    		<div style="font-size: 1.2em; height: 20px;"><span class="left"><%=t('products.show.regularprice')%>:</span><span class="right"><%= number_to_currency(@allspecs["price"]) %></span></div>
    	    <div style="color: #f00; font-size: 1.3em; font-weight: bold;height: 20px;"><span class="left"><%=t('products.show.saleprice')%>:</span><span class="right"><%= number_to_currency(@allspecs["saleprice"]) %></span></div>
    	    <div style = "clear: both;margin-bottom: 5px;height: 18px;"><span class="left"><%=t('products.show.saleends')%>:</span><span class="right"><%= (Date.parse(@allspecs["saleEndDate"]) - 1.day).to_s(:long) %></span></div>
    		<% else %>
    		<div style="font-size: 1.5em; height: 20px;"><span class="left"><%=t('products.show.ourprice')%></span><span class="right"><%= number_with_delimiter(@allspecs["price"]) %></span></div>
    		<% end %>
    		<div class="left" style="height: 18px;"><a href="http://www.bestbuy.ca/en-CA/help/what-is-your-lowest-price-guarantee/hc1001.aspx?path=27eeec1b59d42df5dfc298ab6993d9dfen15&HelpTitleId=HC1001" class="popup-link"><%=t('products.show.lowestprice')%></a></div>
    		<div class="pricespacer"></div>
    	    <div class="buttons"><%= link_to image_tag("bestbuy_addtocart#{fr?}.gif"), "http://www.bestbuy.ca/order/addtocart.ashx?accessories=#{@product.sku}", {:'data-sku' => @product.sku, :class => 'addtocart', :'data-name' => @product.small_title} %></div>
    	    <div class="buttons"><%= link_to image_tag("bestbuy_compare#{fr?}.gif"), "#", {:id => 'add_compare', :'data-id' => @product.id, :'data-name' => @product.small_title} %></div>
			<div class="buttons"><%= link_to image_tag("learnmore#{fr?}.png"), @prod_url, :title => "Go to product detail page", :'data-sku' => @product.sku, :class => 'bestbuy_pdp', :'data-name' => @product.small_title %></div>
        </div>
		<div class="spacer"> </div>
	</div>
	<div class="spacer">&nbsp;</div>
</div>

<% if !@plain %><div style="clear: both;"></div></div><% end %>
{'fraction_non_alphanumeric': 0.24773309337578736, 'fraction_numerical': 0.016266352876029625, 'mean_word_length': 4.4397590361445785, 'pattern_counts': {'":': 6, '<': 373, '<?xml version=': 0, '>': 425, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6488192', 'n_tokens_mistral': 5939, 'n_tokens_neox': 5299, 'n_words': 842}