﻿    function handleLoad(){
						
			$('#header').animate({
      				height: '145px'
      			});
      		     		
    		$("div#expand").show();
			
			$('#expand').animate({
      				height: '27px'
      			});
      			
      		}
    	
      $(document).ready(function(){
      	 initEvents();
      	 $("div#expand").show();
      });
      
      function initEvents(event){
      	var showed = false;
      	
      	
      	$('.show, .label, .labelabout').click(function(){
      		
      		if(!showed){
      			$('#header').animate({
      				height: '540px'
      			});
      			showed = true;
      			
    		$("div#contract").show();
      		$("div#expand").hide();

      		}else{
      			$('#header').animate({
      				height: '145px'
      			});
      			showed = false;
      		$("div#contract").hide();
      		$("div#expand").show();
      		}
      		      		
     	 });
      }
	  
	  function openURL()
	{
		  SelectIndex = document.esmonList.site.selectedIndex;
		  goURL = document.esmonList.site.options[SelectIndex].value;
		  top.location.href = goURL;
	}
	
	$(function(){
		$("#allposts").vgrid({
						easeing: "easeOutQuint",
						time: 400,
						delay: 20,
				fadeIn: {
						time: 500,
						delay: 300
		}
	});


		$(".headerLink, .blogLink").jFade({
					trigger: "mouseover",
					property: 'background',
					start: 'c7c7c7',
					end: 'c91b22',
					steps: 8,
					duration: 8
		}).jFade({
					trigger: "mouseout",
					property: 'background',
					start: 'c91b22',
					end: 'c7c7c7',
					steps: 8,
					duration: 8
		});
		
		$(".teaser").jFade({
					trigger: "mouseover",
					property: 'background',
					start: 'c7c7c7',
					end: 'e0e0da',
					steps: 15,
					duration: 8
		}).jFade({
					trigger: "mouseout",
					property: 'background',
					start: 'e0e0da',
					end: 'c7c7c7',
					steps: 15,
					duration: 8
		});
		
		$('.teaserimg')
			.css('opacity',0)
			.animate({
					opacity: 0.8,
					duration:100
					})
			.mouseover(function(){
				$(this).stop().animate({
					opacity: 1,
					duration:0.8
					})
			})
			.mouseout(function(){
				$(this).stop().animate({
					opacity: 0.8,
					duration:0.8
					})
		})
						
	});