exclude_words="a,able,about,above,abroad,according,accordingly,across,actually,adj,after,afterwards,again,against,ago,head,ain't,all,allow,allows,almost,alone,along,alongside,already,also,although,always,am,amid,amidst,a,ong,amongst,an,and,another,any,anybody,anyhow,anyone,anything,anyway,anyways,anywhere,apart,appear,appreciate,appropriate,are,aren't,around,as,a's,aside,ask,asking,associated,at,available,away,awfully,b,back,backward,backwards,be,became,because,become,becomes,becoming,been,before,beforehand,begin,behind,being,believe,below,beside,besides,best,better,between,beyond,both,brief,but,by,c,came,can,cannot,cant,can't,caption,cause,causes,certain,cetainly,changes,clearly,c'mon,co,co.,com,come,comes,concerning,consequently,consider,considering,contain,containing,contains,corresponding,could,couldn't,course,c's,currently,d,dare,daren't,definitely,described,despite,did,didn't,different,directly,do,does,doesn't,doing,done,don't,down,downwards,during,e,each,edu,eg,eight,eighty,either,else,elsewhere,end,ending,enough,entirely,especially,et,etc,even,ever,evermore,every,everybody,everyone,everything,everywhere,ex,exactly,example,except,f,fairly,far,farther,few,fewer,fifth,first,five,followed,following,follows,for,forever,former,formerly,forth,forward,found,four,from,further,furthermore,g,get,gets,getting,given,gives,go,goes,going,gone,got,gotten,greetings,h,had,hadn't,half,happens,hardly,has,hasn't,have,haven't,having,he,he'd,he'll,hello,help,hence,her,here,hereafter,hereby,herein,here's,hereupon,hers,herself,he's,hi,him,himself,his,hither,hopefully,how,howbeit,however,hundred,i,i'd,ie,if,ignored,i'll,i'm,immediate,in,inasmuch,inc,inc.,indeed,indicate,indicated,indicates,inner,inside,insofar,instead,into,inward,is,isn't,it,it'd,it'll,its,it's,itself,i've,j,just,k,keep,keeps,kept,know,known,knows,l,last,lately,later,latter,latterly,least,less,lest,let,let's,like,liked,likely,likewise,little,look,looking,looks,low,lower,ltd,m,made,mainly,make,makes,many,may,maybe,mayn't,me,mean,meantime,meanwhile,merely,might,mightn't,mine,minus,miss,more,moreover,most,mostly,mr,mrs,much,must,mustn't,my,myself,n,name,namely,nd,near,nearly,necessary,need,needn't,needs,neither,never,neverf,neverless,nevertheless,new,next,nine,ninety,no,nobody,non,none,nonetheless,noone,no-one,nor,normally,not,nothing,notwithstanding,novel,now,nowhere,o,obviously,of,off,often,oh,ok,okay,old,on,once,one,ones,one's,only,onto,opposite,or,other,others,otherwise,ought,oughtn't,our,ours,ourselves,out,outside,over,overall,own,p,particular,particularly,past,per,perhaps,placed,please,plus,possible,presumably,probably,provided,provides,q,que,quite,r,rather,rd,re,really,reasonably,recent,recently,regarding,regardless,regards,relatively,respectively,right,round,s,said,same,saw,say,saying,says,second,secondly,see,seeing,seem,seemed,seeming,seems,seen,self,selves,sensible,sent,serious,seriously,seven,several,shall,shan't,she,she'd,she'll,she's,should,shouldn't,since,six,so,some,somebody,someday,somehow,someone,something,sometime,sometimes,somewhat,somewhere,soon,sorry,specified,specify,specifying,still,sub,such,sup,sure,t,take,taken,taking,tell,tends,th,than,thank,thanks,thanx,that,that'll,thats,that's,that've,the,their,theirs,them,themselves,then,thence,there,thereafter,thereby,there'd,therefore,therein,there'll,there're,theres,there's,thereupon,there've,these,they,they'd,they'll,they're,they've,thing,things,think,third,thirty,this,thorough,thoroughly,those,though,three,through,throughout,thru,thus,till,to,together,too,took,toward,towards,tried,tries,truly,try,trying,t's,twice,two,u,un,under,underneath,undoing,unfortunately,unless,unlike,unlikely,until,unto,up,upon,upwards,us,use,used,useful,uses,using,usually,v,value,various,versus,very,via,viz,vs,w,want,wants,was,wasn't,way,we,we'd,welcome,well,we'll,went,were,we're,weren't,we've,what,whatever,what'll,what's,what've,when,whence,whenever,where,whereafter,whereas,whereby,wherein,where's,whereupon,wherever,whether,which,whichever,while,whilst,whither,who,who'd,whoever,whole,who'll,whom,whomever,who's,whose,why,will,willing,wish,with,within,without,wonder,won't,would,wouldn't,x,y,yes,yet,you,you'd,you'll,your,you're,yours,yourself,yourselves,you've,z,zero,bilal"
function formatDataNew(data){if(!data.id){return data.text;}
var dataText=data.text;var dataArray=dataText.split('|_|');var $result=$(' '+data.text+'');return $result;}
$(document).ready(function(){$('.verify_story').click(function(){var object=$(this);var post_id=object.attr('data-postid');var post_data={post_id:post_id,type:'story'};$.ajax({url:$("body").attr("data-baseurl")+$("body").attr("data-adminpath")+'/content/posts/story_verify',type:"POST",data:post_data,beforeSend:function()
{object.after('');},error:function()
{},success:function(data)
{$('.loader_verify').remove();object.addClass('verified');object.attr('title',data);}});});$('.verify_video').click(function(){var object=$(this);var post_id=object.attr('data-postid');var post_data={post_id:post_id,type:'video'};$.ajax({url:$("body").attr("data-baseurl")+$("body").attr("data-adminpath")+'/content/posts/story_verify',type:"POST",data:post_data,beforeSend:function()
{object.after('');},error:function()
{},success:function(data)
{$('.loader_verify').remove();object.addClass('verified');object.attr('title',data);}});});if(typeof $("body").find("#share_template").attr("id")!=="undefined"){$("#share_template").select2({templateResult:formatDataNew,templateSelection:formatDataNew});$('#share_template').on("select2:open",function(e){$('.select2-dropdown').addClass('templateDropdown');});}
$('#share_template').change(function(){$('#imagenote').find('span').html('Image size = '+$(this).find('option:selected').attr('data-size'));$("input[name=sharetype][value='"+$(this).find('option:selected').attr('data-sharetype')+"']").prop("checked",true);});if($('#alternate_title').val()!='')
$(".alt-area").removeClass("hide");var e=$('
');$('select#category_id1').click(function(){var id=parseInt(this.value);var id_array=[8,9,10,11,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,30,31,32,33,35,37,40];if(jQuery.inArray(id,id_array)>-1)
{$('#title_urdu').val('');$('#title_urdu_display').attr('style','display:block');}
else
{$('#title_urdu').val('0');$('#title_urdu_display').attr('style','display:none');}});$('.view_position_history').click(function(){var object=$(this);var post_id=object.attr('data-id');var post_data={post_id:post_id};$.ajax({url:$("body").attr("data-baseurl")+adminPath+'/content/posts/ajax_get_post_position_log',type:"POST",data:post_data,beforeSend:function()
{$("#myModalNewsPositionLog").modal('show');$("#myModalNewsPositionLog").attr("style","text-align:center");$("#myModalNewsPositionLog").html('');},error:function()
{$("#myModalNewsPositionLog").html("Error occurred please try again
");},success:function(data)
{$("#myModalNewsPositionLog").html(data);}});});$('#reshare-btn').click(function(){$('.edit-loader-area').removeClass('hide');var send_notification=0;var fb_share=0;var tweet_share=0;var sports_tweet_share=0;var share_title=$('#sharing_desc').val();var title=$('#title').val();if($('#send_notification').prop('checked'))
send_notification=1;if($('#fb_share').prop('checked'))
fb_share=1;if($('#tweet_share').prop('checked'))
tweet_share=1;if($('#sports_tweet_share').prop('checked'))
sports_tweet_share=1;var post_data={post_id:$('#post_edit_id').val(),sports_tweet_share:sports_tweet_share,send_notification:send_notification,fb_share:fb_share,tweet_share:tweet_share,share_title:share_title,title:title};var data=httpRequest(adminPath+'/content/posts/ajax_social_reshare','post',post_data,false);data.done(function(response){window.location.reload();$('.edit-loader-area').addClass('hide');$(".alert-dismissable").remove();});});if($('#fullstory').prop('checked'))
$(".fullstory-elements").removeClass("hide");$('#fullstory').click(function(){if($(this).prop('checked'))
$(".fullstory-elements").removeClass("hide");else
$(".fullstory-elements").addClass("hide");});$('[name="fullstory_image"]').on("change",function(){readURL(this,$(".fullstory-display-img"));});$("img.albumImg").hover(function(){if($('#myid'))
$('#myid').remove();$('#imgDiv_'+this.id).append(e);$('#myid').children().first().attr('id',this.id);$('#myid').attr('style','opacity:0.7');$('#myid').children().first().click(function(){var formData={id:this.id};$.ajax({url:SITEURL+adminPath+'/content/posts/delete_image_from_gallery',beforeSend:function(){$('.delete_button').attr('src','../../../../assets/front/images/animation.gif');},complete:function(){$('.delete_button').attr('src','../../../../assets/front/images/button_cancel.png');},type:"POST",data:formData,success:function(data,textStatus,jqXHR)
{if(data)
$('#imgDiv_'+data).remove();},error:function(jqXHR,textStatus,errorThrown)
{}});})},function(){});$('#my_testing').mouseleave(function(){$('#myid').hide();});$('#post_datetime').datetimepicker({dateFormat:'yy-mm-dd',timeFormat:'hh:mm tt',ampm:true,beforeShow:function(input,inst){setTimeout(function(){inst.dpDiv.css({top:"inherit",bottom:"44px"});},0);}});var d=new Date();var date=new Date(Date.parse(d,"yy-mm-dd hh:mm tt"));$('#create_video_form').find('#post_datetime').datetimepicker('setDate',date);$('#filter_startDate').datepicker({dateFormat:'yy-mm-dd'});$('#filter_endDate').datepicker({dateFormat:'yy-mm-dd'});$('#create_form').find('#title').focusout(function(){var title=$('#title').val();var key_words=$(title.split(" ")).not(exclude_words.split(",")).get();if(title!="")
var titleFin=title.toString().toLowerCase().replace(/ /g,'-').replace(/[^\w-]+/g,'');if($('#slug').val()=="")
$('#slug').val(titleFin);});$("#create_new").on("click",function(e){e.preventDefault();var postType=$(this).attr("data-type");$.ajax({url:$("body").attr("data-baseurl")+$("body").attr("data-adminpath")+"/content/posts/add_null_post?post_type="+postType,type:"POST",success:function(data){window.location.href=$("body").attr("data-baseurl")+$("body").attr("data-adminpath")+"/content/posts/edit/"+$.trim(data)+'?post_type='+postType}});});$("#accordion").accordion({collapsible:true,active:false});});var globalTimeout=null;var listId=new Array();$(document).ready(function($){if($("#arpp_ids").val()){listId=$("#arpp_ids").val().split(',');}
$('#vinput').keyup(function(e)
{var vinput=$("#vinput").val();if(vinput!=""&&vinput.length>2&&(e.keyCode==13)){$('#arpp_loading').show();if(globalTimeout!=null){clearTimeout(globalTimeout);}
globalTimeout=setTimeout(ajax_get_data,300);return false;}
else
{$('#arpp_results').hide();}});$('#vexact').change(function()
{var vinput=$("#vinput").val();if(vinput!=""&&vinput.length>2){$('#arpp_loading').show();if(globalTimeout!=null){clearTimeout(globalTimeout);}
globalTimeout=setTimeout(ajax_get_data,300);return false;}
else
{$('#arpp_results ul').remove();$('#arpp_results').hide();}});$('#vinput').on("click",function(){if($('#arpp_results ul li').length){$('#arpp_results').show();}});$(".remove_related_result").on('click',function(){$('#arpp_results').hide();});$("#arpp_results").delegate('li','click',function(){$(this).children('span').html('-');$('#arpp_selected ul').append($(this));listId.push($(this).attr('id'));$('#arpp_ids').val(listId.join(','));return false;});$("#arpp_selected").delegate('li','click',function(){$(this).children('span').html('+');var index=listId.indexOf($(this).attr('id'));if(index!=-1){listId.splice(index,1);}
if(listId.length>0){$('#arpp_ids').val(listId.join(','));}else{$('#arpp_ids').val('');}
$('#arpp_results ul').append($(this));return false;});var globalTimeoutTags=null;$('#suggestedTags').keyup(function()
{var suggest_tags=$("#suggestedTags").val();if(suggest_tags!=""&&suggest_tags.length>2){if(globalTimeoutTags!=null){clearTimeout(globalTimeoutTags);}
globalTimeoutTags=setTimeout(ajax_suggest_data,300);return false;}
else
{$('.response_suggest_tags').html('');}});$(".response_suggest_tags li .people_icon").live("click",function(){if($('#tags_people').val()=='')
{$('#tags_people').val($(this).parent('li').text());}
else
{$('#tags_people').val($('#tags_people').val()+', '+$(this).parent('li').text());}
$(this).parent('li').remove();});$(".response_suggest_tags li .issues_icon").live("click",function(){if($('#tags_issues').val()=='')
{$('#tags_issues').val($(this).parent('li').text());}
else
{$('#tags_issues').val($('#tags_issues').val()+', '+$(this).parent('li').text());}
$(this).parent('li').remove();});$(".response_suggest_tags li .events_icon").live("click",function(){if($('#tags_events').val()=='')
{$('#tags_events').val($(this).parent('li').text());}
else
{$('#tags_events').val($('#tags_events').val()+', '+$(this).parent('li').text());}
$(this).parent('li').remove();});$(".response_suggest_tags li .locations_icon").live("click",function(){if($('#tags_locations').val()=='')
{$('#tags_locations').val($(this).parent('li').text());}
else
{$('#tags_locations').val($('#tags_locations').val()+', '+$(this).parent('li').text());}
$(this).parent('li').remove();});$(".response_suggest_tags li .institutions_icon").live("click",function(){if($('#tags_institutions').val()=='')
{$('#tags_institutions').val($(this).parent('li').text());}
else
{$('#tags_institutions').val($('#tags_institutions').val()+', '+$(this).parent('li').text());}
$(this).parent('li').remove();});$("#bulkCombo").change(function(){if(this.value==3)
$('#tags').attr('style','display:block;width:200px;float:right');else
$('#tags').attr('style','display:none');});$('body').on('click','.remove_content_position',function(){$('.edit-loader-area').removeClass('hide');var post_id=$(this).attr('data-post-id');var position_id=$(this).attr('data-position-id');var panel_id=$(this).attr('data-panel-id');var active=$("#accordion_news_position").accordion("option","active");var post_data={post_id:post_id,position_id:position_id};var request=httpRequest(adminPath+'/content/posts/ajax_remove_content_position','post',post_data,true);request.done(function(response){loadHtml();});$('.edit-loader-area').addClass('hide');$(".alert-dismissable").remove();});$('body').on('click','.remove_category_position',function(){$('.edit-loader-area').removeClass('hide');var post_id=$(this).attr('data-post-id');var category_id=$(this).attr('data-category-id');var panel_id=$(this).attr('data-panel-id');var active=$("#accordion_news_category").accordion("option","active");var post_data={post_id:post_id,category_id:category_id};var request=httpRequest(adminPath+'/content/posts/ajax_remove_category_post_position','post',post_data,true);request.done(function(response){loadHtml();});$('.edit-loader-area').addClass('hide');$(".alert-dismissable").remove();});$("body").on('click','.updateStatus',function(){$('.edit-loader-area').removeClass('hide');var object=$(this).parent();var post_id=object.parent().find('input[type="checkbox"]').val();var publish_status=object.find('select').prop('selected',true).val();var post_data={post_id:post_id,publish_status:publish_status};var data=httpRequest(adminPath+'/content/posts/ajax_update_publish_status','post',post_data,true);data.done(function(response)
{if(response.error==0){closeStatus(object);loadHtml();}
$('.edit-loader-area').addClass('hide');$(".alert-dismissable").remove();$(status_msg(response.error,response.msg)).insertBefore('.admin-box');});});$("body").on('click','.closeStatus',function(){var object=$(this).parent();closeStatus(object);});$("body").on('click','.delete_post',function(){if(confirm("You are about to delete a record. This cannot be undone. Are you sure?"))
{$('.edit-loader-area').removeClass('hide');var object=$(this);var post_id=object.attr('data-id');var post_data={post_id:post_id};var data=httpRequest(adminPath+'/content/posts/ajax_delete_post','post',post_data,true);data.done(function(response){if(response.error==0){loadHtml();}
$('.edit-loader-area').addClass('hide');$(".alert-dismissable").remove();$(status_msg(response.error,response.msg)).insertBefore('.admin-box');});}});$("#view_post").click(function(){var data=httpRequest(adminPath+'/content/posts/index','post',{view_post:1},true);data.done(function(response){loadHtml();});});$("#view_videos").click(function(){var data=httpRequest(adminPath+'/content/posts/index','post',{view_video:1},false);data.done(function(response){alert(response);loadHtml();});});var status_msg=function(error,message)
{var class1="alert-success";if(error==1)
class1="alert-danger";return'';}
var loadHtml=function()
{var data1=httpRequest($('#table-striped-main').attr('data-url'),'get','',false);data1.done(function(response)
{var dataEleModel=$("").html(response);var dataHtmlModel=dataEleModel.find("#myModalNewsPosition").find(".modal-body").clone();dataEleModel.remove();$("#myModalNewsPosition").find(".modal-body").html(dataHtmlModel);var dataEleModel=$("").html(response);var dataHtmlModel=dataEleModel.find("#myModalCategoryPosition").find(".modal-body").clone();dataEleModel.remove();$("#myModalCategoryPosition").find(".modal-body").html(dataHtmlModel);var dataEle=$("").html(response);var dataHtml=dataEle.find("#table-striped-main").clone();dataEle.remove();$("body").find("#table-striped-main").html(dataHtml);});}
var closeStatus=function(object)
{var current_value=object.find('select option:selected').text();object.addClass('postStatus');object.html(current_value);}
$("body").on('click','.postStatus',function(){var current_value=$(this).html();var html="";html+="
update close";$(this).html(html);$(this).find('select option:contains('+current_value+')').attr('selected','selected');$(this).removeClass('postStatus');});function validate(){var cnv=$('#tags').val();if(!$.trim(cnv)){alert('Tags are required!');return false;}else{return true;}}});function getParameterByName(name,url){if(!url)url=window.location.href;name=name.replace(/[\[\]]/g,"\\$&");var regex=new RegExp("[?&]"+name+"(=([^]*)|&|#|$)"),results=regex.exec(url);if(!results)return null;if(!results[2])return'';return decodeURIComponent(results[2].replace(/\+/g," "));}
(function($){var dataContainer=$(".seo-score"),titleContainer=$("#title"),slugContainer=$("#slug"),excerptContainer=$("#excerpt"),descriptionContainer=$(".editable"),colorCodes=['#c7221f','#e67700','#178239'],colorCodesBG=['#fee2e2','rgba(230, 119, 0,0.2)','rgba(23, 130, 57,0.2)'];var focusKeywordPointsMin=5,focusKeywordPointsMax=7,otherKeywordPoints=3,articleFocusKeywordPointsMin=5,articleFocusKeywordPointsMax=7,articleRelatedKeywordPointsMin=2,articleRelatedKeywordPointsMax=3,articleImageAltPointsMin=2,articleImageAltPointsMax=3,heading2Points=5,numberOfWordsPoints=5,inlineLinkPoints=5,min100WordsParaPoints=3,totalPointsFixed=73;var titlePointsEle=$("Title: "),slugPointsEle=$("Slug: "),excerptPointsEle=$("Excerpt: ");var countWords=function(text){return(text!=""||text==null)?text.toString().split(' ').length:0;},calculatePoints=function(){var tagsKeyword=$('[name="tags"]'),keywordsSplit=tagsKeyword.val().toLowerCase().trim().split(","),focusKeyword=typeof keywordsSplit[0]!=="undefined"&&keywordsSplit[0]!=""?keywordsSplit[0]:"-99988553366",titlePoints=0,slugPoints=0,excerptPoints=0,firstParagraphPoints=0,articleTotalFocusWordsPoints=0,articleTotalRelatedKeyWordsPoints=0,articleTotalWordsPoints=0,articlePragraphContain100WordsPoints=0,inlineLinkRelatedKeyWordsPoints=0,imageCaptionFocusPoints=0,imageCaptionRelatedPoints=0,articleHeading2Points=0,totalPoints=0;var firstParagraphEle="",descriptionHeading2=descriptionContainer.find("h2").text().toLowerCase();descriptionContainer.find("p").each(function(){var ele=$(this);if(typeof ele.parent('.editable').attr("class")!=="undefined"&&ele.text().trim()!=""){firstParagraphEle=ele;return false;}});var titleArr=titleContainer.val().toLowerCase(),slugArr=slugContainer.val().split("-").join(" ").toLowerCase(),excerptArr=excerptContainer.val().toLowerCase(),firstParagraphArr=firstParagraphEle!=""?firstParagraphEle.text().toLowerCase():'';if(titleArr.search(focusKeyword)==0){titlePoints+=focusKeywordPointsMax;}else if(titleArr.search(focusKeyword)>-1){titlePoints+=focusKeywordPointsMin;}
if(slugArr.search(focusKeyword)==0){slugPoints+=focusKeywordPointsMax;}else if(slugArr.search(focusKeyword)>-1){slugPoints+=focusKeywordPointsMin;}
if(excerptArr.search(focusKeyword)==0){excerptPoints+=focusKeywordPointsMax;}else if(excerptArr.search(focusKeyword)>-1){excerptPoints+=focusKeywordPointsMin;}
if(firstParagraphArr.search(focusKeyword)==0){firstParagraphPoints+=focusKeywordPointsMax;}else if(firstParagraphArr.search(focusKeyword)>-1){firstParagraphPoints+=focusKeywordPointsMin;}
var articleText=descriptionContainer.find("p").text().toLowerCase(),totalFocusWordsString=articleText.match(new RegExp(focusKeyword,"g")),totalFocusWords=totalFocusWordsString==null?0:totalFocusWordsString.toString().split(",").length;if(totalFocusWords==2){articleTotalFocusWordsPoints=articleFocusKeywordPointsMin;}else if(totalFocusWords>2){articleTotalFocusWordsPoints=articleFocusKeywordPointsMax;}
var imageCaptionText=descriptionContainer.find(".medium-insert-images figcaption").text();if(imageCaptionText.search(focusKeyword)>-1){imageCaptionFocusPoints+=articleImageAltPointsMax;}
var otherForTitleCheck=true;var otherForSlugCheck=true;var otherForExcerptCheck=true;var otherForFirstParagraphCheck=true;var otherForDescriptionHeading2=true;var checkRelatedInArticle=true;var checkRelatedInlineAnchor=true;var checkRelatedInlineImagesCaption=true;$.each(keywordsSplit,function(i,v){v=v.trim();if(v==""){return false;}
if(v!=focusKeyword&&titleArr.search(v)>-1&&!!otherForTitleCheck){titlePoints+=otherKeywordPoints;otherForTitleCheck=false;}
if(v!=focusKeyword&&slugArr.search(v)>-1&&!!otherForSlugCheck){slugPoints+=otherKeywordPoints;otherForSlugCheck=false;}
if(v!=focusKeyword&&excerptArr.search(v)>-1&&!!otherForExcerptCheck){excerptPoints+=otherKeywordPoints;otherForExcerptCheck=false;}
if(v!=focusKeyword&&firstParagraphArr.search(v)>-1&&!!otherForFirstParagraphCheck){firstParagraphPoints+=otherKeywordPoints;otherForFirstParagraphCheck=false;}
if(descriptionHeading2!=""&&v!=focusKeyword&&descriptionHeading2.search(v)>-1&&!!otherForDescriptionHeading2){articleHeading2Points+=heading2Points;otherForDescriptionHeading2=false;}
if(v!=focusKeyword&&!!checkRelatedInArticle){let totalRelatedKeyWordsString=articleText.match(new RegExp(v,"g")),totalRelatedKeyWords=totalRelatedKeyWordsString==null?0:totalRelatedKeyWordsString.toString().split(",").length;if(totalRelatedKeyWords==2){articleTotalRelatedKeyWordsPoints=articleRelatedKeywordPointsMin;}else if(totalRelatedKeyWords>2){articleTotalRelatedKeyWordsPoints=articleRelatedKeywordPointsMax;checkRelatedInArticle=false;}}
if(v!=focusKeyword&&!!checkRelatedInlineAnchor){descriptionContainer.find("a").each(function(){if(v==$(this).text().toLowerCase().trim()){inlineLinkRelatedKeyWordsPoints=inlineLinkPoints;checkRelatedInlineAnchor=false;}})}
if(v!=focusKeyword&&imageCaptionText.search(v)>-1&&!!checkRelatedInlineImagesCaption){imageCaptionRelatedPoints+=articleImageAltPointsMin;checkRelatedInlineImagesCaption=false;}});var totalWords=countWords(descriptionContainer.find("*:not(div)").text());if(totalWords>=300){articleTotalWordsPoints=numberOfWordsPoints;}
var countParagraph=0;descriptionContainer.find("p").each(function(){let cnt=countWords($(this).text());if(cnt>=100){countParagraph++;}});if(countParagraph>=3){articlePragraphContain100WordsPoints=min100WordsParaPoints;}
var html="Title:"+titlePoints+"/10 points";html+="Slug:"+slugPoints+"/10 points";html+="";html+="Excerpt:"+excerptPoints+"/10 points";html+="1st Paragraph:"+firstParagraphPoints+"/10 points";html+="";html+="Focus keywords in article:"+articleTotalFocusWordsPoints+"/7 points";html+="";html+="Related keywords in h2:"+articleHeading2Points+" points";html+="";html+="Related keywords in article:"+articleTotalRelatedKeyWordsPoints+"/3";html+="";html+="Focus keywords in image caption:"+imageCaptionFocusPoints+" points";html+="";html+="Related keywords in image caption:"+imageCaptionRelatedPoints+" points";html+="";html+="Article length over 300 words:"+articleTotalWordsPoints+" points";html+="";html+="Link in article with related keywords:"+inlineLinkRelatedKeyWordsPoints+" points";html+="";html+="3 paragraph of minimum 100 words:"+articlePragraphContain100WordsPoints+" points";totalPoints+=titlePoints;totalPoints+=slugPoints;totalPoints+=excerptPoints;totalPoints+=firstParagraphPoints;totalPoints+=articleTotalFocusWordsPoints;totalPoints+=articleTotalRelatedKeyWordsPoints;totalPoints+=articleHeading2Points;totalPoints+=articleTotalWordsPoints;totalPoints+=articlePragraphContain100WordsPoints;totalPoints+=inlineLinkRelatedKeyWordsPoints;totalPoints+=imageCaptionFocusPoints;totalPoints+=imageCaptionRelatedPoints;var scoreObject=JSON.stringify({"title":titlePoints,"slug":slugPoints,"excerpt":excerptPoints,"first_paragraph":firstParagraphPoints,"atrical_total_focus_words":articleTotalFocusWordsPoints,"article_total_related_keywords":articleTotalRelatedKeyWordsPoints,"article_heading_2":articleHeading2Points,"article_total_words":articleTotalWordsPoints,"article_pragraph_contain_100_words":articlePragraphContain100WordsPoints,"inline_link_related_key_words":inlineLinkRelatedKeyWordsPoints,"image_caption_focus_points":imageCaptionFocusPoints,"image_caption_related_points":imageCaptionRelatedPoints});$("#post_seo_score").val("").val(scoreObject);var pointsPercent=Math.round((totalPoints/totalPointsFixed)*100);$(".score_description").find("div:not(.clearfix)").html(html);$(".total_score span").text(pointsPercent+"%");var totalDescription_score=firstParagraphPoints+
articleTotalFocusWordsPoints+
articleTotalRelatedKeyWordsPoints+
articleHeading2Points+articleTotalWordsPoints+
articlePragraphContain100WordsPoints+inlineLinkRelatedKeyWordsPoints+imageCaptionFocusPoints+imageCaptionRelatedPoints;$(".title_score").text(titlePoints+"/10");$(".slug_score").text(slugPoints+"/10");$(".excerpt_score").text(excerptPoints+"/10");$(".description_score").text(totalDescription_score+"/43");if(pointsPercent>49&&pointsPercent<90){$(".total_score span").css({color:colorCodes[1]});$(".seo-score.score-panel").css({"background-color":colorCodesBG[1],color:colorCodes[1]});}else if(pointsPercent>89){$(".total_score span").css({color:colorCodes[2]});$(".seo-score.score-panel").css({"background-color":colorCodesBG[2],color:colorCodes[2]});}else{$(".total_score span").css({color:colorCodes[0]});$(".seo-score.score-panel").css({"background-color":colorCodesBG[0],color:colorCodes[0]});}};$(function(){if(typeof $(".score_element").attr("class")==="undefined"){calculatePoints();$(".open-breakdown").click(function(){if($(".popup-up-score-chart").hasClass("open")){$(".popup-up-score-chart").removeClass("open");$(".ovleray-popup-score").removeClass("open");}else{$(".popup-up-score-chart").addClass("open");$(".ovleray-popup-score").addClass("open");}});$(".close-score-chart,.ovleray-popup-score").click(function(){$(".open-breakdown").trigger("click");});$(".close-breakdown").click(function(){$(".score_description").removeClass("open");});$(".reload-score").click(function(){calculatePoints();});$("[data-name]").change(function(){calculatePoints();});document.getElementsByClassName("editable")[0].addEventListener("input",function(){calculatePoints();},false);$('[name="tags"]').change(function(){alert($('[name="tags"]').val())});}
$(".score_element").on("click",function(){var array_attr=this.attributes,html="";$.each(array_attr,function(){if(this.name=="class"){return;}
var mdName=this.name.replace("data-","").split("_").join(" ").toUpperCase();html+=" "+mdName+" : "+this.value+"";});$(".score_popup-overlay").show();$(".score_popup-body").show().append(html);});$(".close-popup-anch").click(function(){$(".score_popup-body").find("span").remove();$(".score_popup-overlay").hide();$(".score_popup-body").hide();});});})($);$(document).ready(function(){tinymce.init({selector:"textarea#description",theme:"modern",directionality:'ltr',browser_spellcheck:true,menubar:false,relative_urls:false,paste_data_images:false,cleanup:false,verify_html:true,convert_urls:false,nowrap:false,object_resizing:false,skin:"lightgray",inline:false,height:"400",plugins:["searchreplace visualblocks visualchars wordcount code fullscreen table directionality image link insertdatetime emoticons advlist autolink lists link image charmap print preview hr anchor pagebreak nonbreaking save contextmenu template paste textcolor colorpicker textpattern directionality media responsivefilemanager"],paste_as_text:true,toolbar1:" undo redo | newdocument | blockquote | styleselect |formatselect | fontselect | fontsizeselect| fontsizeselect | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | removeformat | forecolor backcolor | bullist numlist | outdent indent | table | link | responsivefilemanager image media | code | fullscreen | ltr rtl | insertdatetime",toolbar2:"",image_advtab:true,external_filemanager_path:"http://apne.geo.tv/themes/admin/js/editors/filemanager/",filemanager_title:"Filemanager",external_plugins:{"filemanager":"../filemanager/plugin.min.js"},templates:[{title:'Test template 1',content:'Test 1'},{title:'Test template 2',content:'Test 2'}]});});