$.metadata.setType('html5');
$(function() {
	WEBLINC.ui.init();	
	WEBLINC.ajax.init();
	WEBLINC.actions.init();
	WEBLINC.validation.init();

	var widgets = $.w('tabs');
	function initWidgets(scope) {
		$.each(widgets, function() { WEBLINC.widget[this].init(scope); });
		WEBLINC.widget.dialog.init(scope, { onOpen: function() { initWidgets(this); } });
	}
	initWidgets(document);

	var sections = $.w('products');
	$.each(sections, function() {
		if ($('body').hasClass('l-' + this) && WEBLINC.section[this] && WEBLINC.section[this].init) {
			WEBLINC.section[this].init();
		}
	});
});
