/* window . open */
function wo(url, opt) {
	opt = opt || {};
	opt.url = url;
	// width and height
	opt.width = opt.width || 500;
	opt.height = opt.height || 300;
	// bars
	opt.status = opt.status || 'no';
	opt.toolbar = opt.toolbar || 'no';
	opt.location = opt.location || 'no';
	opt.menubar = opt.menubar || 'no';
	opt.directories = opt.directories || 'no';
	// others
	opt.resizable = opt.resizable || 'no';
	opt.scrollbars = opt.scrollbars || 'yes';
	opt.name = opt.name || '_blank';
	opt.top = opt.top || 20;
	opt.left = opt.left || 100;
	opt.channelmode = opt.channelmode || 0;
	window.open(opt.url, opt.name, 'width='+opt.width+', height='+opt.height+', status='+opt.status+', toolbar='+opt.toolbar+', location'+opt.location+', menubar='+opt.menubar+', directories='+opt.directories+', resizable='+opt.resizable+', scrollbars='+opt.scrollbars+', top='+opt.top+', left='+opt.left+', channelmode='+opt.channelmode);
	return false;
}


/* scroll TO */
function scroll_to(id) {
	var pos=$('#'+id).offset();
	$.scrollTo( pos.top, 777 );
	return false
}


function tooltip() {
	xOffset = 10; yOffset = 20;
	$('img,a').hover(function(e){
		this.t = this.title;
		if(this.t != '') {
			this.title = '';
			$('body').append('<p id="tooltip">'+ this.t +'</p>');
			$('#tooltip')
				.css('top',(e.pageY - xOffset) + 'px')
				.css('left',(e.pageX + yOffset) + 'px')
				.fadeIn('fast');
		}
    }, function() {
		this.title = this.t;
		if(this.title != '') $('#tooltip').remove();
    });
	$('img').mousemove(function(e){
		if($('#tooltip')) $('#tooltip')
			.css('top',(e.pageY - xOffset) + 'px')
			.css('left',(e.pageX + yOffset) + 'px');
	});			
};

function goto(care) {
	scroll_to('bg'+care);
	return false;
}

var cTeam = 1;
function changeMember(care) {
	if(cTeam != care) {
		$('.teamC').hide();
		$('#b'+care).fadeIn();
		$('.buT').removeClass('selct');
		$('#bb'+care).addClass('selct');
		cTeam = care;
	}
	return false;
}


function makeShow(care) {
	$('.butB').removeClass('selb');
	$('#butB'+care).addClass('selb');
	$('.cblog').hide();
	$('#cblog'+care).fadeIn();
	return false;
}


function positionBarajos() {
	var h = parseInt($(window).height())-20;
	var s = $(window).scrollTop(); var addIt = s+h;
	$('#barajos').css( { position:'fixed',bottom:'0',left:'0'} );
	$('#barajos').fadeTo('fast',0.85);
	/* var t = setTimeout('positionBarajos()',200); */
}

function openbar() {
	var h = parseInt($('#barajos').height());
	if( h < 25 ) {
	$('#barajos').animate({height:'80px'},500);
	} else $('#barajos').animate({height:'18px'},500);
	return false;
}

function closeother(ce){ $('#'+ce).hide('fast'); }
function openBarJos(ce) {
	var f = 'facebookBar'; var t = 'twitterBar';
	if($('#'+ce).is(':visible')) {
		if(ce == t) closeother(f);
		else closeother(t);
		$('#'+ce).slideUp(); /*hide();*/
	} else {
		closeother(f);
		closeother(t);
		$('#'+ce).slideDown();
	} return false;
}



/* trimite contact 
function sendContact() {
	$('#submth').hide();
	$.post (
		ADR+'ajax/add_contact.php', { nume:$('#nume').val(), mail:$('#mail').val(),telefon:$('#telefon').val(),mesaj:$('#mesaj').val(),captcha:$('#captcha').val() },
		function(data){
			if(data == 'ok') {
				$('#contactform').hide();
				$('#showit').fadeIn();
			} else {
				alert(data);
				$('#submth').show();
			}
		}
	); return false;
}
*/

