﻿$(document).ready(function(){
								
  var price = $("#from_price").html();
  
  if (price.indexOf("USD") != -1){
		$("#fob_price_2").html(price);
  } else {
  //var regex= new RegExp("<strike\b[^>]*>(.*?)</strike>", "g");
  //price = price.replace(regex, "");
  price = $.trim(price);
  price = price.replace(/[^0-9]/g,"");
  price = parseInt(price);
  var x_rate = null;
 
  if(price!=null){
          $.get("/inc/getExchangeRate.php", { currency_from: 'USD', currency_to: 'JPY', price: price },
                        function(data){
		                    $("#to_price").html(data);
							$("#fob_price_2").html(data);
                        });
  }
  
  }


  $("#slide-trigger").click(function () {
      $("#grade-option").slideToggle();
      $(this).toggleClass("on");
      
      if($(this).hasClass("on")){
        $(this).html('<img src="/imgdir/stock-car-detail/arrow_up.png" /> Hide grade information');
      }else{
        $(this).html('<img src="/imgdir/stock-car-detail/arrow_down.png" /> Show grade information');
      }
  });  
   
});

