$(document).ready(function() {
  
  var SIZE = $.cookie('rxmed_fontsize') //get cookie, pass it to SIZE
  
  //if SIZE is not null set css font size
  if (SIZE != null) {
  $('html').css('font-size', $.cookie('rxmed_fontsize')); //set font-size to cookie value
  }

  $('#text-size img').click(function() {
    $.cookie('rxmed_fontsize', null, { path: '/'}); //set cookie with null
    $('html').css('font-size', $(this).attr('value')); //change font size based on click   
    var FONTSIZE = $(this).attr('value'); //create variable for cookie    
    $.cookie('rxmed_fontsize', FONTSIZE, { path: '/'}); //set cookie with variable
    });
});

