﻿$(document).ready(function() {

    var btOptions;
    btOptions = {
        fill: '#f1f1f1',
        width: 300
    };

    $("a#ttPerformance").bt('<h1>Overall Performance</h1><p>This rating is a measure of a computer\'s processor (CPU) and RAM (memory) performance.  This composite rating is based on how fast the computer\'s processor is, and the performance (speed and size) of the computer\'s RAM.</p><p>Overall performance is measured between 0 (slowest) and 10 (fastest).</p>', btOptions);
    $("a#ttCPU").bt('<h1>Processor (CPU) Rating</h1><p>This rating is a measure of the computer\'s processor (CPU) based on benchmark data collected from external sources.  The processor is important for the overall speed of your computer, and determines how quickly individual tasks can be performed.</p><p>Processor rating is measured between 0 (slowest) and 10 (fastest).  For example, a score of \'8\' is twice as fast as a score of \'4\'.</p>', btOptions);
    $("a#ttGPU").bt('<h1>Graphics (GPU) Rating</h1><p>This rating is a measure of the computer\'s graphics card (GPU) based on benchmark data collected from external sources.  The graphics card is important for graphics-intensive activities like playing 3D games or editing videos.</p><p>Graphics rating is measured between 0 (least powerful) and 10 (most powerful).  For example, a score of \'8\' is twice as powerful as a score of \'4\'.</p>', btOptions);
    $("a#ttRAM").bt('<h1>RAM (memory)</h1><p>This rating is a measure of the amount of the computer\'s random access memory (RAM).  RAM is important for multi-tasking between numerous programs and computer overall performance.</p><p>RAM is measured in gigabytes (GB).  In general, more RAM is better; however, there is a \'ceiling effect\' where increasing amounts of RAM does not equally increase system performance.</p>', btOptions);
    $("a#ttHDD").bt('<h1>Storage Space</h1><p>This rating is a measure of the computer\'s hard drive disk space.  Hard drive space is used to store information, such as movies, photos, music, applications, and the operating system.</p><p>Storage space is measured in gigabytes (GB) or terabytes (TB).  One terabyte is equal to 1,024 gigabytes.  In general, increasing storage space does not improve performance, but it does allow for more room for digital photos, music, and videos.</p>', btOptions);
    $("a#ttBattery").bt('<h1>Battery Life</h1><p>This rating is a measure of the computer\'s estimated battery life (in hours).  In general, battery life decreases with larger screen size and higher-end performance.</p><p>Battery life is a very rough estimate, and depends on a variety of factors.</p>', btOptions);
    $("a#ttWeight").bt('<h1>Weight</h1><p>This rating is a measure of how heavy the computer is (in pounds).</p><p>Note that battery life may or may not be reported with a removable battery.</p>', btOptions);
    $("a#ttThinness").bt('<h1>Thinness</h1><p>This rating is a measure of how thin the computer is (in inches).</p><p>Note that thinness is reported as the least thin portion of the device.  Many devices are thinner in the front and thicker toward the battery (in the back).  All values are reported as the thickest portion of the device.</p>', btOptions);
    $("a#ttScreenSize").bt('<h1>Screen Size</h1><p>This rating is a measure of the diagonal screen size (in inches).</p>', btOptions);

    $(".ttSearchReminder").bt('Click this button to search', { trigger: 'none' });
    //$(".ttHMDReminder").bt('<strong>Unsure of what you want?</strong><br />Click this button to find a computer based on your needs');

});

function ConvertToHDDSize(HDDSize) {
    if (HDDSize < 1024) {
        return HDDSize + 'GB'
    }
    else {
        return Math.round(HDDSize / 1024 * 10) / 10 + 'TB'

    }
}
