jQuery(document).ready(function(){	


//Hover Events

$("#our-most-recent-work #gallery img, #main #subpage-main .column-right #gallery-container ul.gallery-thumbs li a").css("opacity","1");

$("#our-most-recent-work #gallery img, #main #subpage-main .column-right #gallery-container ul.gallery-thumbs li a").hover(function() {
     $(this).css("opacity","0.6"); },
function() {
     $(this).css("opacity","1"); });




	 // Fancybox

     $(".fancybox").fancybox({
          'transitionIn'     :     'fade',
          'transitionOut'     :     'fade',
          'speedIn'          :     600,
          'speedOut'          :     200,
          'overlayShow'     :     true
     });
	
	 
	 // Clear all classes
// Add new class called "jqueryon" to the hovered nav item
     $("ul#navigation li a.services-a").hover(function() {
          $("ul#navigation li a.services-a").removeClass("jqueryon");
          $(this).addClass("jqueryon");
     },

// Remove class when hover off
     function () {
          $("ul#navigation li a.services-a").removeClass("jqueryon");
     });

// When hover on a nav item
// do subnav animation
     $("ul#navigation li a.services-a").hover(function() {
          $("#services-navigation").stop(true, true).slideToggle(500); },
     function() {
          $("#services-navigation").stop(true, true).slideToggle(500);
     });

// When hover on subnav itself
// add "jquery" on class to the main nav item
      $("#services-navigation").hover(function() {
          $(this).stop(true, true).show();
          $("#navigation li a.services-a").addClass("jqueryon");
     },

// When hover off subnav
// animate up and remove jqueryon class
     function() {
     $(this).stop(true,true).slideUp(500);
          $("ul#navigation li a").removeClass("jqueryon");
     });     



	$("#gallery-container a").click(function() {
  		var value = $(this).attr("title"); 


		$('#gallery-image').html("<img src='images/content-gallery/"+value+".jpg' alt='gallery image' /> ");	
		
		return false;
	});
	
				
});
