Script conflict

Script conflict

I have two scripts which are conflicting: smooth scroll and Popup Overlay. When smooth scroll is included, Popup Overlaywill not pop up.Remove the smooth scroll and the pop up works. Any thoughts?

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;
      }
    }
  });
});



Popup Overlay

  <a class="initialism fadeandscale_open btn btn-success" href="#fadeandscale">Fade &amp; scale</a>
<div id="fadeandscale" class="well">
    <h4>Fade &amp; scale example</h4>
<pre class="prettyprint">
<code>$('#fadeandscale').popup({
  transition: 'all 0.3s'
});</code>
</pre>
<pre class="prettyprint">
<code>#fadeandscale {
  transform: scale(0.8);
}
.popup_visible #fadeandscale {
  transform: scale(1);
}</code>
</pre>
    <button class="fadeandscale_close slide_open btn btn-default">Next example</button>
    <button class="fadeandscale_close btn btn-default">Close</button>
</div>

<script>
$(document).ready(function poppy() {

    $('#fadeandscale').popup({
        pagecontainer: '.butt',
        transition: 'all 0.3s'
    });

});
</script>