// JavaScript Document
function init(){

$('.btGroup1').click(function(){
    $('button').removeClass('selected');
    $(this).addClass('selected');
});

$('.btGroup2').click(function(){
    $('button').removeClass('selected');
    $(this).addClass('selected');
});
magicAnimate(1);
}




// Requires  Animate.css
// Author Carlos u
// magicSequence(magicGroup, Time);
// <tag1 magicGroup="x" ... <tag2 magicGroup="1" magicEffect="zoomInUp" 
function magicAnimate(groupSequence){

    var DEFAULT_EFFECT = 'bounceInLeft';
    var RECURSION_LIMIT = 20;  // Limito por seguridad

    groupSequence  = (typeof groupSequence === "undefined") ? 1 : groupSequence;
    elements = $('[magicGroup="' + groupSequence + '"]');

    elements.each(function(i){
        attrEffect = $(this).attr('magicEffect');
        effect = (typeof attrEffect === "undefined" || attrEffect=='') ? DEFAULT_EFFECT : attrEffect;
        $(this).addClass('animated '+ effect);

    });

}


