var $j = jQuery

$j(document).ready(function(){


	/*******
	** vp - group - (c) - 0.0.1 **
	*******/
	if ( $j('.group').length > 0 ) {
		$j('.group').mouseenter(function(){
			// open
			$j(this).find('ul').animate({
				height: 'toggle'
			}, 500, function() {
				// Animation complete.
			});
		}).mouseleave(function(){
			// close
			$j(this).find('ul').animate({
				height: 'toggle'
			}, 250, function() {
				// Animation complete.
				$j(this).removeClass('selected');
			});
		});
	
	
	}
	
	
	/*******
	** vp - Brandbox - (c) - 0.0.1 **
	*******/
	if ( $j('.brandBox').length > 0 && jQuery().cycle ) {
		$j('#navBrandBox').empty();
		$j('.brandBoxWrapper')
		.cycle({
			fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
			timeout: 10000,
			speed: 1000,
			fastOnEvent: 300,
			pager: $j('#navBrandBox'),
			pagerAnchorBuilder: function(index, DOMelement) {
				/*
				if (index == 0) {
					return '<li class="first-child"><a href="?boxtab=' + index +'">' + $j(DOMelement).find(".linkText").eq(0).text() + '</a></li>';
				}
				else if (index == 5) {
					return '<li class="last-child"><a href="?boxtab=' + index +'">' + $j(DOMelement).find(".linkText").eq(0).text() + '</a></li>';
				}
				else {*/
					return '<li><a href="?boxtab=' + index +'">' + $j(DOMelement).find(".linkText").eq(0).text() + '</a></li>';
				/*}*/
			}
		});	
	}
	
	
});


