// JavaScript Document
function init(){
	var inp = document.getElementsByTagName('input','textarea');
	for(var i = 0; i < inp.length; i++) {
		if(inp[i].type == 'text') {
			inp[i].setAttribute('rel',inp[i].defaultValue)
			inp[i].onfocus = function() {
				if(this.value == this.getAttribute('rel')) {
					this.value = '';
				} else {
					return false;
				}
			}
			inp[i].onblur = function() {
				if(this.value == '') {
					this.value = this.getAttribute('rel');
				} else {
					return false;
				}
			}
			inp[i].ondblclick = function() {
				this.value = this.getAttribute('rel')
			}
		}
	}
}
if(document.childNodes) {
	window.onload = init
}


jQuery().ready(function() {

// validate the comment form when it is submitted

jQuery("#commentform").validate({

						   errorClass: "invalid",

						    messages: {

     author: "Va rugam completati-va numele sau nickul",

	 url: "Va rugam introduceti o adresa url valida (nu uitati http://)",

	 comment: "Va rugam completati comentariul",

     email: {

       required: "Acest camp este obligatoriu.",

       email: "Va rugam introduceti o adresa de email valida (dupa modelul exemplu@exemplu.com)"

	 }

	   }



		  });

});

jQuery(document).ready(function(){
    jQuery(".detalii-certificare .cf-fs2").css("display","none");
        jQuery(".cf-box-b").click(function(){
        if (jQuery('input[name=cf2_field_2]:checked').val() == "da" ) {
            jQuery(".detalii-certificare .cf-fs2").slideDown("fast"); //Slide Down Effect
        } else {
            jQuery(".detalii-certificare .cf-fs2").slideUp("fast");  //Slide Up Effect
        }
     });
});



