$(function(){var a=$('.mainNav li.localNews'),dropdown=$('.dropdown',a),inner=$('.inner',dropdown);dropdown.css({'display':'block','opacity':0});var b=inner.height()+(dropdown.height()-inner.height());dropdown.css({'height':0,'opacity':1,'overflow':'hidden','display':'none'});inner.css({'opacity':0});a.bind('mouseenter',function(){dropdown.css({'display':'block'});dropdown.stop(true).animate({'height':b});inner.stop(true).animate({'opacity':1})});a.bind('mouseleave',function(){dropdown.stop(true).animate({'height':0});inner.stop(true).animate({'opacity':0},function(){dropdown.css('display','none')})})});$(document).ready(function(){var b=$('.headlines .itemList a[class!=all]');b.bind('mouseenter',function(a){if(parseInt(a.clientX)>0){$('.headlines').data('hovered',true)}});b.bind('mouseleave',function(){$('.headlines').data('hovered',false)})});$(window).load(function(){var d=$('.headlines');if(!d){return false}var e=$('li',d),$current=$('.itemList a.current',d),$bullets=$('.itemList a[class!=all]',d),$title=$('.title',d),interval=3000;e.css({'position':'absolute','left':0,'opacity':0,'top':0,'z-index':1});e.each(function(i,a){var b=$(a),$img=b.find('img');if($img&&(b.width()-$img.width()>20)&&!d.hasClass('sideSlide')){$gradient=$('<div class="pngfix">');$gradient.css({'background':'transparent '+b.css('background-image')+' repeat-y 0 0','height':b.height(),'left':$img.width()-40,'position':'absolute','top':0,'width':40});b.append($gradient)}});e.eq(parseInt($current.text())-1).css({'opacity':1,'z-index':2});$bullets.bind('mouseenter',function(a){if(parseInt(a.clientX)>0&&d.data('timer')){clearInterval(d.data('timer'))}var b=parseInt($(this).text())-1,currentNo=parseInt($current.text())-1,zIndex=parseInt(e.eq(currentNo).css('z-index'));if(zIndex>3){e.css('z-index',1);zIndex=1}e.eq(b).stop(true).css({'opacity':0,'z-index':zIndex+1}).animate({'opacity':1},750);$title.attr('href',e.eq(b).find('a').attr('href')).text(e.eq(b).find('img').attr('alt'));$title.stop(true).css({'height':'auto','opacity':0,'overflow':'visible'});var c=$title.height();$title.css({'height':0,'overflow':'hidden'}).animate({'height':c,'opacity':1},500);$current.removeClass('current');$(this).stop(true).addClass('current');$current=$(this)});$bullets.bind('mouseleave',function(a){clearInterval(d.data('timer'));d.data('timer',setInterval(f,interval))});var f=function(){if(!$('.headlines').data('hovered')){var a=parseInt($current.text());var b=(a===$bullets.length)?0:a;$bullets.eq(b).trigger('mouseenter')}};d.data('timer',setInterval(f,interval))});$(function(){var a=$('.rotor');a.jCarouselLite({btnPrev:a.parent('div').find("a.prev"),btnNext:a.parent('div').find("a.next"),mouseWheel:true,visible:(parseInt(a.find("ul").attr('class'))||3)})});

//$("#TR_Slot_95").ready(
//function(){
//$("#TR_Slot_95").attr("style","");
//var a=$("#TR_Slot_95").parents(".meta object:first");
//if(parseInt(a.length,10)<=0){
//	a=$("#TR_Slot_95").parents(".meta a:first")
//}
//var b=$("#TR_Slot_95").parents("li:first");
//var c=parseInt(b.css("padding-left"),10);
//var d=parseInt(b.css("padding-right"),10);
//var e=parseInt(b.css("margin-left"),10);
//$("#TR_Slot_95").css("width",($(a).width())-(c+d+e))
//});
