$(document).ready(function(){
	//alert('Welcome to VFCS - jQuery is working!');
	//alert($('div.title2 h3').length + ' elements!');
	//alert($('#rightCenter ul li').length + ' is the number of elements the rightCenter id has!');
	//alert($('#rightCenter ul li:even').length + 'is d # of even elements the rightCenter id has!');
	//alert($('#rightCenter ul li:odd').length + ' is d # of odd elements the rightCenter id has!');
	//var fontSize = $('#rightCenter ul li:odd').css('font-size'); // use the css function
	//alert(fontSize);
	//var fontSize = $('#rightCenter ul li:odd').css('background-color','#CCA3B1'); // use the css function
/*
$('#rightCenter ul li:odd').css({
	'background-color':'#CCA3B1',
	'color':'#CC5252'}); // show modifying multiple css pair functions
*/
//Manipulate table
$('#services tbody tr:odd').css({
	'background-color':'#84494f',
	'color':'#ffffff'}); // show modifying multiple css pair functions

//Now will do the sam thing using addCLass....don't forget to add the rule to CSS first
//$('#rightCenter ul li:even').addClass('zebra'); // Somthing did not work right with the addClass
//The above is better,this is a better method because it dont add inline code but uses a class
//$('#rightCenter ul li:even').addClass('zebra'); 
//$('#hideButton').click(function() {$('#disclaimer' ).hide();}); 
//$('#hideButton').click(function()   {$(this).hide();}); //This code hide the button not the disclaimer
/*
$('#toggleButton').click(function() {
  if ($('#disclaimer' ).is(':visible')) {
	  $('#disclaimer').hide();
  }
  else
  { $('#disclaimer').show();
  }
 }); 
*/
//Remove an element using jQuery
//$('#disclaimer').remove();
/*
$('#toggleButton').click(function() {
  $('#disclaimer').toggle();

    if ($('#disclaimer' ).is(':visible')) {
	  $(this).val('Hide Terms Of Usage');
  }
  else
  { $(this).val('Show Terms Of Usage');
  }
 });
*/
/*
$('#toggleButton').click(function() {
  $('#disclaimer').slideToggle('slow');

    if ($('#disclaimer' ).is(':visible')) {
	  $(this).val('Hide Terms Of Usage');
  }
  else
  { $(this).val('Show Terms Of Usage');
  }
 });
*/
//use prepend and append
//$('<strong> START!</strong>').prependTo('#disclaimer');
//$('<strong> End!</strong>').appendTo('#disclaimer');
///*
//Try out the hover function
$('#rightCenter ul li').hover(function(){
	$(this).addClass('zebraHover');},
	function() {
		$(this).removeClass('zebraHover');
	});
//*/
/*
//Try out toggleClass
$('#rightCenter2 ul li').click(function(){
	$(this).toggleClass('zebraHover');
	});
//Try Animation
$(document).ready(function(){
  $('#navlist li').hover(function(){
    $(this).animate({paddingLeft: '+=15px'}, 200);
  }, function(){
    $(this).animate({paddingLeft: '-=15px'}, 200);
  });
});
*/
/*
//Another animate
$(document).ready(function(){
  $("#toggleButton").click(function() {
    $('#disclaimer').animate({ 
      opacity: 'hide',
      height: 'hide'
    }, 'slow');    
  });
});
*/
//Color animation - download color library - is this available from goggle? 
$('p:first').animate({'backgroundColor':'#84494f'},28000);
//Add html element via jQuery
//$('<p> A new paragraph!</p>').insertBefore('#disclaimer2');

/*
//Try easing - can use linear also
$(document).ready(function(){
  $('p:first').toggle(function() {
    $(this).animate( {'height':'+=150px'}, 2000, 'easeOutBounce')//linear,swing,
  }, function() {
    $(this).animate( {'height':'-=150px'}, 2000, 'easeOutElastic');
  });
});
//*/
//test
//alert($('p:first').length + 'is d length of the first paragraph!');
///*
// Test panel hiding
//$('#rightCenter > ul > li').hide();
//$('#rightCenter > ul > li:first').show();
//Now show the rest of the content
/*
('#rightCenter ul li').click(function() {
    $(this).next().animate( 
	    {'height':'toggle'}, 'slow', 'easeOutBounce'
    );
  });
*/
/*
//Try the chaining function s
$('#disclaimer2')
.hide()
.slideDown('slow')
.delay(7000)
.fadeOut();
*/
///*
$(document).ready(function(){
  $('#logo1')//p:first
  	.delay(3000)
	.effect('shake', {direction:"up",distance:7,times:10},1400)
    //.effect('fold', {times:3}, 700)
    //.effect('highlight', {}, 3000)
    //.hide('explode', {}, 9000 )
	.show();
});
//*/
/*
//Maintian the menu window as user scroll down the page
$(document).ready(function(){
  $(window).scroll(function () { 
    $('#navcontainer').css('top', $(document).scrollTop()); 
  });
});
*/
//Resize Option
//$('p').resizable();

//console.log(top,left);

//alert($('#photos').length + 'Photos Length!');


$('.headerPic').cycle({
    fx: 'fade',  // other options, scrollUp, shuffle, fade,zoom, turndown
	speed: 7000,
	fit: 0,
	pause: 7000
	
  });

$('#photos').cycle({
    fx: 'fade',  // other options, scrollUp, shuffle
	speed: 2000,
	fit: 0,
	pause: 0
	
  });

//Set up Accordions
$(document).ready(function(){
  $('#title22').accordion({header: 'h2'});
  $('#title22').accordion('activate', 1);
});


$(document).ready(function(){
  $('#accordion').accordion({header: 'h3'});
  $('#accordion').accordion('activate', 1);
});


//Sliding Overlay
$('<div></div>')
    .attr('id', 'overlay')
    .css('opacity', 0.95) //.65
    .hover(function(){
      $(this).addClass('active');
    }, function() {
      $(this).removeClass('active');
      setTimeout(function(){
        $('#overlay:not(.active)').slideUp(function(){
          $('a.terms-hover').removeClass('terms-hover');
        });
      }, 200); //800
    }).appendTo('body');
    
  $('.terms a').mouseover(function(){
    $(this).addClass('terms-hover');
    $('#overlay:not(:animated)')
      .addClass('active')
      .html('<h1><b>VFCS Terms Of Usage</b></h1><align="left"><a href="terms.html">View Terms Of Usage&nbsp;</a>')
	   .slideDown();      
  });










}); 


