/* <![CDATA[ */
 
 
 /* Cufon Script - Font Image Replacement*/
 /* 
 Cufon.replace('#header #navi', {
  fontFamily: 'TrajanPro',
  color: '-linear-gradient(#666666,#4C4C4C,#333333)',
  textShadow: '1px 1px #fff'
});
 */
  $(document).ready(function (){
	/* Pajinate Script */
	$('#category').pajinate({
		num_page_links_to_display : 6,
		items_per_page : 5	
	});
	
	$(".scroll").click(function(event){
		//prevent the default action for the click event
		

		//get the full url - like mysitecom/index.htm#home
		var full_url = this.href;

		//split the url by # and get the anchor target name - home in mysitecom/index.htm#home
		var parts = full_url.split("#");
		var trgt = parts[1];

		//get the top offset of the target anchor
		var target_offset = $("#"+trgt).offset();
		var target_top = target_offset.top;

		//goto that anchor by setting the body scroll top to anchor top
		$('html, body').animate({scrollTop:target_top}, 500);
	});
	
	
	$(".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);
	});
	
	
	
  	$("body").ready(function(){
			$("body").animate({opacity:"0.2",speed:"fast"});
			$("body").animate({opacity:"1",speed:"fast"});
		});
/*Jquery Fancybox */ 
  $(".fancypic, a[rel=fancypic]").fancybox({
    'titleShow'		: true,
    'transitionIn'	: 'elastic',
    'transitionOut'	: 'elastic'
  });
/*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 */  
    
      });
/* ]]> */
