var slide={check:function(){if(j("#lts_testimonials img")[0].complete){clearInterval(cID);j("#lts_testimonials .active").animate({opacity:1.0},1000);var sID=setInterval("slide.sSwitch()",9000);}},sSwitch:function(){var active=j('#lts_testimonials div.active');if(j(active).length==0)active=j('#lts_testimonials div:last');var next=j(active).next().length?j(active).next():j('#lts_testimonials div:first');j(active).addClass('last-active');j(next).css({opacity:0.0})
.addClass('active')
.animate({opacity:1.0},1000,function(){j(next).attr("style","");j(active).removeClass('active last-active');});}}
var slide2={check:function(){if(j("#lts_testimonials_content img")[0].complete){clearInterval(cID2);j("#lts_testimonials_content .active").animate({opacity:1.0},1000);var sID2=setInterval("slide2.sSwitch()",9000);}},sSwitch:function(){var active=j('#lts_testimonials_content div.active');if(j(active).length==0)active=j('#lts_testimonials_content div:last');var next=j(active).next().length?j(active).next():j('#lts_testimonials_content div:first');j(active).addClass('last-active');j(next).css({opacity:0.0})
.addClass('active')
.animate({opacity:1.0},1000,function(){j(next).attr("style","");j(active).removeClass('active last-active');});}}
function liveHelp(){j('a#live-help').click(function(){var opener=window.open('http://chat.onstate.net:8080/chatproxy/servlet/ChatProxy?skill=Help%2Bchat&action=1000&tenantName=astausa&clientDomain=astausa&winLayout=advanced&wwwURL='+encodeURIComponent(window.location)+'&time='+(new Date()).getTime(),'ChatLobby','width=500,height=400');if(opener)opener.focus();return false;});}
function clientList(){var val=j('ul.left li').length;val=(Math.round(val/2))-1;j('ul.left').after('</ul><ul class="right">');j('ul.left li:gt('+val+')').appendTo(j('ul.right'));}
function sfHover(){if(j("#nav").length<0)return false;j("#nav li").each(function(n){j(this).bind("mouseover",function(){j(this).addClass("sfhover");})
j(this).bind("mouseout",function(){j(this).removeClass("sfhover");})})}
function sitemap(){j('#sitemap_list li.home-item a').html('LegalTranslationSolutions.com');j('#sitemap_list li.page-item-135').css({display:'none'});}
function gYear(){var gDate=new Date();var gFullYear=gDate.getFullYear();return gFullYear;}
function windowName(val){return window.name=val;}
function validateLogin(){if(j("#username").val()==""){alert("Please enter your username.");return false;}
if(j("#password").val()==""){alert("Please enter your password.");return false;}
return true;}
function trim(str,chars){return ltrim(rtrim(str,chars),chars);}
function ltrim(str,chars){chars=chars||"\\s";return str.replace(new RegExp("^["+chars+"]+","g"),"");}
function rtrim(str,chars){chars=chars||"\\s";return str.replace(new RegExp("["+chars+"]+$","g"),"");}
function validateQuote1(){var fields=[["#name","your full name"],["#getQuote #email1","your email"],["#phone","your phone number"],["#source","the source language"],["#language","the desired language"],["#documentmaterials","the document materials"]];for(x=0;x<fields.length;x++){if(j(fields[x][0]).val()==""){j(fields[x][0]).focus();alert("Please enter "+fields[x][1]+".");return false;}}
return true;}
function freeQuote(){if(j('#getQuote').length>0){j('#getQuote').ajaxForm({beforeSubmit:validateQuote1,success:function(){document.location="http://www.legaltranslationsolutions.com/contact/thank-you/";}});}}
function validateQuote2(){var fields=[["#First_Name","your first name"],["#Last_Name","your last name"],["#Phone","your phone number"],["#requestQuote #email1","your email"],["#Source_language","the source language"],["#Desired_language","the desired language"],["#Translation_description","the translation description"],["#How_did_you_hear_about_us","how did you hear about us"]];for(x=0;x<fields.length;x++){if(trim(j(fields[x][0]).val())==""){j(fields[x][0]).focus();alert("Please enter "+fields[x][1]+".");return false;}}
return true;}
function translationQuote(){if(j('#requestQuote').length>0){j('#requestQuote').ajaxForm({beforeSubmit:validateQuote2,success:function(){document.location="http://www.legaltranslationsolutions.com/contact/thank-you/";}});}}
function thankYouTop(){if(j(".page-id-135").length>0){window.scroll(0,0);}}
var sID=0;var cID=0;var sID2=0;var cID2=0;var j=jQuery.noConflict();j(document).ready(function(){if(j("body.error404").length>0){document.title="WE'RE SORRY, THAT PAGE DOES NOT EXIST";}
if(j("#lts_testimonials div.featured_client").length>0){cID=setInterval("slide.check()",1000);}
if(j("#lts_testimonials_content").length>0){cID2=setInterval("slide2.check()",1000);}
liveHelp();clientList();sfHover();sitemap();j('span.year').html(gYear());windowName('main');freeQuote();thankYouTop();})