/* ------------------------- Introduction -------------------------
  Copyright (c) 2009 Mark Avery. Copious Inc. -- copiousinc.com --
  
  ther are two different 'acts', load_acts, and jax_acts
  load_acts are the functions to be called upon a 'load' action
  jax_acts are to be called upon an 'jax' action
  for the different 'acts' they take 3 paramaters..
  
  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.
  
*/

// magic edit link 
// '<a href="/admin/page_categories/content/pages' + (document.URL.match(/\/\d+/)[0]) + '/edit"> hello </a>'

function Introduction(element){
  Controler.call(this, element);
  var self = this;
  this.live_site = 'http://fawnandforest.copiousdev.com';
  
  this.linker_force = [{
    hookshot : /^\/contact\/refer/i,
    handle : Email_page
  },{
    hookshot : /^\/contact\/personal_contact/i,
    handle : Personal_contact
  }]
 
  this.scenes = [{
    item : this.container.find('div#header form.search input[name=query], div#sidebar div.quick_labels fieldset.search input[name=query]'),
    handle : Text_input_default_vaule_switch
  },{
    item : this.container.find('div.grid'),
    handle : Product_grid_fixer
  },{
    item : this.container.find('div#body.product div.deskman table, div#body.registries div.content dl.info'),
    handle : Table_striper
  },{
    item : this.container.find('div#body.blog #content div.post div.featured_products'),
    handle : Blog_post_relatedproducts_expander
  }];
  
  this.acts = [{
    item : this.container.find('div#header div.widgets'),
    handle : Header_widgets
  },{
    item : this.container.find('div#footer div.footer_callouts div.callout div.tipper '),
    handle : Footer_widgets
  },{
    item : this.container.find('div.cart div.item'),
    handle : Cart_helper_adder
  },{
    item : this.container.find('div#header #mini_cart'),
    handle : Mini_cart
  },{
    item : this.container.find('div#body.store div.designers'),
    handle : Designer_expander
  },{
    item : this.container.find('div#body.store div.extra_wide .designer_list'),
    handle : Designer_grid_fixer
  },{
    item : this.container.find('div#content').find('button, a.button'),
    handle : Button_pusher
  },{
    item: this.container.find('div#sidebar .quick_labels'),
    handle : Sidebar_labels
  },{
    item: this.container.find('div#sidebar #side_extender'),
    handle : Sidebar_expander,
    extras : [this.container.find('div#body')]
  },{
    item: this.container.find('div#sidebar .designer_navigation'),
    handle : Sidebar_designer_navigation
  },{
    item: this.container.find('.payment_adjustments'),
    handle : Submit_order_total_modification
  },{
    item: this.container.find('div#sidebar .navi.side'),
    handle : Side_navi
  },{
    item : this.container.find('div#body.home .home_store'),
    handle : Home_store
  },{
    item : this.container.find('div#body.product #product_specifics'),
    handle : Product_tabs
  },{
    item : this.container.find('div#body.product div#content #product_chooser').parent('form'),
    handle : Product_plus,
    extras : [this.container.find('div#header #mini_cart')]
  },{
    item : this.container.find('div#body.product div#content #gallery'),
    handle : Image_gallery
  },{
    item : this.container.find('div#body.store div#content div.shelves'),
    handle: Active_shelving
  },{
    item : this.container.find('div#body.home div#sidebar .callout .content'),
    handle : Home_sidebar_callout
  },{
    item : this.container.find('a.snippet_dialog'),
    handle : Popin_pager
  },{
    item : this.container.find('div.tag_list'),
    handle : Tag_tips,
    extras : ['whiter', 'bottom']
  },{
    item : this.container.find('fieldset.gift_cards'),
    handle : Gift_card_jaxer
  },{
    item : this.container.find('#categroy_flash'),
    handle : Remove_shipping_graphic_hack
  },{
    item : this.container.find('#product_specifics div.group a'),
    handle : Swatcher
  },{
    item : this.container.find('#content').children('div.related'),
    handle : Related_extender
  },{
    item : this.container.find('#body.home #content div.specials .product'),
    handle : Home_brandnew_tag_add
  },{
    item : this.container.find('div#body.product #product_specifics'),
    handle : Content_height_setter
  },{
    item : this.container.find('div#body.product .bundle_item .chooser'),
    handle : Disable_bundle_options
  },{
    item : this.container.find('div#body.product #product_specifics .basin.bundled_products .bundle_item'),
    handle : Bundle_price_setter
  }];
  
  return this;
}

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