$(document).ready(function(){
	
	if ($('.hidden').length > 0){
	
		// Referrer Conditional
		var $referrer = document.referrer;
		if (($referrer == 'http://www.ftsdev.com/jlica/coded/about/leadership.php') || ($referrer == 'http://www.ftsdev.com/jlica/coded/news-events/mexico-city-events.php')) {
			$('.view strong').text("Hide Co-chairs");
			$('.view').addClass('hide');
		} else {
			// Hide Divs
			$('.view strong').text("View Co-chairs");
			$('.view').removeClass('hide');
			$('.hidden').hide();
		}
		// Hide & Show
		$('.view').click(function(){
			$('.hidden').toggle();
			return false;
		});
		// Toggle Effects
		if($('.view').hasClass('hide') != -1){
			$('.view').toggle(function(){
				$('.view strong').text("View Co-chairs");
				$(this).removeClass('hide');
				console.log('Has .hide');
			}, function() {
				$('.view strong').text("Hide Co-chairs");
				$(this).addClass('hide');
				console.log('No .hide');
			});
		} else {
			$('.view').toggle(function(){
				$('.view strong').text("Hide Co-chairs");
				$(this).addClass('hide');
			}, function() {
				$('.view strong').text("View Co-chairs");
				$(this).removeClass('hide');
			});
		}
		
	}
	
	// Blockquote Wrapper
	if ($('.content_module blockquote').length > 0) { 
		$('.content_module blockquote').wrap('<div class="outer"><div class="inner"></div></div>');
	}
	
	// Safe Mailto's
	if ($('.email').length > 0){
		$.getScript('js/jquery.mailto.js',function(){ 
			// Execute this function once the plugin is loaded
			$('.email').mailto();
		});
	}
	
});