$(document).ready(function() {

	// ======================= Solutions Menu Toggle =========================


		$(".hide div.view_more_bullets").hide(); 
		$(".hide div.view_menu").hide(); 
        $(".hide a.view_more_link").removeClass('selected');
        

		$("a.view_more_link").click(function () {
			$("a.view_more_link").addClass("selected").toggleClass('remove');
		
		
											  
			$("div.view_menu").slideToggle('400', function() {
			// Animation complete.
		  });
	  });
		
		
		
		$("div.togglecontent").hide(); 

		$("a.togglelink").click(function (event) {
			if ($(this).attr('class').indexOf('selected')==-1) {
				$("a.togglelink").removeClass("selected");
				$(this).addClass("selected");	
				$("div.togglecontent").slideUp('400');			
			}
			else {
				$(this).removeClass("selected");
			}
			
			var parent = $(event.target).parent().parent().parent();

			//$("div.togglecontent").slideUp('400');

			$(parent).children("div.togglecontent").slideToggle('400', function() {
			// Animation complete.
		  });
	  });
	
	
	// ======================= Back to top =========================

	// jQuery Prerequisite
	$('#back-to-top').click(function() {
		window.scrollTo(0,0);
	 
		// don't change the hash if not needed
		return false;
	});
	
		// Continuing with Previous Example
		$(function() {
			$('#back-to-top').hide();
		});
		 
		// If the page scrolls, we know there is a scrollbar.
		$(window).scroll(function() {
			$('#back-to-top').show();
		});
		 
		// For completeness, you may also want to
		//   add logic to the "resize" event.
		
		
		
	// ======================= Testimonial Scroller =========================
	
						
		$('div.testimonialscroller').cycle({ 
			fx:     'fade',
		    cleartype:  1, // enable cleartype corrections 
			timeout:  10000 
		});					
					
			

 // ======================= ADD PRINT BUTTON TO BOTTOM UL =========================

	$('div.footer p.footer_links').append(' <span>|</span> <a class="print" href="#print">Print Page</a>');
	$('div.footer p.footer_links a.print').click(function() {
		window.print();
		return false;
	});
	$('div.footerhome p.footer_links').append(' <span>|</span> <a class="print" href="#print">Print Page</a>');
	$('div.footerhome p.footer_links a.print').click(function() {
		window.print();
		return false;
	});
	
});

