	                        function show_terms()
				{
						$('#terms_conditions').show();
	                                        $('#terms_conditions').css("top","50%");
				}				
				function hide_terms()
				{
						$('#terms_conditions').hide();
				}
	                        function show_privacy()
				{
						$('#privacy_policy').show();
						$('#privacy_policy').css("top","50%");
				}
				
				function hide_privacy()
				{
						$('#privacy_policy').hide();
				}
                
                		function show_template_payment(tid)
				{
					    //alert(tid);
						$('#template_payment'+tid).show();
				}
				
				function hide_template_payment(tid)
				{
						$('#template_payment'+tid).hide();
				}
	                       function open_box()
				{
                	$('#firstdiv').hide();
		     		document.getElementById('seconddiv').style.display='inline';
				}
				
					function show_one()
				{
					document.getElementById('firstdiv').style.display='inline';
                	$('#seconddiv').hide();
				}


function check_quotes()
{
	var str="";
   	var fck="";
	  if(document.getElementById('first_name').value=="")
     {
        str+="Please enter First Name\n";
	if(fck=="")
	fck='first_name';
     }
	  else if(document.getElementById('last_name').value=="")
     {
        str+="Please enter Last Name\n";
	if(fck=="")
	fck='last_name';
     }
	 	  else if(document.getElementById('email').value=="")
     {
        str+="Please enter Email address\n";
	if(fck=="")
	fck='email';
     }
	      else if(valid(document.getElementById('email').value)==false)
     {
        str+="Please enter valid Email address\n";
	if(fck=="")
	fck='email';
     }
	  else if(document.getElementById('contact').value=="")
     {
        str+="Please enter your contact details\n";
	if(fck=="")
	fck='contact';
     }
     else  if(document.getElementById('company').value=="")
     {
        str+="Please enter your company name\n";
	if(fck=="")
	fck='company';
     }
	 	  else if(document.getElementById('message').value=="")
     {
        str+="Please enter discription field \n";
	if(fck=="")
	fck='message';
     }
     if(str!="")
     {
	document.getElementById('divlerrorbox').innerHTML='* '+str;
	//alert(str);
	document.getElementById(fck).focus();
	//document.getElementById(fck).select();
	return false;
     }
     else
     {
	return true;
     }

}



function valid(email_id)
{
	var re_mail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z])+$/;
	if(!re_mail.test(email_id))
	{
		return false;	
	}
	else
	{
		return true;	
	}
}


function check_numeric_value(getvalue)
{
	var check_int  = /^([0-9])+$/;
	if(!check_int.test(getvalue))
	{
	 return false;
	}
	else
	{
	 return true;
	}
}






function check_contacts()
{
	var str="";
   	var fck="";
	  if(document.getElementById('first_name').value=="")
     {
        str+="Please enter First Name\n";
	if(fck=="")
	fck='first_name';
     }
	  else if(document.getElementById('last_name').value=="")
     {
        str+="Please enter Last Name\n";
	if(fck=="")
	fck='last_name';
     }
	  else if(document.getElementById('email').value=="")
     {
        str+="Please enter Email address\n";
	if(fck=="")
	fck='email';
     }
     else if(valid(document.getElementById('email').value)==false)
     {
        str+="Please enter valid Email address\n";
	if(fck=="")
	fck='email';
     }
     else  if(document.getElementById('message').value=="")
     {
        str+="Please enter message\n";
	if(fck=="")
	fck='message';
     }
	 	  else if(document.getElementById('comments').value=="")
     {
        str+="Please enter comments field \n";
	if(fck=="")
	fck='comments';
     }
     if(str!="")
     {
	document.getElementById('divlerrorbox').innerHTML='* '+str;
	//alert(str);
	document.getElementById(fck).focus();
	//document.getElementById(fck).select();
	return false;
     }
     else
     {
	return true;
     }

}



function check_payments()
{
	var str="";
   	var fck="";
	  if(document.getElementById('first_name').value=="")
     {
        str+="Please enter First Name\n";
	if(fck=="")
	fck='first_name';
     }
	  else if(document.getElementById('last_name').value=="")
     {
        str+="Please enter Last Name\n";
	if(fck=="")
	fck='last_name';
     }
	  else if(document.getElementById('amount').value=="")
     {
        str+="Please enter amount\n";
	if(fck=="")
	fck='amount';
     }
     else  if(document.getElementById('website').value=="")
     {
        str+="Please enter website field\n";
	if(fck=="")
	fck='website';
     }
	 	  else if(document.getElementById('message').value=="")
     {
        str+="Please enter discription field \n";
	if(fck=="")
	fck='message';
     }
     if(str!="")
     {
	document.getElementById('divlerrorbox').innerHTML='* '+str;
	//alert(str);
	document.getElementById(fck).focus();
	//document.getElementById(fck).select();
	return false;
     }
     else
     {
	return true;
     }

}



