convertNumberToIntAndPercentToFloat = function (a, def){
                return !!a && !isNaN(a) && parseInt(a, 10) ||
                    !!a && !isNaN(parseFloat(a)) && parseFloat(a) >= 0 &&
                    parseFloat(a) <= 100 && parseFloat(a) / 100 ||
                def;
            }
Dispatches a mouse event to the DOM element behind the provided selector.

@param  String   type      Type of event to dispatch
@param  String   selector  A CSS3 selector to the element to click
@param  {Number} x         X position
@param  {Number} y         Y position
@return Boolean