$(this).ready(function(){

$('#gotop').click(function (ev) {
    ev.preventDefault();
	$.scrollTo('#wrapper', {duration:1000, axis: 'y'});
});
$('.tabs').fadeIn(1000);
$('.optab').hide();
$('.descriereRest').show();

$('.linkComentariiRest').click(function (ev) {
    ev.preventDefault();
	$('.optab').hide();
    $('.comentariiRest').fadeIn(500);
});

$('.linkAdaugaRest').click(function (ev) {
    ev.preventDefault();
	$('.optab').hide();
    $('.adaugaComentariiRest').fadeIn(500);
});

$('.linkDescriereRest').click(function (ev) {
    ev.preventDefault();
	$('.optab').hide();
    $('.descriereRest').fadeIn(500);
});

$('.linkRaspundeComentariu').click(function (ev) {
    ev.preventDefault();
	$('.optab').hide();
    $('.adaugaComentariiRest').fadeIn(500);
    $.scrollTo('.tabs', {duration:1000, axis: 'y'});
});

$("#mainContent label .text").tooltip({ 
    position: "top center", 
    offset: [0, 0], 
    effect: "slide", 
    opacity: 0.9, 
    tip: '#dynatip' 
    }).dynamic( { 
        bottom: { 
        direction: 'down', 
        bounce: true 
        } 
    });
    
    $("#mainContent inputCheckbox input").tooltip({ 
    position: "top center", 
    offset: [0, 0], 
    effect: "slide", 
    opacity: 0.9, 
    tip: '#dynatip' 
    }).dynamic( { 
        bottom: { 
        direction: 'down', 
        bounce: true 
        } 
    });
    
if (location.href.indexOf('#comentariu')>-1)
{
$('.optab').hide();
    $('.comentariiRest').fadeIn(500);
}
});
