/*
 * Copyright (c) 2009, Techtribe B.V.
 * Url: http://www.techtribe.nl
 * Author: Remon de Boer
 *
 * SCHUBERG packages
 */
var SCHUBERG = {

	mainModel: null,
	mainView: null,
	mainController: null,

	//Kickstarter
	init: function (menuObj, imageObj, remote) {
		this.mainModel = SCHUBERG.model.Model.getInstance();
		this.mainModel.photosObj = imageObj;
		this.mainModel.menuObj = menuObj;
		this.mainView = new SCHUBERG.view.View(remote);
		this.mainController = new SCHUBERG.controller.Controller();
		var that = this;
		window.onresize = function () {
			that.resizeHandler();
		};
	},

	initMenu: function (menuObj) {
		this.mainView = {
            headerView : {
                getMenuObj : function () {
                    return menuObj;
                }
            }
        };
        if (swfobject) {
            swfobject.embedSWF(
                "/wp-content/themes/schubergphilis/swf/Menu.swf",
                "header",
                "960",
                "100%",
                "9.0.115",
                false,
                // flash vars
                {
	                "menuColorPattern" : "1"
                },
                // params
                {
                    "allowScriptAccess" : "always",
	                "wmode" : "transparent"
                },
                // attributes
                false
            );
        }
	},

	resizeHandler: function () {
		if (this.mainController != null) {
			this.mainController.resizeController.resizeHandler();
		}
	},

	//SCHUBERG.model package
	model:
	{
		//SCHUBERG.vo package
		vo:
		{
		}
	},

	//SCHUBERG.view package
	view:
	{
	},

	//SCHUBERG.controller package
	controller:
	{
	},

	//SCHUBERG.events package
	events:
	{
	}
}