function $m(selector) { return document.getElementById(selector); }function $c(tagname) { return document.createElement(tagname); }function addVirgol(num){var ret='';for(var i=num.length-1;i>=0;i--){ret= num.charAt(i) +ret;if( (num.length-i)%3==0 && i>0 ){ret=','+ret;}
}return ret;}function yourOffer() { var NewWin = open('offer.aspx', '', 'width=1000,height=700,toobar=yes,scrollbars=yes,resizable=yes'); NewWin.moveTo(0, 0); return false; }$(function() {$('#divTellaFriend').hide();$('#divTellaFriendShower').append($('#divTellaFriend'));
var timerTellaFriend;$('#divTellaFriendShower').hover(function() { timerTellaFriend=setTimeout( function(){ $('#divTellaFriend').show('slow');},500); }, function() { clearTimeout(timerTellaFriend); $('#divTellaFriend').hide('fast'); });$('.tSubmitTranslator tr:odd').addClass('tSubmitTranslatorOdd');
var spanAllCashe;$('#spanAllCasheEn , #spanAllCasheFa').hover(function() { var tthis=this; spanAllCashe=setTimeout( function(){ $('#divShowAllCashe').detach().appendTo($(tthis)).fadeIn('fast');  },300); if(tthis.id=='spanAllCasheEn'){showAllCasheInDiv( $('#divShowAllCashe').get(0),'en'); }else{showAllCasheInDiv( $('#divShowAllCashe').get(0),'fa');}  }, function() { clearTimeout(spanAllCashe);  $('#divShowAllCashe').hide()}  );$('#divShowAllCashe').corner('');
$('h2').corner('top');$('.headername').corner("bottom");$('.footer').corner('top');$('.lh').corner('top');$('.login').corner();$('.tdra a').corner();$(".showVirgol").after("<span class='showVirgolVirgol'></span>");$(".showVirgol").keyup(function(event) {
$(".showVirgolVirgol", $(this).parent()).html(addVirgol($(this).val()));});$("#setHomePage").click(function() { this.style.behavior = 'url(#default#homepage)'; this.setHomePage('http:/' + '/dic.kharido.ir'); return false; });$('#showwbw').click(function() { $('#wbw').slideDown('slow'); });
$('#tbWord').autocomplete('Function/wordsAutoCompelete.aspx?', { max: 200, minChars: 3, cacheLength: 1, extraParams: { lang: 'en'} });$('#tbWordFa').autocomplete('Function/wordsAutoCompelete.aspx?', { max: 200, minChars: 4, cacheLength: 1, extraParams: { lang: 'fa'} });$('#divGoogleTran').hide('fast');
$('#resultTranslated').hide();$('#resultTranslated').click(function(){this.select();});$.get("advertisment/advertisment.txt", function(data){$("#divAdvertisment").html(data);});nextPrevarrow('en');nextPrevarrow('fa');});
function doGooleTranslate(){var sourceText=$('#sourceTextForTranslate').val();var from=$('#selTranslateFromLang').val();var to=$('#selTranslateToLang').val();var newScript = document.createElement('script');newScript.type = 'text/javascript';
var sourceText = escape(sourceText);var source = 'https:/'+'/www.googleapis.com/language/translate/v2?key=AIzaSyDCrUetckZLVpyh1l-fLloCnVZJU8N2kFY&callback=showGoogleTranslateResult&source='+from+'&target='+to+'&q='+sourceText;newScript.src = source;
document.getElementsByTagName('head')[0].appendChild(newScript);}function showGoogleTranslateResult(data){$('#resultTranslated').show('fast');$('#resultTranslated').val( (data.data.translations[0].translatedText) );}

