function LocalGameResult(n,t,i,r){this.ListID=n;this.CorrectAnswers=t;this.WrongAnswers=i;this.LastUpdated=r;this.TotalQuestions;this.MergeGameResult=function(n){var t;for(answer in this.WrongAnswers)t=n.CorrectAnswers.indexOf(answer),t>-1&&n.CorrectAnswers.splice(index,1);for(answer in this.CorrectAnswers)t=n.WrongAnswers.indexOf(answer),t>-1&&n.WrongAnswers.splice(index,1);Array.prototype.push.apply(n.CorrectAnswers,this.CorrectAnswers);Array.prototype.push.apply(n.WrongAnswers,this.WrongAnswers);n.CorrectAnswers=Utility.getUnique(n.CorrectAnswers);n.WrongAnswers=Utility.getUnique(n.WrongAnswers)};this.GetCorrectAnswerSize=function(){return this.CorrectAnswers.length}}function userIds(n){var t=localStorage[n]==null?[]:localStorage[n].split(","),i=n;this.updateId=function(n){t[n]=n;localStorage[i]=t.toString()};this.deleteID=function(n){delete t[n];localStorage[i]=t.toString()};this.isIdExist=function(n){return t[n]!=undefined&&t[n]!=""};this.clearStorage=function(){localStorage.removeItem(i)}}var GameListType,GameResultsManager,QuickQuizResultsManager,ajaxHelper,popped,initialURL,learn;!function(n){"use strict";var t=function(t,i){this.$element=n(t);this.options=n.extend({},n.fn.typeahead.defaults,i);this.matcher=this.options.matcher||this.matcher;this.sorter=this.options.sorter||this.sorter;this.select=this.options.select||this.select;this.autoSelect=typeof this.options.autoSelect=="boolean"?this.options.autoSelect:!0;this.highlighter=this.options.highlighter||this.highlighter;this.updater=this.options.updater||this.updater;this.source=this.options.source;this.delay=typeof this.options.delay=="number"?this.options.delay:250;this.$menu=n(this.options.menu);this.shown=!1;this.listen();this.showHintOnFocus=typeof this.options.showHintOnFocus=="boolean"?this.options.showHintOnFocus:!1},i;t.prototype={constructor:t,select:function(){var n=this.$menu.find(".active").data("value"),t;(this.autoSelect||n)&&this.$element.val(this.updater(n)).change();t=this;setTimeout(function(){return t.hide()},100)},updater:function(n){var t=n.split("~");return t[0]},setSource:function(n){this.source=n},show:function(){var t=n.extend({},this.$element.position(),{height:this.$element[0].offsetHeight}),i;return i=typeof this.options.scrollHeight=="function"?this.options.scrollHeight.call():this.options.scrollHeight,this.$menu.insertAfter(this.$element).css({top:t.top+t.height+i,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var i,r;if(this.query=typeof t!="undefined"&&t!==null?t:this.$element.val()||"",this.query.length<this.options.minLength)return this.shown?this.hide():this;r=n.proxy(function(){i=n.isFunction(this.source)?this.source(this.query,n.proxy(this.process,this)):this.source;i&&this.process(i)},this);clearTimeout(this.lookupWorker);this.lookupWorker=setTimeout(r,this.delay)},process:function(t){var i=this;return(t=n.grep(t,function(n){return i.matcher(n)}),t=this.sorter(t),!t.length)?this.shown?this.hide():this:this.options.items=="all"?this.render(t).show():this.render(t.slice(0,this.options.items)).show()},matcher:function(n){return~n.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(n){for(var i=[],r=[],u=[],t;t=n.shift();)t.toLowerCase().indexOf(this.query.toLowerCase())?~t.indexOf(this.query)?r.push(t):u.push(t):i.push(t);return i.concat(r,u)},highlighter:function(n){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return n.replace(new RegExp("("+t+")","ig"),function(n,t){return"<strong>"+t+"<\/strong>"})},render:function(t){var i=this;return t=n(t).map(function(t,r){t=n(i.options.item).data("value",r);var u=i.highlighter(r).split("$");return t.find("a").html(u[0]),t.find("a").parent().append(u[1]),t[0]}),this.autoSelect&&t.first().addClass("active"),this.$menu.html(t),this},next:function(){var i=this.$menu.find(".active").removeClass("active"),t=i.next();t.length||(t=n(this.$menu.find("li")[0]));t.addClass("active")},prev:function(){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last());n.addClass("active")},listen:function(){this.$element.on("focus",n.proxy(this.focus,this)).on("blur",n.proxy(this.blur,this)).on("keypress",n.proxy(this.keypress,this)).on("keyup",n.proxy(this.keyup,this));if(this.eventSupported("keydown"))this.$element.on("keydown",n.proxy(this.keydown,this));this.$menu.on("click",n.proxy(this.click,this)).on("mouseenter","li",n.proxy(this.mouseenter,this)).on("mouseleave","li",n.proxy(this.mouseleave,this))},destroy:function(){this.$element.data("typeahead",null);this.$element.off("focus").off("blur").off("keypress").off("keyup");this.eventSupported("keydown")&&this.$element.off("keydown");this.$menu.remove()},eventSupported:function(n){var t=n in this.$element;return t||(this.$element.setAttribute(n,"return;"),t=typeof this.$element[n]=="function"),t},move:function(n){if(this.shown){switch(n.keyCode){case 9:case 13:case 27:n.preventDefault();break;case 38:n.preventDefault();this.prev();break;case 40:n.preventDefault();this.next()}n.stopPropagation()}},keydown:function(t){this.suppressKeyPressRepeat=~n.inArray(t.keyCode,[40,38,9,13,27]);this.shown||t.keyCode!=40?this.move(t):this.lookup("")},keypress:function(n){this.suppressKeyPressRepeat||this.move(n)},keyup:function(n){switch(n.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}n.stopPropagation();n.preventDefault()},focus:function(){this.focused||(this.focused=!0,(this.options.minLength===0&&!this.$element.val()||this.options.showHintOnFocus)&&this.lookup())},blur:function(){this.focused=!1;!this.mousedover&&this.shown&&this.hide()},click:function(n){n.stopPropagation();n.preventDefault();this.select();oSearch.GetTranslation()},mouseenter:function(t){this.mousedover=!0;this.$menu.find(".active").removeClass("active");n(t.currentTarget).addClass("active")},mouseleave:function(){this.mousedover=!1;!this.focused&&this.shown&&this.hide()}};i=n.fn.typeahead;n.fn.typeahead=function(i){var r=arguments;return this.each(function(){var f=n(this),u=f.data("typeahead"),e=typeof i=="object"&&i;u||f.data("typeahead",u=new t(this,e));typeof i=="string"&&(r.length>1?u[i].apply(u,Array.prototype.slice.call(r,1)):u[i]())})};n.fn.typeahead.defaults={source:[],items:8,menu:'<ul id="autocomplete_ul" class="typeahead dropdown-menu"><\/ul>',item:'<li><a href="#"><\/a><\/li>',minLength:1,scrollHeight:0,autoSelect:!0};n.fn.typeahead.Constructor=t;n.fn.typeahead.noConflict=function(){return n.fn.typeahead=i,this};n(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(){var t=n(this);t.data("typeahead")||t.typeahead(t.data())})}(window.jQuery);GameResultsManager={GAME_RESULT_KEY:"GAME_RESULT_KEY",GAME_LAST_PICKED:"GAME_LAST_PICKED",LAST_PICKED_KEY:"LAST_PICKED_KEY",MAX_QUIZ_SIZE:10,GetGameResultByID:function(n){var t=localStorage[GameResultsManager.GAME_RESULT_KEY+n];return t!=null?JSON.parse(localStorage[GameResultsManager.GAME_RESULT_KEY+n]):null},GetFullGamesResult:function(){for(var n="[",i,t=0;t<localStorage.length;t++)i=localStorage.key(t),i.indexOf(GameResultsManager.GAME_RESULT_KEY)==0&&(n+=localStorage.getItem(i)+",");return n.length>1&&(n=n.substring(0,n.lastIndexOf(","))),n+"]"},SaveGameResult:function(n){var t=GameResultsManager.GetGameResultByID(n.ListID);GameResultsManager.isGameExist(n.ListID)?(n.MergeGameResult(t),GameResultsManager.SaveToStorage(t)):GameResultsManager.SaveToStorage(n)},SynchResultFromServer:function(n){var i,t;if(n!=undefined)try{for(typeof n=="string"&&(n=JSON.parse(n)),i=n.length,t=0;t<i;t++)GameResultsManager.SaveToStorage(n[t])}catch(r){console.log(r.message)}},SaveToStorage:function(n){localStorage[GameResultsManager.GAME_RESULT_KEY+n.ListID]=JSON.stringify(n)},isGameExist:function(n){return localStorage[GameResultsManager.GAME_RESULT_KEY+n]!=undefined&&localStorage[GameResultsManager.GAME_RESULT_KEY+n]!=""},setLastPicked:function(n,t){localStorage[GameResultsManager.GAME_LAST_PICKED+n]=t},getLastPicked:function(n){var t=localStorage[GameResultsManager.GAME_LAST_PICKED+n];return t!=null?t:1},GetList:function(n){var r=[],o=localStorage.LastTranslationTeaser!=undefined&&localStorage.LastTranslationTeaser!=null&&GameListType=="lookups"?!0:!1,u,t,i,e,f;if(o){try{for(u=[],u.push(JSON.parse(localStorage.LastTranslationTeaser)),t=n,i=t.length;0!==i;)f=Math.floor(Math.random()*i),i-=1,u[0].EntryPOCO.Entry!=t[i].EntryPOCO.Entry&&(e=t[i],t[i]=t[f],t[f]=e);r=u.concat(t.slice(0,GameResultsManager.MAX_QUIZ_SIZE-1))}catch(s){r=Utility.shuffle(oTotalWordList).slice(0,GameResultsManager.MAX_QUIZ_SIZE)}localStorage.LastTranslationTeaser=null}else r=Utility.shuffle(oTotalWordList).slice(0,GameResultsManager.MAX_QUIZ_SIZE);return r},getQuizQuestion:function(){var r=GameResultsManager.GetGameResultByID(oGame.WordListID),i,n,u,t;if(oGameWordsList=[],r==null||localStorage.LastTranslationTeaser!=undefined&&localStorage.LastTranslationTeaser!=null){oGameWordsList=GameResultsManager.GetList(oTotalWordList);return}if(i=Utility.shuffle(oTotalWordList).slice(),n=oTotalWordList.length-r.CorrectAnswers.length,oTotalWordList.length<=GameResultsManager.MAX_QUIZ_SIZE||n<=0){u=oTotalWordList.length>GameResultsManager.MAX_QUIZ_SIZE?GameResultsManager.MAX_QUIZ_SIZE:oTotalWordList.length;oGameWordsList=oTotalWordList.slice(0,u);return}for(t=0,n=GameResultsManager.MAX_QUIZ_SIZE-n;oGameWordsList.length<GameResultsManager.MAX_QUIZ_SIZE;)n<GameResultsManager.MAX_QUIZ_SIZE&&t<n&&oGameWordsList.push(i[t]),r.CorrectAnswers.indexOf(i[t].EntryPOCO.MelingoId)<0&&oGameWordsList.push(i[t]),t++;$("#TotalItems").val(oGameWordsList.length)}};QuickQuizResultsManager={GAME_RESULT_KEY:"QQ_GAME_RESULT_KEY",GetResultByID:function(n){var t=localStorage[QuickQuizResultsManager.GAME_RESULT_KEY+n];return t!=null?JSON.parse(localStorage[QuickQuizResultsManager.GAME_RESULT_KEY+n]):null},SaveToStorage:function(n,t){localStorage[QuickQuizResultsManager.GAME_RESULT_KEY+t]=n},GetFullGamesResult:function(){for(var r,u,n="[",i,t=0;t<localStorage.length;t++)i=localStorage.key(t),i.indexOf(QuickQuizResultsManager.GAME_RESULT_KEY)==0&&(r=localStorage.getItem(i),u=i.substring(QuickQuizResultsManager.GAME_RESULT_KEY.length),n+=QuickQuizResultsManager.GetJsonGameResult(u,r)+",");return n.length>1&&(n=n.substring(0,n.lastIndexOf(","))),n+"]"},GetJsonGameResult:function(n,t){return'{ "ListID":'+n+', "Score":'+t+"}"},SynchResultFromServer:function(n){var i,t;if(n!=undefined)try{for(typeof n=="string"&&(n=JSON.parse(n)),i=n.length,t=0;t<i;t++)QuickQuizResultsManager.SaveToStorage(n[t].Score,n[t].ListID)}catch(r){console.log(r.message)}}},function(){var c=80,o,t,s,r=!0,i=!1,u=0,e=!1,l=!1,n=[],h=null,f=0,a=document.createElement("audio"),v=document.createElement("audio");window.oQQGameWordsList={};window.oGameWordsList={};window.oTotalWordList={};window.oCurrentEntry={};window.oGameProperties={};window.oGameLocalization={};window.oGame={LoginCheckBeforStart:function(n){n!="True"&&$.cookie("LoginDialogShown")!="True"&&($("#BeforStartGameModal").modal("show"),$.cookie("LoginDialogShown","True",{expires:1,path:"/"}))},setAudio:function(){a.setAttribute("src",$("#correct_answer_sound").val());v.setAttribute("src",$("#incorrect_answer_sound").val())},playActualSound:function(n){n?a.play():v.play()},setGame:function(n){o=n;$("#countdown").html(n);$("#TotalItems").html(oGameWordsList.length);i=!0},InitQQGameList:function(n){oQQGameWordsList=n},InitGameList:function(){GameResultsManager.getQuizQuestion()},InitTotalWordList:function(n){oTotalWordList=n},InitGameLocalization:function(n){oGameLocalization=n},countdown:function(){if(h!=null&&clearTimeout(h),i==!1){if(t=document.getElementById("countdown").innerHTML,t=parseInt(t,10),t==5&&(s=document.getElementById("countdown"),$("#TimerDiv").addClass("TimeOver"),$("#TimerDiv").find("*").addClass("TimeOverColor")),t==0){l?oGame.CheckAnswerQQ(null):oGame.CheckAnswer(null);return}t--;s=document.getElementById("countdown");s.innerHTML=t<10?"0"+t:t;h=setTimeout(oGame.countdown,1e3);oGame.seconds=t}},StartPlayClick:function(){var t,i,n;if(ga("send","pageview"),t=oGameWordsList.length,i=parseInt($("#CurrentGameNum").text()),i==t){oGame.GameOver();return}$("#NextButton").addClass("Hide");n=parseInt($("#CurrentGameNum").text());n++;$("#CurrentGameNum").text(n);$(".GamesCenterBottom_div").fadeOut(500,function(){oGame.StartPlay()})},StartPlay:function(){e=!1;r=!0;oGame.ClearGameTimer();$("#BeginButton").hide();$("#PlayWordspan").addClass("SingleWord");$(".QuestionDiv").addClass("always_english");oGame.CreatePlayList();i=!1;$(".GamesCenterBottom_div").fadeIn(500,function(){oGame.countdown()})},StartPlayQQClick:function(){var t,i,n;if(ga("send","pageview"),t=parseInt($("#PlayWordsListCount").val()),i=parseInt($("#CurrentGameNum").text()),i==t){oGame.GameOverQQ();return}$("#NextButton").addClass("Hide");n=parseInt($("#CurrentGameNum").text());n++;$("#CurrentGameNum").text(n);$(".GamesQQCenterBottom_div").fadeOut(500,function(){oGame.StartPlayQQ()})},StartPlayQQ:function(){l=!0;e=!1;r=!0;$(".shadow_contant").addClass("Hide");oGame.ClearGameTimer();$("#BeginButton").hide();oGame.CreateQQPlayList();i=!1;$(".GamesQQCenterBottom_div").fadeIn(500,function(){oGame.countdown()})},CreateQQPlayList:function(){if($("#AnswerUl").removeClass("Hide"),$("#AnswerUl li").remove(),window.oCurrentEntry=oGame.GetCurrentQQByID(),oCurrentEntry!=undefined&&oCurrentEntry!=null){oCurrentEntry.ChallengeQuizzesPOCO.Question.split(" ").length==1&&$("#QQPlayWordspan").css({"font-size":"36px"});$("#QQPlayWordspan").html(oCurrentEntry.ChallengeQuizzesPOCO.Question.replace("~","_________"));$("#CurrentGameWordID").val(oCurrentEntry.ChallengeQuizzesPOCO.ID);Utility.matchCssToLang(".QuestionQQDiv",oCurrentEntry.ChallengeQuizzesPOCO.Question);var n=[];oGame.AddQQLi(n,oCurrentEntry.ChallengeQuizzesPOCO.Distractor1,!1);oGame.AddQQLi(n,oCurrentEntry.ChallengeQuizzesPOCO.Distractor2,!1);oGame.AddQQLi(n,oCurrentEntry.ChallengeQuizzesPOCO.Answer,!0);oGame.AddQQLi(n,oCurrentEntry.ChallengeQuizzesPOCO.Distractor3,!1);oGame.RandomizeList(n);Utility.matchCssToLang("#AnswerUl",oCurrentEntry.ChallengeQuizzesPOCO.Answer)}},AddQQLi:function(n,t,i){i?n.push("<li id='corA'><span  onclick=\"oStuff.gaLog('QuickQuizzes', 'AnswerClick', oCurrentEntry.ChallengeQuizzesPOCO.ID, oGame.seconds);oGame.CheckAnswerQQ(this);\" class='WordPlayButton'>"+t+"<\/span><img class ='GameAnswerImg Hide' src='"+$("#CorrectAnswerImgURL").val()+"' /><\/li>"):t!=null&&t.trim()!=""&&n.push("<li><span  onclick=\"oStuff.gaLog('QuickQuizzes', 'AnswerClick', oCurrentEntry.ChallengeQuizzesPOCO.ID, oGame.seconds);oGame.CheckAnswerQQ(this);\" class='WordPlayButton'>"+t+"<\/span><img class ='GameAnswerImg Hide' src='"+$("#WrongAnswerImgURL").val()+"' /><\/li>")},CheckAnswerQQ:function(n){if(r){r=!1;i=!0;var t=oGame.GetCurrentQQByID();t!=null&&(t.IsCorrect=!1,$(".shadow_contant").html(t.Answer.replace("[MORE]","")),n!=null&&oCurrentEntry.ChallengeQuizzesPOCO.Answer==$(n).text()?(oGame.playActualSound(!0),$(n).parent().parent().find("li").addClass("Hide"),t.IsCorrect=!0,$(n).parent().removeClass("Hide"),$(n).addClass("bgR"),$(n).parent().find("img").removeClass("Hide"),f=f+10,u++,setTimeout(function(){$(".shadow_contant").removeClass("Hide");$(".shadow_contant").fadeOut(0);$(".shadow_contant").fadeIn(500);$("#NextButton").removeClass("Hide");oGame.FillAnswerQQ()},500)):n==null?($(n).parent().parent().find("li").addClass("Hide"),$(".shadow_contant").removeClass("Hide"),$("#corA").parent().find("li").addClass("Hide"),$("#corA").removeClass("Hide"),$("#corA").find("span").addClass("bgR"),$("#corA").find("img").removeClass("Hide"),$("#NextButton").removeClass("Hide"),t.WrongAswer="Time Up",oGame.FillAnswerQQ()):(oGame.playActualSound(!1),$(n).addClass("bgW"),$(n).parent().find("img").removeClass("Hide"),t.WrongAswer=$(n).text(),setTimeout(function(){$(n).parent().parent().find("li").addClass("Hide");$("#corA").find("span").addClass("bgR");$("#corA").removeClass("Hide");$(n).parent().removeClass("Hide");$("#corA").find("img").removeClass("Hide");setTimeout(function(){$(".shadow_contant").removeClass("Hide");$(".shadow_contant").fadeOut(0);$(".shadow_contant").fadeIn(500);$("#NextButton").removeClass("Hide");oGame.FillAnswerQQ()},500)},500)),$("#PointSpan").text(f))}},FillAnswerQQ:function(){oCurrentEntry.ChallengeQuizzesPOCO.Question.indexOf("~")>=0&&$("#QQPlayWordspan").html(oCurrentEntry.ChallengeQuizzesPOCO.Question.replace("~","<u>"+oCurrentEntry.ChallengeQuizzesPOCO.Answer+"<\/u>"))},GameOverQQ:function(){var f,o,n,s;$(".shadow_contant").addClass("Hide");$(".GamesCenter_div").hide();$(".GamesCenterVocab_div").hide("Hide");$("#GameOverQQDiv").removeClass("Hide");var r=Math.round(u/oQQGameWordsList.length*100),t=parseInt($("#PointSpan").text()),h=oGame.GetActualResultGameTitle(r),c=oGame.GetActualResultGamePointstext().replace("{-}",t),i=QuickQuizResultsManager.GetResultByID(oGame.WordListID);for((i==null||i<t)&&(QuickQuizResultsManager.SaveToStorage(t,oGame.WordListID),i=t),f={Points:t,Percent:r,PointsTitleText:h,PointsText:c},oUI.AddToPlaceHolder($("#GameOverQQDiv"),Handlebars.compile($("#GameResultHeaderDiv").html()),f),o=Utility.isEnglish(oQQGameWordsList[0].ChallengeQuizzesPOCO.Answer),n=0;n<oQQGameWordsList.length;n++)oQQGameWordsList[n].ChallengeQuizzesPOCO.Question=oQQGameWordsList[n].ChallengeQuizzesPOCO.Question.replace("~","_________"),oUI.AddToPlaceHolder($("#GameOverQQDiv"),Handlebars.compile($("#GameResultCardDiv").html()),oQQGameWordsList[n]),oGame.CreatePopover(n,o);Utility.matchCssToLang(".top_trunover",oQQGameWordsList[0].ChallengeQuizzesPOCO.Question);Utility.matchCssToLang(".bottom_trunover",oQQGameWordsList[0].ChallengeQuizzesPOCO.Answer);u=0;e=!0;oSite.IsLogedIn&&(s=QuickQuizResultsManager.GetJsonGameResult(oGame.WordListID,QuickQuizResultsManager.GetResultByID(oGame.WordListID)),oGame.RemoteSaveQuickGameResult("["+s+"]"));oUI.refreshAds()},CreatePopover:function(n,t){t?$("#example"+oQQGameWordsList[n].ChallengeQuizzesPOCO.ID).popover({placement:"left",html:"true",title:"",content:oQQGameWordsList[n].Answer.replace("[MORE]","")}):$("#example"+oQQGameWordsList[n].ChallengeQuizzesPOCO.ID).popover({placement:"right",html:"true",title:"",content:oQQGameWordsList[n].Answer.replace("[MORE]","")}).css("left",$("#example"+oQQGameWordsList[n].ChallengeQuizzesPOCO.ID).offset().left+$("#example"+oQQGameWordsList[n].ChallengeQuizzesPOCO.ID).width()+" !important")},CreatePlayList:function(){if($("#AnswerUl").removeClass("Hide"),$("#AnswerUl li").remove(),window.oCurrentEntry=oGame.GetCurrentEntryByID(),oCurrentEntry!=undefined&&oCurrentEntry!=null){$("#PlayWordspan").text(oCurrentEntry.Entry);$("QuestionSoundImg").removeAttr("onclick");$("QuestionSoundImg").addClass("Hide");oCurrentEntry.PronunciationFile!=null&&oCurrentEntry.PronunciationFile.trim()!=""&&($("#QuestionSoundImg").removeClass("Hide"),$("#QuestionSoundImg").click(function(){oStuff.gaLog("Dictionary","Play sound",oCurrentEntry.Entry);oSound.playSound(this,oCurrentEntry.PronunciationFile.trim(),"")}));$("#CurrentGameWordID").val(oCurrentEntry.MelingoId);var n=[];n.push("<li><span  onclick=\"oStuff.gaLog('VoacbBuilderGame', 'AnswerClick', oCurrentEntry.MelingoId, oGame.seconds);oGame.CheckAnswer(this);\" class='WordPlayButton'>"+oCurrentEntry.Distractor1+"<\/span><img class ='GameAnswerImg Hide' src='"+$("#WrongAnswerImgURL").val()+"' /><\/li>");n.push("<li><span  onclick=\"oStuff.gaLog('VoacbBuilderGame', 'AnswerClick', oCurrentEntry.MelingoId, oGame.seconds);oGame.CheckAnswer(this);\" class='WordPlayButton'>"+oCurrentEntry.Distractor2+"<\/span><img class ='GameAnswerImg Hide' src='"+$("#WrongAnswerImgURL").val()+"' /><\/li>");n.push("<li id='corA'><span  onclick=\"oStuff.gaLog('VoacbBuilderGame', 'AnswerClick', oCurrentEntry.MelingoId, oGame.seconds);oGame.CheckAnswer(this);\" class='WordPlayButton'>"+oCurrentEntry.CorrectAns+"<\/span><img class ='GameAnswerImg Hide' src='"+$("#CorrectAnswerImgURL").val()+"' /><\/li>");n.push("<li><span  onclick=\"oStuff.gaLog('VoacbBuilderGame', 'AnswerClick', oCurrentEntry.MelingoId, oGame.seconds);oGame.CheckAnswer(this);\" class='WordPlayButton'>"+oCurrentEntry.Distractor3+"<\/span><img class ='GameAnswerImg Hide' src='"+$("#WrongAnswerImgURL").val()+"' /><\/li>");oGame.RandomizeList(n);Utility.matchCssToLang("#AnswerUl",oCurrentEntry.CorrectAns)}},RandomizeList:function(n){for(var i,r,t=n.length;t>0;t--)i=Math.floor(Math.random()*t),r=n.splice(i,1),$("#AnswerUl").append(r)},ClearGameTimer:function(){$("#countdown").text(o);$("#TimerDiv").removeClass("TimeOver");$("#TimerDiv").find("*").removeClass("TimeOverColor")},CheckAnswer:function(n){if(r){r=!1;i=!0;var t=oGame.GetCurrentEntryByID(),e=oGameWordsList.length;t!=null&&(t.IsCorrect=!1,n!=null&&oCurrentEntry.CorrectAns==$(n).text()?(oGame.playActualSound(!0),t.IsCorrect=!0,$("#corA").find("img").removeClass("Hide"),$(n).addClass("bgR"),f=f+100/e,u++,setTimeout(oGame.StartPlayClick,500)):n==null?($("#corA").find("img").removeClass("Hide"),$("#corA").find("span").addClass("bgR"),$("#NextButton").removeClass("Hide"),t.WrongAswer="Time Up"):(oGame.playActualSound(!1),$(n).addClass("bgW"),$(n).parent().find("img").removeClass("Hide"),setTimeout(function(){$("#corA").find("span").addClass("bgR");$("#corA").find("img").removeClass("Hide");setTimeout(function(){$("#NextButton").removeClass("Hide")},500)},500),t.WrongAswer=$(n).text()),$("#PointSpan").text(Math.round(f)))}},GetCurrentEntryByID:function(){var n=parseInt($("#CurrentGameNum").text())-1;return oGameWordsList[n]!=undefined?oGameWordsList[n].EntryPOCO:null},GetCurrentQQByID:function(){var n=parseInt($("#CurrentGameNum").text())-1;return oQQGameWordsList[n]!=undefined?oQQGameWordsList[n]:null},GameOver:function(){var n,f,o,r,s;$(".GamesCenter_div").hide();$(".GamesCenterVocab_div").hide("Hide");$("#GameOverDiv").removeClass("Hide");var h=Math.round(100*u/oGameWordsList.length),t=parseInt($("#PointSpan").text()),a=oGame.GetActualResultGameTitle(h),v=oGame.GetActualResultGamePointstext().replace("{-}",t),y=parseInt(oGameLocalization.Vuelta)+1,p=oGameLocalization.LevelName,i=new LocalGameResult(oGame.WordListID,[],[]),l="";for(n=0;n<oGameWordsList.length;n++)l+=oUI.AddToPlaceHolder($("#GameOverDiv"),Handlebars.compile($("#GameResultCardDiv").html()),oGameWordsList[n].EntryPOCO,!0),f=oGameWordsList[n].EntryPOCO.MelingoId,oGameWordsList[n].EntryPOCO.IsCorrect?i.CorrectAnswers.push(f):i.WrongAnswers.push(f);GameResultsManager.SaveGameResult(i);o=Math.round(100*GameResultsManager.GetGameResultByID(oGame.WordListID).CorrectAnswers.length/oTotalWordList.length);r=t==100?oGameLocalization.PerfectPersonalShareDescription:oGameLocalization.PersonalShareDescription;r=encodeURIComponent(r.replace("#",t));s={Points:t,Percent:h,PointsTitleText:a,PointsText:v,UserProgress:o,Level:p,NextRound:y,Description:r};oUI.AddToPlaceHolder($("#GameOverDiv"),Handlebars.compile($("#GameResultHeaderDiv").html()),s);oGame.ShowPopUps(o,c,s);$("#GameOverDiv").append(l);learn.onLoad(!1);u=0;e=!0;oGame.RemoteSaveGameResult(JSON.stringify(i));oUI.refreshAds()},ShowPopUps:function(n,t,i){var r={};n>=t&&oGameLocalization.IsLastRoundInTheLevel==!1&&oGameLocalization.IsUserLists==!1?(oGameProperties=oGame.GetGamePropertiesByKey(oGameLocalization.Level+"_"+oGameLocalization.Vuelta),oGameProperties!=null?oGameProperties.NextRoundPopUpIsShowed||(oGameProperties.NextRoundPopUpIsShowed=!0,localStorage[oGameLocalization.Level+"_"+oGameLocalization.Vuelta]=JSON.stringify(oGameProperties),oGame.ShowNextRoundPopUp(i)):(r.Level=oGameLocalization.Level,r.Round=parseInt(oGameLocalization.Vuelta),r.NextRoundPopUpIsShowed=!0,r.NextLevelPopUpIsShowed=!1,localStorage[oGameLocalization.Level+"_"+oGameLocalization.Vuelta]=JSON.stringify(r),oGame.ShowNextRoundPopUp(i))):n>=t&&oGameLocalization.IsLastRoundInTheLevel&&oGameLocalization.IsUserLists==!1&&(oGameProperties=oGame.GetGamePropertiesByKey(oGameLocalization.Level+"_"+oGameLocalization.Vuelta),oGameProperties!=null?oGameProperties.NextLevelPopUpIsShowed||(oGameProperties.NextLevelPopUpIsShowed=!0,localStorage[oGameLocalization.Level+"_"+oGameLocalization.Vuelta]=JSON.stringify(oGameProperties),oGame.ShowNextLevelPopUp(i)):(r.Level=oGameLocalization.Level,r.Round=parseInt(oGameLocalization.Vuelta),r.NextLevelPopUpIsShowed=!0,r.NextRoundPopUpIsShowed=!1,localStorage[oGameLocalization.Level+"_"+oGameLocalization.Vuelta]=JSON.stringify(r),oGame.ShowNextLevelPopUp(i)))},ShowNextRoundPopUp:function(n){oUI.AddToPlaceHolder($("#BeforGameOverModal"),Handlebars.compile($("#GameOverNextRound").html()),n);$("#BeforGameOverModal").modal("show")},ShowNextLevelPopUp:function(n){oUI.AddToPlaceHolder($("#BeforGameOverModal"),Handlebars.compile($("#GameOverNextLevel").html()),n);$("#BeforGameOverModal").modal("show")},GetGamePropertiesByKey:function(n){var n=localStorage[n];return n!=null?JSON.parse(n):null},RemoteSaveGameResult:function(n){if(oSite.IsLogedIn){var t=oSite.BaseSiteUrl+"/LearnPrivate/SaveGameResult";ajaxHelper.AjaxReqest(n,t,"post",!1,GameResultsManager.SynchResultFromServer)}},RemoteSaveQuickGameResult:function(n){if(oSite.IsLogedIn){var t=oSite.BaseSiteUrl+"/GameResult/SetQuickQuizResult";ajaxHelper.AjaxReqest(n,t,"post",!1,GameResultsManager.SynchResultFromServer)}},RemoteSaveFullResult:function(){ajaxHelper.AjaxReqest(GameResultsManager.GetFullGamesResult(),oSite.BaseSiteUrl+"/LearnPrivate/SaveFullGameResult","post",!1,learn.dummyFunc);ajaxHelper.AjaxReqest(QuickQuizResultsManager.GetFullGamesResult(),oSite.BaseSiteUrl+"/GameResult/SetQuickQuizResult","post",!1,learn.dummyFunc)},GetActualResultGameTitle:function(n){var t=oGameLocalization.ResultGameTitleDict;return n>=0&&n<=20?oGameLocalization.ResultGameTitleDict[0]:n>20&&n<=50?oGameLocalization.ResultGameTitleDict[20]:n>50&&n<=70?oGameLocalization.ResultGameTitleDict[50]:n>70&&n<=90?oGameLocalization.ResultGameTitleDict[70]:n>90&&n<=100?oGameLocalization.ResultGameTitleDict[90]:void 0},GetActualResultGamePointstext:function(){return oGameLocalization.ResultGamePointsText},CreateflashcardView:function(n,t){var i=parseInt($("#CurrentCardNum").text())-1,r,u;$("#ShowCardsDiv").html("");r=JSON.stringify(oTotalWordList[i].ListExampleSentencesFC).replace("{it}","<b>").replace("{/it}","<\/b>");oTotalWordList[i].ListExampleSentencesFC=JSON.parse(r);switch(n){case"en":oUI.AddToPlaceHolder($("#ShowCardsDiv"),Handlebars.compile($("#ShowEnCard").html()),oTotalWordList[i]);break;case"nonen":oUI.AddToPlaceHolder($("#ShowCardsDiv"),Handlebars.compile($("#ShowNonEnCard").html()),oTotalWordList[i]);break;case"full":oUI.AddToPlaceHolder($("#ShowCardsDiv"),Handlebars.compile($("#ShowFullCard").html()),oTotalWordList[i]);t?$("#FullViewImg").addClass("Hide"):($("#FullViewImg").removeClass("Hide"),$("PreviousViewImg").removeAttr("onclick"),$("NextViewImg").removeAttr("onclick"),$("#PreviousViewImg").click(function(){oGame.Previous("",!1)}),$("#NextViewImg").click(function(){oGame.Next("",!1)}));break;case"":u=$("input[name=ViewChoose]:checked","#flashcardTopDiv");switch(u.attr("id")){case"radio1":oGame.CreateflashcardView("en",!1);break;case"radio2":oGame.CreateflashcardView("nonen",!1);break;case"radio3":oGame.CreateflashcardView("full",!0)}}i==oTotalWordList.length-1?$("#NextViewImg").addClass("Hide"):i==0?$("#PreviousViewImg").addClass("Hide"):($("#PreviousViewImg").removeClass("Hide"),$("#NextViewImg").removeClass("Hide"));learn.onLoad(!1)},Previous:function(n,t){var i=parseInt($("#CurrentCardNum").text());i--;$("#CurrentCardNum").text(i);oGame.CreateflashcardView(n,t)},Next:function(n,t){var i=parseInt($("#CurrentCardNum").text());i++;$("#CurrentCardNum").text(i);oGame.CreateflashcardView(n,t)},TabClick:function(n){switch(n){case"multichoice":window.history.pushState("","",oGameLocalization.CurrentURL+"/multichoice");ga("send","pageview",oGameLocalization.CurrentURL+"/multichoice");e?($("#GameOverDiv").removeClass("Hide"),$(".GamesCenter_div").addClass("Hide"),$(".GamesCenterVocab_div").addClass("Hide")):($("#GameOverDiv").addClass("Hide"),$(".GamesCenter_div").removeClass("Hide"),$(".GamesCenterVocab_div").removeClass("Hide"));$("#listTab").removeClass("SelectedTab");$("#flashcardTab").removeClass("SelectedTab");$("#flashcardDiv").addClass("Hide");$("#listDiv").addClass("Hide");$("#multichoiceTab").addClass("SelectedTab");i&&r&&t<o&&(i=!1);oGameLocalization.NeedChangeTitleOnTabClick&&$("#CardTitleLast").text(oGameLocalization.TabNameList[0]);oGame.countdown();break;case"flashcard":window.history.pushState("","",oGameLocalization.CurrentURL+"/flashcard");ga("send","pageview",oGameLocalization.CurrentURL+"/flashcard");$("#multichoiceTab").removeClass("SelectedTab");$("#listTab").removeClass("SelectedTab");$("#flashcardDiv").removeClass("Hide");$("#GameOverDiv").addClass("Hide");$(".GamesCenter_div").addClass("Hide");$(".GamesCenterVocab_div").addClass("Hide");$(".GameOverDiv").addClass("Hide");$("#listDiv").addClass("Hide");$("#flashcardTab").addClass("SelectedTab");i=!0;oGame.CreateflashcardView("",!0);var u=$("input[name=ViewChoose]:checked","#flashcardTopDiv").attr("id")=="radio3";u?$("#FullViewImg").addClass("Hide"):$("#FullViewImg").removeClass("Hide");oGameLocalization.NeedChangeTitleOnTabClick&&$("#CardTitleLast").text(oGameLocalization.TabNameList[1]);break;case"list":window.history.pushState("","",oGameLocalization.CurrentURL+"/list");ga("send","pageview",oGameLocalization.CurrentURL+"/list");$("#multichoiceTab").removeClass("SelectedTab");$("#flashcardTab").removeClass("SelectedTab");$("#listDiv").removeClass("Hide");$("#GameOverDiv").addClass("Hide");$(".GamesCenter_div").addClass("Hide");$(".GamesCenterVocab_div").addClass("Hide");$(".GameOverDiv").addClass("Hide");$("#flashcardDiv").addClass("Hide");$("#listTab").addClass("SelectedTab");i=!0;oGameLocalization.NeedChangeTitleOnTabClick&&$("#CardTitleLast").text(oGameLocalization.TabNameList[2])}$(".PersonalCard_imgTopWhite").each(function(){learn.MarkStar(!1,this)});oUI.refreshAds()},setMetaItem:function(){$.each($(".meta_item"),function(){var i=$(this),t=i.data("list-level"),r=i.data("list-order");n[t]==null&&(n[t]={},n[t].items=[],n[t].min=1,n[t].size=0);n[t].items[r]=i;n[t].size++});oGame.onResize();$(window).on("resize",function(){oGame.onResize()})},onResize:function(){for(var t in n)oGame.shiftMetaList(t,0)},setMetaItemProgress:function(t){var f,a,i,o,h,l;GameResultsManager.SynchResultFromServer(t);for(f in n)for(a=GameResultsManager.getLastPicked(f),i=1;i<=n[f].size;i++){var e=n[f].items[i],r=e.data("list-id"),v=e.data("list-size"),y=GameResultsManager.GetGameResultByID(r),p=i==1||n[f].items[i-1].data("list-percentage")>=c||oSite.DefaultCulture=="ar",u,s=0;y!=null?(s=y.CorrectAnswers.length,u=100*s/v):u=0;n[f].items[i].data("list-percentage",u);o=$("#progressbar_"+r);o.attr("aria-valuenow",u);o.css("width",u+"%");h=$("#progressText_"+r);h.html(s+"/"+v);l=$("#lock_"+r);p&&l.attr("src",l.attr("src").replace("locked","unlocked"));var b=$("#lockedText_"+r),k=$("#listIcon_"+r),d=$("#startText_"+r),w=e.children();p?(b.css("display","none"),a==i&&k.css("display","block")):(e.attr("href",null),e.attr("onclick",""),o.parent().css("display","none"),h.css("display","none"),w.children().not(".locked_text").css("color","#A9A9A9"),w.css("background-color","rgba(236, 233, 230, 0.43)"),e.removeClass("enlargeHover"));u>=80&&o.css("background-color","LightGreen");u>=100&&o.css("background-color","DarkGreen")}},shiftMetaList:function(t,i){var r=4,e,h,f,o;window.innerWidth<1200&&(r=3);window.innerWidth<768&&(r=1);n[t].min+=i;var u=n[t].min,c=u>1,l=n[t].size-u>=r,s=$("#metaArrowPrev_"+t);c?s.css("display","block"):s.css("display","none");e=$("#metaArrowNext_"+t);l?e.css("display","block"):e.css("display","none");for(h in n[t].items)f=n[t].items[h],o=f.data("list-order"),o>u+r-1||o<u?f.css("display","none"):f.css("display","block")},setMetaQuizHighscore:function(n,t){QuickQuizResultsManager.SynchResultFromServer(t);$.each($(".meta_highscore"),function(){var t=$(this),i=QuickQuizResultsManager.GetResultByID(t.data("list-id"));if(i==null){t.addClass("no_score");return}t.html(n+" "+i)})}}}();var didScroll,lastScrollTop=0,delta=5,navbarHeight=50,audioElement=document.createElement("audio"),MobileSize=768;(function(){window.oSite={};window.oAdvertisement={};window.oAdvLearn={};window.oAdvResult={};window.oSound={playSound:function(n,t){audioElement.setAttribute("src",t);var i=(new Date).getTime(),r=function(){oStuff.gaLog("Measurement","Sound clicked",t,(new Date).getTime()-i);i=0;audioElement.removeEventListener("canplaythrough",r)};audioElement.addEventListener("canplaythrough",r);audioElement.play()}};window.oStuff={gaLog:function(n,t,i,r){try{if(oSite.GoolgeAnalyticsEnabled){if(!n||!t)return;i=i||"";ga("set","dimension1",oSite.CurrentCulture);typeof r=="number"?ga("send","event",n,t,i,r):ga("send","event",n,t,i)}}catch(u){}},htmlDecode:function(n){return $("<div/>").html(n).text()},runMethod:function(n){n()},evalMethod:function(method){eval(method)},urlencode:function(n){return n=(n+"").toString(),encodeURIComponent(n).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/ /g,"%20").replace(/\./g,"%2E")},getParameterByName:function(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+n+"=([^&#]*)"),t=i.exec(location.search);return t===null?"":decodeURIComponent(t[1].replace(/\+/g," "))},IsEmail:function(n){return/^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(n)?!0:!1}};window.oUI={InnitSite:function(){oUI.SetSearchBoxID();oSite.GoolgeAnalyticsEnabled&&$("head").append(oStuff.htmlDecode(oSite.GoogleAnalyticsScript));oSite.AdvertisementJsonStr!=""&&(oAdvertisement=JSON.parse(oStuff.htmlDecode(oSite.AdvertisementJsonStr)));oSite.IsHomePage?oRender.RenderAdvertisementsHome():(oRender.RenderAdvertisementsResultPage(),oRender.RenderAdvertisementsResult(),oUI.refreshAds());oUI.InitWaterMarkText();oRender.RenderAutoComplete();oUI.AddMaxLimit();oLogin.FBinit();oRender.RenderSearchBox();var n;$(window).on("resize",function(){clearTimeout(n);n=setTimeout(function(){oUI.SetSearchBoxID();oUI.InitWaterMarkText();oRender.RenderSearchBox();oRender.RenderAutoComplete()},100)});oUI.InitHideHeader();oUI.InitMobileMenu()},InitMobileMenu:function(){var n=$("[data-toggle=collapse-side]"),t=n.attr("data-target"),i=n.attr("data-target-2");n.click(function(){$(t).toggleClass("in");$(i).toggleClass("out")})},InitHideHeader:function(){function n(){var n=$(this).scrollTop();n>lastScrollTop&&n>navbarHeight?$(document.body).addClass("body_scrolled_down"):n==0&&$(document.body).removeClass("body_scrolled_down");lastScrollTop=n}$(window).scroll(function(){didScroll=!0});setInterval(function(){didScroll&&(n(),didScroll=!1)},250)},InitoAdvLearn:function(n){oAdvLearn=JSON.parse(oStuff.htmlDecode(n))},InitAdvertisement:function(n){oAdvertisement=JSON.parse(oStuff.htmlDecode(n))},InitLocalization:function(n){oLocalization=JSON.parse(oStuff.htmlDecode(n))},InitoSite:function(n){oSite=n},ShowMore:function(n){var t=$(n).parent();t.find('[name="backLink"]').show();t.find('[name="hidden"]').show();$(n).hide()},Back:function(n){var t=$(n).parent();t.find('[name="hidden"]').hide();t.find('[name="showMoreLink"]').show();$(n).hide()},InitWaterMarkText:function(){$("#searchField").focus(function(){oUI.HideWaterMark(!1)});$("#searchField").keypress(function(){oUI.HideWaterMark(!0)});$("#searchDesc").focus(function(){oUI.HideWaterMark(!0);$("#searchField").select()});$("#searchField").blur(function(){oUI.ShowWaterMark()});oSite.CurrentQuery!=""&&($("#searchField").val(oSite.CurrentQuery),oUI.HideWaterMark(!0))},ShowWaterMark:function(){$("#searchField").val()==""&&($("#searchField").hide(),$("#searchDesc").show())},HideWaterMark:function(n){n&&n!=undefined?($("#searchDesc").hide(),$("#searchField").show()):$("#searchField").val()!=""&&$("#searchDesc").hide()},GoTo:function(n,t,i){oStuff.gaLog(n,t,i);setTimeout(function(){window.location=i},1e3)},GoToQuizTeaser:function(n,t,i){oStuff.gaLog(t,"QuizTeaser",i);setTimeout(function(){window.location=n},1e3)},GoToTranslationTeaser:function(n,t,i){oStuff.gaLog(t,"MyTranslationsTeaserClick",i);setTimeout(function(){window.location=n},1e3)},AlphabetPagerGoTo:function(n){if($("#AlphabetPager").val()!=""){var t=$("#AlphabetPager").val();setTimeout(function(){window.location=n+t},1e3)}},CheckInputKey:function(n){if(n.keyCode=="13")return setTimeout(function(){oSearch.GetTranslation();document.activeElement.blur()},300),$("#autocomplete_ul").hide(),oSite.IsOccursAjax=!1,!1;if($("#searchField").val().length>=oSite.maxCharacterCountInput)return!1;oSite.IsOccursAjax=!1},changeSearchFieldDir:function(){var n,t;if(oSite.SearchDetectDirection&&(n=$("#searchField"),t=null,t=window.innerWidth>MobileSize?$("#serachbox_input_content"):$(".input_areaM"),n.length!=0&&n.val()!="")){var i=/[a-zA-Z]/,r=n.val(),u=r.match(i)?"direction_en":"direction_ar",f=r.match(i)?"font_en":"font_ar";n.removeClass("direction_en").removeClass("direction_ar").addClass(u);n.removeClass("font_en").removeClass("font_ar").addClass(f);r.match(i)?t.removeClass("input_area_ar"):t.addClass("input_area_ar")}},GetAutoCompleteLngImage:function(n){switch(n){case"L1":return oSite.AutoCompleteImageNameL1;case"L2":return oSite.AutoCompleteImageNameL2}},forgotPassword:function(){ajaxHelper.forgotPassword()},ContactUs:function(){ajaxHelper.ContactUs()},ChangePassword:function(){ajaxHelper.ChangePassword()},FormatQuery:function(n){return n.replace(/[�~!@$%^&#*()_|+\=?;:,<>\{\}\[\]\\\/]/gi,"")},AddMaxLimit:function(){var n=""+oSite.maxCharacterCountInput;$("#searchField").attr("maxLength",n);$("#searchDesc").attr("maxLength",n)},DictionaryRender:function(n){$("#renderBody").empty();$("#renderBody").html(n);$("#autocomplete_ul").hide();oSite.IsOccursAjax=!0;oUI.changeSearchFieldDir();oSite.IsHomePage=!1;$("#actualTitle_hdn").val()!=""&&(document.title=oStuff.htmlDecode($("#actualTitle_hdn").val()));oSite.ShowResultSearchBox=!0;oRender.RenderSearchBox();oRender.RenderAdvertisementsSide()},SignInHome:function(){$("body").removeClass("modal-open");var n=oSite.CurrentSiteURL+"users/SignIn";ajaxHelper.AjaxReqest("",n,"post")},LoginForm:function(n){n=typeof n!="undefined"?n:!1;ajaxHelper.LoginForm(n)},LoginFormHome:function(n){n=typeof n!="undefined"?n:!1;ajaxHelper.LoginForm(n,!0)},RegisterUser:function(n){n=typeof n!="undefined"?n:!1;ajaxHelper.RegisterUser(n)},RegisterUserHome:function(n){n=typeof n!="undefined"?n:!1;ajaxHelper.RegisterUser(n,!0)},OnPostLogin:function(n,t){if(oGame.RemoteSaveFullResult(),n.indexOf("window.location")>-1){setTimeout(function(){window.location=val},500);return}if(t){oRender.RegistrationFormHomeRender(n);return}$("#renderBody").empty();$("#renderBody").html(n);return},Logout:function(){var n=oSite.CurrentSiteURL+"users/LogOut";ajaxHelper.AjaxReqest("",n,"post",!1,!0,!0,!1);localStorage.clear()},RemoveScriptFormHeader:function(n){var i=document.getElementsByTagName("head")[0],t=document.getElementById(n);t&&i.removeChild(t)},CheckIsAdUnitSupprres:function(n,t){var r=!0,u,i;if(window.screen.width>=1216)return r;for(u=t.split(","),i=0;i<u.length;i++)if(n==u[i]){r=!1;break}return r},ExistAdvertisementResultPageScript:function(n){var t=document.getElementById(n);return t?!0:!1},refreshAds:function(){try{googletag.pubads().refresh()}catch(n){}},readCookie:function(n){for(var r=n+"=",u=document.cookie.split(";"),t,i=0;i<u.length;i++){for(t=u[i];t.charAt(0)==" ";)t=t.substring(1,t.length);if(t.indexOf(r)==0)return t.substring(r.length,t.length)}return null},MobileScreen:function(){var n=$("#SearchBoxContent"),u=$("#SearchMobile"),i=$("#SearchBoxDiv"),r=$("#searchField"),t=$("#topContainer"),f=$("#searchDesc");$.scrollLock(!1);f.val(oSite.SearchBoxMobileText);t.removeClass("topContainer").removeClass("topContainerOpenMenuMobile");oSite.IsHomePage?(t.removeClass("topContainerMobileResult"),t.hasClass("topContainerMobile")||t.addClass("topContainerMobile"),n.hasClass("SearchBoxContent")||n.addClass("SearchBoxContent")):(n.removeClass("SearchBoxContent"),u.removeClass("Hide"),i.removeClass("SearchBox"),r.removeClass("searchField"),t.removeClass("topContainerMobile"),n.hasClass("input-group")||n.addClass("input-group"),n.hasClass("custom-search-form")||n.addClass("custom-search-form"),i.hasClass("SearchBoxMobile")||i.addClass("SearchBoxMobile"),r.hasClass("searchFieldMobile")||r.addClass("searchFieldMobile"),t.hasClass("topContainerMobileResult")||t.addClass("topContainerMobileResult"))},FullScreen:function(){var u=$("#SearchBoxContent"),r=$("#SearchMobile"),n=$("#SearchBoxDiv"),t=$("#searchField"),i=$("#topContainer"),f=$("#searchDesc");f.val(oSite.SearchBoxDesktopText);u.removeClass("input-group").removeClass("custom-search-form").removeClass("SearchBoxContent");n.removeClass("SearchBoxMobile");t.removeClass("searchFieldMobile");i.removeClass("topContainerMobile").removeClass("topContainerMobileResult").removeClass("topContainerOpenMenuMobile");r.hasClass("Hide")||r.addClass("Hide");n.hasClass("SearchBox")||n.addClass("SearchBox");t.hasClass("searchField")||t.addClass("searchField");i.hasClass("topContainer")||i.addClass("topContainer")},MobileMenuButtonClick:function(){var n=$("#menu_mobile_div").hasClass("in")?!0:!1;n?$.scrollLock(!0):$.scrollLock(!1)},AddToPlaceHolder:function(n,t,i,r){if(r)return t(i);n.append(t(i))},SendMailRequest:function(){var n=$("#SendEmailInput").val(),t;n!=""&&(oStuff.IsEmail(n)?(t=oSite.CurrentSiteURL+"users/RegisterNewsletter",$.ajax({type:"POST",async:!0,url:t,data:n,cache:!1,success:function(){$(".wordoftheday_newsletter_btn").hide();$(".wordoftheday_newsletter_error").hide();$(".wordoftheday_newsletter_aswer").show()},error:function(){}})):$(".wordoftheday_newsletter_error").show())},SetSearchBoxID:function(){var n=$('[name="searchFieldM"]').attr("id"),i=$('[name="searchDescM"]').attr("id"),t=$('[name="searchField"]').attr("id"),r=$('[name="searchDesc"]').attr("id");window.innerWidth<=MobileSize?n!="searchField"&&($("#"+t).attr("id","searchField"+window.screen.width),$("#"+r).attr("id","searchDesc"+window.screen.width),$("#"+n).attr("id","searchField"),$("#"+i).attr("id","searchDesc")):t!="searchField"&&($("#"+t).attr("id","searchField"),$("#"+r).attr("id","searchDesc"),$("#"+n).attr("id","searchField"+window.screen.width),$("#"+i).attr("id","searchDesc"+window.screen.width));window.innerWidth<=750?$(".topContainer").height("93px"):$(".topContainer").height("210px")},SetCurrentUserName:function(){var n=localStorage.UserName;n!=""&&$(".navbar_UserName").html(n)},PayPalSendForm:function(n){$("#"+n).submit()},hideAllPopovers:function(){$(".popover").each(function(){$(this).popover("hide")})}};window.oRender={RenderSearchBox:function(){oSite.ShowResultSearchBox&&window.innerWidth>MobileSize?($("#mwArea").hide(),$(".topContainer").height("170px")):($("#mwArea").show(),window.innerWidth<=750?$(".topContainer").height("93px"):$(".topContainer").height("210px"))},RenderAutoComplete:function(){if(oSite.DefaultCulture=="ar"){if($.fn.typeahead!="undefined"){var n=$.fn.typeahead.Constructor.prototype.show;$.fn.typeahead.Constructor.prototype.show=function(){typeof this.options.onshow=="function"&&this.options.onshow();var t=this.$element.offset();this.$menu.css({left:$(window).width()-t.right-this.$element.outerWidth(),right:"auto"});n.apply(this,[])}}window.jQuery;$("#searchField").typeahead({autoSelect:!1,items:"all",source:function(n,t){return $.ajax({url:oSite.AutoCompleteServicePath+n,type:"GET",data:{},contentType:"application/json; charset=utf-8",success:function(n){var i=typeof n.Results=="undefined"||n.Results.length==0?n.ResultsL2:n.Results;if(!oSite.IsOccursAjax)return typeof i=="undefined"?!1:t(i)},error:function(){}})}})}else $("#searchField").typeahead({autoSelect:!1,items:"all",source:function(n,t){return $.ajax({url:oSite.AutoCompleteServicePath+n,type:"GET",data:{},contentType:"application/json; charset=utf-8",dataType:"jsonp",success:function(n){var r=typeof n.Results=="undefined"?n.ResultsL2:n.Results,i;if(typeof n.Results!="undefined")for(i in n.Results)n.Results[i]+="~L1";if(typeof n.ResultsL2!="undefined")for(i in n.ResultsL2)n.ResultsL2[i]+="~L2",typeof n.Results!="undefined"&&r.push(n.ResultsL2[i]);if(!oSite.IsOccursAjax)return typeof r=="undefined"?!1:t(r)}})},highlighter:function(n){var t=n.split("~");return t[0]+"$<img src='"+oSite.CurrentImagePath+oUI.GetAutoCompleteLngImage(t[1])+"' class='autocomplete_image'  alt='' >"}})},RegistrationFormHomeRender:function(n){$("#LoginHomeDiv").empty();$("#LoginHomeDiv").html(n)},RenderAdvertisementsSide:function(){var n=oSite.CurrentSiteURL+"users/RenderAdvertisement";ajaxHelper.AjaxReqest("",n,"get",!0,oRender.RenderAdvertisementResponse)},RenderAdvertisementResponse:function(n){$("#Advertisement_div").empty();$("#Advertisement_div").html(n);$("#autocomplete_ul").hide();oRender.RenderAdvertisementsResultPage();oRender.RenderAdvertisementsResult();oUI.refreshAds()},RenderAdvertisementsHome:function(){var u,i,r,t,n;if(oUI.RemoveScriptFormHeader("AdvertisementScript"),u=document.getElementsByTagName("head")[0],i=document.createElement("script"),i.id="AdvertisementScript",i.type="text/javascript",r=!1,oAdvertisement!=null&&oAdvertisement!=""){for(t="googletag.cmd.push(function() {",n=0;n<oAdvertisement.length;n++)oAdvertisement[n].IsResultPage||oSite.CurrentCulture!=oAdvertisement[n].Lng||oUI.CheckIsAdUnitSupprres(oAdvertisement[n].ID,"TopRightRadvertisement,MiddleRightRadvertisement,BottomRightRadvertisement")&&(oAdvertisement[n].ID=="Topadvertisement"?window.screen.width<1216&&(r=!0,t=t+" var slot"+n+"="+oAdvertisement[n].Header+".addService(googletag.pubads());"):(r=!0,t=t+" var slot"+n+"="+oAdvertisement[n].Header+".addService(googletag.pubads());"));for(t=t+"googletag.pubads().enableSingleRequest();googletag.pubads().enableAsyncRendering(); googletag.enableServices(); });",i.innerHTML=t,r&&u.appendChild(i),n=0;n<oAdvertisement.length;n++)oAdvertisement[n].IsResultPage||oSite.CurrentCulture!=oAdvertisement[n].Lng||oUI.CheckIsAdUnitSupprres(oAdvertisement[n].ID,"TopRightRadvertisement,MiddleRightRadvertisement,BottomRightRadvertisement")&&(oAdvertisement[n].ID=="Topadvertisement"?window.screen.width<1216&&($("#"+oAdvertisement[n].ID).empty(),$("#"+oAdvertisement[n].ID).html(oAdvertisement[n].Body)):($("#"+oAdvertisement[n].ID).empty(),$("#"+oAdvertisement[n].ID).html(oAdvertisement[n].Body)))}},RenderAdvertisementsResultPage:function(){var u,i,r,t,n;if(!oUI.ExistAdvertisementResultPageScript("AdvertisementScript")&&(oUI.RemoveScriptFormHeader("AdvertisementScript"),u=document.getElementsByTagName("head")[0],i=document.createElement("script"),i.id="AdvertisementScript",i.type="text/javascript",r=!1,oAdvertisement!=null&&oAdvertisement!="")){for(t="googletag.cmd.push(function() {",n=0;n<oAdvertisement.length;n++)oSite.CurrentCulture==oAdvertisement[n].Lng&&oUI.CheckIsAdUnitSupprres(oAdvertisement[n].ID,"TopRightRadvertisement,MiddleRightRadvertisement,BottomRightRadvertisement")&&(oAdvertisement[n].ID=="Topadvertisement"?window.screen.width<1216&&(t=t+" var slot"+n+"="+oAdvertisement[n].Header+".addService(googletag.pubads());",r=!0):(r=!0,t=t+" var slot"+n+"="+oAdvertisement[n].Header+".addService(googletag.pubads());"));t=t+"googletag.pubads().enableSingleRequest();googletag.pubads().enableAsyncRendering(); googletag.enableServices(); });";i.innerHTML=t;r&&u.appendChild(i)}for(n=0;n<oAdvertisement.length;n++)oSite.CurrentCulture==oAdvertisement[n].Lng&&oUI.CheckIsAdUnitSupprres(oAdvertisement[n].ID,"TopRightRadvertisement,MiddleRightRadvertisement,BottomRightRadvertisement")&&(oAdvertisement[n].ID=="Topadvertisement"?window.screen.width<1216&&($("#"+oAdvertisement[n].ID).empty(),$("#"+oAdvertisement[n].ID).html(oAdvertisement[n].Body)):($("#"+oAdvertisement[n].ID).empty(),$("#"+oAdvertisement[n].ID).html(oAdvertisement[n].Body)))},RenderAdvertisementsResult:function(){var u,i,r,t,n;if(!oUI.ExistAdvertisementResultPageScript("AdvertisementResultScript")&&(oUI.RemoveScriptFormHeader("AdvertisementResultScript"),u=document.getElementsByTagName("head")[0],i=document.createElement("script"),i.id="AdvertisementResultScript",i.type="text/javascript",r=!1,oAdvResult!=null&&oAdvResult!="")){for(t="googletag.cmd.push(function() {",n=0;n<oAdvResult.length;n++)oSite.CurrentCulture==oAdvResult[n].Lng&&(r=!0,t=t+" var slot"+n+"="+oAdvResult[n].Header+".addService(googletag.pubads());");t=t+"googletag.pubads().enableSingleRequest();googletag.pubads().enableAsyncRendering(); googletag.enableServices(); });";i.innerHTML=t;r&&u.appendChild(i)}for(n=0;n<oAdvResult.length;n++)oSite.CurrentCulture==oAdvResult[n].Lng&&($("#"+oAdvResult[n].ID).empty(),$("#"+oAdvResult[n].ID).html(oAdvResult[n].Body))},RenderAdvLearn:function(n){var f,r,u,i,t;if($("#Advertisement_"+n).html().trim()==""&&AdvLearnCounter<=MaxAdvLearnCounter&&oAdvLearn!=null&&oAdvLearn!=""){if(oUI.RemoveScriptFormHeader("AdvLearnScript_"+n),f=document.getElementsByTagName("head")[0],r=document.createElement("script"),r.id="AdvLearnScript_"+n,r.type="text/javascript",u=0,oAdvLearn!=null&&oAdvLearn!=""){for(i="googletag.cmd.push(function() {",t=0;t<oAdvLearn.length;t++)if(!oAdvLearn[t].IsShown){oAdvLearn[t].ID="Advertisement_"+n+"'";u=t;i=i+" var slot0"+t+"="+oAdvLearn[t].Header+".addService(googletag.pubads());";break}i=i+"googletag.pubads().enableSingleRequest();googletag.pubads().enableAsyncRendering(); googletag.enableServices(); });";r.innerHTML=i;f.appendChild(r);$("#Advertisement_"+n).html(oAdvLearn[u].Body);oAdvLearn[u].IsShown=!0}AdvLearnCounter=AdvLearnCounter+1}else $("#Advertisement_"+n).html().trim()!=""&&$("#Advertisement_"+n).show()}};window.oSearch={GetTranslation:function(){var n,t;if(oUI.hideAllPopovers(),n=$("#searchField").val().trim(),n=oStuff.urlencode(oUI.FormatQuery(n)),t=oSite.CurrentSiteURL+n,n!=""&&window.location!=t)try{oStuff.gaLog("Dictionary","TransltionClick",n);oSite.PushState?(window.history.pushState("","",t),ajaxHelper.dictionaySearch(n),ga("send","pageview",t)):window.location=t}catch(i){window.location=t}}}})();$(document).ready(function(){oUI.InnitSite()});ajaxHelper={dictionaySearch:function(n){var n=oSite.DefaultCulture=="ar"?n:"?Query="+n,t=oSite.CurrentSiteURL+"ResultAjax/"+n;ajaxHelper.AjaxReqest("",t,"get",!0,oUI.DictionaryRender)},forgotPassword:function(){var n=oSite.CurrentSiteURL+"/user/forgotpassword",t=$("#ForgotPasswordCardEmail").val();ajaxHelper.AjaxReqest("email="+t,n,"post")},ContactUs:function(){var u=oSite.CurrentSiteURL+"info/contactus",n=$.cookie("Query"),i=" ",t,r;if(n!=null&&n!="")for(t=0;t<n.Queries.length;t++)i=i+n.Queries[t].HtmlDisplay+",";r={about:$("#textarea_aboutBritanica").val(),added:$("#textarea_addedToBritanica").val(),email:$("#input_email").val(),lastTranslations:i};ajaxHelper.AjaxReqest("Data="+JSON.stringify(r),u,"post")},ChangePassword:function(){var n=oSite.CurrentSiteURL+"user/changepassword",t={OldPass:$("#ChangePasswordCardOLDPass").val(),NewPass:$("#ChangePasswordCardPass").val(),NewRePass:$("#ChangePasswordCardRePass").val()};ajaxHelper.AjaxReqest("Data="+JSON.stringify(t),n,"post")},LoginForm:function(n,t){var r,i,u;t=typeof t!="undefined"?t:!1;wordID=typeof wordID!="undefined"&&wordID!=""?wordID:0;r=oSite.CurrentSiteURL+"users/"+(t?"LoginHome":"Login");i="";n?(localStorage.UserName=t?$("#SiteLoginEmail").val():$("#SiteLoginCardEmail").val(),u={UserPass:t?$("#SiteLoginPassword").val():$("#SiteLoginCardPassword").val(),Mail:t?$("#SiteLoginEmail").val():$("#SiteLoginCardEmail").val(),mID:wordID},i="UserDetails="+JSON.stringify(u),ajaxHelper.AjaxReqest(i,r,"post",!1,oUI.OnPostLogin,!1,t)):t?ajaxHelper.AjaxReqest(i,r,"post",!1,oUI.OnPostLogin,!1,t):ajaxHelper.AjaxReqest(i,r,"post")},RegisterUser:function(n,t){var r,i,u;t=typeof t!="undefined"?t:!1;wordID=typeof wordID!="undefined"&&wordID!=""?wordID:0;r=oSite.CurrentSiteURL+"users/"+(t?"RegisterUserHome":"RegisterUser");i="";n?(localStorage.UserName=t?$("#NewUserEmail").val():$("#SiteNewUserCardHomeEmail").val(),u={UserEmail:t?$("#NewUserEmail").val():$("#SiteNewUserCardHomeEmail").val(),UserPass:t?$("#NewUserPass").val():$("#SiteNewUserCardHomePass").val(),UserRePass:t?$("#NewUserRePass").val():$("#SiteNewUserCardHomeRePass").val(),mID:wordID,NewsletterRegistration:$('input[id="newslater_chkb"]:checked').length>0?!0:!1},i="UserDetails="+JSON.stringify(u),ajaxHelper.AjaxReqest(i,r,"post",!1,oUI.OnPostLogin,!1,t)):t?ajaxHelper.AjaxReqest(i,r,"post",!1,oUI.OnPostLogin,!1,t):ajaxHelper.AjaxReqest(i,r,"post")},UpdateWord:function(n,t,i){var r=oSite.CurrentSiteURL+"LearnPrivate/UpdateWord/"+n+"/"+t;ajaxHelper.AjaxReqest("",r,"get",!0,i,!0)},AjaxReqest:function(n,t,i,r,u,f,e){i||(i="post");$.ajax({type:i,async:!0,url:t,data:n,cache:!1,success:function(n){if(n){if(u){f?oStuff.evalMethod(n):u(n,e);return}$("#renderBody").empty();$("#renderBody").html(n);return}},error:function(){r&&r()}})}};$.scrollLock=function(){"use strict";function u(){var n=i.attr("style"),t=[],u={};n&&(t=n.split(/;\s/),$.each(t,function(n){if(n){var t=n.split(/\s:\s/);t.length<2||(u[t[0]]=t[1])}}),$.extend(r,u))}function f(){var r={};n||(t={scrollLeft:$(window).scrollLeft(),scrollTop:$(window).scrollTop()},u(),$.extend(r,o,{left:-t.scrollLeft+"px",top:-t.scrollTop+"px"}),i.css(r),$(window).scrollLeft(0).scrollTop(0),n=!0)}function e(){n&&(i.attr("style",$("<x>").css(r).attr("style")||""),$(window).scrollLeft(t.scrollLeft).scrollTop(t.scrollTop),n=!1)}var i=$("html"),n=!1,t={scrollLeft:$(window).scrollLeft(),scrollTop:$(window).scrollTop()},r={},o={"overflow-y":"scroll",position:"fixed",width:"100%"};return u(),function(t){arguments.length?t?f():e():n?e():f()}}();popped="state"in window.history&&window.history.state!==null;initialURL=location.href;$(window).bind("popstate",function(){var n=!popped&&location.href==initialURL;(popped=!0,n)||oSite.PushState&&(window.location=window.location.pathname)});var Utility={shuffle:function(n,t){for(var f,u,i=t?n.slice():n,r=i.length;0!==r;)u=Math.floor(Math.random()*r),r-=1,f=i[r],i[r]=i[u],i[u]=f;return n},getUnique:function(n){for(var i={},r=[],t=0,u=n.length;t<u;++t)i.hasOwnProperty(n[t])||(r.push(n[t]),i[n[t]]=1);return r},isEnglish:function(n){if(oSite.DefaultCulture=="es")return!0;var t=oSite.isNonEnglishRegex;return n.match(t)?!1:!0},matchCssToLang:function(n,t){$(n).removeClass("always_english");$(n).removeClass("always_non_english");$(n).addClass(Utility.isEnglish(t)?"always_english":"always_non_english")}},AdvLearnCounter=0,MaxAdvLearnCounter=4,personalIds=new userIds("personalIds"),wordID="",_starPos="";learn={ShowMore:function(n,t){var i=$(n).parent();i.find('[name="backLink"]').show();i.find('[name="hidden"]').show();oRender.RenderAdvLearn(t);$(n).hide()},Back:function(n,t){var i=$(n).parent();i.find('[name="hidden"]').hide();i.find('[name="showMoreLink"]').show();$("#Advertisement_"+t).hide();$(n).hide()},MarkStar:function(n,t,i,r){var e=$(t).attr("id"),f=e.split("_")[0],u,o;f=f.replace("StarWhite","");u="StarOrange"+f;_starPos=e.split("_")[1];_starPos=_starPos==null?"":"_"+_starPos;oSite.IsLogedIn&&(n?(personalIds.updateId(f),$("#"+u).removeClass("Hide"),$("#"+u+"_a").removeClass("Hide"),$("#"+u+"_b").removeClass("Hide"),$("#"+u+"_c").removeClass("Hide"),$(t).addClass("Hide")):personalIds.isIdExist(f)&&($("#"+u).removeClass("Hide"),$("#"+u+"_a").removeClass("Hide"),$("#"+u+"_b").removeClass("Hide"),$("#"+u+"_c").removeClass("Hide"),$(t).addClass("Hide")));i&&(oStuff.gaLog("Learn","AddWord",r),wordID=f,oSite.IsLogedIn?learn.UpdateWordOnServer(f,t,!0):(o=oSite.CurrentSiteURL+"users/RenderNotLogedInForm",ajaxHelper.AjaxReqest("",o,"get",!0)))},RemoveStar:function(n,t,i){var f=$(n).attr("id"),r=f.split("_")[0],u;r=r.replace("StarOrange","");u="StarWhite"+r;personalIds.deleteID(r);$("#"+u).removeClass("Hide");$("#"+u+"_a").removeClass("Hide");$("#"+u+"_b").removeClass("Hide");$("#"+u+"_c").removeClass("Hide");$(n).addClass("Hide");t&&(oStuff.gaLog("Learn","RemoveWord",i),learn.UpdateWordOnServer(r,n,!1))},onLoad:function(n){n&&personalIds.clearStorage();$(".PersonalCard_imgTopWhite").each(function(){learn.MarkStar(n,this)})},UpdateWordOnServer:function(n,t,i){ajaxHelper.UpdateWord(n,i,oStuff.evalMethod)},RollBackFavorite:function(n,t,i){var r="StarOrange"+n+_starPos,u,e,f;if(t?learn.RemoveStar($("#"+r)):(r="StarWhite"+n+_starPos,learn.MarkStar(!0,$("#"+r))),i==!0){r="StarWhite"+n+_starPos;u=document.createElement("div");u.className="upgrade_popover_container";e=document.createElement("p");e.innerHTML=oSite.LimitPopoverMessage;u.appendChild(e);oSite.AllowPurchase&&(f=document.createElement("button"),f.innerHTML=oSite.LimitPopoverButton,f.setAttribute("onclick","oStuff.gaLog('Popups','Upgrade wordlist click','upgrade click'); window.open('"+oSite.PurchaseUrl+"', '_self')"),u.appendChild(f));$("#"+r).popover({placement:"bottom",trigger:"focus",html:!0,container:"body",content:u});$("#"+r).focus();$("#"+r).on("hidden.bs.popover",function(){oStuff.gaLog("Popups","Upgrade wordlist click","outside popup click");$("#"+r).popover("destroy")});oStuff.gaLog("Popups","Upgrade wordlist shown",oSite.PersonalListLimit)}},dummyFunc:function(){}},function(){window.oLogin={FBinit:function(){window.fbAsyncInit=function(){FB.init({appId:oSite.appId,xfbml:!0,version:"v2.1"});FB.getLoginStatus(function(n){if(n.status!=="connected"){var t=oUI.readCookie("UserLoginType");t!=null&&t!="undefined"&&t=="True"&&oUI.Logout()}},!0)},function(n,t,i){var r,u=n.getElementsByTagName(t)[0];n.getElementById(i)||(r=n.createElement(t),r.id=i,r.src="//connect.facebook.net/en_US/sdk.js",u.parentNode.insertBefore(r,u))}(document,"script","facebook-jssdk")},FbLogin:function(){FB.login(function(n){n&&(n.authResponse?n.status==="connected"&&FB.api("/me",function(n){var t,i;wordID=typeof wordID!="undefined"?wordID:0;t={id:n.id,email:n.email,first_name:n.first_name,last_name:n.last_name,mID:wordID!=""?wordID:0};localStorage.UserName=n.email;dataRequest="UserDetails="+JSON.stringify(t);i=oSite.CurrentSiteURL+"users/LoginFb";ajaxHelper.AjaxReqest(dataRequest,i,"post",!1,oUI.OnPostLogin)}):console.log("unsuccessful auth"))},{scope:"email"})},IsLoggedIn:function(){var t=!1,n=oUI.readCookie("UserSettings");return n!=null&&n!="undefined"&&n!=""&&(t=!0),t}}}()