// JavaScript Document
 $(function(){
		$(".lbOn").colorbox({href: function(){
    var url = $(this).attr('href');
    return url+'&type=hasjs';
}});
        $('.slide-out-services').tabSlideOut({
            tabHandle: '.serviceshandle',                     //class of the element that will become your tab
            pathToTabImage: 'images/services.png', //path to the image for the tab //Optionally can be set using css
            imageHeight: '225px',                     //height of tab image           //Optionally can be set using css
            imageWidth: '50px',                       //width of tab image            //Optionally can be set using css
            tabLocation: 'right',                      //side of screen where tab lives, top, right, bottom, or left
            speed: 300,                               //speed of animation
            action: 'hover',                          //options: 'click' or 'hover', action to trigger animation
            topPos: '275px',                          //position from the top/ use if tabLocation is left or right
            leftPos: '0px',                          //position from left/ use if tabLocation is bottom or top
            fixedPosition: true                      //options: true makes it stick(fixed position) on scroll
        });
		 $('.slide-out-contact').tabSlideOut({
            tabHandle: '.contacthandle',                     //class of the element that will become your tab
            pathToTabImage: 'images/contact.png', //path to the image for the tab //Optionally can be set using css
            imageHeight: '175px',                     //height of tab image           //Optionally can be set using css
            imageWidth: '50px',                       //width of tab image            //Optionally can be set using css
            tabLocation: 'right',                      //side of screen where tab lives, top, right, bottom, or left
            speed: 300,                               //speed of animation
            action: 'hover',                          //options: 'click' or 'hover', action to trigger animation
            topPos: '100px',                          //position from the top/ use if tabLocation is left or right
            leftPos: '0px',                          //position from left/ use if tabLocation is bottom or top
            fixedPosition: true                      //options: true makes it stick(fixed position) on scroll
        });

    });

 $(document).ready(function() { 
$('#commentForm').validate({
						   
	rules: {
    name: {
      required: true,
      minlength: 2
    },
	 email: {
      required: true,
     email: true
    },
	phone: {
      required: true,
      minlength: 6
    },
	 message: {
      required: true,
      minlength: 2
    }
  },

 submitHandler: function(form) {

var options = { 
        target:        '#commentForm',   // target element(s) to be updated with server response  
        // other available options: 
        url:       'includes/email.php?js=1',         // override for form's 'action' attribute 
        //type:      type        // 'get' or 'post', override for form's 'method' attribute 
        //dataType:  null        // 'xml', 'script', or 'json' (expected server response type) 
        clearForm: true        // clear all form fields after successful submit 
        //resetForm: true        // reset the form after successful submit 
 
        // $.ajax options can be used here too, for example: 
        //timeout:   3000 
    }; 
 $('#commentForm').ajaxSubmit(options);
   }
}); 
            
        });
