(function () {
	'use strict';

	function markWidgetsReady() {
		var widgets = document.querySelectorAll('[data-solardawn-sun-widget]');

		widgets.forEach(function (widget) {
			widget.classList.add('solardawn-sun-widget--ready');
		});
	}

	if (document.readyState === 'loading') {
		document.addEventListener('DOMContentLoaded', markWidgetsReady);
	} else {
		markWidgetsReady();
	}
}());
