/* jQuery Shopping Cart 
 *
 * Published under GNU License 
 * 
 * 2010/07/01 - by delete ( olivier@smartmarseille.com )
 * 2010/07/14 - by delete ( olivier@smartmarseille.com ) - Added Attributes support     
 */
$(document).ready(function() {
/*---------------MANUFACTURER-------------*/
  $('.brand').click(function(){
     $('#brand_container').animate({opacity:0}, 500);
     $('#brand_container').css({'display':'none'});
     window.location = 'index.php?manufacturers_id=' + $(this).attr('id');
  });

  $('#brand_dropdown').toggle(
    function() {
        $('#brand_container').css({'display':'block'});
        $('#brand_container').animate({opacity:1}, 500);
    },
    function() {
        $('#brand_container').animate({opacity:0}, 500);
        $('#brand_container').css({'display':'none'});
    });

/*---------------CATEGORY-------------*/
  $('.category').click(function(){
     $('#category_container').animate({opacity:0}, 500);
     $('#category_container').css({'display':'none'});
     window.location = 'index.php?cPath=' + $(this).attr('id');
  });

  $('#category_dropdown').toggle(
    function() {
        $('#category_container').css({'display':'block'});
        $('#category_container').animate({opacity:1}, 500);
    },
    function() {
        $('#category_container').animate({opacity:0}, 500);
        $('#category_container').css({'display':'none'});
    });

/*---------------GOALS-------------*/
  $('.goal').click(function(){
     $('#goal_container').animate({opacity:0}, 500);
     $('#goal_container').css({'display':'none'});
     window.location = 'index.php?goals_id=' + $(this).attr('id');
  });

  $('#goal_dropdown').toggle(
    function() {
        $('#goal_container').css({'display':'block'});
        $('#goal_container').animate({opacity:1}, 500);
    },
    function() {
        $('#goal_container').animate({opacity:0}, 500);
        $('#goal_container').css({'display':'none'});
    });
});
