	/**
	 * date.prototype.getWeekNumber
	 * @return current week number
	 */
	Date.prototype.getWeekNumber = function(){
	    var d = new Date(+this);
	    d.setHours(0,0,0);
	    d.setDate(d.getDate()+4-(d.getDay()||7));
	    return Math.ceil((((d-new Date(d.getFullYear(),0,1))/8.64e7)+1)/7);
	};

	/**
	 * Calendar
	 * - calendar.getCalendarForToday(callback)
	 *
	 * @param callback-function to be called when parsed
	 * @return todays lectures as an array
	 * @author Michael McMillan <email@michaelmcmillan.net>
	 */
	var calendar = {
		
		/* Attributes */
		url: 'http://ntnu.1024.no',
		username: 'michaelmcmillan', /* ligger i localStorage på //ntnu.1024.no */
		calendarHTML: null,
		semesters: ['var', 'host'],
		currentYear: new Date().getFullYear(),
		currentWeek: new Date().getWeekNumber(),
		currentDay: function () {
			weekday = ['søndag',  'mandag', 
					   'tirsdag', 'onsdag',
					   'torsdag', 'fredag',
					   'lørdag',  'søndag'];
			return weekday[new Date().getDay() + 3/*  */];
		},
		currentSemester: function () {
			return this.semesters[0];
		},
		
		/**
		 * isLectureToday
		 * - Is lecture this current day,
		 *   returns boolean
		 */
		isLectureToday: function (lecture) {
			var that = this;
			return (lecture.day == that.currentDay());
		},
		
		/**
		 * isLectureThisWeek
		 * - Is lecture in this current week, 
		 *   returns boolean
		 */
		isLectureThisWeek: function (lecture) {
			var that = this;				
			var isCurrentWeekInRange = false; 
			
			// If one interval: 7-11
			if ((lecture.weeks.indexOf(', ') < 0) && (lecture.weeks.indexOf('-') > 0)) {
				
				weekOne = parseInt(lecture.weeks.split('-')[0]);
				weekTwo = parseInt(lecture.weeks.split('-')[1]);
				
				if (weekOne <= that.currentWeek && weekTwo >= that.currentWeek)
					isCurrentWeekInRange = true;
			}
			
			// If several intervals: 7-11, 13-14
			if (lecture.weeks.indexOf(', ') > 0) {
				
				// Iterate each interval
				intervals = lecture.weeks.split(', ');
				$.each(intervals, function (key, interval) {
					
					// If interval
					if (interval.indexOf('-') > 0) {
						weekOne = interval.split('-')[0];
						weekTwo = interval.split('-')[1];
						
						if (that.currentWeek >= weekOne && that.currentWeek <= weekTwo)
							isCurrentWeekInRange = true;
					}
					
					// If single week
					else {
						if (that.currentWeek == parseInt(interval))
							isCurrentWeekInRange = true;
					}
				});
			}
			
			// If one week: 7
			if (parseInt(lecture.weeks.length) == 1) {
				
				if (that.currentWeek == parseInt(lecture.weeks))
					isCurrentWeekInRange = true;
			}
			
			// Return findings
			return isCurrentWeekInRange;
		},
		
		/**
		 * parseLecture
		 * - Parses a single event, returns as object
		 */
		parseLecture: function (lectureElement) {
			var that = this;

			var lecture = {
				course: $($(lectureElement)[0]).children()[0].innerHTML,
				day:    $($(lectureElement)[0]).children()[1].innerHTML,
				time:   $($(lectureElement)[0]).children()[2].innerHTML,
				room:   $($(lectureElement)[0]).children()[3].innerHTML,
				weeks:  $($(lectureElement)[0]).children()[7].innerHTML
			}
			
			// Collect lectures which are today 
			if (that.isLectureThisWeek(lecture) && that.isLectureToday(lecture))
				return lecture;
		},
					
		/**
		 * parseCalendar
		 * - Parses the calendar (html table)
		 */
		parseCalendar: function (calendarElement) {
			var that = this;
			
			var lectures = [];			
			$.each($(calendarElement).children(), function (key, lectureElement) {
				if (that.parseLecture(lectureElement) != undefined)
					lectures.push(that.parseLecture(lectureElement));
			});
			
			return lectures;
		},
			
		/**
 		 * getCalendar
		 * - Invokes parsing of the calendar
		 */
		getCalendarForToday: function (callback) {
			var that = this;
			
			$.ajax({
			  url: this.url               + '/' + 
			       this.currentYear       + '/' + 
			       this.currentSemester() + '/' +
				   this.username          + '/' + 
				   this.currentWeek,
			  success: function (response) {
				   callback(that.parseCalendar($('tbody', $(response))[3]));
			  }, 
			  dataType: 'HTML'
			});
		}
	}
@@ -108,18 +108,20 @@
 function
+ 
 ()
+ 
 %7B%0A%09    v
@@ -850,17 +850,16 @@
 s%C3%B8ndag',
- 
  'mandag
@@ -861,26 +861,32 @@
 andag', %0A%09%09%09
-%09%09
+        
    'tirsdag'
@@ -893,25 +893,24 @@
 , 'onsdag',%0A
-%09
 %09%09%09%09   'tors
@@ -929,17 +929,16 @@
 g',%0A%09%09%09%09
-%09
    'l%C3%B8rd
@@ -995,18 +995,8 @@
 ay()
- + 3/*  */
 %5D;%0A%09
@@ -3951,25 +3951,28 @@
  + '/' +%0A%09%09%09
-%09
+    
    this.user
@@ -3996,18 +3996,26 @@
 /' + %0A%09%09
-%09%09
+     %09    
    this.
@@ -4172,8 +4172,9 @@
 ;%0A%09%09%7D%0A%09%7D
+%0A

Update calendar.js