// Agency Theme JavaScript

(function($) {
    "use strict"; // Start of use strict

    // jQuery for page scrolling feature - requires jQuery Easing plugin
    $('a.page-scroll').bind('click', function(event) {
        var $anchor = $(this);
        $('html, body').stop().animate({
            scrollTop: ($($anchor.attr('href')).offset().top - 50)
        }, 1250, 'easeInOutExpo');
        event.preventDefault();
    });

    // Highlight the top nav as scrolling occurs
    $('body').scrollspy({
        target: '.navbar-fixed-top',
        offset: 51
    });

    // Closes the Responsive Menu on Menu Item Click
    $('.navbar-collapse ul li a:not(.dropdown-toggle)').click(function() {
        $('.navbar-toggle:visible').click();
    });

    // Offset for Main Navigation
    $('#mainNav').affix({
        offset: {
            top: 100
        }
    })

})(jQuery); // End of use strict

@@ -161,29 +161,57 @@
   $(
-'a.page-scroll').bind
+document).ready(function()%7B%0A%09$('a%5Bhref%5E=%22#%22%5D').on
 ('cl
@@ -219,17 +219,16 @@
 ck',
- 
 function
 (eve
@@ -227,30 +227,50 @@
 tion
+ 
 (e
-vent
 ) %7B%0A
+%09
     
+e.preventDefault();%0A%0A%09
     var 
 $anc
@@ -269,31 +269,60 @@
 var 
-$anchor
+target
  = 
-$(
 this
-)
+.hash
 ;%0A
+%09
     
+var $target = $(target);%0A%0A%09
     
@@ -354,24 +354,25 @@
 imate(%7B%0A
+%09
         
     scro
@@ -363,20 +363,17 @@
         
-    
+'
 scrollTo
@@ -377,34 +377,18 @@
 lTop
+'
 : 
-($($anchor.attr('href'))
+$target
 .off
@@ -400,89 +400,102 @@
 .top
- - 50)%0A    
+%0A%09
     %7D, 
-125
+90
 0, '
-easeInOutExpo');%0A        event.preventDefault()
+swing', function () %7B%0A%09        window.location.hash = target
 ;%0A
+%09
     %7D);
+%0A%09%7D);%0A%7D);
 %0A%0A  

Update agency.js