Help with Jquery validate plugin

Help with Jquery validate plugin

Apologise if this is a double post, as I tried to post it yesterday, but dont think it went through, just checked the dashboard and the forum and cant find it so here goes again.
 
I have a form which has a select tag and an input field on it. The selct tag can contain one value out of the following, tel, mobile, email, web and fax. The input value which I have named details, can contain either a tel email or web address. I have the following script working which makes sure that the details field is not empty when submitted. However I would further like to validate the details field to check it is a valid email address PROVIDING the select tag which is named "type" has the value email in it.
 
Is this possible?
 
Many Thanks for any advice, I enclose the basic code I have working for preventing the details input being empty.
 
  1. <script type="text/javascript">
     $(document).ready(function(){
     $("#contactAdd").validate({
      rules: {
        details: {required: true},
        }
     });
     });
    </script>