			//global variable used for storing the original color of the active hovered row
			var originalColor;
			$(document).ready(function(){

				$(".hide").hide();

				$("tr.hide td").css("background-color","#A6B8A6");
				
				//paint even rows and wrap the text in a div
				$("tr.clickableRow:even")
				.css("background-color","#D9E1D9")
				.children("td")
				.wrapInner('<div></div>');

				//higlight the div's borders to a give bevel effect	
				$("tr.clickableRow:even div")
				.css({
					"padding":"5px",
					"border-bottom":"1px solid #C3D0C3",
					"border-top":"1px solid #E9EEE9"
				});

				//paint odd rows and wrap the text in a div
				$("tr.clickableRow:odd")
				.css("background-color","#CCD6CC")
				.children("td")
				.wrapInner('<div></div>');

				//higlight the div's borders to give a bevel effect	
				$("tr.clickableRow:odd div")
				.css({
					"padding":"5px",
					"border-bottom":"1px solid #C3D0C3",
					"border-top":"1px solid #E9EEE9"
				});
				
				//add a higlight every time the mouse hovers on a clickable row
				$('.clickableRow')
				.hover(function(){
					originalColor = $(this).children("td").css("background-color");
					$(this).children("td").css("background-color","#E8F2E8");
				},
				function(){
					$(this).children("td").css("background-color",originalColor);
				})

				//on the first click show the rows that have the same date
				.toggle(function(){
					var specificDay = $(this).children(".thisDay").text();
					$(this).children("td.thisDay").next().children("div").text("Click here to hide these details.");
					$(this).nextAll("tr").filter("tr td.thisDay").filter(":contains('"+ specificDay +"')")
					.show()
				},
				//on the second click hide the rows that have the same date
				function(){
					var specificDay = $(this).children(".thisDay").text();
					$(this).css("border-bottom","1px solid #000")
					.children("td.thisDay").next().children("div").text("Click here to show more details.");
					$(this).nextAll("tr").filter("tr td.thisDay").filter(":contains('"+ specificDay +"')")
					.hide();
				});
			});