 
$(document).ready(function() {
        // Tooltip only Text
        
    //disable copy paste
       $('#siteUrl').bind('copy paste', function (e) {
        e.preventDefault();
    });
        $('.masterTooltip').hover(function(){
                // Hover over code
        	 
        		$(this).css( 'cursor', 'pointer' );
                var title = $(this).attr('title');
                $(this).data('tipText', title).removeAttr('title');
                $('<p class="tooltip"></p>')
                .text(title)
                .appendTo('body')
                .fadeIn('slow');
        }, function() {
                // Hover out code
                $(this).attr('title', $(this).data('tipText'));
                $('.tooltip').remove();
        }).mousemove(function(e) {
                var mousex = e.pageX + 10; //Get X coordinates
                var mousey = e.pageY - 10; //Get Y coordinates
                $('.tooltip')
                .css({ top: mousey, left: mousex })
        });
        
        
        //Sitename Vlidation
        
  $("#siteUrl").on("keyup keydown keypress change paste", function(e){
    if (e.type == "paste") $(this).change();
        var newValue = $(this).val(); 
                //$('#errormessage').html('');
                var yourInput = $(this).val();
                re = /[`~!@#$%^&*()|+\-=?;:'",<>\{\}\[\]\\\/]/gi;
                var isSplChar = re.test(yourInput);
                if(isSplChar)
                {
                        var no_spl_char = yourInput.replace(/[`~!@#$%^&*()|+\-=?;:'",<>\{\}\[\]\\\/]/gi, '');
                        $(this).val(no_spl_char);
                        $('#errormessage').html('Invalid site name.Enter valid sitename.Only letters,numbers,dot,space,underscore are allowed');
                        $(this).val(lastValue);
                }else{
                    lastValue = newValue;
                    $('#errormessage').html('');
                }
    
    /*if (isNaN(newValue) === true) {
        $(this).val(lastValue);
     
    } else {
         lastValue = newValue;
    
    };*/

});


        
});
 