function template_payment(tid)
{
	var str="";
   	var fck="";
	
	  if(document.getElementById('first_name'+tid).value=="")
     {
		 //alert(tid);
        str+="Please enter First Name\n";
	if(fck=="")
	fck='first_name'+tid;
     }
	  else if(document.getElementById('last_name'+tid).value=="")
     {
        str+="Please enter Last Name\n";
	if(fck=="")
	fck='last_name'+tid;
     }
	  else if(document.getElementById('email'+tid).value=="")
     {
        str+="Please enter Email address\n";
	if(fck=="")
	fck='email'+tid;
     }
	      else if(valid(document.getElementById('email'+tid).value)==false)
     {
        str+="Please enter valid Email address\n";
	if(fck=="")
	fck='email'+tid;
     }
    if(str!="")
     {
	document.getElementById('divlerrorbox'+tid).innerHTML='* '+str;
	//alert(str);
	document.getElementById(fck).focus();
	//document.getElementById(fck).select();
	return false;
     }
     else
     {
	return true;
     }

}




$(document).ready(function(){
						   
	// set the default options for all scrollpanes on this page
				$.extend($.fn.jScrollPane.defaults, {showArrows:true});
				// The above line could also be expressed like this as we are just setting one default:
				//$.fn.jScrollPane.defaults.showArrows = true;

				// this initialises the demo scollpanes on the page.
				$('#pane1').jScrollPane();
				$('#pane2,#pane5').jScrollPane();
				// overriding showArrows for pane3
				$('#pane3').jScrollPane({scrollbarWidth:20, scrollbarMargin:10, showArrows:false});
				$('#pane4').jScrollPane();
                
				// this allows you to click a link to add content to #pane4 and shows how to 
				// reinitialise the scrollbars when you have done this.
				$('#add-content').bind(
					'click',
					function()
					{
						$('#pane4').append($('<p></p>').html($('#intro').html())).jScrollPane();
					}
				);
				// and this allows you to click the link to reduce the amount of content in
				// #pane4 and reinitialise the scrollbars.
				$('#remove-content').bind(
					'click',
					function()
					{
						$('#pane4').empty().append($('<p></p>').html($('#intro').html())).jScrollPane();
					}
				);
				jQuery("a[rel='example1']").colorbox({width:"95%", height:"95%"});
        jQuery("a[rel='example2']").colorbox({width:"900px", height:"600px"});
			//Example of preserving a JavaScript event for inline calls.
				jQuery("#click").click(function(){ 
					jQuery('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
					return false;
				});
	$('#terms_conditions').hide();
	$('#privacy_policy').hide();
    $('#template_payment1').hide();
	$('#template_payment2').hide();
	$('#template_payment3').hide();


	
	$('.boxgrid.slidedown').hover(function(){
					$(".cover", this).stop().animate({top:'-260px'},{queue:false,duration:300});
				}, function() {
					$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:300});
				});
				//Horizontal Sliding
				$('.boxgrid.slideright').hover(function(){
					$(".cover", this).stop().animate({left:'325px'},{queue:false,duration:300});
				}, function() {
					$(".cover", this).stop().animate({left:'0px'},{queue:false,duration:300});
				});
				//Diagnal Sliding
				$('.boxgrid.thecombo').hover(function(){
					$(".cover", this).stop().animate({top:'260px', left:'325px'},{queue:false,duration:300});
				}, function() {
					$(".cover", this).stop().animate({top:'0px', left:'0px'},{queue:false,duration:300});
				});
				//Partial Sliding (Only show some of background)
				$('.boxgrid.peek').hover(function(){
					$(".cover", this).stop().animate({top:'100px'},{queue:false,duration:160});
				}, function() {
					$(".cover", this).stop().animate({top:'0px'},{queue:false,duration:160});
				});
				//Full Caption Sliding (Hidden to Visible)
				$('.boxgrid.captionfull').hover(function(){
					$(".cover", this).stop().animate({top:'90px'},{queue:false,duration:300});
				}, function() {
					$(".cover", this).stop().animate({top:'220px'},{queue:false,duration:300});
				});
				//Caption Sliding (Partially Hidden to Visible)
				$('.boxgrid.caption').hover(function(){
					$(".cover", this).stop().animate({top:'50px'},{queue:false,duration:160});
				}, function() {
					$(".cover", this).stop().animate({top:'260px'},{queue:false,duration:160});
				});


});
