
$(document).ready(function(){

// links com target blank
$('a[class*=blank]').click( function() {
window.open(this.href);
return false;
});

//Destaque
$('#box-destaques .control li').animate({opacity: 0.8}, 0);
$('#destaques div div').animate({opacity: 1.0}, 0);
$('#box-destaques .control li a').mouseenter(function(){
$(this).parent('li').children('div').fadeIn('fast');
}).mouseleave(function(){
$(this).parent('li').children('div').fadeOut('fast');
});


$.fn.cycle.transitions.SlideZoom = function($cont, $slides, opts) { 				
opts.before.push(function(curr, next, opts, fwd) {
var element = null;
var w = 627;
var h = 345;
if ($(curr).attr('id') == $(next).attr('id')) {
element = '#' + $(curr).attr('id') + ' div a img';
} else {
element = '#' + $(next).attr('id') + ' div a img';
}

$(element).css({'width': w+'px','height': h+'px'});

$(element).animate(
{
height: h + Math.round((h*5)/100),
width: w + Math.round((w*5)/100)
}, 
opts.timeout*2, 
function() {
//$(element).css("width","627px");
//$(element).css("height","345px");
}
);
$.fn.cycle.commonReset(curr,next,opts);
});

};

if ($('#destaques')[0]) {

$('#destaques').cycle({
fx: 'fade',  
speed:  1500, 
timeout: 3300,
pause:   1,
pagerEvent: 'click',
pager:   '.control',
after:   onAfterDestaques,
pauseOnPagerHover: true,
pagerAnchorBuilder: function(index, DOMelement) {
return '.control li:eq(' + index + ') a'; 
}
});
}



});



function onAfterDestaques(){
/*$(".Zoom").animate(
{'width':'+=5%','height':'+=5%'},
{'queue':false,'duration':4000}
)*/
}
