showTodoMsg = function() {
		window.alert('does not yet work');
}

YUI().use('node', function(Y) {
    var node = Y.get('#wrap');
    Y.log('Found node.. Setting style');
		node.on('click', function(e) {
				var target = e.target;
				if (target.hasClass('image-switch')) {
						var imgPath = target.getAttribute('makers_image');
						var mainImage = Y.get('#product-main-image');
						mainImage.set('src', imgPath);
				}

				if (target.hasClass('todo')) {
						e.halt();
						showTodoMsg();
				}
		});

		node.on('submit', function(e) {
				Y.log(e);
				var form = e.target;
				if (form.hasClass('todo')) {
						e.halt();
						showTodoMsg();
				}
		});
});

YUI().use('node', function(Y) {
		var nodes = Y.all('.form-table .input-clean');
		if (!nodes) return;
    nodes.on('focus', function(e) {
				var node = e.target;
				Y.log('detected click');
				if (node.hasClass('input-clean')) {
						node.removeClass('input-clean');
						node.setAttribute('value', '');
				}
		});
});

YUI().use('node', function(Y) {
		var nodes = Y.all('form');
		if (!nodes) return;
    nodes.on('submit', function(e) {
				var node = e.target;
				Y.log('detected submit');
				var inputs = Y.all('input');
				if (inputs) {
						inputs.each(function(inputNode) {
								if (inputNode.hasClass('input-clean')) {
										inputNode.setAttribute('value', '');
								}
						});
				}
		});
});