
function validateContactForm(){	

                                    jQuery("#contactName").removeClass('error');
                                    jQuery("#contactPhone").removeClass('error');
                                    jQuery("#contactEmail").removeClass('error');
                                    jQuery("#message").removeClass('error');
                                    jQuery("#error_warning").empty();
									if((jQuery("#contactName").val()) == ''){
										jQuery("#contactName").removeClass('error');
										jQuery("#contactName").addClass('error');
										jQuery("#error_warning").append("Please enter the name");
										jQuery("#contactName").focus();
										jQuery("#contactName").val('');
										return false;
									}
									else if((jQuery("#contactPhone").val()) == ''){
										jQuery("#contactPhone").removeClass('error');
										jQuery("#contactPhone").addClass('error');
										jQuery("#error_warning").append("Please enter the phone number");
										jQuery("#contactPhone").focus();
										jQuery("#contactPhone").val('');
										return false;
									}
									else if((jQuery('#contactEmail').val())=="")
									{
										jQuery("#contactEmail").removeClass('error');
										jQuery("#contactEmail").addClass('error');
										jQuery("#error_warning").append("Please enter the mail id");
										jQuery("#contactEmail").focus();
										return false;
									}
									else if((jQuery('#contactEmail').val())!="" ){
											var x = (jQuery('#contactEmail').val());
											var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
											if(!filter.test(x)){	
										    jQuery("#contactEmail").removeClass('error');
										    jQuery("#contactEmail").addClass('error');
										    jQuery("#error_warning").append("Please enter the valid mail id");
												jQuery("#contactEmail").focus();
												return false;
											}
											else{
												if((jQuery('#message').val())==""){
      										jQuery("#message").removeClass('error');
      										jQuery("#message").addClass('error');
      										jQuery("#error_warning").append("Please enter your valid comments");
													jQuery("#message").focus();
													jQuery("#message").val('');
													return false;		
												}			
												else{
											        validateCheckDatacontact()
													return false;		
												}
											}
										}
									}
function validateBottomContactForm(){	

                                    jQuery("#contactNameBottom").removeClass('error');
                                    jQuery("#contactPhoneBottom").removeClass('error');
                                    jQuery("#contactEmailBottom").removeClass('error');
                                    jQuery("#commentBottom").removeClass('error');
                                    jQuery("#errorBottom_warning").empty();
									if((jQuery("#contactNameBottom").val()) == "Name"){
										jQuery("#contactNameBottom").removeClass('error');
										jQuery("#contactNameBottom").addClass('error');
										jQuery("#errorBottom_warning").append("Please enter the name");
										jQuery("#contactNameBottom").focus();
										jQuery("#contactNameBottom").val('');
										return false;
									}
									else if((jQuery("#contactPhoneBottom").val()) == "Phone"){
										jQuery("#contactPhoneBottom").removeClass('error');
										jQuery("#contactPhoneBottom").addClass('error');
										jQuery("#errorBottom_warning").append("Please enter the phone number");
										jQuery("#contactPhoneBottom").focus();
										jQuery("#contactPhoneBottom").val('');
										return false;
									}
									else if((jQuery('#contactEmailBottom').val())=="Email ID")
									{
										jQuery("#contactEmailBottom").removeClass('error');
										jQuery("#contactEmailBottom").addClass('error');
										jQuery("#errorBottom_warning").append("Please enter the mail id");
										jQuery("#contactEmailBottom").focus();
										return false;
									}
									else if((jQuery('#contactEmailBottom').val())!="" ){
											var x = (jQuery('#contactEmailBottom').val());
											var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
											if(!filter.test(x)){	
										    jQuery("#contactEmailBottom").removeClass('error');
										    jQuery("#contactEmailBottom").addClass('error');
										    jQuery("#errorBottom_warning").append("Please enter the valid mail id");
												jQuery("#contactEmailBottom").focus();
												return false;
											}
											else{
												if((jQuery('#commentBottom').val())=="Message"){
      										jQuery("#commentBottom").removeClass('error');
      										jQuery("#commentBottom").addClass('error');
      										jQuery("#errorBottom_warning").append("Please enter your valid comments");
													jQuery("#commentBottom").focus();
													jQuery("#commentBottom").val('');
													return false;		
												}			
												else{
													//validateCheckDatacontactBottom()
													validateCheckDataBottomcontact()
													return false;		
												}
											}
										}
					}									



