You are replacing the space here
.replace(/\s+/g," ⇉
$('#primary-navigation div ul li a').css({'font-family':'"'+$load_css_font+'"'});
Which is turning the link href tag's attribute to
http://fonts.googleapis.com/css?family= restOfCodeHere&etc=123
As you can see there is a space after the family= .