summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/site/ProfileView.js
blob: 8661bcd14b1bb6d171c2ab484a068fdad1d666cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
var ProfileView = View.extend({

	initialize: function() {
	},

	load: function() {
		var classes = ['one', 'two', 'three', 'four',
		               'five', 'six', 'seven', 'eight',
		               'nine', 'ten', 'eleven', 'twelve',
		               'thirteen'];
		$(".bio").addClass(choice(classes));
		
		$("td.border").each(function() {
			var iframe = $(this).find("iframe").get('0')
			if (! iframe) return
			$(this).on({
				mouseenter: function(e){
					iframe.contentWindow.postMessage("spin-on", window.location.origin)
				},
				mouseleave: function(e){
					iframe.contentWindow.postMessage("spin-off", window.location.origin)
				}
			})
		})
	}

})