var $j = jQuery.noConflict();
	$j(document).ready(function() {
		
		// first remove the noscript div
		$j('.slideshow-noscript').remove();
		// now remove the 'hidden' class from the slideshow
		$j('.slideshow-images').removeClass('hidden');
		$j('.nav-holder').html(function(){return $j(this).html().replace(" ","")})
		$j('.clear').html(function(){return $j(this).html().replace(" ","")})
		// check out options reference http://www.malsup.com/jquery/cycle/options.html
		$j('.slideshow-images').cycle({
			fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
			pager:'.nav-holder',
			pagerAnchorBuilder:function(idx, slide)
			{
				return '<li><a href="#">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>';
			},
			timeout:4000
		});
		$j('.slideshow-images').prepend("<b class=\"tl\"></b><b class=\"tr\"></b>").append("<b class=\"bl\"></b><b class=\"br\"></b>")
		
		

		
		var isPlaying = true;
		// set default tootop
		$j('.slideshow_play_btn li a').attr('title', 'Pause');
		
		$j('.slideshow_play_btn').click(function(event)
		{ 
			event.preventDefault();
			if(isPlaying)
			{			
	    		$j('.slideshow-images').cycle('pause'); 
				$j('.slideshow_play_btn li a').addClass('pause');
				// update tooltip
				$j('.slideshow_play_btn li a').attr('title', 'Resume');
				isPlaying = false;
			}else
			{
	    		$j('.slideshow-images').cycle('resume'); 
				$j('.slideshow_play_btn li a').removeClass('pause');
				// update tooltip
				$j('.slideshow_play_btn li a').attr('title', 'Pause');
				isPlaying = true;				
				
			}
		});
	
	});
