// JavaScript Document


 $(document).ready(function() {
  $('#login').click(function() {
	window.location='https://thedirectorscollege.com/accounts/login.php';
  });
	
					
	$('#calendar').fullCalendar({
	
		editable: false,
		
		events: "http://thedirectorscollege.com/wp-content/themes/tdc/scripts/json-events.php",
		
		
		eventMouseover: function(event) {
			//alert(event.title + '\n' + event.description);
		},
		
		eventRender: function(event, element) {
       	 	element.qtip({
            	position: {
                  corner: {
                     tooltip: 'rightTop', // Use the corner...
                     target: 'leftBottom' // ...and opposite corner
                  }
               },

				
				content: event.description,
				 style: { 
				  
				  width: 100,
				  padding: 5,
				  background: '#A2D959',
				  color: 'black',
				  textAlign: 'center',
				  border: {
					 width: 7,
					 radius: 5,
					 color: '#A2D959'
				  },
				  tip: true,
				 
				  name: 'dark' // Inherit the rest of the attributes from the preset dark style
			   }

			});
    	},

		
		loading: function(bool) {
			if (bool) $('#loading').show();
			else $('#loading').hide();
		}
		
	});
	
	
	$('#calendar_big').fullCalendar({
	
		editable: false,
		
		events: "http://thedirectorscollege.com/wp-content/themes/tdc/scripts/json-events.php",
		
		
		eventMouseover: function(event) {
			//alert(event.title + '\n' + event.description);
		},
		
		eventRender: function(event, element) {
       	 	element.qtip({
            	content: event.description,
				 style: { 
				  width: 100,
				  padding: 5,
				  background: '#A2D959',
				  color: 'black',
				  textAlign: 'center',
				  border: {
					 width: 7,
					 radius: 5,
					 color: '#A2D959'
				  },
				  tip: 'topLeft',
				  name: 'dark' // Inherit the rest of the attributes from the preset dark style
			   }

			});
    	},

		
		loading: function(bool) {
			if (bool) $('#loading').show();
			else $('#loading').hide();
		}
		
	});
	
						
	
	 
 });

