added new param: onclick : funtion() + fixed clickToClose