$(document).ready(function(){
	//write comment and login pop out
	$('a[rel="group"].showdetail').fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">' + (currentIndex + 1) + ' of ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + ' item(s)</span>';
				}
			});

	$('#slider').nivoSlider();
		$('.s2 , #cap-s2').cycle({ 
   		 fx:     'fade', 
    	 speed:  'fast', 
    	 timeout: 5000, 
    	 next:   '.next2', 
   		 prev:   '.prev2' 
		});
		$('.s3 , #cap-s3').cycle({ 
   		 fx:     'fade', 
    	 speed:  'fast', 
    	 timeout: 6000, 
    	 next:   '.next3', 
   		  prev:   '.prev3'
		});
		$('.s4 , #cap-s4').cycle({ 
   		 fx:     'fade', 
    	 speed:  'fast', 
    	 timeout: 6000, 
    	 next:   '.next4', 
   		  prev:   '.prev4'
		});
		
		$("#navigation").treeview({
		persist: "location",
		collapsed: true,
		unique: true
		});
		Cufon.replace('.brook_23', { fontFamily: 'Brook 23', hover: true }); 
		
	
	$('#gv').galleryView({
		gallery_width: 800,
		gallery_height: 600,
		frame_width: 90,
		frame_height: 90,
		pause_on_hover: true
	});
	
	
});
