	$(document).ready(function(){
                 var startTimer = setTimeout(function()
                                {
                                    var height1 = $('.teaser_link:eq(0)').find('div').css('height');
                                    $('.teaser_link:eq(0)').find('div > div').stop(true, true).animate({
                                                    height: '-=' + height1
                                              }, 1000, function(){
                                                  var height2 = $('.teaser_link:eq(1)').find('div').css('height');
                                                        $('.teaser_link:eq(1)').find('div > div').stop(true, true).animate({
                                                    height: '-=' + height2
                                              }, 1000, function(){
                                                  var height3 = $('.teaser_link:eq(2)').find('div').css('height');
                                    $('.teaser_link:eq(2)').find('div > div').stop(true, true).animate({
                                                    height: '-=' + height3
                                              }, 1000,function(){ $('.teaser_link').addClass('inactive');})
                                              })
                                              })
                                },10000);
                                $(document).mousemove(function(){
                                    clearTimeout(startTimer);
                                });
                $('h1').each(function(){
					$(this).gradientText({
						colors: ['#0185c9', '#ed1c3b']
					});
				});
                $('h2').each(function(){
					$(this).gradientText({
						colors: ['#0185c9', '#ed1c3b']
					});
				});                
                $('#slogan').gradientText({
                    colors: ['#0185c9', '#ed1c3b']
                });
				
                $.preloadCssImages();

		$('.teaser_link').mouseenter(function(){
                        if(!$(this).hasClass('inactive')){
			var height2 = $(this).find('div').css('height');
			$(this).find('div > div').stop(true, true).animate({
				height: '-=' + height2
			  }, 1000)
		}});
		$('.teaser_link').mouseleave(function(){
                    if(!$(this).hasClass('inactive')){
			$(this).find('div > div').stop(true, true);
			var height2 = $(this).find('div').css('height');
                        $(this).find('div > div').css('opacity',0);
			$(this).find('div > div').css('height',height2);
                        $(this).find('div > div').animate({opacity: '+=1'},700);
		}});
                $('.teaser_icon').mouseenter(function(){
			var height2 = $(this).find('div').css('height');
			$(this).find('div > div').stop(true, true).animate({
				height: '-=' + height2
			  }, 700)
		});
		$('.teaser_icon').mouseleave(function(){
			$(this).find('div > div').stop(true, true);
			var height2 = $(this).find('div').css('height');
			$(this).find('div > div').css('height',height2);
		});
		var totalNumber = $('.content').size();
		var divHeight = $('#content').height();
		$('.refresh_icon').find('a').unbind('click');
		$('.more_link').find('a').unbind('click');
		$('.content').css('top',divHeight + 'px');
		$('.more_link').unbind('click').click(function(){
				$('#content').css('overflow','hidden');
				$('#content').css('height',divHeight);
				$('.content').show();
				$('.more_link').unbind('click').hide();
				$('.refresh_icon').unbind('click').hide();
				var newHeight = (totalNumber-1)*divHeight - totalNumber*20;
				$('#content').stop(true,true).animate({height: '+='+newHeight+'px'},700,function(){
					$('#content').css('overflow','visible');
				});
		});
		$('.refresh_icon').click(function(){
				var divHeight = $('#content').height();
				$('#content').css('height',divHeight);
				$('.content:first').stop(true,true).slideUp(800,function(){
					var temp = $('.content:eq(0)');
					$('.content:eq(0)').appendTo('#content');

				});
				$('.content:gt(0)').hide();
				$('.content:eq(1)').show();
		});

        });
