$(document).ready(function(){ 
$("#form").delay(700).fadeIn(1000)
 }); 
 
$(document).ready(function() {
$('#Submit').click(function() {
var searchValue = $('#Search').val();
if (searchValue === "Desired name here..") {
alert('Please enter a valid domain name, Thank you.');
return false;
}
var oResults = $('#results');
oResults.html('');
oResults.hide();
$("#loading").fadeIn(2500);
var now = new Date();
$.post('http://velvetdata.com/process.php?domain=' + encodeURIComponent(searchValue) + '&t=' + now.getTime() , { }, function(response) {
oResults.show();
oResults.html(decodeURIComponent(response)); 
$("#loading").hide();
});
return false;
});
});
function addCommas(nStr)
{
	nStr += '';
	x = nStr.split('.');
	x1 = x[0];
	x2 = x.length > 1 ? '.' + x[1] : '';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + ',' + '$2');
	}
	return x1 + x2;
}
$(function() {
twitterusername = 'vantagedesignuk';
$.getJSON('http://twitter.com/users/'+twitterusername+'.json?callback=?',
function(data){
$('#twitflw').html(addCommas(data.followers_count));
});
});

$(document).ready(function() {
$('#login_box').click(function() {
$("#loginbox").slideToggle(200);
});
});

$(document).ready(function() {
$("#l_username").focus(function() {
	if( this.value == this.defaultValue ) {
		this.value = "";
	}
}).blur(function() {
	if( !this.value.length ) {
		this.value = this.defaultValue;
	}
});
});
$(document).ready(function() {
$("#l_password").focus(function() {
	if( this.value == this.defaultValue ) {
		this.value = "";
	}
}).blur(function() {
	if( !this.value.length ) {
		this.value = this.defaultValue;
	}
});
});

$(document).ready(function() {
$(".oh tr:odd").css("background-color", "#f6f6f6");
});

$(document).ready(function() {
$("#odd tr:odd").css("background-color", "#f6f6f6");
});

function ImgError(source){
    source.src = "/img/nologo.gif";
    source.onerror = "";
    return true;
}

function PicError(source){
    source.src = "/img/nppic.gif";
    source.onerror = "";
    return true;
}

