if (typeof loadedWidgets == "undefined") { loadedWidgets = false; } (function() { if (loadedWidgets) { return; } loadedWidgets = true; var jQuery; if (window.jQuery === undefined || window.jQuery.fn.jquery !== '3.2.1') { var script_tag = document.createElement('script'); script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src", "https://code.jquery.com/jquery-3.2.1.js"); if (script_tag.readyState) { script_tag.onreadystatechange = function () { // For old versions of IE if (this.readyState == 'complete' || this.readyState == 'loaded') { scriptLoadHandler(); } }; } else { script_tag.onload = scriptLoadHandler; } (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); } else { jQuery = window.jQuery; main(); } function scriptLoadHandler() { jQuery = window.jQuery.noConflict(true); main(); } function main() { jQuery(document).ready(function($) { if ($('.bbv-script').data('style') !== false) { $('head').append(''); } $bbvWidgetId = new Array(); $('.bbv-widget').each(function(i, obj) { $bbvWidgetId[i] = $(this); var jsonp_url = 'https://www.hessischer-badminton-verband.de/nu/nubadminton/widgets.php?type='+$bbvWidgetId[i].data('type') +'&season='+$bbvWidgetId[i].data('season') +'&team='+$bbvWidgetId[i].data('team') +'&clubnr='+$bbvWidgetId[i].data('clubnr') +'&url='+encodeURI(window.location.href) +'&group='+$bbvWidgetId[i].data('group') +'&callback=?'; $.getJSON(jsonp_url, function(data) { $bbvWidgetId[i].html(data.html); }); }); }); } })();