$(document).ready(function() {

    //$('.capa').corner();
    $('.capa2').corner();

    $(".roll").each(function() {
        rollsrc = $(this).attr("src");
        rollON = rollsrc.replace(/.gif$/ig, "_hover.gif");
        $("<img>").attr("src", rollON);
    });
    $(".roll").mouseover(function() {
        imgsrc = $(this).attr("src");
        matches = imgsrc.match(/_hover/);
        if (!matches) {
            imgsrcON = imgsrc.replace(/.gif$/ig, "_hover.gif");
            $(this).attr("src", imgsrcON);
        }
    });
    $(".roll").mouseout(function() {
        $(this).attr("src", imgsrc);
    });
        
//  $('#menu li a').click(function(event){
//			var elem = $(this).next();
//			if(elem.is('ul')){
//				event.preventDefault();
//				$('#menu ul:visible').not(elem).slideUp();
//				elem.slideToggle();
//			}
//	});		
		
	   $().piroBox({
        my_speed: 600, //animation speed
        bg_alpha: 0.5, //background opacity
        radius: 4, //caption rounded corner
        scrollImage : true, // true == image follows the page, false == image remains in the same open position
        pirobox_next : 'piro_next', // Nav buttons -> piro_next == inside piroBox , piro_next_out == outside piroBox
        pirobox_prev : 'piro_prev',// Nav buttons -> piro_prev == inside piroBox , piro_prev_out == outside piroBox
        close_all : '.piro_close',// add class .piro_overlay(with comma)if you want overlay click close piroBox
        slideShow : 'slideshow', // just delete slideshow between '' if you don't want it.
        slideSpeed : 4 //slideshow duration in seconds(3 to 6 Recommended)
    });

});
