if(window.location == window.parent.location) { jQuery('head').append(''); jQuery('body').prepend(''); jQuery("#stickynav ul a").each(function () { hostname = jQuery(this).attr('hostname'); if( typeof(hostname) == 'undefined') {hostname = jQuery(this).prop('hostname');} if(hostname == jQuery(location).attr('hostname')) { jQuery(this).find('li').addClass('navthis'); return; } }); }