function validateCommentForm(user){	

                                  
                                    jQuery("#errorComment_warning").empty();
									if((jQuery(".txtarea").val()) == ""){
										jQuery("#errorComment_warning").append("Please enter your comments");
										jQuery(".txtarea").focus();
										jQuery(".txtarea").val('');
										return false;
									}
									else if((jQuery("#author").val()) == "Name" && user==''){
										jQuery("#errorComment_warning").append("Please enter your name");
										jQuery("#author").focus();
										jQuery("#author").val('');
										return false;
									}
									else if((jQuery('#email').val())=="Email ID" && user=='')
									{
										jQuery("#errorComment_warning").append("Please enter the mail id");
										jQuery("#email").focus();
										return false;
									}
									else if((jQuery('#email').val())!="" && user==''){
											var x = (jQuery('#email').val());
											var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
											if(!filter.test(x)){	
										    jQuery("#errorComment_warning").append("Please enter the valid mail id");
												jQuery("#email").focus();
												return false;
											}
											else{
													validateCheckDatacontactComment();
													return false;		
												}
											}
									else {
										    validateCheckDatacontactComment();
										    return false;
									}
					}

function reInitAcc()
{
   $(".ui-accordion .ui-accordion-content").css("display","none");
   $(".ui-accordion span.ui-state-active").removeClass("ui-state-active").addClass("ui-state-default");
}



