Made changes to the function for the pop up

used the proportions equation to get the proper width of the pop up div