/**
 * @fileoverview Shop-specific JS
 * 
 * @author PG @ Pirata [piratalondon.com]
 * 
 */
(function(){
	
	// jquery prototype no conflict shop fix
	var $ = window.jQuery;
	

    /**
     * Initialise the functionality
	 * 
     * @return void
     * @public
     */
    var init = function() {
		
		// initialise the 'sub-category' fix
		subCatInit();
		
	};
	
	
	/*
	 * Create sub-categories
	 */
	var subCatInit = function() {
		
		// add a sub-category class to any items that contain the > character
		$('section#aside-categories ul.categories-list li a')
			.filter(function(index){
				var content = $(this).text();
				return content.match(/^(>|&gt;)/);
			})
			.addClass('sub-category');
		
	};
	
	// start
	$(document).ready(function(){
		init();
	});
})();

