
$(document).ready(function(){
/*    setTimeout(function(){
            $("#logo_big").animate({
			marginTop: '0px', // The next 4 lines will vertically align this image  
			height: '120px'
		}, 1500); 
    }, 1500);
                
$("#logo_big").hover(function() {
    $(this).animate({
			marginTop: '-80px', // The next 4 lines will vertically align this image 
			height: '200px'
		}, 200);
}, function() {
    $(this).animate({
			marginTop: '0px', // The next 4 lines will vertically align this image  
			height: '120px'
		}, 200);    
});*/
	//$.nmManual('http://algrida.lt/new/uzklausa&img=http://www.aaa.lt/new');
      //$('.nyroModal').nyroModal();
    $('.form_expand').click(function(){
        $('.content_form_text').slideToggle(1000);
    });
});
function expand(id)
{
    $('#expand-'+id).slideToggle();
}

function validateForm()
{
    $('.formLikeContainer input').each(function(){
		if ($(this).attr('id')!="su_ajax")
		{
		    $(this).css('background','white');
		}
	});
    if ($('.formLikeContainer #fbrp__29').val()=="")
    {
        $('.formLikeContainer #fbrp__29').css('background','#f7caca');
    }
    if ($('.formLikeContainer #fbrp__31').val()=="" && $('.formLikeContainer #fbrp__30').val()=="")
    {
        $('.formLikeContainer #fbrp__31').css('background','#f7caca');
        $('.formLikeContainer #fbrp__30').css('background','#f7caca');
    }
}
// pre-submit callback
  function formValidate(formData, jqForm, options) {
      err=false;
    // formData is an array; here we use $.param to convert it to a string to display it
    // but the form plugin does this for you automatically when it submits the data
     var queryString = $.param(formData);

    // jqForm is a jQuery object encapsulating the form element.  To access the
    // DOM element for the form do this:
     var formElement = jqForm[0];
     var parent = jqForm.parent();
     var throber = parent.children('.throbber');
     parent.children('form').fadeOut("slow", function(){throber.fadeIn("slow")});
    // alert('About to submit: \n\n' + queryString);
    //alert(formData);
//    for(i in formData)
//        {
//            nv=$.param(formData[i]).split('&value=');
//            name=nv[0].replace('name=','');
//            value=nv[1];
//            
//            if($('[name|="'+name+'"]').parent().hasClass("required") && value==''){
//                $('[name|="'+name+'"]').css('background-color','#fdebeb');
//                err=true;
//            }
//            //alert(name);
//            //alert(value);
//        }
    
    // if it validates Insert Throbber
    //contact_form.fadeOut("slow", function(){$(".throbber").fadeIn("slow")});
    //like_form.fadeOut("slow", function(){$(".throbber").fadeIn("slow")});
   // here we could return false to prevent the form from being submitted;
    // returning anything other than false will allow the form submit to continue
    if (err)
        return false;
    else return true;
  };
// function callNyro(url)
// {
    // alert('labas');
    // root=$('#root_url').html();
    // $('.imga textarea').html(root+'/'+url);
    // $.nmData('<table cellpadding="15" class="doyoulike"><tr><td width="320">'+$("#doyoulike").html()+'</td><td><img src="'+url+'" width="200" /></td></tr></table><div class="formLikeContainer" id="ajax_like">'+$('#formLike').html()+'</div>',
    // {
        // sizes: {	// Size information
            // minW: 400,	// minimum width
            // minH: 500	// minimum height
        // }
    // });
      
    
    // setTimeout(function(){ 
	// prepareAjaxForm();
    // }, 1000);
// }
function setAllHeight()
{ 
}


