(function($) { $(function() { function getParameterByName(name) { name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); var regexS = "[\\?&]" + name + "=([^&#]*)", regex = new RegExp(regexS), results = regex.exec(window.location.search); if(results == null) return ""; else return decodeURIComponent(results[1].replace(/\+/g, " ")); } if (getParameterByName('src')) { var url = "http://dealers.aultec.com/v/?object=show&Type=U&sort=PhotoTagId%20Desc&maxrows=10&DealerId=7522&AutoId=" + getParameterByName('src'); $('iframe[src^="http://dealers.aultec.com"]').attr('src', url); } }); })(jQuery);