﻿
// Resize Font
$(document).ready(function () {
    $('span, div, p').removeAttr('style');

    $('.Part_D_Disclaimer').popupWindow({
        height: 600,
        width: 500,
        top: 50,
        left: 50,
        windowURL: '/medicare/disclaimer.html',
        windowName: 'disclaimer',
        scrollbars: 1
    });

    // IF link to PDF, show download link
    $('a[href$="pdf"').each(function(){
        $('.adobeLink').show();
    });


// Reset Font Size
var originalFontSize = $('html').css('font-size');

$(".resetFont").click(function () {
    $('.changeable').css('font-size', originalFontSize);
});

// Increase Font Size
$(".increaseFont").click(function () {
    var currentFontSize = $('.changeable:first-child').css('font-size').replace('px', '');
    if (currentFontSize < 17) {
        var currentFontSizeNum = parseFloat(currentFontSize, 12);
        var newFontSize = currentFontSizeNum * 1.1;
        $('.changeable').css('font-size', Math.round(newFontSize));
    }
    return false;
});

// Decrease 
$(".decreaseFont").click(function () {
    var currentFontSize = $('.changeable:first-child').css('font-size').replace('px', '');
    if (currentFontSize > 12) {
        var currentFontSizeNum = parseFloat(currentFontSize, 12);
        var newFontSize = currentFontSizeNum * 0.9;
        $('.changeable').css('font-size', Math.round(newFontSize));
    }
    return false;
});
});
