/*  Autor: Richelly
    Data: 04/08/2011
    Website: SelectSound
*/

jQuery(document).ready(function(){

    //MENU
    jQuery('.main-menu-produtos>li').hover(function(){
        jQuery(this).find('ul').slideDown('fast');

    }, function(){
        jQuery(this).find('ul').stop(true, true).slideUp('fast');


    })

	 jQuery(".wpcf7").contents().find("br").remove();
	 
    //PARA CADA BANNERIZE
    jQuery('div[class^=wp_bannerize] ul').each(function(){
        jQuery(this).cycle({
            fx: 'scrollVert',
            speed: 'slow',
            easing: 'shadyGraphics'
        })
    });

    jQuery('#main-banner .imgs').cycle({
        fx:     'fade',
        speed:  'slow',
        easing: 'shadyGraphics',
        timeout: 5000,
        pager:  '#main-banner .listagem',
        pagerAnchorBuilder: function(idx, slide) {
            var pos = jQuery('#main-banner .imgs li:eq('+idx+') img');
//            return '<a href="#"><img src="'+ pos.attr('src')+'" width="72" height="38"/></a>';
               return '<li><a href="#" title="'+jQuery('#main-banner .imgs li:eq('+idx+') a').attr('title')+'"><img width="115" height="70" src="'+ pos.attr('src')+'" alt="'+pos.attr('alt')+'"/></a></li>';
        }
    });
})

jQuery.easing['shadyGraphics'] = function (x, t, b, c, d) {
    if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
    return -c/2 * ((t-=2)*t*t*t - 2) + b;
};


