$("#editors-choice-body").css('height', '70');
		
		$(document).ready(function(){
			var origValue = $('#search_field').val();
			$("#search_field").focus(function(){
				if($(this).val() == origValue) {
					$(this).val('');
				}
			});
			$("#search_field").blur(function(){
				if($(this).val() == '') {
					$(this).val(origValue);
				}
			});
			
			
			// animation for socialbuttonbox
			$("#recommend").click(function(){
				if($("#sharebox").is(':visible')) {
					$("#recommend").attr('title',$("#recommendtitle").html());
				}
				if($("#sharebox").is(':visible') == false) {
					$("#recommend").attr('title',$("#close img").attr('title'));
				}
				$("#sharebox").slideToggle('slow');	
			})
			$("#close").click(function(){
				$("#sharebox").slideUp("slow");
			});
			$("#linkwrapper textarea").click(function(){
				$("#linkwrapper textarea").focus();
				$("#linkwrapper textarea").select();
			});
			// animation for article-boxes
			
			var anispeed = 700;
			var heightmin = 47;
			var heightImgMin = 145;
			var heighttolerate = 60;
			var heightec = $("#right-stuff-body").height();
			var heighted = $("#editorial-hint-body").height();
			var heighttt = $("#editorial-tech-body").height();
			function ArticelBoxAnim(Box, speed){
					if (Box == "#right-stuff") { MaxHeight = heightec; typ = "rightstuff"; }
					if (Box == "#editorial-hint") { MaxHeight = heighted; typ = "editorial"; }
					if (Box == "#editorial-tech") { MaxHeight = heighttt; typ = "editorial"; }
					// Does this box exist and is the lenght enough
					if ($(Box).length > 0 && MaxHeight - heightmin > heighttolerate ) {
						// show the "more" button
						$(".article-box .readmore-wrapper").css('display', 'block');
						// detecting type of box
						// detecting including images and status of box (open?)
						if ($(Box +"-body img").length > 0 && $(Box +"-body").height() > heightImgMin) {ah = heightImgMin; opac = 1; btndir = "down"}
						// detecting if the box has not including images and status of box (open?)
						else if ($(Box +"-body img").length == 0 && $(Box +"-body").height() > heightmin ) { ah = heightmin; opac = 1; btndir = "down"}
						// detecting status closed...
						else { ah = MaxHeight; opac = 0; btndir = "up"}
						// generell animation
						$(Box +"-body").css('overflow', 'hidden');
						$(Box +"-body").css('margin-bottom', '2px');
						$(Box +"-body-wrapper .readmore").css('background-image', 'url(/gfx/article-box/arrow_'+ btndir +'.png)');
						$(Box +"-body").animate({height: ah}, speed );
						$(Box +" .article-box-points").animate({opacity: opac}, speed );
						// switch button "more" or "less"					
						if(ah > $(Box +"-body").height()) {
							$(Box + " .readmore-text").html($("#btn_less").text());
						}
						if(ah < $(Box +"-body").height()) {
							$(Box + " .readmore-text").html($("#btn_more").text());
						}
					}	
			}
			// autostart
			ArticelBoxAnim('#right-stuff', 1);
			ArticelBoxAnim('#editorial-hint', 1);
			ArticelBoxAnim('#editorial-tech', 1);

			// editors-chioce
			$("#right-stuff .readmore").click(function(){
					ArticelBoxAnim('#right-stuff', anispeed);
			});
			// editorial-hint
			$("#editorial-hint .readmore").click(function(){
					ArticelBoxAnim('#editorial-hint', anispeed);
			});
			// editorial-techtipps
			$("#editorial-tech .readmore").click(function(){
					ArticelBoxAnim('#editorial-tech', anispeed);
			});
		});
