jQuery.noConflict();
var options5 = {
    zoomWidth: 415,
    zoomHeight: 300,
    showEffect:'show',
    hideEffect:'fadeout',
    fadeoutSpeed: 'slow',
    title :false
}


jQuery(window).bind("load", function() {
    jQuery("div#mygalone").slideView();
    jQuery('.stripTransmitter li:first').addClass('first');
    jQuery('.stripTransmitter li:last').addClass('last');
    //=======intro=====
    var slider_links = jQuery('.stripTransmitter li a');
    var slider_links_index = 0;
    function slider_intro(){
        slider_links.eq(slider_links_index).trigger('click');
        slider_links_index++;
        if(slider_links_index <= slider_links.size()){
            setTimeout(function(){slider_intro()}, 5000); //select change time
        }
        else if(slider_links_index > slider_links.size()){
            slider_links.eq(0).trigger('click')
        }
    }
    slider_intro();
    //===============

    //=======for mini subscribe ======
    jQuery('#accept-condition').click(function() {
        if (jQuery('#accept-condition').is(':checked')){
            jQuery('#sendMailDesc').hide();
            jQuery('#sendMail').show();
        }else{
            jQuery('#sendMailDesc').show();
            jQuery('#sendMail').hide();
        }
    });
    jQuery('#sendMailDesc').click(function() {
        if (jQuery('#accept-condition').is(':checked')){
        }else{
            alert('Debes aceptar la Política de Privacidad');
        }
    });
    /* No enterkey submit if no accept conditions */
    jQuery('#newsletter-validate-detail').keypress(function(e){
           if (jQuery('#accept-condition').is(':checked')){
           }else{
               if(e == 13){
                  return false;
                }
           }
    });
    jQuery('#newsletter-validate-detail').keypress(function(e){
           if (jQuery('#accept-condition').is(':checked')){
           }else{
            if(e.which == 13){
              return false;
            }
           }
    });
    /*=========for account page===========*/
    jQuery('#Sign-up-accept-condition').click(function() {
        if (jQuery('#Sign-up-accept-condition').is(':checked')){
            jQuery('#SingUpsbmtDes').hide();
            jQuery('#SingUpsbmt').show();
        }else{
            jQuery('#SingUpsbmtDes').show();
            jQuery('#SingUpsbmt').hide();
        }
    });
    jQuery('#SingUpsbmtDes').click(function() {
        if (jQuery('#Sign-up-accept-condition').is(':checked')){
        }else{
            alert('Debes aceptar la Política de Privacidad');
        }
    });
    /* No enterkey submit if no accept conditions */
    jQuery('#form-validate').keypress(function(e){
           if (jQuery('#Sign-up-accept-condition').is(':checked')){
           }else{
               if(e == 13){
                  return false;
                }
           }
    });
    jQuery('#form-validate').keypress(function(e){
           if (jQuery('#Sign-up-accept-condition').is(':checked')){
           }else{
            if(e.which == 13){
              return false;
            }
           }
    });
    /*=========for billing page (checkout step 2)===========*/
    jQuery('#billingContinue').hide();
    jQuery('#billing-accept-condition').click(function() {
        if (jQuery('#billing-accept-condition').is(':checked')){
            jQuery('#billingContinueDes').hide();
            jQuery('#billingContinue').show();
        }else{
            jQuery('#billingContinueDes').show();
            jQuery('#billingContinue').hide();
        }
    });
    jQuery('#billingContinueDes').click(function() {
        if (jQuery('#billing-accept-condition').is(':checked')){
        }else{
            alert('Debes aceptar las condiciones de venta');
        }
    });
    /* No enterkey submit if no accept conditions */
    jQuery('#co-billing-form').keypress(function(e){
           if (jQuery('#billing-accept-condition').is(':checked')){
           }else{
               if(e == 13){
                  return false;
                }
           }
    });
    jQuery('#co-billing-form').keypress(function(e){
           if (jQuery('#billing-accept-condition').is(':checked')){
           }else{
            if(e.which == 13){
              return false;
            }
           }
    });

  //Jquery ZOOM

    jQuery(".jqzoom").jqzoom(options5);

});

var nCount = 0;
var theTimerID;

function intro (){
        if(jQuery("div#mygalone").length > 0) {
            jQuery("div#mygalone").slideView();
            theLinks = jQuery('#stripTransmitter0 a');
            //for kill interval purposes
            theTimerID = setInterval("autoSlide()", 3000);
        }
}
function autoSlide(){
    nCount++;
    if(nCount == theLinks.length ) nCount = 0;
    jQuery(theLinks[nCount]).trigger("click");
}

jQuery(window).bind("load", intro );

