// Cufon Font Replacement

/*Cufon.replace('h2');
			Cufon.replace('h3');
			Cufon.replace('h4');*/
			
	// Slideshow
	
	try {
	   Typekit.load({
		 loading: function() {
		   // Javascript to execute when fonts start loading
				$(document).ready(function() {
				   // Adjust font-size
				 });
		 },
		 active: function() {
		   // Javascript to execute when fonts become active
		   $(document).ready(function() {
				   // Adjust font-size
				   $('h2').addClass('typekit-loaded');
				 });
		 },
		 inactive: function() {
		   // Javascript to execute when fonts become inactive
		 }
	   })
	 } catch(e) {}
	
	$(function () {
			$('.module').children().children('a').addClass('more');
			$('ul.news-list li').children('a').addClass('more');
			
			// Avoid choppy movement by adding total height
			$("a.more").each (function() {
				$(this).hide();
				$(this).css("height", $(this).closest('.module').outerHeight());
			});
			
			// Avoid choppy movement by adding total height
			$("ul.news-list a.more").each (function() {
				$(this).hide();
				$(this).css("height", $(this).closest('ul.news-list li').outerHeight());
			});
			
			$(".module").hover(function(){
				$(this).children().children('a.more').stop().fadeTo("easeInOutSine", 0.7); // This should set the opacity to 100% on hover
				},function(){
				
				$(this).children().children('a.more').stop().fadeTo("easeInOutSine", 0); // This should set the opacity back to 60% on mouseout
			});
			
			$("ul.news-list li").hover(function(){
				$(this).children('a.more').stop().fadeTo("easeInOutSine", 0.7); // This should set the opacity to 100% on hover
				},function(){
				
				$(this).children('a.more').stop().fadeTo("easeInOutSine", 0); // This should set the opacity back to 60% on mouseout
			});

		});
	
	jQuery(document).ready(function($) {
      $('a[rel*=facebox]').facebox({
        loading_image : 'loading.gif',
        close_image   : 'closelabel.gif'
      }) 
    })
	
	
	
	
