Put this on a click handler. This is more along the lines of the jQuery solution but only using Hype. Why use jQuery if there is querySelector(All) and Hype
var opacity = hypeDocument.getElementProperty(element, 'opacity');
hypeDocument.setElementProperty(element, 'opacity', (opacity==0.2) ? 0.5 : 0.2, 0.5, 'easeinout');