// JavaScript Document

$(document).ready(function() {
var high = '170px';
var low = '0px';
if(navigator.appName == 'Microsoft Internet Explorer'){
	if(navigator.appVersion.indexOf('MSIE 6.0') != -1){
		high = '149px';
	}
	if(navigator.appVersion.indexOf('MSIE 7.0') != -1){
		high = '149px';
	}
}
	$(".topMenuAction2").click( function() {
					if($("#slider2").css('marginTop') == high){
						$("#slider2").animate({ 
							marginTop: low
						}, 500);

								$("#contentslidecontainer").css('z-index', '15000');	
						


						$("#tmi2").attr("src", "includes/imgs/close-content.gif");
					}
					else{
						$("#slider2").animate({ 
							marginTop: high
						}, 500, function(){
								$("#contentslidecontainer").css('z-index', '');	
						}  );
						$("#tmi2").attr("src", "includes/imgs/open-content.gif");
					}
	 });
});

$(document).ready(function() {
 // hides the slickbox as soon as the DOM is ready
 // (a little sooner than page load)
 // jQuery('sideBarContents').hide();
 
 // toggles the slickbox on clicking the noted link  
 
 	/*window.setTimeout(function() {
 	$('#sideBarContents').show("slow");
	}, 4000);*/
	
	
 
   $('a#sideBarTab').click(function()
	{
		if($('#content-holder').css("margin-left") == '30px' || $('#content-holder').css("margin-left") == '10px'){
			$('#sideBarTab').css('backgroundImage', 'url(includes/imgs/open-info-large.jpg)');
			$("#sideBarContents").animate({ marginLeft: "-560px"}, 500 )
			if(navigator.appVersion.indexOf('MSIE 6.0') == -1){
				$(".transparency").animate({ marginLeft: "-560px"}, 500 )
			}
			if(navigator.appVersion.indexOf('MSIE 7.0') != -1){
				$("#content-header").animate({ marginLeft: "-580px"}, 500 )
			}
			if(navigator.appVersion.indexOf('MSIE 6.0') != -1){
				$("#content-holder").animate({ marginLeft: "-580px"}, 500 )
			}
			else{
				if(navigator.appVersion.indexOf('MSIE 6.0') == -1 && navigator.appVersion.indexOf('MSIE 7.0') == -1){
					$("#content-header").animate({ marginLeft: "-580px"}, 500 )
				}
				$("#content-holder").animate({ marginLeft: "-530px"}, 500 )
			}
		}
		else{
			$('#sideBarTab').css('backgroundImage', 'url(includes/imgs/close-info-large.jpg)');
			if(navigator.appVersion.indexOf('MSIE 6.0') == -1){
				$(".transparency").animate({ marginLeft: "0px"}, 500 )
			}
			if(navigator.appVersion.indexOf('MSIE 6.0') != -1){
				$("#sideBarContents").animate({ marginLeft: "-20px"}, 500 )
				$("#content-holder").animate({ marginLeft: "10px"}, 500 )
			}
			else{
				$("#sideBarContents").animate({ marginLeft: "0px"}, 500 )
				if(navigator.appVersion.indexOf('MSIE 7.0') != -1){
					$("#content-header").animate({ marginLeft: "-530px"}, 500 )
				}
				if(navigator.appVersion.indexOf('MSIE 6.0') == -1 && navigator.appVersion.indexOf('MSIE 7.0') == -1){
					$("#content-header").animate({ marginLeft: "-20px"}, 500 )
				}
				$("#content-holder").animate({ marginLeft: "30px"}, 500 )
			}


				
		}
			/*$('#sideBarContents').toggle("slow")*/

		
	return false;
	});
	
});
