﻿$(document).ready(function() {
    var heightOfReview = $("#ctl00_cphMain_pReview").height();
    if (heightOfReview > 69) {
        $.get("/assets/handlers/reviewtoolarge.ashx?reviewid=" + reviewid);
    }

    var heightOfNewsHeading = $("#ctl00_cphMain_h3NewsTitle").height();
    var heightOfNewsP = $("#ctl00_cphMain_pNews").height();
    var heightOfNewsPanel = heightOfNewsHeading + heightOfNewsP;

    if (heightOfNewsPanel > 84) {
        var amount = '';
        if (heightOfNewsPanel > 100) amount = 'med';
        if (heightOfNewsPanel > 120) amount = 'large';
        $.get("/assets/handlers/newstoolarge.ashx?newsid=" + newsid + "&amount=" + amount);
    }

    var heightOfLoyaltyHeading = $("#ctl00_cphMain_h3LoyaltyTitle").height();
    var heightOfLoyaltyP = $("#ctl00_cphMain_pLoyalty").height();
    var heightOfLoyaltyPanel = heightOfLoyaltyHeading + heightOfLoyaltyP;
    // alert(heightOfLoyaltyPanel);
    if (heightOfLoyaltyPanel > 100) {
        var amount = '';
        if (heightOfLoyaltyPanel > 120) amount = 'med';
        if (heightOfLoyaltyPanel > 140) amount = 'large';
        $.get("/assets/handlers/loyaltytoolarge.ashx?resourcearticleid=" + resourcearticleid + "&amount=" + amount);
    }
});
