
jQuery(document).ready(function(){


	// checks to see if selector exists
	jQuery.fn.exists = function(){return jQuery(this).length>0;}

	// makes a whole div clickable and add hover class
	if (jQuery("div.clickable").exists()) {

		jQuery("div.clickable").click(
			function() { 
				window.location = jQuery(this).find("h2 a").attr("href"); 
				return false;
			}
		);
		
		jQuery("div.clickable").hover(
			function() {
				jQuery(this).addClass("hover");
			},
			function() {
				jQuery(this).removeClass("hover");
			}
		);
	}
	// end "make whole div clickable and add hover class"
	
	
	// social media hover effect
	jQuery('.social li a').mouseover(function() { jQuery(this).animate({ opacity: 0.6 });
    	}).mouseout(function() { jQuery(this).animate({ opacity: 1 });
   	});


});

