/* <![CDATA[ */
$(document).ready(function (){
/*  gallery csv code
  $(".gallery a span").ready(function(){
    $(".gallery a span").animate({opacity:"0.50",speed:"fast"});
    });
    $(".gallery a").hover(function() {
        $(this).find('span').addClass("hover").stop()
            .animate({
        opacity: '0.5'
            }, 1000);
        } , function() {
        $(this).find('span').removeClass("hover").stop()
            .animate({
        opacity: '1'
            }, 2000);
    });
    $('#category').pajinate({
        num_page_links_to_display : 5,
        items_per_page : 10	
    });*/
     $("body").ready(function(){
            $("body").animate({opacity:"0.2",speed:"fast"});
            $("body").animate({opacity:"1",speed:"fast"});
        });
/*Jquery Fancybox */
  $(".fancypic").fancybox({
    'titleShow'		: false,
    'transitionIn'	: 'elastic',
    'transitionOut'	: 'elastic'
  });
    $(".fancymap").fancybox({
    'titleShow'		: false,
    'transitionIn'	: 'elastic',
    'transitionOut'	: 'elastic',
    'autoScale':	false,
    'width':'600',
    'height':'600'
  });
  
    $(".mylsap").fancybox({
    'width'				: '75%',
    'height'			: '75%',
    'titleShow'		: false,
    'autoScale'			: false,
    'transitionIn'		: 'elastic',
    'transitionOut'		: 'elastic',
    'type'				: 'iframe'

    });
/*Jquery Validator */
              jQuery.validator.addMethod("phoneUS", function(phone_number, element) {
    phone_number = phone_number.replace(/\s+/g, "");
  return this.optional(element) || phone_number.length > 9 &&
    phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/);
}, "Please specify a valid phone number");
  jQuery.validator.addMethod("lettersonly", function(value, element) {
    return this.optional(element) || /^[a-z\s]+$/i.test(value);
  }, "Letters only please");
       $("#Contact_Form").validate({
    rules: {
      NameTxt:{
        required: true,
      lettersonly:true
      },
      EmailTxt: {
        required: true,
        email: true
      },
    /*AddressTxt: "required",
    CityTxt: "required",
    StateTxt: "required",
    ZipTxt: "required",*/
    CountryLst: "required",
    MessageTxt: "required",
    PhoneNum: {
        /*required: true,*/
        phoneUS: true
      },
     FaxNum: {
        /*required: true,*/
        phoneUS: true
      },
      SubjectTxt: "required",
      CaptchaTxt: "required"
    }
  });
  /*Jquery Validator */
      });
          $(function(){
        AjaxContent.init({
            containerDiv:"#contentwrapper",
            contentDiv:"#content",
            sidebarDiv:"#sidebar",
            }).ajaxify_links("a.ajax");
    });

/* ]]> */
