// js functions for the sochi project /home/

// wait for the DOM to be loaded 
$(document).ready(function() {
					
			$('.imagecontainer_h').mouseover(function(){$(this).addClass("imagecontainer_v");$(this).removeClass('imagecontainer_h');}).mouseout(function(){
			$(this).addClass('imagecontainer_h');
			$(this).removeClass('imagecontainer_v');
			});
			
			$('.textitem_heading_h').mouseover(function(){
			$(this).addClass("textitem_heading_v");
			$(this).removeClass('textitem_heading_h');
			$}).mouseout(function(){
			$(this).addClass('textitem_heading_h');
			$(this).removeClass('textitem_heading_v');});
			
			
			$('.headerfoldin').mouseover(function(){
				$(this).addClass('headerfoldout');
				$(this).removeClass('headerfoldin');
				}
			).mouseout(function(){
				$(this).addClass('headerfoldin');
				$(this).removeClass('headerfoldout');
				}
			);


			$('#smallmap').click(function(){$('#sochimap').show();});
			$('#sochimap').click(function(){$(this).hide();});
			
			
			
			$('.biolink1').mouseover(function(){$('#biography1').toggle()}).mouseout(function(){$('#biography1').toggle()});
			$('.biolink2').mouseover(function(){$('#biography2').toggle()}).mouseout(function(){$('#biography2').toggle()});
			$('#sign_in').click(function(){$('#sign_in_form').toggle();});
			
			// wissel footer class
			$('#tac').toggle(
				function(){
					$('#contact_text').hide();
					$('#tac_text').show();
					$('#footer').css({height:"auto"});
				},
				function(){
					$('#tac_text').hide();
					$('#footer').height(21);
				}
			);
			
			
			// wissel footer class
			$('#contactlink').toggle(
				function(){
					$('#tac_text').hide();
					$('#contact_text').show();
					$('#footer').css({height:"auto"});
				},
				function(){
					$('#contact_text').hide();
					$('#footer').height(21);
				}
			);
			
			
			    $('#login').focus(function () {
         			curval = $(this).val();
         
		         	if(curval == "Login"){
		         		$(this).val('');
		         	}
         
    			});


			    $('#password').focus(function () {
         			curval = $(this).val();
         
		         	if(curval == "Password"){
		         		$(this).val('');
		         	}
         
    			});
    			
			
});