29ccd41471e83f55378bc18ce8391ab4b31a01a9
[philo.git] / static / js / init.js
1 var philo_site = {
2         three_up: {
3                 init: function(){
4                         $('.three-up figure').hover(philo_site.three_up.activate, philo_site.three_up.deactivate);
5                 },
6                 activate: function(){
7                         var $this = $(this);
8                         $this.addClass('expanded');
9                         $this.parent().children().not($this).addClass('shrunk');
10                 },
11                 deactivate: function(){
12                         var $this = $(this);
13                         $this.parent().children().removeClass('expanded').removeClass('shrunk');
14                 }
15         }
16 }
17
18 $(philo_site.three_up.init);