// JavaScript Document

      $("ul.thumb li").hover(function() {
	$(this).css({'z-index' : '10'}); /*Add a higher z-index value so this image stays on top*/ 
	$(this).find('img').addClass("hover").stop() /* Add class of "hover", then stop animation queue buildup*/
		.animate({
			marginTop: '-150px', /* The next 4 lines will vertically align this image */ 
			marginLeft: '-150px',
			top: '50%',
			left: '50%',
			width: '300px', /* Set new width */
			height: '300px', /* Set new height */
			padding: '20px'
		}, 10); /* this value of "200" is the speed of how fast/slow this hover animates */

	} , function() {
	$(this).css({'z-index' : '0'}); /* Set z-index back to 0 */
	$(this).find('img').removeClass("hover").stop()  /* Remove the "hover" class , then stop animation queue buildup*/
		.animate({
			marginTop: '0', /* Set alignment back to default */
			marginLeft: '0',
			top: '0',
			left: '0',
			width: '80px', /* Set width back to default */
			height: '80px', /* Set height back to default */
			padding: '5px'
		}, 400);
});  



$(document).ready(function () {    
       
    $('#nav li').hover(   
        function () {   
            //show its submenu   
            $('ul', this).slideDown(1000);   
  
        },    
        function () {   
            //hide its submenu   
            $('ul', this).slideUp(1000);            
        }   
    );   
       
}); 


// Photoshow

$(document).ready(function(){
$(".fade").fadeTo("slow", 1.0); // This sets the opacity of the thumbs to fade down to 60% when the page loads

$(".fade").hover(function(){
$(this).fadeTo("slow", 0.5); // This should set the opacity to 100% on hover
},function(){
$(this).fadeTo("slow", 1.0); // This should set the opacity back to 60% on mouseout
});
});



$(function() {
setInterval ("rotateImages()", 5000);
});

function rotateImages() {
var oCurPhoto = $("#photoshow div.current");
var oNxtPhoto = oCurPhoto.next();
if (oNxtPhoto.length == 0)
	oNxtPhoto = $("#photoshow div:first");	
	
oCurPhoto.removeClass('current').addClass('previous');

oNxtPhoto.css({ opacity:0.0 } ).addClass('current').animate({ opacity: 1.0 }, 2000,
	function() {
	oCurPhoto.removeClass('previous');
});

}

// Tooltips

$(document).ready(function() 
{
   // By suppling no content attribute, the library uses each elements title attribute by default
   $('a[href][title]').qtip({
      content: {
         text: false // Use each elements title attribute
      },
      style: { tip: 'topLeft',
   border: {
      width: 2,
      radius: 2,
      color: '#FFF'
   },
   background: '#00a94f',
   color: '#FFF' }
   });
   
});




$(document).ready(function() 
{
   // By suppling no content attribute, the library uses each elements title attribute by default
   $('div#branding a[href][title]').qtip({
      content: {
         text: false // Use each elements title attribute
      },
      style: { tip: 'topLeft',
   border: {
      width: 2,
      radius: 2,
      color: '#000'
   },
   background: '#3B5998',
   color: '#FFF' }
   });
   
});

$(document).ready(function() 
{
   // By suppling no content attribute, the library uses each elements title attribute by default
   $('div#content a[href][title]').qtip({
      content: {
         text: false // Use each elements title attribute
      },
      style: { tip: 'topLeft',
   border: {
      width: 2,
      radius: 2,
      color: '#000'
   },
   background: '#3B5998',
   color: '#FFF' }
   });
   
});

$(document).ready(function() 
{
   // By suppling no content attribute, the library uses each elements title attribute by default
   $('div#anmal a[href][title]').qtip({
      content: {
         text: false // Use each elements title attribute
      },
      style: { tip: 'topLeft',
   border: {
      width: 2,
      radius: 2,
      color: '#000'
   },
   background: '#3B5998',
   color: '#FFF' }
   });
   
});


// Accordion

	$(function() {
		$( "#tabs" ).tabs();
	});



