function onPCS1Before() { 
	$('#PCS1Output').animate({ 
        opacity: 0.0
    }, 1000 );
} 
function onPCS1After() { 
    $('#PCS1Output').html($(this).attr("alt"));
	$('#PCS1Output').animate({ 
        opacity: 1.0
    }, 500 );
}

$(document).ready(function(){
	
	$('#currencies_header').hide();
	
	$('.flags').mouseover(function(){
		var langPos = $(this).position();
		$('#currencies_header').show();
		$('#currencies_header').css({
			'left' : langPos.left-110, 
			'top' : langPos.top+15 
		});
	});
	
	$('#currencies_header').mouseout(function(){
		$('#currencies_header').hide();
	});
	
	$('.search_header').click(function(){
		$('.search_header').val('');
	});
	
	
	$('.submenutop').hide();
	$('.menutopparent').mouseover(function(){
		$(this).css({'cursor':'pointer'});
		var subitem = $(this).attr('rel');
		$('#'+subitem).show();
	}).mouseout(function(){
		var subitem = $(this).attr('rel');
		$('#'+subitem).hide();
	});
	
	$('.langcurr').hide();
	$('.langsitem').mouseover(function(){
		$(this).css({'cursor':'pointer'});
		var subitem = $(this).attr('rel');
		$('#curr'+subitem).show();
		var langPos = $(this).position();
		$('#curr'+subitem).css({
			'left' : langPos.left-110, 
			'top' : langPos.top+15 
		});
	}).mouseout(function(){
		var subitem = $(this).attr('rel');
		$('#curr'+subitem).hide();
	});
	
	$('#PCS1').cycle({ 
		fx:     pcsfx,
		sync:   pcssync,
		speed:  pcsspeed,
		timeout: pcstimeout,
		pause:    pcspause,
		random:  pcsrandom,
		pager:  '#PCS1Pager',
	    before:  onPCS1Before,
	    after:   onPCS1After,
		prev:   '#pcs_prev2',
		next:   '#pcs_dalej2'
	});
});