
	/* 
		airfront vs studioskylab
		page specific js file
	*/
	
	
	var PLAhomepage = {
		
		querypaths : {
			plaIntroCTA : "js-pla-intro-cta",
			plaIntro : "js-pla-intro",
			toggler : "toggler",
			togglerOpen : "toggler-open",
			togglerClosed : "toggler-closed"
		},
		
		jsLabels : {
			open : "more info",
			close : "hide"
		},
		
		_init : function() {
			
			var self = this;
			
			// some jQuery object avrs for elements we're going to manipulate
			var jPlaIntroCTA = $j("." + PLAhomepage.querypaths.plaIntroCTA);
			var jPlaIntro = $j("." + PLAhomepage.querypaths.plaIntro);
			
			// add in the more/less button 
			jPlaIntroCTA.prepend('<a href="#" class="' + PLAhomepage.querypaths.toggler +  '">' + PLAhomepage.jsLabels.open + '</a>');
			
			// attach toggle event to more/less button
			$j("." + PLAhomepage.querypaths.toggler, jPlaIntroCTA).toggle(
				function () {
					$j(this).text(PLAhomepage.jsLabels.close).addClass(PLAhomepage.querypaths.togglerOpen);
					jPlaIntro.slideDown();
				},
				function () {
					$j(this).text(PLAhomepage.jsLabels.open).removeClass(PLAhomepage.querypaths.togglerOpen);
					jPlaIntro.slideUp();
				}
			);
			
		}
		
	}

	$j(document).ready(function(){
		PLAhomepage._init();
	});
	