﻿$(function() {
	dsoInterface = new Interface();
	// check font size cookie
	/*if ($.cookie('fontSize') == 'medium') {
		var li = $('#icons li.fontSizeSTL');
		var a = $(li).find('a');
		$('body').css('fontSize', '108%');
		li.removeClass().addClass('fontSizeLTS');
		a.attr('title', 'Decrease the font size');
		$.cookie('fontSize', 'medium', { expires: 100 });
	}*/
});

// Used to avoid weird selection issues
/*if ($.browser.msie)
	jQuery.event.add(document, 'selectstart', function() { return false; });
else
	jQuery.event.add(document, 'mousedown', function() { return false; });*/
	
	
$.toQueryParams = function(str) {
	str = str || document.location.search;
  var pairs  = str.match(/^\??(.*)$/)[1].split('&');
	var params = {};
	for (var i=0; i<pairs.length; i++) {
		var pair  = pairs[i].split('=');
		if (pair.length != 2) continue;
		var value = pair[1] ? decodeURIComponent(pair[1]) : '';
		params[decodeURIComponent(pair[0])] = value;
	}
	return params;
};