jQuery(document).ready(function (){
/*         $(".tab_title").click(function(event)
         {
          event.preventDefault();
          id = $(this).attr("id").split(("_")[0]);
          $(".tab_content").css("display","none");
    	  $(".appeals_video").css("display","none");
          $("#video_"+id[1]).css("display","block");
          $("#tab"+id[1]).css("display","block");
         }); */

 $(".headSecLink").click(function(event){
  event.preventDefault();
  $(".areaclass").removeClass('active');
  id = $(this).attr("id").split(("_")[0]);
  $("#li_"+id[1]).addClass('active');
  });


$(".video_carousel").click(function(event){
                   var video_id=$(this).attr("id");
                   $(".video_content").css("display","none");
                   $("#"+video_id+"_content").css("display","block");
               
              });




/*
$(".citytabSec li ").click(function(event){
             id = $(this).attr("id").split(("_")[0]);
             $(".citytabCont").css("display","none");
             $("#citytabCont_"+id[1]).css("display","block");
              });



$(".cityimgview span").click(function(event){
             id = $(this).attr("id").split(("_")[0]);
             $(".citytabCont").css("display","none");
             $("#citytabCont").css("display","block");
              });
*/

 jQuery(function() {
        $(".carouselwidgetvideo .jCarouselLite").jCarouselLite({
            btnNext: ".carouselwidgetvideo .next",
            btnPrev: ".carouselwidgetvideo .prev",
          vertical: false,
          hoverPause:true,
          visible: 10,
          auto:4000,
          speed:1000
          
        });
        });


$(".videoCarousel img").click(function(){
                   var content_id = ($(this).attr("alt"));
                   $(".mid").html('<object class="object"><param value="'+content_id+'" \/><param value="true" name="allowFullScreen"\/><param value="always" name="allowscriptaccess"\/><embed width="480" height="360" allowfullscreen="true" allowscriptaccess="always" type="application/x-shockwave-flash" src="'+content_id+'"\/><\/object>');
              });

		$("#demoFive").accordion({ 
			   header: "span",
			     event: "click",
			   autoHeight:false,
			   animated: 'bounceslide',
			   clearStyle:true,
			   selectedClass:"selected",
			   collapsible: true,
			   active: 0
		});
			
       jQuery("#dropmenu ul").css({display: "none"}); 
      jQuery("#dropmenu li:last").addClass("last"); 
        jQuery("#dropmenu li").hover(function(){
		        jQuery(this).find('ul:first').css({visibility: "visible",display: "none"}).show(268);
		        },function(){
		        jQuery(this).find('ul:first').css({visibility: "hidden"});
		        });
        jQuery(function() {
         if(document.getElementById('carousel'))
        {
	        $(".show").jCarouselLite({
		        vertical: false,
		        hoverPause:true,
		        visible: 1,
		        auto:12000,
		        speed:1000
		        
	        });
	    }
		 $("#caseResult").jCarouselLite({
		        vertical: false,
		        hoverPause:true,
		        visible: 1,
		        auto:3000,
		        speed:2000
		        
	        });

        });		
        jQuery(function() {
        $(".carouselwidget .jCarouselLite").jCarouselLite({
            btnNext: ".carouselwidget .next",
            btnPrev: ".carouselwidget .prev",
		        vertical: false,
		        hoverPause:true,
		        visible: 10,
		        auto:4000,
		        speed:1000
		        
        });
        });


	      $(".mapDiv").click(function(){
                   //var map_div = ($(this).attr("id"));
                   var map_id=$(this).attr("id").split(("_")[0]);
                   var map_value=$("#map_"+map_id[1]).val();
                   $(".mapli").removeClass("active");
                   $("#mapli_"+map_id[1]).addClass("active");
                   $('.office_map').html('<iframe width="100%" height="100%" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'+map_value+'"><\/iframe>');
              });


      /*        $(".adressContent").click(function(){
                   var content_id = ($(this).attr("id"));
                   $('.office_map').html('<iframe width="100%" height="100%" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'+content_id+'"><\/iframe>');
              }); */
                   var content_id = ($(".single_address").attr("id"));
                   $('.office_location_single').html('<iframe width="100%" height="100%" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'+content_id+'"><\/iframe>');
              $(".carouselwidget li img").click(function(){
                   var content_id = ($(this).attr("alt"));
                   $(".mid").html('<object class="object"><param value="'+content_id+'" \/><param value="true" name="allowFullScreen"\/><param value="always" name="allowscriptaccess"\/><embed width="480" height="360" allowfullscreen="true" allowscriptaccess="always" type="application/x-shockwave-flash" src="'+content_id+'"\/><\/object>');
              });
             
        jQuery("#contactPhone,#contactPhoneBottom,#form,#botform,#comform,#homephone,#infoAnswer").keypress(function(event){
                              jQuery("#"+this.id+"_warning").empty(); 
											        var asciiValue = event.which;
											        if((asciiValue > 47 && asciiValue<58) || (asciiValue==8) || (asciiValue==0) || (asciiValue==13) ||(asciiValue==46))
												        return true;                      
											        else
												        return false;
										        });
        jQuery("#contactName,#contactNameBottom").keypress(function(event){ 
															        jQuery("#"+this.id+"_warning").empty(); 
															        var asciiValue = event.which;
															        if((asciiValue > 64 && asciiValue<91) || (asciiValue > 96 && asciiValue<123) || (asciiValue==8) || (asciiValue==0) || (asciiValue==13) || (asciiValue==32))
																        { 
																        jQuery("#"+this.id+"_warning").empty(); 
																        return true; 
																							            
															        }
															        else{
																        return false;
															        }
														        }); 
	jQuery("#contactEmail,#message,#contactName,#contactPhone,#form,#botform,#comform,.txtarea,#author,#email,#contactEmailBottom,#commentBottom,#contactNameBottom,#contactPhoneBottom").keypress(function(event){ 
															      jQuery("#errorBottom_warning").empty();
															      jQuery("#error_warning").empty();
															      jQuery("#errorComment_warning").empty();
														        });
	$("#demoSix").accordion({ 
                           header: "span",
                             event: "click",
                           autoHeight:false,
                           animated: 'bounceslide',
                           clearStyle:true,
                           selectedClass:"selected",
                           collapsible: true,
                           active: 0
                });	
})
function addClass(id){
//                $(".tab_title").removeClass("active");
                $("#"+id).addClass("active");
            }


function validateInfo(){
    jQuery("#error_info_warning").empty();
    jQuery("#infoEmail_warning").empty();
    jQuery("#homephone_warning").empty();
    jQuery("#realname_warning").empty();
	if((jQuery("#realname").val()) == ''){
		jQuery("#realname_warning").append("Please enter the name");
		jQuery("#realname").focus();
		jQuery("#realname").val('');
		return false;
	}
	else if((jQuery("#homephone").val()) == ''){
		jQuery("#homephone_warning").append("Please enter the phone number");
		jQuery("#homephone").focus();
		jQuery("#homephone").val('');
		return false;
	}
	else if((jQuery('#infoEmail').val())=="")
	{
		jQuery("#infoEmail_warning").append("Please enter the mail id");
		jQuery("#infoEmail").focus();
		return false;
	}
	else if((jQuery('#infoEmail').val())!="" ){
			var x = (jQuery('#infoEmail').val());
			var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
			if(!filter.test(x)){	
		    jQuery("#infoEmail_warning").append("Please enter the valid mail id");
				jQuery("#infoEmail").focus();
				jQuery("#infoEmail").val('');
				return false;
			}
			else{
			        validateInfoCaptcha()
					return false;		
				}
			}
		}


