jQuery(document).ready(function () {
	
	jQuery("a.product-modal").fancybox({
		'width'	: 700,
		'height'	:	600,
		'autoDimensions'	: false,
		'overlayShow'		: false,
		'scrolling'			: 'no',
		'centerOnScroll'	: true,
		'type' : 'iframe',
		'titleShow' : false
});


// Feature box for category descriptions

jQuery.fn.showFeatureText = function() {

  return this.each(function(){    
    var box = jQuery(this);
    var text = jQuery('p.slider',this);    

    text.css({ position: 'absolute', top: '0' }).hide();

    box.hover(function(){
      text.slideDown("fast");
    },function(){
      text.slideUp("fast");
    });

  });
}

jQuery('.comparison-item').showFeatureText(); // initialise

/* Quicksand */

// Load

//$('ul#productList').quicksand( $( 'ul#' + active_quicksand + '> li'), {
//      duration: 500,
//      attribute: 'data-id',
//      easing: 'easeInOutQuad'
//    });

// Click

// var brand = 'All';

jQuery(function() {

  jQuery('#filterBrand a').click(function(e) {
									 
	var brand = jQuery(this).attr('title');													 
										 
    jQuery('ul#productList').quicksand( jQuery( '#brand' + brand + ' > li'), {
      duration: 500,
      easing: 'easeInOutQuad',
	  attribute: "data-id"
    }, function() { 
    
    jQuery('.comparison-item').showFeatureText(); 
    
    });
    
    e.preventDefault();

  });
});

/* End Quicksand */

// $('#tabs').tabify();

});
