function permanent_notice(msg){
	 jQuery.noticeAdd({
                        text: msg,
                        stay: true
                });
	}
	
function temporal_notice(msg){
	jQuery.noticeAdd({
                        text: msg,
                        stay: false
                });
	}
	
function remove_notice(){
	jQuery.noticeRemove($('.notice-item-wrapper'), 400);
	}

/*Funcion para JCarousel*/
function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.startAuto(0);
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.startAuto(0);
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
};

jQuery(document).ready(function() {
	if(document.getElementById('menu')){//Validar que exista el menu y no cause error en Admin
    	jQuery('#mycarousel').jcarousel({
        	auto: 5,
        	wrap: 'last',
        	initCallback: mycarousel_initCallback
    	});
		//Validar ventanas popup
		$("a[rel='example2']").colorbox({transition:"fade"});
	}
});
