	
	var PageSlider = {
		
		current: 'main',
		previous : '',
		
		init : function()
		{
			// Set default width 
			PageSlider.contWidth = document.body.offsetWidth;
			
			// Set width of pages
			jQuery('.page-container').css( 'width', PageSlider.contWidth+'px' );
			
			//jQuery('#page-about').css( 'left', document.body.offsetWidth+'px' );
		},
		
		Jump : function( id )
		{
			if (PageSlider.current != id)
			{
				// Actual page index
				var pIndex = jQuery('#page-' + id).attr('rel').replace( 'page-', '' );
				// Slide out current page
				jQuery('#page-' + PageSlider.current).animate({ left: '-=' + PageSlider.contWidth }, 500, function(){			
					jQuery(this).css( 'left', jQuery(this).attr('id')=='page-main' ? PageSlider.contWidth+'px' : 0 );
				});
				
				// Slide in selected page
				jQuery('#page-' + id).animate({ left: '-=' + ( pIndex * PageSlider.contWidth ) }, 500);
				
				// Store new page ID
				PageSlider.current = id; 
				
			}
		},
		
		Prev : function()
		{
			if( PSlider.index != 0 )
			{
				// Index
				PSlider.index--;
				
				// Animate
				
				
				// Change Title
				PSlider.ChangeTitle();
			}
		}
		
	}
	
	
	var PSlider = {
		
		index : 0,
		count : 0,
		
		init : function()
		{
			PSlider.count = jQuery('.photo-slider img').length;
		},
		
		ChangeTitle : function(  )
		{
			jQuery('.photo-slider .title').animate({ opacity: 0 }, 400, function(){
				
				//alert( $('.photo-slider img')[PSlider.index] );
				
				var title = jQuery(jQuery('.photo-slider img')[PSlider.index]).attr('title');
				//var desc = jQuery(jQuery('.photo-slider img')[PSlider.index]).attr('alt');
				
				jQuery('.photo-slider .title').html( '<strong>'+title+'</strong>' );					
				jQuery('.photo-slider .title').animate({ opacity: 100 }, 1000 );
							
			});
			
		},
		
		Next : function()
		{
			if( (PSlider.index+1) != PSlider.count )
			{
				// Index
				PSlider.index++;
				
				// Animate
				jQuery('.photo-slider .psc').animate({ left: '-=380' }, 500 );
				
				// Change Title
				PSlider.ChangeTitle();
			}
		},
		
		Prev : function()
		{
			if( PSlider.index != 0 )
			{
				// Index
				PSlider.index--;
				
				// Animate
				jQuery('.photo-slider .psc').animate({ left: '+=380' }, 500 );
				
				// Change Title
				PSlider.ChangeTitle();
			}
		}
		
	}

 
	var PortfolioSlider = {
		
		index : 0,
		count : 0,
		
		Change : function( category, obj )
		{
			jQuery('.ppage').hide();
			jQuery('.category-'+category).show();
			
			PortfolioSlider.index = 0;
			PortfolioSlider.count = jQuery('.category-'+category).length;
			
			jQuery('.portfolio-inner .portfolio-slider').css( 'left', '0' );
			
			if (obj) {
				jQuery('.categories > li > a').removeClass('active');
				jQuery(obj).addClass('active');
			}
		},
		
		Next : function()
		{
			if( (PortfolioSlider.index+1) != PortfolioSlider.count )
			{
				// Index
				PortfolioSlider.index++;
				
				// Animate
				jQuery('.portfolio-inner .portfolio-slider').animate({ left: '-=730' }, 500 );
				
			}
		},
		
		Prev : function()
		{
			if( PortfolioSlider.index != 0 )
			{
				// Index
				PortfolioSlider.index--;
				
				// Animate
				jQuery('.portfolio-inner .portfolio-slider').animate({ left: '+=730' }, 500 );
				
			}
		}
		
	}
 
