$(document).ready(function() {
	$('.cSlideShow')
	.before('<div class="nav" id="nav">')
	.cycle({
		fx:     'scrollRight',
		pager: '#nav',
	    timeout:  0,
	    speed: 2000,
		easing: 'backinout',
		random: 1,
//		startingSlide: 0,
//		fastOnEvent:   0,
//		after: onAfter
	});

	$.setupTip = function(what,sh,cont){
//		if(typeof cont == 'undefined' || cont == '') cont = 'Use links above to navigate the header';
		if(typeof cont == 'undefined' || cont == '') cont = 'Click here to navigate';
/*		if(what=='.cSlideShow > a'){
			target = '#cSlideShow';
			offsetXt = -180;
			offsetYt = -102;
		}
		else{*/
			target = 'target';
			offsetXt = 28;
			offsetYt = -30;
//		}
		$(what).poshytip({
			content: cont,
			className: 'tip-darkgray',
			bgImageFrameSize: 9,
			showTimeout: 20,
			showOn: sh,
			alignTo: target,
			alignX: 'right',
			alignY: 'top',
			offsetX: offsetXt,
			offsetY: offsetYt
		});
	}

	$('#nav a').each(function(index) {
		$.setupTip(this,'none');
	});		

//	$.setupTip('#nav > a','none');

	$('#nav > a:last-child').poshytip('show');

//	$.setupTip('.cSlideShow > a','none');
	
//	$('.cSlideShow > a:first-child').poshytip('show');
	
//	setTimeout("$('.cSlideShow > a:first-child').poshytip('hide');$.setupTip('.cSlideShow > a','hover');", 5500);

	setTimeout("$('#nav > a:last-child').poshytip('hide');/* $('#nav a').each(function(index) { $.setupTip(this,'hover'); }); */", 4500);

});

