<script>
    var themeHasJQuery = !!window.jQuery;
</script>
<script type="text/javascript" src="{{ theme_url }}/js/jquery.js?{{ version }}"></script>
<script>
    window.@jQuery = jQuery.noConflict(themeHasJQuery);
</script>