/* window . open */
function wo(url, opt) { /* width, height, status, toolbar, location, menubar, directories, resizable, scrollbars, name, top, left, chanelmode */
opt = opt || {}; opt.url = url; opt.width = opt.width || 500; opt.height = opt.height || 300; 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'; 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; }
/* tooltip functions */
function removethetooltip(obj) { obj.title = obj.t; $('#tooltip').hide(); }
function tooltip() { if($('#tooltip').length<=0) $('body').append('<p id="tooltip"></p>'); xOffset = 10; yOffset = 20; $('.tt').hover( function(e){ if(this.title != '') { this.t = this.title; this.title = ''; $('#tooltip').css('top',(e.pageY - xOffset) + 'px').css('left',(e.pageX + yOffset) + 'px'); $('#tooltip').html(this.t).show(); } $(this).click(function() { removethetooltip(this); }); }, function(){ removethetooltip(this); } ); $('.tt').mousemove(function(e){ if($('#tooltip').length>0) $('#tooltip').css('top',(e.pageY - xOffset) + 'px').css('left',(e.pageX + yOffset) + 'px'); }); }
/* example here - function generalSend(to, params) { var toSend = to || 'make_insert.php'; $.post ( ADR+'ajax/'+toSend, params, function(data){ scb(data); } ); return false; } */
/* refresh iframe */
function rfrm(id, cu) { var ifr = document.getElementById(id); ifr.src = cu; return false; }
/* scroll to ID */
function goto(id,addclass) { var pos=$('#'+id).offset(); $.scrollTo(pos.top-20, 500); if( addclass == 'yes' ) { $('.orangebg').removeClass('orangebg'); $('#'+id).addClass('orangebg'); if($('#a_'+id)) $('#a_'+id).addClass('orangebg'); } return false }
/* add flash element */
function addFlash(opt) { opt.how = opt.how || 'write'; opt.data = opt.data || ''; opt.w = opt.w || ''; opt.h = opt.h || ''; opt.fv = opt.fv || ''; opt.wmode = opt.wmode || 'transparent'; opt.flashvars = opt.flashvars || ''; opt.allowscriptaccess = opt.allowscriptaccess || 'allways'; var finalString = '<'+'object type="application/x-shockwave-flash" data="'+opt.data+'" width="'+opt.w+'" height="'+opt.h+'"> <'+'param name="movie" value="'+opt.data+'" /'+'> <'+'param name="flashVars" value="'+opt.fv+'" /'+'> <'+'param name="wmode" value="'+opt.wmode+'" /'+'> <'+'param name="flashvars" value="'+opt.flashvars+'" /'+'> <'+'param name="allowscriptaccess" value="'+opt.allowscriptaccess+'" /'+'>'+'<'+'/object>'; if(opt.how == 'write') document.write(finalString); else return finalString; }
/* close/show a DIV and return false */
function closediv(id) { $('#'+id).fadeOut(300); return false; } function showdiv(id) { $('#'+id).fadeIn(300); return false; }
/* send 2 friend */
function trimiteunuiprieten() { $('#send2friend_submit').hide(); $.post( ADR+'ajax/send.mail.php?key='+thekey, { mail1:$('#send2friend_adr1').val(), tip:'send2friend', mail2:$('#send2friend_adr2').val(), linkul:$('#send2friend_page').val() }, function(data){ $('#send2friend_submit').show(); if(data == 'ok') { $('#trimiteunuiprieten input').val(''); closediv('trimiteunuiprieten'); } else { alert(data); } } ); return false; }
/* don't show oferta speciala */
function faraofertaspeciala() { $('#ofertaSpeciala').slideUp(); $.post( ADR+'ajax/fara-oferta-speciala.php', { faraoferta:1 }, function(data){  } ); return false }
/* deschide popup */
function opentur() {  }
/* addmail */ var busymail = false;
function addmail(camp, thepdf) { /* nume, submit_nume, form_nume */ if(!busymail) { busymail = true; $('#submit_'+camp).html('Asteptati...'); $.post ( ADR+'ajax/getmail.php', { mail: $('#'+camp).val(), pdf: thepdf }, function(data){ busymail = false; if(data == 'notok') { $('#submit_'+camp).html('OK'); alert('Mail-ul nu are format corect sau nu este completat.'); } else { $('.tx').val($('#'+camp).val()); $('#form_'+camp).css({ background:'#eee' }).html(data); } } ); } else alert('Asteptati trimiterea datelor...'); return false; }


$(document).ready( function() {

	$('.link1').hover( function() {
		
		
		$('.pic2').attr('src', 'fl/tpl/images/bg_white.png');
		$('.pic2').stop().fadeIn(300);
		$('.pic1').stop().fadeOut(300);
		$('.pic1').attr('src', 'fl/tpl/images/bg_white.png');
	
		$('.pic1').show();
		$('.pic2').hide();
		//$('#xxx').BgImageTransition( 'fl/tpl/images/bg_white.png' );
	
	}, function() {
		
		
	} );
	
	
	$('.link2').hover( function() {
	
		$('.pic2').attr('src', 'fl/tpl/images/bg_red.png');
		$('.pic2').stop().fadeIn("slow");
		$('.pic1').stop().fadeOut("slow");
		$('.pic1').attr('src', 'fl/tpl/images/bg_red.png');
		
		$('.pic1').show();
		$('.pic2').hide();
		
		//$('#xxx').BgImageTransition( 'fl/tpl/images/bg_red.png' );
		
	
	}, function() {
		
	} );

	
	


});

