/*
 *	StudentCity 2010
 *	Homepage JS functions
 *	Author: TJ Kelly - www.tjkelly.com
 */

$(document).ready(function(){

	// Call trip_builder functions
	$('#book_form').trip_builder();

	// split URL data
	var temp = window.location.search.substring(1).split('&');
	var length = temp.length;
	var key_values = {};
	if(length > 0){
		for(var x = 0; x < length; x++){
			var key = temp[x].split('=')[0];
			var value = temp[x].split('=')[1];
			if(typeof(value) == 'string'){
				value = value.replace(/%20/gi, ' ');
			}
			key_values[key] = value;
		}
	}

});
