/**
 * jq_slideBox Jan 2011 Version 1.0
 * Maritta Sturt
 * Copyright (c) M. Sturt 
 */
	
$(function() {
	
	var in_y = -265;
	var out_y = 0;
	
	$('a.sld_box').click(function() {
		
		var id = $(this).parents('.sld_box').attr('id');
		
		var p = $(this).parents('.sld_box:first');
		var posAll = p.position();
		var topPos = posAll.top;
		
		if(topPos == in_y ) {
			$('#'+id).animate({top: out_y}, {
				duration: 3000, 
				specialEasing: {
				  top: 'linear'
				}
			}); 
		} 
		if(topPos == out_y ) {
			$('#'+id).animate({top: in_y}, {
				duration: 3000, 
				specialEasing: {
				  top: 'linear'
				}
			}); 
		} 
	
		return false;
	});

	setTimeout(function(){openPlayer();}, 2000);
	
	function openPlayer() {
		$('#player').animate({top: 0}, {
					duration: 3000, 
					specialEasing: {
					  top: 'linear'
					}
		}); 
		setTimeout(function(){closePlayer();}, 10000);
	}
	function closePlayer() {
		$('#player').animate({top: -265}, {
					duration: 3000, 
					specialEasing: {
					  top: 'linear'
					}
		}); 
	}	
		
});//function
