/* <![CDATA[ */
 $(document).ready(function (){

 
 
    /*Full calendar */
    
     var date = new Date();
        var d = date.getDate();
        var m = date.getMonth();
        var y = date.getFullYear();
        $('#calendar').fullCalendar({
            editable: true,
            events: [
                                {
                    title: 'New Years Day',
                    start: new Date(y, 0, 1)
                },
                                 {
                    title: 'Martin Luther King Day	School Closed',
                    start: new Date(y, 0, 17)
                },
                                 {
                    title: 'Groundhog Day',
                    start: new Date(y, 1, 2)
                },
                                 {
                    title: 'Parent Teacher\'s Conference',
                    start: new Date(y, 1, 10),
                                        end: new Date (y, 1, 11)
                },
                                 {
                    title: 'Abraham Lincoln\'s BirthDay',
                    start: new Date(y, 1, 12)
                },
                                 {
                    title: 'Valentine\'s Day',
                    start: new Date(y, 1, 14)
                },
                                 {
                    title: 'Presedent\'s Day',
                    start: new Date(y, 1, 21)
                },
                                 {
                    title: 'Daylight Savings Time Begins',
                    start: new Date(y, 2, 13)
                },
                                {
                    title: 'St. Patrick\'s Day ',
                    start: new Date(y, 2, 17)
                },
                                  {
                    title: 'April Fool\'s Day',
                    start: new Date(y, 3, 1)
                },
                                 {
                    title: 'Taxes Due',
                    start: new Date(y, 3, 15)
                },
                                 {
                    title: 'Passover',
                    start: new Date(y, 3, 19)
                },
                                 {
                    title: 'Earth Day Good Friday School Closed',
                    start: new Date(y, 3, 22)
                },
                                 {
                    title: 'Easter',
                    start: new Date(y, 3, 24)
                },
                                 {
                    title: 'Admin Assist Day',
                    start: new Date(y, 3, 27)
                },
                                 {
                    title: 'Mother\'s Day Breakfast with your children 8am-9am',
                    start: new Date(y, 4, 6)
                },
                                 {
                    title: 'Mother\'s Day',
                    start: new Date(y, 4, 8)
                },
                                 {
                    title: 'Memorial Day School Closed',
                    start: new Date(y, 4, 30)
                },
                                 {
                    title: 'Flag Day',
                    start: new Date(y, 5, 14)
                },
                                {
                    title: 'Father\'s Day Breakfast with your children 8am-9am',
                    start: new Date(y, 5, 17)
                },
                                 {
                    title: 'Father\'s Day ',
                    start: new Date(y, 5, 19)
                },
                                 {
                    title: 'Independence Day ',
                    start: new Date(y, 6, 4)
                },
                                 {
                    title: 'Trip to Sesame Place',
                    start: new Date(y, 6, 15)
                },
                                 {
                    title: 'Parent\'s Day ',
                    start: new Date(y, 6, 24)
                },
                                 {
                    title: 'Ramadan Begin\'s ',
                    start: new Date(y, 7, 1)
                },
                                 {
                    title: 'Graduation Ceremony 3pm - 5pm',
                    start: new Date(y, 7, 26)
                },
                {
                    title: 'Labor Day School Closed',
                    start: new Date(y, 8, 5)
                },
                {
                    title: 'Patriot Day, Grandparents Day',
                    start: new Date(y, 8, 11)
                },
				{
                    title: 'Rosh Hashanah',
                    start: new Date(y, 8, 29)
                },
				{
                    title: 'Yom Kippur',
                    start: new Date(y, 9, 8)
                },
                {
                    title: 'Columbus Day',
                    start: new Date(y, 9, 10)
                },
                {
                    title: 'United Nations Day',
                    start: new Date(y, 9, 24)
                },
                {
                    title: 'Halloween',
                    start: new Date(y, 9, 31)
                },
                {
                    title: 'Winter / Holiday Pictures',
                    start: new Date(y, 10, 3),
                                        end: new Date(y, 10, 4)
                },
                {
                    title: 'Daylight Savings Ends',
                    start: new Date(y, 10, 6)
                },
                                {
                    title: 'Veterans Day',
                    start: new Date(y, 10, 11)
                },
                                {
                    title: 'Thanksgiving Break School Closed',
                    start: new Date(y, 10, 24),
                                        end: new Date(y, 10, 25)
                },
                                {
                    title: 'Staff Christmas Party',
                    start: new Date(y, 11, 23)
                },
                                {
                    title: 'Christmas Eve',
                    start: new Date(y, 11, 24)
                },
                                 {
                    title: 'Christmas Day',
                    start: new Date(y, 11, 25)
                },
                                {
                    title: 'School Closed',
                    start: new Date(y, 11, 26)
                },
				{
                    title: "New Year's Eve",
                    start: new Date(y, 11, 31)
                }
            ]
        });
 
	$(".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);
	});
    
    
	
	/* Pajinate Script */
	$('#category').pajinate({
		num_page_links_to_display : 5,
		items_per_page : 4	
	});
    
    /* Pajinate Script */
	$('#calendarpaging').pajinate({
		num_page_links_to_display : 5,
		items_per_page : 1	
	});
	
  	$("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'
  });
  
  /*font effect*/
  $("#header .midheader .banner .bannertext").FontEffect({
    outline         :true, // Apply the outline effect
    outlineColor1   :"#fff",    // [find contrasting] The upper left  outline color
    outlineWeight   :1,     // 1=light,2=normal,3=bold
    shadow          :true, // Apply the shadow effect
    shadowColor     :"#000",// The color of the shadow
    shadowOffsetTop :-4,     // The top offset position (px)
    shadowOffsetLeft:-4,     // The left offset position (px)
    shadowBlur      :1,     // The shadow blur 1=none,2=low,3=high
    shadowOpacity   :0.1   // The opacity of the shadow (0=none,1=all)
    });
    $("#navi li a,#sidebar .sidebox .sideheader").FontEffect({
    shadow          :true, 
    shadowColor     :"#000",
    shadowOffsetTop :-1,    
    shadowOffsetLeft:-1,   
    shadowBlur      :1,     
    shadowOpacity   :0.1 
    });

/*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 */  
    
    
    
    
    
    
    
    
    
    
      });
/* ]]> */
