"use strict";
(function ($) {
  $(function () {

    if($(".locationmenu").length) {
      //make menu working
      $(".locationmenu a").click( function() {
        var menu = $(".locationmenu"),
            active = menu.find(".active"),
            activeid = active.attr("href"),
            thisid = $(this).attr("href");

        if(activeid == thisid) {return false;}
        active.removeClass("active");
        $(this).addClass("active");

        $(activeid).fadeOut(300, function(){
          $(thisid).fadeIn(300);
        });
      });

      //find hash
      $("a[href=" +window.location.hash +"]").click();
    }
  });
}(jQuery));

