function start(){
		$("#browser").treeview({
			toggle: function() {
				// console.log("%s was toggled.", $(this).find(">span").text());
			}
		});
		
		$("#add").click(function() {
			var branches = $("<li><span class='folder'>New Sublist</span><ul>" + 
				"<li><span class='file'>Item1</span></li>" + 
				"<li><span class='file'>Item2</span></li></ul></li>").appendTo("#browser");
			$("#browser").treeview({
				add: branches
			});
		});

		$(function() {
			setInterval( "setSliderPP()", 5000 );
		});
		
		toggleNextDiv();
}

function toggleNextDiv(){
	$('.toggleNextDiv').click(function(){
		$(this).next().toggle();
	});

		
}

function setContact(){
	$(".contact_plugin").contact({
		'sendToName' : 'Vesa Andrei',
		'sendToEmail' : 'contact@vesaandrei.ro',
		'strName' : 'Numele',
		'strEmail' : 'E-mail',
		'strTo' : 'Catre',
		'strSubject' : 'Subiect',
		'strMessage' : 'Mesaj',
		'strSend' : 'Trimite',
		'send_success': 'send_success',
		'send_failure' : 'send_failure',
		'validYes' : '/images/validYes.png',
		'validNo' : '/images/validNo.png',
		'fpost': '/include/functii.php',
		'rows':6
	});
}


function setSliderPP()
{
	var $active = $('#sliderpp IMG.active');
	if ( $active.length == 0 ) 
		$active = $('#sliderpp IMG:last');

	// use this to pull the images in the order they appear in the markup
	var $next =  $active.next().length ? $active.next() : $('#sliderpp IMG:first');
	$active.addClass('last-active');

	$next.css({opacity: 0.0})
		.addClass('active')
		.animate({opacity: 1.0}, 1000, function() {$active.removeClass('active last-active');});
}




