//////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////
////
////		setCalendar() - Calendar Expand/Slide/Toggle details functions
////
//////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////
/*$(document).ready(function() {
	// hides the slickbox as soon as the DOM is ready
	// (a little sooner than page load)
	$('.details_body').hide(500);
	$('div.details_btn').click(function() {
		//$(this).parent().children("div.details_body").toggle(400);
		// change the text
		//var attribute = $(this).children('.bigplus').text;
		//alert(attribute)
			//if ($(this).text() == '+ Details') {
			//if ($(this).children('.bigplus').text() == '+') {
		if ($(this).children('.bigplus').text() == '+') {
		//if ($(this).parent().children("div.details_body").height==1){
			$(this).children('.bigplus').text('-')
			//$(this).text('- Details');
			$(this).parent().children("div.details_body").show('slow'); 
		} else {
			//$(this).text('+'+ ' Details');
			$(this).children('.bigplus').text('+')
			//$(this).parent().children('.bigplus').text('+')
			$(this).parent().children("div.details_body").hide('fast'); 
		}
			return false;	
	});

});*/
//v2	
//$(document).ready(function() {

		// click actions for top_row
		
function setCalendar()
{
	//var ieVersion = checkVersionIE();
	
	//if(ieVersion != 6){ 
		// hide all detail content		  
		$('.bottom_row').slideUp("fast");
		$('.bottom_row_L').slideUp("fast");
		$('.bottom_row_R').slideUp("fast");
	//}
}


