if($.cookie('exp__currency') === 'GB' ) { 
	var jsonfile = '/json/logg_rf_json_gb'
}
if($.cookie('exp__currency') === 'US' ) { 
	var jsonfile = '/json/logg_rf_json_us'
}
if($.cookie('exp__currency') === 'EU' ) { 
	var jsonfile = '/json/logg_rf_json_eu'
}

$.getJSON(jsonfile, (function(data) {
	console.log(data);
	var pricePT104 = data.priceData[1].price;
	$("#total").html(pricePT104);
}));

$(document).ready(function() {
	$('.fancybox').fancybox({
		openEffect : 'fade',
		openSpeed  : 150,
		closeEffect : 'fade',
		closeSpeed  : 150,
		aspectRatio : true,
		scrolling   : 'no',
		helpers: {
			title : {
				type : 'inside'
			},
			overlay : {
				css : {
					'background' : 'rgba(87,120,165,0.55)'
				}
			}
		}
	});
});
$("a.zoom").append("<span></span>");

$(window).scroll(function() {
	if ($(this).scrollTop() > 100) {$('.scrollup').fadeIn();} else {$('.scrollup').fadeOut();}
});

$(function() {
	$('.scrollup').click(function() {
		$("html, body").animate({
			scrollTop: 0
		}, 600);
		return false;
	});
});
$(function () {

    $('.popover-link').popover({
        html: true,
        placement: 'right'
    })
        .click(function (e) {e.preventDefault();});

    $(':not(#anything)').on('click', function (e) {
        $('.popover-link').each(function () {
            //the 'is' for buttons that trigger popups
            //the 'has' for icons and other elements within a button that triggers a popup
            if (!$(this).is(e.target) && $(this).has(e.target).length === 0 && $('.popover').has(e.target).length === 0) {
                $(this).popover('hide');
                return;
            }
        });
    });
});
$(".accsTabs li:first").addClass("active");
$(".tab-pane:first").addClass("active");
//Reviews product selector
$('select#prod_id').on('change', function() {
  $(".hiddenFields input[name='entry_id']").val(this.value);
});