$(document).ready(
		function() {
			
			var urldocument = document.URL;
			var pathname = document.location.pathname;
			
			if(urldocument.match("patients") || urldocument.match("surgeons") || urldocument.match("hospitals")){
				$("#home_submenu").show();
				$("#home_submenu_closed").remove();
			} else if(urldocument.match("locate") || urldocument.match("search")){
				$("#home_submenu_closed").show();
				$("#home_submenu").remove();
			} else {
				$("#home_submenu").remove();
				$("#home_submenu_closed").remove();
			}

			
			$('#contentRight').jScrollPane(); 
			
			$('#internal_menu_name').corner('5px');
			
			$('#internal_menu_left').corner('5px');
			
			$('#topicMenu').corner('tr, br');
			
			$('#topicMenu').css({opacity:0.9});
			
			/*$('.jScrollPaneContainer').css({background:url(../images/pixel.png)});	
			
			
			$('#contentRight').css({opacity:1});
			
			
				$('h5').css({opacity:1});
			*/
			$('#mapRight').css( {
				opacity : 0.8
			});

			$('#back').corner('tl');

			$('#searchMap,#check,#btnok').css( {
				opacity : 1
			});
			/*$('#results,#cities,li#miniPictures').css( {
				opacity : 1
			});*/
			$('#details_surgeon').css( {
				opacity : 0
			});
			
			$("#searchMap").click(
				      function () {
				    	  value = $(this).val();
				    	  if (value == 'Enter your city and state'){
				    		  $(this).val('');
				    	  }
				      });
			
			if (jQuery.browser.msie){
				if (parseInt(jQuery.browser.version) == 7){
					if (pathname == "/locate"){
						$("#home_content").css("height", "496px");
					}
				}
			}
			
			if ((jQuery.browser.msie && (parseInt(jQuery.browser.version)>6)) || !jQuery.browser.msie) {
	  			$("#advSearch").toggle(
			      function () {
			    	  $("#mapSearch").animate({ 
			                opacity: 0.8,
			                marginTop: "-184px",
			                height:"184px"
			              }, "fast" );
			      },
			      function () {
			    	  $("#mapSearch").animate({ 
			                opacity: 0.8,
			                marginTop: "0px",
			                height:"0px"
			              }, "fast" );
			      });
			}

			/*
			$(".okbtn").click(
			      function () {
			    	  $("#mapRight").animate( {
							opacity : 0.7,
							marginLeft : "-4px"
						}, "fast");
			      },
			      function () {
			    	  $("#mapRight").animate( {
							opacity : 0,
							marginLeft : "-190px"
						}, "fast");
			      });
/*

			$(".city").toggle(
			      function () {
			    	  $("#mapRight").animate( {
							opacity : 0.7,
							marginLeft : "-4px"
						}, "fast");
			      },
			      function () {
			    	  $("#mapRight").animate( {
							opacity : 0,
							marginLeft : "-190px"
						}, "fast");
			      });*/
			

			$('#back').click(function() {
				/*$("#mapRight").show("slow");*/
				$("#details_surgeon").animate( {
					opacity : 0,
					marginRight : "-202px"
				}, "fast");
				$("#details_surgeon").fadeIn("slow");
			});

		});