function setUpTopRow(){	

	// mouse over/out actions for top_row
	//var ieVersion = checkVersionIE();
	
	//if(ieVersion != 6){ 

		//alert(ieVersion)
	//}else{
		//alert(ieVersion)
		
	//cursor:pointer;
	//$('div.top_row').css("cursor") = "pointer";
	//$('div.top_row').css("cursor","pointer");
	//$('div.top_row').attr("title","Click to expand/collapse")
		$('div.top_row').mouseover(function(){
			$(this).addClass("mouseover_opacity");
			//$(this).css("filter","alpha(opacity=30)");
			// ie6,7
			var ieversion = getInternetExplorerVersion();
			if (navigator.appName == 'Microsoft Internet Explorer'){
			if (ieversion<8){
				$(this).parent().parent().addClass("mouseover_opacity"); 
			}}
		})
		$('div.top_row_L').mouseover(function(){
			$(this).addClass("mouseover_opacity");
			//$(this).css("filter","alpha(opacity=30)");
			// ie6,7
			var ieversion = getInternetExplorerVersion();
			if (navigator.appName == 'Microsoft Internet Explorer'){
			if (ieversion<8){
				$(this).parent().parent().addClass("mouseover_opacity"); 
			}}
		})
		$('div.top_row_R').mouseover(function(){
			$(this).addClass("mouseover_opacity");
			//$(this).css("filter","alpha(opacity=30)");
			// ie6,7
			var ieversion = getInternetExplorerVersion();
			if (navigator.appName == 'Microsoft Internet Explorer'){
			if (ieversion<8){
				$(this).parent().parent().addClass("mouseover_opacity"); 
			}}
		})

		
		
		$('div.top_row').mouseout(function(){
			$(this).removeClass("mouseover_opacity");	
			// ie6,7
			$(this).parent().parent().removeClass("mouseover_opacity"); 			
		});
		$('div.top_row_L').mouseout(function(){
			$(this).removeClass("mouseover_opacity");	
			// ie6,7
			$(this).parent().parent().removeClass("mouseover_opacity"); 			
		});
		$('div.top_row_R').mouseout(function(){
			$(this).removeClass("mouseover_opacity");	
			// ie6,7
			$(this).parent().parent().removeClass("mouseover_opacity"); 			
		});

	
	
		$('div.top_row').click(function() {
			var attrib = $(this).children('.details_btn').css("font-size");
			if (attrib == '10px') {
				$(this).children('.details_btn').addClass("details_btn_collapse");
				$(this).parent().children("div.bottom_row").slideDown("slow");
			} else {
				$(this).children('.details_btn').removeClass("details_btn_collapse");
				$(this).parent().children("div.bottom_row").slideUp("slow");
			}
			return false;	
		});
		
		$('div.top_row_L').click(function() {
			var attrib = $(this).children('.details_btn_L').css("font-size");
			if (attrib == '10px') {
				$(this).children('.details_btn_L').addClass("details_btn_collapse");
				$(this).parent().children("div.bottom_row_L").slideDown("slow");
			} else {
				$(this).children('.details_btn_L').removeClass("details_btn_collapse");
				$(this).parent().children("div.bottom_row_L").slideUp("slow");
			}
			return false;	
		});
		
		$('div.top_row_R').click(function() {
			var attrib = $(this).children('.details_btn_R').css("font-size");
			if (attrib == '10px') {
				$(this).children('.details_btn_R').addClass("details_btn_collapse");
				$(this).parent().children("div.bottom_row_R").slideDown("slow");
			} else {
				$(this).children('.details_btn_R').removeClass("details_btn_collapse");
				$(this).parent().children("div.bottom_row_R").slideUp("slow");
			}
			return false;	
		});
	
	
		/////////////////////////////
		//
		// expand all buttons setup
		//
		/////////////////////////////
		
		/*$('div.expandall_btn').click(function() {
			var attrib = $(this).css("font-size");
			if (attrib != '5px') {
				$(this).addClass("collapseall_btn");
				//$(this).parent().parent().parent().parent().children('.details_btn').addClass("details_btn_collapse");
				//$('.bottom_row').slideDown("slow");
				
				$('.details_btn').addClass("details_btn_collapse");
				$('.bottom_row').slideDown("slow");

								
				$("div.expandall_btn").hover(
				
					function () {
						$(this).addClass("collapse_all_btn_over");
						$(this).removeClass("expandall_btn_over");
					},
					function () {
						$(this).removeClass("collapse_all_btn_over");
						$(this).removeClass("expandall_btn_over");
					}
				);
				
				//alert(color)
			} else {
				$(this).removeClass("collapseall_btn");
				$('.details_btn').removeClass("details_btn_collapse");
				$('.bottom_row').slideUp("slow");
				
				$("div.expandall_btn").hover(
				
					function () {
						$(this).addClass("expandall_btn_over");
						$(this).removeClass("collapse_all_btn_over");
					},
					function () {
						$(this).removeClass("expandall_btn_over");
						$(this).removeClass("collapse_all_btn_over");
					}
				);
				//alert(color)
			}
			//alert(attrib)
			return false;	
		});*/
		
		$('div.expandall_btn_L').click(function() {
			var attrib = $(this).css("font-size");
			if (attrib != '5px') {
				$(this).addClass("collapseall_btn");
				
				$('.details_btn_L').addClass("details_btn_collapse");
				$('.bottom_row_L').slideDown("slow");				
				//alert(color)
			} else {
				$(this).removeClass("collapseall_btn");
				$('.details_btn_L').removeClass("details_btn_collapse");
				$('.bottom_row_L').slideUp("slow");
			}
			//alert(attrib)
			return false;	
		});
		$('div.expandall_btn_R').click(function() {
			var attrib = $(this).css("font-size");
			if (attrib != '5px') {
				$(this).addClass("collapseall_btn");
				
				$('.details_btn_R').addClass("details_btn_collapse");
				$('.bottom_row_R').slideDown("slow");				
				//alert(color)
			} else {
				$(this).removeClass("collapseall_btn");
				$('.details_btn_R').removeClass("details_btn_collapse");
				$('.bottom_row_R').slideUp("slow");
			}
			//alert(attrib)
			return false;	
		});
		
		
		
		
		$("div.expandall_btn").hover(
			
			function () {
			/*	var attrib = $(this).css("font-size");
				if (attrib != '5px') {
					$(this).addClass("expandall_btn_over");
				}else{
					$(this).addClass("collapse_all_btn_over");
				}*/
				$(this).addClass("expandall_btn_over");
				//alert("FUN");
			}, 
			function () {
				/*var attrib = $(this).css("font-size");
				if (attrib != '5px') {
					$(this).removeClass("expandall_btn_over");
				}else{
					$(this).removeClass("collapse_all_btn_over");
				}*/
				$(this).removeClass("expandall_btn_over");
			}
		);
	
	
	
	
	
	// click actions for expand_all_btn
/*	$('div.expand_all_btn').click(function(){
		if ($(this).text() == '+ Expand All') {
			$('.bottom_row').show(500);
			$('.bigplus').text('-')
			$(this).text('- Collapse All');
			$(this).width('80px');
		} else {
			$(this).text('+ Expand All');
			$(this).width('80px');
			$('.bigplus').text('+')
			$('.bottom_row').hide(500);
		}
		return false;
	});*/
	
/*		$('div.expand_all_btn').click(function(){
		if ($(this).text() == '+ Expand All') {
			$('.bottom_row').show(500);
			$('.bigplus').text('-')
			$(this).text('- Collapse All');
			$(this).width('80px');
		} else {
			$(this).text('+ Expand All');
			$(this).width('80px');
			$('.bigplus').text('+')
			$('.bottom_row').hide(500);
		}
		return false;
	});*/
		

	
	//}
};

function setUpTopRow2(){
	
	//alert("HI");
	
}
//setup_top_row();	
//});
// End //////////////
/////////////////////// JavaScript Document
