//Start DropDown Menu
$(function(){
	$('.button').mouseover(function() {
		$(this.firstChild).addClass('sfHover');
		$(this).find('.dropdown').show();
	}).mouseout(function() {
		$(this.firstChild).removeClass('sfHover');
		//alert($(this).find('.dropdown').length);
		$(this).find('.dropdown').hide();
	});
});

//End DropDown Menu

// Clear Inputs
function clearText(input){
    if (input.defaultValue==input.value)
    input.value = ''
}
function restoreText(input){
if (input.value=='')
	input.value = input.defaultValue
}
// End Clear Inputs

// Expander
$(function(){
	$('.article .links a').click(function() {
		var node = $(this).parent().prev();
		if (node.css('display')=='none') {
			node.show("fast");
		}  else { 
			node.hide("fast");
		}
		$(this).parent().children("a").toggleClass('closed');
        return false;
	});
	$('.back-top a').click(function() {
		 jQuery.scrollTo( '#page', 1000 );
		 return false;
	});
});
// End Expander

//Login Area Show, hide
var mouseover_timeout;
function keep_form_visible() {
	mouseover_timeout = setTimeout(function(){
		$('#loginarea').fadeOut('fast');
	}, 500);
}

$(function(){
	$('#client-login').click(function() {
		$('#loginarea').fadeIn('fast');
	})
	$('#loginarea').mouseover(function(){
		clearTimeout(mouseover_timeout);
	});
	$('#loginarea').mouseout(function(){
		keep_form_visible();
	});
});
// End Login Area Show, hide

//Validate Request Form
function getId(id) {
    return document.getElementById(id);
}
function v(id) {
    return getId(id).value;
}
function f(id) {
    getId(id).focus();
}
function validateform() {
if(v('f-fname')=='First Name:' || v('f-fname')=='' ) {
    alert('Please, enter your First Name.');
    f('f-fname');
    return false;
}
if(v('f-lname')=='Last Name:') {
    alert('Please, enter your Last Name.');
    f('f-lname');
    return false;
}
if(!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(v('f-mail'))) {
    alert('Please, enter valid e-mail address.');
    f('f-mail');
    return false;
}

if(v('f-phone')=='Phone Number:') {
    alert('Please, enter your Phone Number.');
    f('f-phone');
    return false;
}
/*if(v('f-company')=='Company Name:') {
    alert('Please, enter your Company Name.');
    f('f-company');
    return false;
}
if(v('f-position')=='Your Position:') {
    alert('Please, enter Your Position.');
    f('f-position');
    return false;
}
if(v('f-industry')=='Industry:') {
    alert('Please, enter Industry.');
    f('f-industry');
    return false;
}
if(v('f-budget')=='Monthly Budget:') {
    alert('Please, enter Monthly Budget.');
    f('f-budget');
    return false;
}
if(v('f-starting')=='Starting Date:') {
    alert('Please, enter Starting Date.');
    f('f-starting');
    return false;
}
if(v('f-duration')=='Estimated Duration:') {
    alert('Please, enter Estimated Duration.');
    f('f-duration');
    return false;
}*/
if(v('f-comments')=='Comments:') {
    alert('Please, enter Comments.');
    f('f-comments');
    return false;
}
return true;
}
document.write('<\/script>');

document.write('<\/script>');
