//TODO: clean up
Drupal.behaviors.neova_retailer_collapsable = function(context) {
	var prefix = '';
	//if nodeType is body context is not from ajax response and we use div-id for speedup
	if(context.nodeType == 9) {
		prefix = '#block-views-retailer-block_1 ';
	}
	$(prefix + 'div.view-retailer div.views-row', context).find('div:first').each(function() {
		var self = this;
		$(this).nextAll().hide();
		$(this).children().eq(0).wrap('<a href="#"></a>').click(function() {
			$(self).toggleClass('exposed').
			nextAll().slideToggle('fast');
			return false;
		});
	});
}
