jQuery(function() {
	jQuery("tr:even").addClass("row-even");
	jQuery('tr').hover(function() {
		jQuery(this).addClass("row-hover");
	},function() {
		jQuery(this).removeClass("row-hover");
	});

	if(parseInt(jQuery.browser.version) < 7 && jQuery.browser.msie) {
		jQuery('div#footer ul li:last-child').after('<li class="ie6notice">Grayed out for IE 6 - use a <a href="http://www.browsehappy.com/">modern browser</a>, NOT a rotting corpse!</li>');
	}

	/** Add external link icon */
// 	if(!jQuery.browser.msie) {
	if(!jQuery('html').hasClass('oldie')) {
		jQuery('#content a').filter(function() {
			return this.hostname && this.hostname !== location.hostname;
		}).addClass('external');
	}

	/**
	 * Unobtrusive slide-out menu
	 *
	 * @see http://tympanus.net/codrops/2009/12/08/beautiful-slide-out-navigation-revised/
	 */
	/*
	jQuery('#navigation').css('bottom', '-80px').hover(function() {
	 	jQuery(this).stop().animate({
            'bottom':'-2px'
        },200);
    }, function() {
        jQuery(this).stop().animate({
            'bottom':'-80px'
        },200);
	});*/
	/*if(this.hostname !== location.hostname && jQuery(this).hasClass('no-external') == false) {
			return true;
    	} else {
			return false;
    	}*/
});

/**
 * function parseQuery
 *
 * @description Parses the GET query into an multidimensioal array
 * @parameter string Query
 * @return array ParsedQuery Consists of ParsedQuery[n] = array(0 => varName, 1 => varValue)
 */

function parseQuery(strUserQuery) {
	returnData = new Array();
	strQueryString = strUserQuery;

	if(strUserQuery.substr(0, 1) == '?') {
		strQueryString = strUserQuery.substr(1);
	}

	if(strQueryString != '') {
		arrX = strQueryString.split('&');

		for(n = 0; n < arrX.length; n++) {
			arrX2 = arrX[n].split('=');
			returnData[n] = new Array(arrX2[0], arrX2[1]);
		}

	}


	return returnData;
}

/**
 * function parseQuery
 *
 * @description Parses the GET query into an associative array
 * @parameter string Query
 * @return array ParsedQuery Consists of ParsedQuery[varName] = varValue;
 */

function parseQueryAssoc(strUserQuery) {
	returnData = new Object();
	strQueryString = strUserQuery;

	if(strUserQuery.substr(0, 1) == '?') {
		strQueryString = strUserQuery.substr(1);
	}

	if(strQueryString != '') {
		arrX = strQueryString.split('&');

		for(n = 0; n < arrX.length; n++) {
			arrX2 = arrX[n].split('=');
			returnData[arrX2[0]] =  arrX2[1];
		}

	}


	return returnData;
}

/**
 * Image Post-Loader
 * Loads images AFTER the whole DOM / page has been loaded
 *
 * @author Fabian Wolf (http://fwolf.info/)
 * @version 0.1
 * @license GNU GPL v2
 * @date
 */

/**
 * Uses list generated by template to post-load images
 */

function postLoad() {
	if(typeof arrPostLoadImages != 'undefined') {
		for (var i = 0; i < arrPostLoadImages.length; i++) {
			new Image().src = arrPostLoadImages[i];
		}
	}
}


