(function($){ window.urlVars = window.urlVars || (function () { try { if (window.location.href.indexOf("?") == -1) { return {}; } var vars = {}, hashes = window.location.href.slice(window.location.href.indexOf("?") + 1).split("&"); $.each(hashes, function (index, value) { var hash = value.split("="); vars[hash[0]] = unescape(hash[1]); // RN: url deode }); return vars; } catch (error) { return {}; } }()); $(function() { var tbTopic = $(".titelRatgeber"), tbTopicTextBox = $(".titelRatgeberTB"); if(!tbTopicTextBox.val()) { tbTopicTextBox.val(window.urlVars.TitelRatgeber); } tbTopic.text(window.urlVars.TitelRatgeber); }); })(jQuery)