window.GGBT_spinner=function(){"use strict";function attachSpinner(element,top){if(window.Spinner){var opts={lines:11,length:6,width:3,radius:10,scale:1,corners:1,color:"#666",opacity:.25,rotate:0,direction:1,speed:1,trail:60,fps:20,zIndex:2e9,className:"spinner",top:top||"50%",left:"50%",shadow:false,hwaccel:true,position:"absolute"};var el=element||document.body;removeSpinner(el);new window.Spinner(opts).spin(el)}}function removeSpinner(element){var el=element||document.body;var spinner=el.querySelector(".spinner");if(spinner){spinner.parentNode.removeChild(spinner)}}function toggleSpinner(element,spin){var el=element||document.body;if(spin){window.GGBT_spinner.attachSpinner(el,"50%")}else{window.GGBT_spinner.removeSpinner(el)}}function attachOnDOMContentLoaded(){document.addEventListener("DOMContentLoaded",function(){attachSpinner(document.body,"50%")})}return{attachSpinner:attachSpinner,removeSpinner:removeSpinner,toggleSpinner:toggleSpinner,attachOnDOMContentLoaded:attachOnDOMContentLoaded}}();