//Intialize the site when the document is ready $(document).ready(function(){ /* customized skin for all dropdown */ /*$('.uiSelect').css('opacity', 0)*/ var selectName = $('.uiSelectBg'); $(selectName).each( function(){ var selectWidth = $(this).outerWidth(); $(this).find('select').css('width', selectWidth); }) $('.myVal').remove(); /* $('.uiSelectBg').change( function(){ $(this).find('span.myVal').remove(); var value = $(this).find('option:selected').text() $(this).append(''+ value+''); }).change(); $('.uiSelect').focus( function(){ $(this).parents('div.uiSelectBg').addClass('selectBorder') }) $('.uiSelect').blur( function(){ $(this).parents('div.uiSelectBg').removeClass('selectBorder') }) $('.uiSelectBg').keydown(function (e) { var keyCode = e.keyCode || e.which, arrow = {left: 37, up: 38, right: 39, down: 40}; switch (keyCode) { case arrow.up: $(this).find('span.myVal').remove(); var value = $(this).find('option:selected').text(); $(this).append(''+ value+''); break; case arrow.down: $(this).find('span.myVal').remove(); var value = $(this).find('option:selected').text(); $(this).append(''+ value+''); break; } }) */ $('.fundDocumentsPop').click( function(){ $('#fundDocument').fadeIn(); $('.on').fadeIn(); $('.close').click( function(){ $('#fundDocument').fadeOut(); $('.on').fadeOut(); }) }) $('.table tbody tr').hover( function(){ $(this).find('td').css('background-color', '#f6f1da'); }, function(){ $(this).find('td').css('background-color', '#fff'); $('td.annualized').css('background-color', '#f8f7f0'); $('td.cumulative').css('background-color', '#f8f7f0'); $('th.annualized').css('background-color', '#eeeddd'); $('th.cumulative').css('background-color', '#eeeddd'); }) /**** flash transparent */ fix_flash(); }); /* flash make transparent function */ function fix_flash() { // loop through every embed tag on the site var embeds = document.getElementsByTagName('embed'); for (i = 0; i < embeds.length; i++) { embed = embeds[i]; var new_embed; // everything but Firefox & Konqueror if (embed.outerHTML) { var html = embed.outerHTML; // replace an existing wmode parameter if (html.match(/wmode\s*=\s*('|")[a-zA-Z]+('|")/i)) new_embed = html.replace(/wmode\s*=\s*('|")window('|")/i, "wmode='transparent'"); // add a new wmode parameter else new_embed = html.replace(//i)) new_object = html.replace(//i, ""); // add a new wmode parameter else new_object = html.replace(/<\/object\>/i, "\n"); // loop through each of the param tags var children = object.childNodes; for (j = 0; j < children.length; j++) { try { if (children[j] != null) { var theName = children[j].getAttribute('name'); if (theName != null && theName.match(/flashvars/i)) { new_object = new_object.replace(//i, ""); } } } catch (err) { } } // replace the old embed object with the fixed versiony object.insertAdjacentHTML('beforeBegin', new_object); object.parentNode.removeChild(object); } } }