* made code 4.0.1 ready
* converted to OOP
* used wp_enqueue_scripts() hook for compatibility