$(document).ready(function(){ $('embed[src*=zing],embed[src*=nhaccuatui],embed[src*=vui]').css({'width': '300px', 'height': '50px'}); $("td#pro_ms>div:eq(0),td#ms_pro>div:eq(0),button#music1").removeClass(); $("button#music1").click(function(){ $("td#pro_ms>div:eq(0),td#ms_pro>div:eq(0),button#music1").addClass("hide_ms"); $("td#pro_ms>div:eq(1),td#ms_pro>div:eq(1),button#music2").removeClass(); }); $("button#music2").click(function(){ $("td#pro_ms>div:eq(1),td#ms_pro>div:eq(1),button#music2").addClass("hide_ms"); $("td#pro_ms>div:eq(2),td#ms_pro>div:eq(2),button#music3").removeClass(); }); $("button#music3").click(function(){ $("td#pro_ms>div:eq(2),td#ms_pro>div:eq(2),button#music3").addClass("hide_ms"); $("td#pro_ms>div:eq(3),td#ms_pro>div:eq(3),button#music4").removeClass(); }); $("button#music4").click(function(){ $("td#pro_ms>div:eq(3),td#ms_pro>div:eq(3),button#music4").addClass("hide_ms"); $("td#pro_ms>div:eq(4),td#ms_pro>div:eq(4),button#music5").removeClass(); }); $("button#music5").click(function(){ $("td#pro_ms>div:eq(4),td#ms_pro>div:eq(4),button#music5").addClass("hide_ms"); $("td#pro_ms>div:eq(0),td#ms_pro>div:eq(0),button#music1").removeClass(); }); }); function openWin(pageUrl, w, h) { width = w; height = h; top_val = (screen.height - height) / 2 - 30; if (top_val < 0) { top_val = 0; } left_val = (screen.width - width) / 2; window.open(pageUrl, null, "toolbar=0,location=0,status=1,menubar=0,scrollbars=0,resizable=0,width=" + width + ",height=" + height + ", top=" + top_val + ",left=" + left_val); } $(document).ready(function(){ $('#text_editor_textarea').keyup(function() { max_chars = 777; current_value = $('#text_editor_textarea').val(); current_length = current_value.length; remaining_chars = max_chars-current_length; $('#counter_number').html(remaining_chars); if(remaining_chars<=77){ $('#counter_number').css('color', 'red'); } else { $('#counter_number').css('color', 'yellow'); } }); }); $(document).ready(function(){ $('a.poplight[href^=#]').click(function() { var popID = $(this).attr('rel'); var popURL = $(this).attr('href'); //Pull Query & Variables from href URL var query= popURL.split('?'); var dim= query[1].split('&'); var popWidth = dim[0].split('=')[1]; $('#' + popID).fadeIn().css({ 'width': Number( popWidth ) }).prepend('Close'); var popMargTop = ($('#' + popID).height() + 80) / 2; var popMargLeft = ($('#' + popID).width() + 80) / 2; $('#' + popID).css({ 'margin-top' : -popMargTop, 'margin-left' : -popMargLeft }); //Fade in Background $('body').append('
'); $('#fade').css({'filter' : 'alpha(opacity=80)'}).fadeIn(); return false; }); //Close Popups and Fade Layer $('a.close, #fade').live('click', function() { $('#fade , .popup_block').fadeOut(function() { $('#fade, a.close').remove(); }); //fade them both out return false; }); });