var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opens = _____WB$wombat$assign$function_____("opens");
$(function () {
  // initialize skrollr if the window width is large enough
   if ($(window).width() > 1024) {
    skrollr.init({forceHeight: false});
  }

  // disable skrollr if the window is resized below 1024px wide
  $(window).on('resize', function () {
    if ($(window).width() <= 1023 && $(window).width() >= 1024) {
      skrollr.init().destroy(); // skrollr.init() returns the singleton created above
    }

  });
});



//Refresh at breakpoint
var threshold = 1024;
var initialDiff = ($(window).width() > threshold) ? 1:-1;

$(window).on('resize',function(e){
    var w = $(window).width();
    var currentDiff = w - threshold;
    if(currentDiff*initialDiff < 0) {
        location.reload();
    }
});

// Smooth Scroll
$(function() {
  $('a[href*=#]:not([href=#])').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
      var target = $(this.hash);
      target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
      if (target.length) {
        $('html,body').animate({
          scrollTop: target.offset().top
        }, 1000);
        return false;
      }
    }
  });
});

$("select.store").change(function () {
   if( $("option.rosebank:selected").length )
   {
     $("div.store").fadeOut();
     $("div.rosebank").fadeIn();
   }
});

$("select.store").change(function () {
   if( $("option.bryanston:selected").length )
   {
     $("div.store").fadeOut();
     $("div.bryanston").fadeIn();
   }
});

$("select.store").change(function () {
   if( $("option.centurion:selected").length )
   {
     $("div.store").fadeOut();
     $("div.centurion").fadeIn();
   }
});


$("select.store").change(function () {
   if( $("option.illovo:selected").length )
   {
     $("div.store").fadeOut();
     $("div.illovo").fadeIn();
   }
});

$("select.store").change(function () {
   if( $("option.suncity:selected").length )
   {
     $("div.store").fadeOut();
     $("div.suncity").fadeIn();
   }
});

$("select.store").change(function () {
   if( $("option.wild-coast:selected").length )
   {
     $("div.store").fadeOut();
     $("div.wild-coast").fadeIn();
   }
});

$("select.store").change(function () {
   if( $("option.molbarton:selected").length )
   {
     $("div.store").fadeOut();
     $("div.molbarton").fadeIn();
   }
});
}