JQuery Compatibility Mode Detection

JQuery Compatibility Mode Detection

Is there  a way we can detect if the browser is running in compatibility mode and preferably switch the browser to IE 9 standards mode automatically?