// $cmignore
		
		var controllers = {
			config : function(){
				return {
					hldr : $('.hldr'),
					hldrItems : $('.hldr > li'),
					hldrLastItem : $('.hldr > li:last'),
					hldrHeight : $('.hldr li').height()
				}
			},

			settings: {
				sherwin : false 
			},

			init :	{ 

				extendOptions : function(el, options){
					if(options){
						controllers.settings = $.extend(true, controllers.settings, options);
					}
				},
				triggerEvent : function(position){
					position.click( function(){
						/* put settings logic for background image swap-in and swap-out */
						var indx = (position.index() != 0) ? -(position.index() + 1) : -1;
						if( !$('.hldr > li').eq(indx).hasClass('visible') && !$('.hldr *').is(':animated')){
							controllers.helpers.hasBeenClicked($(this));
							controllers.helpers.firstAnimation($('.hldr > li').eq(indx));
							controllers.helpers.posHidden();
						}else{
							
						}
					});
				},
				loadContent : function(){	

					var hash = controllers.helpers.getHash();
					var scene = controllers.helpers.getHash().replace('#', '');

					if(hash.length > 1 && controllers.helpers.getIndx() != 'undefined'){

						var indx = (controllers.helpers.getIndx() != 0) ? -(controllers.helpers.getIndx() + 1) : -1;
						$('.'+scene).addClass('clicked');
						$('.hldr > li').eq(indx).addClass('visible');

					}else{

						$('.clk li:first').addClass('clicked');
					}

			 	},
				styles : function(){
					controllers.config().hldr.css({
					       'height' : controllers.config().hldrHeight,
					       'overflow' : 'hidden',
					       'position' : 'absolute'
					 });
					controllers.config().hldrItems.css({
					       'position' : 'absolute',
					       'bottom' : '-6px'
					 });
					if( controllers.helpers.getHash().length > 0 ){

						$('.hldr > li').not('.visible').css({'display':'none'});

						$('.visible').css({
							'display' : 'block'
						});
						$('.hldr').css({'overflow' : 'visible'});	

					}else{

						controllers.config().hldrLastItem.addClass('visible');
						controllers.config().hldrItems.not('.visible').css({
							'display' : 'none'
						});
						$('.visible').css({
							'display' : 'block'
						});

					}
					$('.hldr').css({
					       'display' : 'block'
					});
				}
			},
			helpers : {
				firstAnimation : function(el){
					controllers.helpers.firstSherwinAnimation(el);

					/*
					need to build
					if( controllers.settings.sherwin == true ){
						controllers.helpers.firstSherwinAnimation(el);
					*/
				},
				secondAnimation : function(){
				},
				removeVisible : function (){
					$('.visible').removeClass();	
				},
				positionElem : function (el){
					el
						.css({ 'bottom' : controllers.config().hldrHeight,
						       'display' : 'block'	
						})
						.addClass('visible');
				},
				posHidden : function (){
						$('.hldr > li').not('.visible').css({'bottom' : controllers.config().hldrHeight + 10});	
				},
				hasBeenClicked : function (el){
					if( !el.hasClass('clicked') ){	
						el.addClass('clicked')	
						var clicked = $('.clk li').not(el);
						if(clicked.hasClass('clicked'))
							clicked.removeClass('clicked');
					}
				},
				getHash : function(){

					return window.location.hash;

				},

				getIndx : function(){
						if($('.clicked').length){
							var indx = $('.clicked').index();
							return indx;
						}
			  	},


				addHash : function(){
						window.location.hash = $('.clicked').attr('class').split(" ")[0];
			    },

				firstSherwinAnimation : function(el){
					$('.hldr').css({'overflow' : 'hidden'});	
					$('.hldr > li').not('.visible').css({'display' : 'block'});	

					$('.visible')
						.animate({
							'bottom' : [ "-=20" , 'swing']
							},
							{ duration : 500, queue : true }
						)	
						.animate({
							'bottom' : [ ( controllers.config().hldrHeight + 10 ) , 'swing']
							},
							{duration : 350, 
							 queue : true,
							 complete : function(){
								controllers.helpers.removeVisible();
								controllers.helpers.positionElem(el);
								controllers.helpers.secondSherwinAnimation(el);
								}
							}
						);	
				},
				secondSherwinAnimation : function(el){
					el
						.animate({
							'bottom' : [ "-20px" , 'swing']
							},
							{ duration : 250, queue : true }
						)	
						.animate({
							'bottom' : [ "-6" , 'swing']
							},
							{duration : 400, 
							 queue : true,
							 complete : function(){
									$('.hldr').css({'overflow' : 'visible'});	
									$('.hldr > li').not('.visible').css({'display' : 'none'});	
									controllers.helpers.addHash();
								}
							}
						);	
					/*
					.animate(controllers.settings.animations[0]]);
					.animate(controllers.settings.animations[0].properties, controllers.settings.animations[0].options);
					*/
				}
			}
		}


	if (typeof Object.create !== 'function') {
		Object.create = function (o) {
			function F() {}
			F.prototype = o;
			return new F();
	   	};
	}


	(function($) {

		$.fn.swtch = function(options) {
			this.each(function() {
				var myController = Object.create(controllers);
				for( prop in myController.init){
					myController.init[prop]($(this), options);
				}
			});
			return this;
		};

	})(jQuery);



// $/cmignore

