Ext.namespace('fenceco','fenceco.public');

fenceco.public.about = function() {

    var init = function( ) {

		new Ext.ux.Carousel('entryfenceimage', {
            itemSelector: 'img',
            interval: 5,
        	transitionEasing: 'easeIn'  ,
        	autoPlay: true,
            showPlayButton: true,
            pauseOnNavigate: true,
            freezeOnHover: true,
            navigationOnHover: true              
    	});
	}
	
	var openViewer = function( bad ) {
		
		var url = 'imageviewer.php';
		
		if( bad ) {
		
		    url += '?t=bad';
		}
		
	    window.open( url , 'fencecoimageviewer' , 'width=620,height=420,resizable=no,scrollbars=yes,location=no,directories=no,menubar=no,copyhistory=no,status=no');
	}
	
	var openPhilanthropy = function( type ) {
		
		var url = 'imageviewer.php?t=philanthropy&galleryid=' + type;
	    window.open( url , 'fencecoimageviewer' , 'width=620,height=420,resizable=no,scrollbars=yes,location=no,directories=no,menubar=no,copyhistory=no,status=no');
	}

    return {
    
        init : function( ) {
        
            init( );
        },
        
        openViewer : function( bad ) {
        
            openViewer( bad );
        },
        
        openPhilanthropy : function( t ) {
        	
        	openPhilanthropy( t );
        }
    }
}();