jQuery(document).ready(function(){
  jQuery(".open_pop").click(function(){
	  jQuery(this).attr('alt',jQuery(this).attr('href'));
	  
		var iMyWidth;
		var iMyHeight;
		//half the screen width minus half the new window width (plus 5 pixel borders).
		iMyWidth = (window.screen.width/2) - (450 + 10);
		//half the screen height minus half the new window height (plus title and status bars).
		iMyHeight = (window.screen.height/2) - (370 + 50);
	
		url = jQuery(this).attr('alt');
		
		window.open(url,'degreecom', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=900,height=740,top='+iMyHeight+',left='+iMyWidth);
	 	return false;jQuery(this).attr('href',jQuery(this).attr('alt'));
	});
	
	
});
function urlencode (str) {
    str = (str + '').toString();
 
    // Tilde should be allowed unescaped in future versions of PHP (as reflected below), but if you want to reflect current
    // PHP behavior, you would need to add ".replace(/~/g, '%7E');" to the following.
    return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').
    replace(/\)/g, '%29').replace(/\*/g, '%2A').replace(/%20/g, '+').replace(/%26/g, '&');
}
function strpos (haystack, needle, offset) {
    // Finds position of first occurrence of a string within another  
    // 
    // version: 1102.614
    // discuss at: http://phpjs.org/functions/strpos
    // +   original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   improved by: Onno Marsman    
    // +   bugfixed by: Daniel Esteban
    // +   improved by: Brett Zamir (http://brett-zamir.me)
    // *     example 1: strpos('Kevin van Zonneveld', 'e', 5);
    // *     returns 1: 14
    var i = (haystack + '').indexOf(needle, (offset || 0));
    return i === -1 ? false : i;
}
