$.noConflict();
jQuery(document).ready(function($) {

	// Animate the "go to top" scroll
	$('a[href=#top]').click(function(){
		$('html, body').animate({scrollTop:0}, 'slow');
			return false;
	});

	// Hover effect on social icons
	jQuery(".social_links img").hover(
		function() {
			jQuery(this).stop().animate({"opacity": "0"}, "400");
		},
		function() {
			jQuery(this).stop().animate({"opacity": "1"}, "400");
		});
		
	// Opacity fade on the main logo
	jQuery(".linkFade").hover(
		function() {
			jQuery(this).stop().animate({"opacity": "1"}, "300");
		},
		function() {
			jQuery(this).stop().animate({"opacity": "0.7"}, "300");
		});
		
	// Opacity fade on targeted backgrounds.
	jQuery(".bgFade").hover(
		function() {
			jQuery(this).stop().animate({"opacity": "1"}, "300");
		},
		function() {
			jQuery(this).stop().animate({"opacity": "0.2"}, "300");
		});
		
	// Show & Hide: Search
	$("#search").hide();
	$('.jq_show_search').click(function() {
		$('#search').fadeOut('fast');
	});		
	$('.jq_show_search').click(function(event){		     
		if(!$('#search').is(":visible")) {
			$('#search').stop().fadeIn('fast');
			$('#search').css('visibility','visible');
		}
		return false;	
		event.stopPropagation();
	});

	// Show & Hide: Admin
	$("#admin_bar").hide();
	$('.jq_show_admin_bar').click(function() {
		$('#admin_bar').fadeOut('fast');
	});		
	$('.jq_show_admin_bar').click(function(event){		     
		if(!$('#admin_bar').is(":visible")) {
			$('#admin_bar').stop().fadeIn('fast');
		}
		return false;	
		event.stopPropagation();
	});
	
});

