Khomeini wrote a book. Really.
Here's a quote:
Having sex with the wife is illegal before reaching nine years, be it a permanent or a timed [timed marriage in shia], but the rest of acts like foreplaying [touching for sexual pleasure], hugging and Tafkhid is legal even with a baby.
http://en.wikipedia.org/wiki/Tahrir_al-Wasilah
Men suspected of homosexuality and women suspected of adultery have to be executed though.