/*
	Stempora Web Framework
	Copyright (c) 2002-2018 Stempora. 
	All rights reserved.
		web:  www.stempora.com
		mail: support@stempora.com				
*/

var STBModuleJobs = Object.create(STBModule.prototype);

STBModuleJobs.name = "ModuleJobs";
STBModuleJobs.initPlugin = function() {

	var el=jQuery(".module-jobs:not(.__done) .job-contact > ul ");

	if (el.length) {
		el.each(function() {
			if (!jQuery(this).find("li").length) {
				jQuery(this).parent().remove();
			}

			jQuery(this).closest(".module").addClass("__done");
		});	
	}
}

STBModuleJobs.runOnReady = function() {
	STBModuleJobs.initPlugin();
}

STBModuleJobs.runOnContentUpdate = function() {
	STBModuleJobs.initPlugin();
}

site.registerModule(STBModuleJobs);