/* ------------------------- Introduction -------------------------
  Copyright (c) 2010 Mark Avery.

  live_site is the url to the live url of the site
  analytics is the google analytics code that is given to you.

  acts are called once for all items passed, while scenes and linkers are called for each item
  likers use a regular expression string instead of an item

  item : the jQuery selector being passed to the function
  handle : the fuction to be called
  extras : any additional argument to be passed as an array

  this.start_up() initiates the controler.. and will be called upon instantiation.. of all classes.

*/

function Introduction(element){
  Controler.call(this, element);
  var self = this;
  this.live_site = 'http://pacificlightingsystems.com';
  this.analytics = 'UA-8173296-53';

  this.linkers = [{
    hookshot : /^((?!pls\.mediadrink\.com|(mailto)|(^\/)|(^\#)|(\.loc)).)*$/,
    handle : External_link
  }]

  this.scenes = [{
    item : this.container.find('div#content.personnel table'),
    handle : Table_styled,
    extras : [false]
  },{
    item : this.container.find('div#content.products table'),
    handle : Table_styled,
    extras : [false]
  },{
    item : this.container.find('#content.products div.callout form'),
    handle : Product_sort,
    extras : [this.container.find('div#content.products div.content table')]
  },{
    item : this.container.find('ul.navigation.primary li ul'),
    handle : Navigation_hover
  }];

  this.acts = [{
    item : this.container.find('ul.navigation.primary li a'),
    handle : Navigation_active_state
  },{
    item : this.container.siblings('div#admin_bar').find('ul li a[href=#logout]'),
    handle : Logout_user
  },{
    item : this.container.find('div#content.home div.gallery'),
    handle : Slideshow
  },{
    item : this.container.find('#content.personnel form.admin'),
    handle : Employee_update,
    extras : [this.container.find('div#content div.content table tbody tr')]
  },{
    item : this.container.find('#content.products form.admin'),
    handle : Product_update,
    extras : [this.container.find('div#content div.content table tbody tr')]
  },{
    item : this.container.find('#content.samples form.admin'),
    handle : Sample_update,
    extras : [this.container.find('div#content div.content div.sample')]
  },{
    item : this.container.find('#content.profile form.admin'),
    handle : User_update,
    extras : [this.container.find('div#content div.callout h5')]
  },{
    item : this.container.find('#content.home form.admin'),
    handle : Home_update
  },{
    item : this.container.find('#gmap div.google_map'),
    handle : Location_finder
  }];

  return this;
}

$(document).ready(function() {
  new Introduction($('#container')).start_up();
});

