$(document).ready(function() {
	TopUp.host = "http://local.solidaredesign.com/albanyent/admin/";
	TopUp.images_path = "cache/themes/default/images/top_up/";
	TopUp.addPresets({
		".flyer": {
		group: 0,
		layout: "dashboard",
		modal: 1,
		shaded: 1,
		resizable:0
		}
	});

	// Add a span to each social media menu anchor
	$('ul#socialMedia li a').each( function(){
		var title = $(this).html();
		$(this).html("<span>"+ title +"</span>");
	});

	// set opacity to nill on page load
	$("ul#socialMedia span").css("opacity","0");

	// on mouse over
	$("ul#socialMedia span").hover(function () {
		// animate opacity to full
		$(this).stop().animate({
			opacity: 1
		}, "slow");
	},
	// on mouse out
	function () {
		// animate opacity to nill
		$(this).stop().animate({
			opacity: 0
		}, "slow");
	});

	// Fade our events menu
	$('#eventMenuWrapper').hover( function(){
		$(this).animate({
			opacity:1
		}, 'slow')
	},
	function(){
		$(this).animate({
			opacity:.7
		}, 'slow')
	});

	// Show our event menu!
	$('#eventMenuHandle').click( function(){
		$(this).toggleClass( 'active' );
		$('#eventMenu').slideToggle();
	});
});
