jQuery(function ($) {
	
	
	
/* HOVERS FILTRO CATEGORIAS */
	
    $('#filtro-categorias li a').hover(
    function () {

        $(this).css('padding', '7px 9px;').stop().animate({
            'color': '#ffffff',
            'paddingLeft': '14px',
            'paddingRight': '14px',
            'backgroundColor': 'rgba(0,76,153,1)'
        }, 'fast');
    },
    function () {

        $(this).css('padding', '7px 14px').stop().animate({
            'color': '#444444',
            'paddingLeft': '9px',
            'paddingRight': '9px',
            'backgroundColor': 'rgba(255,255,255,1)'
        }, 'normal');

    });



/* TICKET NEWS */

    $('#twitter_update_list').ticker();

    // hide the release history when the page loads
    $('#release-wrapper').css('margin-top', '-' + ($('#release-wrapper').height() + 20) + 'px');

    // show/hide the release history on click
    $('a[href="#release-history"]').toggle(function () {
        $('#release-wrapper').animate({
            marginTop: '0px'
        }, 600, 'linear');
    }, function () {
        $('#release-wrapper').animate({
            marginTop: '-' + ($('#release-wrapper').height() + 20) + 'px'
        }, 600, 'linear');
    });



/* LOGIN CAPA */


    $("#acceso-login").click(function (event) {
        event.preventDefault();
        $("#login-capa").slideToggle();
    });

    $("#login-capa a").click(function (event) {
        event.preventDefault();
        $("#login-capa").slideUp();
    });
	
	
    $("#acceso-registro").click(function (event) {
        event.preventDefault();
        $("#registro-capa").slideToggle();
    });

    $("#registro-capa a").click(function (event) {
        event.preventDefault();
        $("#registro-capa").slideUp();
    });
	





/* ROTAR */

    $(".rotar15").rotate({
        bind: {
            mouseover: function () {
                $(this).rotate({
                    animateTo: 15
                })
            },
            mouseout: function () {
                $(this).rotate({
                    animateTo: 0
                })
            }
        }

    });



/* HOVERS TOPNAV */

    $("#categorias > ul > li").not(".categorias-otros").hover(

    function () {
        $(this).find("a:first").stop().animate({
            color: '#ffffff',
            backgroundColor: '#014081'
        }, 300);
    }, function () {
        $(this).find("a:first").stop().animate({
            color: '#fff',
            backgroundColor: '#004c99'

        }, 300);
    });

    $("#cesta-menu").hover(

    function () {
        $(this).find(".cesta-menu-total").stop().animate({
            color: '#ffffff',
            backgroundColor: '#E2001A'
        }, 300);
    }, function () {
        $(this).find(".cesta-menu-total").stop().animate({
            color: '#444444',
            backgroundColor: '#ffffff'
        }, 300);
    });


    $('.switch').hover(function () {
        $(this).find('.switch-opt').stop(true, true).slideDown('fast');
    }, function () {
        $(this).find('.switch-opt').stop(true, true).slideUp('fast');
    });





/* TABS */


    $(".tabs").tabs({
        fx: {
            opacity: 'toggle',
            duration: 250
        }
    });



/* PRETTYPHOTO */

    $("#producto-imagen a[rel^='prettyPhoto'], #producto-galeria a[rel^='prettyPhoto']").prettyPhoto({
        theme: 'light_square',
        opacity: 0.5
    });




/* TOGGLES */

    /*$("#checkout form").accordion({
        autoHeight: false
    });*/





/* SLIDER PORTADA */
$('#banners-slider').nivoSlider({
        effect: 'fade',
        animSpeed: 200,
        pauseTime: 3000,
        directionNav: false,
        prevText: 'Anterior',
        nextText: 'Siguiente',
        randomStart: true
       
    });






});





/*

var Header = {
	addFade : function(selector){
		$("<span class=\"fake-hover\"></span>").css("display", "none").prependTo($(selector)); 
		$(selector+" a").bind("mouseenter",function(){
			$(selector+" .fake-hover").fadeIn("slow");
		});
		$(selector+" a").bind("mouseleave",function(){
			$(selector+" .fake-hover").fadeOut("slow");
		});
		
	}
};

$(function(){
	Header.addFade("#logo");
});




*/
