var engine = {
    customPlugin : {
        init : function(opts) {
            this.supportMethod_1(opts)
        },
        supportMethod_1 : function(options) {
            var x = options;
            this.supportMethod_2(x)
        },
        supportMethod_2 : function(options2) {
            alert(options2);
        }
    },
    structure: {
        init : function(){
            if (!jQuery.support.opacity) {
                this.ie();
                this.allBrowsers();
            }
            else {
                this.allBrowsers();
            }
        },
        ie : function(){
			//HERE GOES jQUERY FOR IE BROWSERS ONLY!
        },
        allBrowsers : function(){
			$j('.ctrContent .post:last-child').css({'border-bottom':'none'}); 
			Cufon.replace('.headForm h2,.team h2, a.lgRed', { fontFamily: 'Garamond' });
			Cufon.replace('.team h2 strong', { fontFamily: 'GaramondBld' });
			$j('.events li').hover(function(){
				$j(this).addClass('hover');
			}, function () {
				$j(this).removeClass('hover');
			});
			$j('.navigation li:last-child').css({'border-right':'none'});
			$j('.newsItem').hover(function(){
				$j(this).addClass('hover');
			}, function () {
				$j(this).removeClass('hover');
			});
	   if ($j("ul.sf-menu").length) {
                $j("ul.sf-menu").supersubs({
                    minWidth:15,
                    maxWidth:30,
                    extraWidth:1
                }).superfish().find('ul').bgIframe({
                    opacity:false
                });
            }
            $j("#contribute .team a.btn").hover(
            function(){
              $j(this).find("span").stop().animate({"margin-left":30},400)
            },
            function(){
              $j(this).find("span").stop().animate({"margin-left":20},400)
            }
            );
            $j("p.soc-nets").fadingSiblings();
            $j("#searchButton input, input.submit_tag, #zip_submit, #run_search, div#view_contacts_manual input.submit_button").button();
            $j("#blog-comments input:submit, table.styled_table input:submit, #contribute_submit_button").button();


        }
    }
}

$j(function(){
    engine.structure.init();
    //engine.customPlugin.supportMethod_2("Remove CustomPlugin in init.js");
    plugins.pageTools.init("#contentHere");
	if ($j("#flickr").length) {
    plugins.flickrFeed({      
        cont: "#flickr",
        api: "eb4be2bc9b39e0625af47006c9a790cc",
        type: "user",
        userId: "51349373@N02",
        num: 8 
    });
	}
    $j.fn.formLabels()
    plugins.externalLinks()
});
