var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
var TabbedPanels2 = new Spry.Widget.TabbedPanels("TabbedPanels2");
$(window).load(function() {
$('.flexslider').flexslider({
animation: "slide",
slideshowSpeed: 7000,
animationDuration: 3000,
directionNav: true,
controlNav: true,
slideshow: true,
prevText: '
',
nextText: '
',
});
});
$(function() {
$('form').each(function() {
$('input').keypress(function(e) {
// Enter pressed?
if (e.which == 10 || e.which == 13) {
this.form.submit();
}
});
//$('input[type=submit]').hide();
});
});
$.ajaxSetup({
beforeSend: function() {
$('#loader').show();
$(this).html('loading');
},
complete: function() {
$('#loader').hide('slow');
},
success: function() {}
});
function basket_go() {
// if the search box is in the parent window
if ($('#keyword', window.parent)) {
window.parent.location = '/shp/checkout.php';
} else {
document.location = '/shp/checkout.php';
}
}
function stacks_get_group_product_options(obj, page, cat, file, selector) {
var getstr = "?filter=1&";
getstr += cat + '=' + obj.options[obj.selectedIndex].value;
getstr += '&stack_row=' + obj.options[obj.selectedIndex].id;
makeRequestSelector('/special-offers/' + file + '.php' + getstr, '', selector);
}
function makeRequestSelector(url, parameters, selector) {
$.ajax({
async: false,
url: url,
data: parameters,
success: function(data) {
alertContents_selector(data, selector)
},
type: "post",
cache: "false"
});
}
function alertContents_selector(data, selector) {
$(document).ready(function() {
$('#' + selector).html(data);
});
}
function go_page(cat) {
document.location = '/shp/list.php?cat=' + cat;
}
$(document).ready(function($) {
$('.loc_link').click(showLocationMenu);
$('.cur_link').click(showCurrencyMenu);
});
// the step setting is based on whether or not a checkbox is checked.
// clear the $("#noUiSlider") div, then initialize.
//$("#noUiSlider").noUiSlider( options, true /* Allow destruction + rebuilding */ );
$("#noUiSlider").noUiSlider({
start: [0.00, 104.00],
range: {
'min': [0.00],
'max': [104.00]
},
connect: true,
step: 1,
format: {
to: function(value) {
return '£' + Math.round(value) * 1.00;
},
from: function(value) {
return value.replace('£', '');
}
}
}, true);
$("#noUiSlider").on({
col - sm - 8 col - md - 9
set: function() {
var lower = $('#noUiSlider').val()[0];
var upper = $('#noUiSlider').val()[1];
lower = lower.replace('£', '');
upper = upper.replace('£', '');
var filtertext = '
';
$("#filterform").append(filtertext);
$('#filterform').submit();
}
});
$('#noUiSlider').Link('lower').to($('#prices_min'), 'html');
$('#noUiSlider').Link('upper').to($('#prices_max'), 'html');
$('#feefo-banner').click(function(e) {
e.preventDefault();
$('html, body').animate({
scrollTop: $("#nav-tabs").offset().top
}, 500);
return false;
});
$('#lists .toplevel > a').removeAttr('data-toggle');
if ($(window).width() < 767) {
if ($('#lists .toplevel').has("ul")) {
($('#lists .toplevel').has("ul")).children("a").attr("data-toggle", "dropdown");
}
}
$(window).resize(function() {
if ($(window).width() > 767) {
$('#lists .toplevel > a').removeAttr('data-toggle');
} else {
if ($('#lists .toplevel').has("ul")) {
($('#lists .toplevel').has("ul")).children("a").attr("data-toggle", "dropdown");
}
}
});