




function validateform()
{
	var name=document.getElementById("name_id").value;
	var email=document.getElementById("email_id").value;
	var desc=document.getElementById("desc_id").value; 
      if(name=="")
	{
		alert("Please enter your name");
		return false;
	}
	if(email=="")
	{
		alert("Please enter your email address");
		return false;
	}
	if(desc=="")
	{
		alert("Please enter the description");
		return false;
	}
	if(email.indexOf("@")==-1)
	{
		alert("Please enter a valid email address");
		return false;
	}
	if(email.indexOf(".")==-1)
	{
		alert("Please enter a valid email address");
		return false;

	}
	

	$(".tmp").load("contact.php?name="+name+"&email="+email+"&desc="+desc);
	document.getElementById("name_id").value="";
	document.getElementById("email_id").value="";
	document.getElementById("desc_id").value="Email was sent";
	$("#contact_area").slideUp(3000);
	$("#topbar_min_contact").hide(0);

	return false;
}
function facebookshare()
{
	var link=document.location;
	document.location="http://www.facebook.com/sharer.php?u="+encodeURIComponent(link);
}
function twittershare()
{
	var link=document.location;
	document.location="http://twitter.com/home?status="+encodeURIComponent(link);

}
function diggshare()
{
	var link=document.location;
	document.location="http://digg.com/submit?phase=2&url="+encodeURIComponent(link);

}
function linkedinshare()
{
	var link=document.location;
	alert(link);
	document.location="http://www.linkedin.com/shareArticle?mini=true&url="+encodeURIComponent(link);

}
function deliciousshare()
{
	var link=document.location;
	document.location="https://secure.delicious.com/login?Furl="+encodeURIComponent(link);

}
function myspaceshare()
{
	var link=document.location;
	document.location="http://www.myspace.com/Modules/PostTo/Pages/?u="+encodeURIComponent(link);

}
function tumblrshare()
{
	var link=document.location;
	document.location="http://www.tumblr.com/tagged/"+encodeURIComponent(link);

}


function flickrshare()
{
	var link=document.location;
	document.location="www.flickr.com";

}
var hidelinks=false;
var openlink=false;
var showtool=false;
var tipok=false;
var timer;
function invertTool()
{
	showtool=false;
	jQuery("#tooltip").fadeOut("fast");
}


function showTip()
{
	if(tipok==true)
	{
		jQuery("#tooltip").fadeIn("slow");
	}
}
var showtool2=false;
var tipok2=false;
var timer2;
function invertTool2()
{
	showtool2=false;
	jQuery("#cm_linx").fadeOut(500);
}


function showTip2()
{
	if(tipok2==true)
	{
		jQuery("#cm_linx").fadeIn(500);
	}
}
jQuery(document).ready(function(){



				jQuery("#toolimg").live('mouseover',function(){
				if(!showtool)
				{
					
					showtool=true;
					tipok=true;
					clearTimeout(timer);
					setTimeout("showTip()",200);

				}
				});

				jQuery("#toolimg").live('mouseout',function(){
				
					tipok=false;
					clearTimeout(timer);
					timer=setTimeout("invertTool()",200);
				});
				
				jQuery("#tooltip").live('mouseover',function(){
				
					clearTimeout(timer);
					showtool=false;

				});
				jQuery("#tooltip").live('mouseout',function(){
					clearTimeout(timer);
					timer=setTimeout("invertTool()",200);

				});

				
				
				
				
				///////////////////////// HOMEPAGE STARTS/////////////////////
				
				jQuery("#homelogo").live('mouseover',function(){
				if(!showtool2)
				{
					
					showtool2=true;
					tipok2=true;
					clearTimeout(timer2);
					setTimeout("showTip2()",200);

				}
				});

				jQuery("#homelogo").live('mouseout',function(){
				
					tipok2=false;
					clearTimeout(timer2);
					timer2=setTimeout("invertTool2()",200);
				});
				
				jQuery("#cm_linx").live('mouseover',function(){
				
					clearTimeout(timer2);
					showtool2=false;

				});
				jQuery("#cm_linx").live('mouseout',function(){
					clearTimeout(timer2);
					timer2=setTimeout("invertTool2()",200);

				});
				
				
				/*jQuery("#homelogo").live('mouseover',function(){
				jQuery("#cm_linx").fadeIn(500);
				});

				jQuery("#homelogo").live('mouseout',function(){
				jQuery("#cm_linx").fadeOut(1000);
				});*/
				
				/////////////////////////HOMEPAGE ENDS//////////////////////
				
				jQuery("#linkrose").live('mouseover',function(){
				jQuery("#rose_linx_area").fadeIn("slow");
				hidelinks=true;
				});

				








				jQuery("#topbar_initial").live('mouseover',function(){
				jQuery("#topbar_initial").hide();
				jQuery("#topbar").slideDown("fast");
				openlink=true;
				
				});

				
		
				

				jQuery("body").live('mousemove',function(e){
				
					if(openlink)
					{
						
					
	      				var x=e.pageX;
						var y=e.pageY;
						if(x<700 || y>300)
						{
							
							openlink=false;
							unScrollShareOptionsEffect();
							unScrollFollowOptionsEffect();
							unScrollContactOptionsEffect();

							jQuery("#topbar_initial").slideDown("fast");
							jQuery("#topbar").slideUp("fast");
							
							   							
						}
					}

					if(hidelinks)
					{
						
	      					var x=e.pageX;
						var y=e.pageY;
						if(y<500)
						{
							
							hidelinks=false;
							
							jQuery("#rose_linx_area").fadeOut("slow");

							
							   							
						}
					

					}

				});


											

	});		


function scrollShareOptions()
{

	$("#share_area").slideDown("fast");
	$("#topbar_min_share").show(0);

	unScrollFollowOptions();
	unScrollContactOptions();
}				
function unScrollShareOptions()
{

	$("#share_area").hide(0);
	$("#topbar_min_share").hide(0);

}
function scrollFollowOptions()
{
	$("#follow_area").slideDown("fast");
	$("#topbar_min_follow").show(0);
	unScrollShareOptions();
	unScrollContactOptions();

}

function unScrollFollowOptions()
{
	$("#follow_area").hide(0);
	$("#topbar_min_follow").hide(0);
}

function scrollContactOptions()
{

	$("#contact_area").slideDown("fast");
	$("#topbar_min_contact").show(0);

	unScrollFollowOptions();
	unScrollShareOptions();
}				
function unScrollContactOptions()
{

	$("#contact_area").hide(0);
	$("#topbar_min_contact").hide(0);

}

	


function unScrollShareOptionsEffect()
{

	$("#share_area").slideUp("fast");
	$("#topbar_min_share").hide(0);

}

function unScrollFollowOptionsEffect()
{
	$("#follow_area").slideUp("fast");
	$("#topbar_min_follow").hide(0);
}

		
function unScrollContactOptionsEffect()
{

	$("#contact_area").slideUp("fast");
	$("#topbar_min_contact").hide(0);

}





