

 
    $(document).ready(function() { 
        $('ul.sf-menu').superfish({ 
            delay:       500,                            // one second delay on mouseout 
            animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
            speed:       'fast',                          // faster animation speed 
            autoArrows:  false,                           // disable generation of arrow mark-up 
            dropShadows: false                            // disable drop shadows 
        }); 
    }); 
 
	//  thumbnail hover
    $(document).ready(function() {
			$(".ngg-gallery-thumbnail").each(function() {
				var thumb = $(this);	
				var thumbImg = thumb.find('img');
				thumbImg.after('<div class="hoverView"></div>');
			});
		
    }); 
	
	//  add ! to current portfolio page
    $(document).ready(function() {
		var link = $("#sidebar h2.current_page_item a");
		var linkText = link.text();
		link.text(linkText+'!');
    }); 
 
 
    $(document).ready(function() {
			//hoverview
			$(".ngg-gallery-thumbnail a").mouseenter(function() {
				$(".hoverView").hide();
				var thumb = $(this);	
				var curHover = thumb.find('.hoverView');
				curHover.fadeIn("fast");
			});
			
			$(".ngg-gallery-thumbnail a").mouseleave(function() {
				var thumb = $(this);	
				var curHover = thumb.parent().find('.hoverView');
				curHover.fadeOut("fast");
			});
    }); 
 
 // sidebar h2 link effect
    $(document).ready(function() {
			$("#sidebar h2 a").hover(function() {
				$(this).stop().animate({marginLeft:"15px"},200,"easeInSine");
			},function(){
				$(this).animate({marginLeft:"0px"},300,"easeOutSine");			
			});
			
    }); 
 
    $(document).ready(function() {
	
			// loop for tabs
			$('.infoselector a').each(
				function(intIndex) {
				$(this).val('t'+intIndex);
				}
			);
			// loop for tab info
			$('.hiddeninfo .sinfo').each(
				function(intIndex) {
				$(this).addClass('t'+intIndex+'i');
				}
			);
			//start txt
			var starttxt = $('.sinfo:first').html();
			$('.tinfo .tcontent').html(starttxt); // set starting text
			
			//hover over selector for tabs
			$('.infoselector a').hover(function(){
				 $(this).stop().animate({color: "#bdd73c"},250);
			},function(){
				 $(this).stop().animate({color: "#ffffff"},450);
			});
			
			//sidebar hover
			$('.portfolioside li').hover(function(){
				 $(this).stop().animate({backgroundColor: "#2485d0"},100);
			},function(){
				 $(this).stop().animate({backgroundColor: "#0d1216"},300);
			});
			//headnav color hover
			$('#pagemenu a').hover(function(){
				 $(this).stop().animate({color: "#bdd73c"},100);
			},function(){
				 $(this).stop().animate({color: "#fff"},350);
			});
			// on click
			$(".infoselector a").stop().click(function(){ // on click for each show button
					$('.showinfo').removeClass('current'); // removes current class
					$(this).addClass('current'); // makes clicked link current
					var label = $(this).html(); 
					var curval = $(this).val(); 
					var labeltxt = $('.'+curval+'i').html(); // get info
					   $('.tinfo .tcontent').fadeOut("normal", function(){
							$(this).html(labeltxt).fadeIn("normal");
					   }); 
		   });			   
		});  
		
$(document).ready(function() {
	$('.request-quote').append('<span class="hover"></span>').each(function () {
	  var $span = $('> span.hover', this).css('opacity', 0);
	  $(this).hover(function () {
	    $span.stop().fadeTo(500, 1);
	  }, function () {
	    $span.stop().fadeTo(500, 0);
	  });
	});
});

		SyntaxHighlighter.config.clipboardSwf = 'http://www.betaimages.com/js/clipboard.swf';
		SyntaxHighlighter.all();
		
		
$(document).ready(function() {
    $('.slideshow').cycle({
		fx: 'fade',
    next:   '.slideshow', 
    pause:   1 ,
	});
});


$(document).ready(function() {
    $('#slider').cycle({
		fx: 'fade',     
    timeout: 7000
	});
});

    $(document).ready(function() {
    
    	$('.hpc').append('<span class="hover"></span>').each(function () {
    	  var $span = $('> span.hover', this).css('opacity', 0);
    	  $(this).hover(function () {
    	    $span.stop().fadeTo(300, 1);
    	    $(this).stop().animate({
                marginTop:"-5px"},300);
    	  }, function () {
    	    $span.stop().fadeTo(500, 0);  
    	    $(this).stop().animate({
                marginTop:"0"},300);
    	  });
    	});         
    });
    
    $(document).ready(function() {
    
    	$('.ph').append('<span class="hover"></span>').each(function () {
    	  var $span = $('> span.hover', this).css('opacity', 0);
    	  $(this).hover(function () {
    	    $span.stop().fadeTo(500, 1);   
    	    $(this).stop().animate({
                marginLeft:"5px"},300);
    	  }, function () {
    	    $span.stop().fadeTo(800, 0);   
    	    $(this).stop().animate({
                marginLeft:"0"},300);
    	  });
    	});  
      
    });
    
    
    $(window).load(function() {
	$('#slider2').nivoSlider({
		effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
		slices:1,
		animSpeed:500,
		pauseTime:4000,
		startSlide:0, //Set starting Slide (0 index)
		directionNav:false, //Next & Prev
		directionNavHide:false, //Only show on hover
		controlNav:true, //1,2,3...
		controlNavThumbs:false, //Use thumbnails for Control Nav
      controlNavThumbsFromRel:false, //Use image rel for thumbs
		controlNavThumbsSearch: '.jpg', //Replace this with...
		controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src
		keyboardNav:false, //Use left & right arrows
		pauseOnHover:true, //Stop animation while hovering
		manualAdvance:false, //Force manual transitions
		captionOpacity:0.8, //Universal caption opacity
		beforeChange: function(){},
		afterChange: function(){},
		slideshowEnd: function(){} //Triggers after all slides have been shown
	});
});
