/***********************************************
* jQuery functions execute
***********************************************/

$(document).ready(function() {                
              
	/*cmx form */

	if(jQuery.browser.mozilla) {
		$('form.cmxform').hide().find('label:not(.nocmx)').each(function(){
                          	var $labelContent = $(this).html();
                                       var $labelWidth = $(this).css('width');
                                       $(this).empty();
                                       $(this).append('<span style="display: block; width: '+$labelWidth+';">');
                                       $(this).prepend('</span>');
                                       $(this).css('display', '-moz-inline-box');
                                       $(this).find('span').html($labelContent);
                                       $('form.cmxform').show();
                                });
                };             


	/*external link*/

	$('a[@rel$="external"]').click(function(){this.target = "_blank";});
		
	/*set hover class*/
	$('form.form input.send').hover(function() {$(this).addClass('hover');}, function() {$(this).removeClass('hover');});
	
				
});


/*simple show + hide*/

      $(document).ready(function() {
			  $('div.quote').hide();
		
        $('h3 a.open-quote').click(function() {
          $('div.quote').toggle(400);
          return false;
        });
      });


/***********************************************
* Safe email links
***********************************************/

function hideEmail() {
	var s1 = "admin";
			var s2 = "@";
			var s3 = "mcp-au.com";
			var s4 = "?Subject=Enquiry%20from%20" + s3;
			var s5 = s1 + s2 + s3;
			document.write("<a href=" + "mail" + "to:" + s1 + s2 + s3 + s4 + ">" + s5 + "</a>");
}



