jQuery(function($){$("body").addClass("has_js");if($.browser.msie){$.ifixpng('/c/media/img/blank.gif');$('#logo img, .sticker, .mod-recruit span.friend, .bnr-urgent').ifixpng();$('.action-progress .container, .mod-action .top, .mod-action .btm').ifixpng();try{document.execCommand("BackgroundImageCache",false,true);}catch(err){}}
if($.browser.mozilla&&parseFloat($.browser.version)<1.9&&navigator.appVersion.indexOf('Mac')!==-1){$('body').css('opacity',0.9999);}
$('#top-links li').addClass('sub-site').not(':last').append('|');$.each([$('#legals li')],function(){$(this).not(':last').append('|');});$('.more-pnl').each(function(i,elem){var innerMargins=0;var globalHeight=parseInt($(this).outerHeight());$.data(this,"height",globalHeight);$(this).css('height',0);});$('.show-more').click(function(e){$(this).animate({opacity:0.001},"fast");e.preventDefault();var more_pnl=$(this).parent().next('.more-pnl');more_pnl.find('.show-less').css('opacity',1);more_pnl.animate({height:more_pnl.data("height")+'px'},1000,"easeInOutCubic");});$('.show-less').click(function(e){e.preventDefault();$(this).animate({opacity:0.001},"fast");var more_pnl=$(this).parents('.more-pnl');more_pnl.animate({height:'0px'},1000,"easeInOutCubic");more_pnl.parent().find('.show-more').animate({opacity:1},"fast");});$('.no-btm-bdr li:last-child').each(function(){$(this).css({background:'none',marginBottom:0});});var last_para=$('.gr-content p.last');var str_len=last_para.text().length;var last_char='<span class="one-logo">'+last_para.text().charAt(str_len-1)+'</span>';$('.gr-content .last').text(last_para.text().substring(0,str_len-1)).append(last_char);$('.drop-cap').each(function(){var paragraph=this;var node=paragraph.firstChild;var text=node.nodeValue;var first_letter=text.substr(0,1);node.nodeValue=text.slice(1);$(paragraph).wrap('<div class="first-para clearfix"></div>');$('<div class="clear"></div>').insertAfter($(paragraph).parent());$('<span class="first-letter">'+first_letter+'</span>').insertBefore($(this).parent());});$('.quote-lrg').each(function(){var paragraph=this;var node=paragraph.firstChild;var text=node.nodeValue;var quotation=text.substr(0,1);node.nodeValue=text.slice(1);$('<span class="big-quote">'+quotation+'</span>').insertBefore($(paragraph));});$('#issues-ov .issue,.hot-topics .topic').hover(function(){$(this).addClass('hover').css('cursor','default');},function(){$(this).removeClass('hover');});var clearDefaults=$("form input:text.clear_default");var clearFields=new Array();clearDefaults.each(function(i){clearFields.push([$(this).attr("id"),$(this).val()]);});clearDefaults.focus(function(){$(this).css('color','#000');for(i=0;i<clearFields.length;i++){if($(this).attr("id")==clearFields[i][0]&&$(this).val()==clearFields[i][1]){$(this).val("");}}});clearDefaults.blur(function(){for(i=0;i<clearFields.length;i++){if($(this).attr("id")==clearFields[i][0]&&$(this).val()==""){$(this).val(clearFields[i][1]);$(this).removeAttr('style');}}});$(".rollover").live("mouseover",function(){var newSrc=$(this).attr("src").replace("-off.","-on.");$(this).attr("src",newSrc);}).live("mouseout",function(){var newSrc=$(this).attr("src").replace("-on.","-off.");$(this).attr("src",newSrc);});$('.wide-carousel').each(function(){var $this=$(this);var carousel_wrap=$this.find('.carousel-container');var the_carousel=carousel_wrap.find('.carousel');the_carousel.jCarouselLite({speed:500,scroll:2,btnNext:".next",btnPrev:".prev",visible:6,circular:false,btnGo:['.carousel-reset']});if($this.hasClass('caro-collapse')){the_carousel.hide();carousel_wrap.removeClass('loading').hide();}
the_carousel.css({'width':'820px'}).find('h4 a').each(function(i,elem){$(elem).hover(function(){$(this).parents('li').addClass('hover').find('.filter').css('opacity',0.7);},function(){$(this).parents('li').removeClass('hover').find('.filter').css('opacity',0);});$(elem).click(function(e){e.preventDefault();the_carousel.fadeOut("medium",function(){carousel_wrap.slideUp("medium",function(){window.location.href=$(elem).attr('href');});});});carousel_wrap.find('.filter').css('opacity',0);});function checkCarouselClick(e){if(!$(e.target).parents('.wide-carousel').length){$('.carousel-container:visible').prev().find('a').trigger("click");}}
$this.find('.learn a').click(function(e){e.preventDefault();$(this).toggleClass('active');if(carousel_wrap.is(':visible')){the_carousel.fadeOut("medium",function(){carousel_wrap.slideUp("medium");$this.find('.carousel-reset').trigger('click');$(document).unbind("click");});}else{$('.carousel-container:visible').prev().find('a').trigger("click");carousel_wrap.slideDown("medium",function(){the_carousel.fadeIn("medium");$(document).bind("click",checkCarouselClick);});}});$this.find('.prev,.next').click(function(e){e.preventDefault();});});$('.share a.share-more-dd').mouseover(function(e){e.preventDefault();e.stopPropagation();var dropdown=$(this);var menu=$(this).parent().find('.share-additional');if(!menu.filter(':visible').length){dropdown.addClass('active');menu.mouseover(function(e){e.stopPropagation();}).show().find('li:last').css('background','none');$(document).bind("mouseover",function(){menu.hide();dropdown.removeClass('active');$(this).unbind("click");});}else{menu.hide();dropdown.removeClass('active');}});$('.mod-top-5 table, #action-status').each(function(i,elem){$(this).find('tr:even').addClass('alt');});});
