
function go_flash (vars, params) { 
    var params = {
        menu: "false",
        wmode: "transparent"
    };

    var swf = '/main.swf';
    var target = 'wrapper';
    var height = '578px';
    if (vars.site == 'rockndreams')
    {
        swf = '/rndMain.swf';
        target = 'outer';
        height = '100%';
    }
    
    swfobject.embedSWF(swf, target, "100%", height, "9.0.0", "expressInstall.swf", vars, params);
	swfobject.createCSS("#" + target,"outline:none"); 
}


/*
From http://www.reindel.com/five_javascript_tricks_jquery/

The viewport object is mainly for the cross-browser mess
that is unfortunately necessary to get a DIV to center.
 
There is also an officially supported plugin called "Dimensions"
that can manage some of this on your own projects. Check it out at:
 
http://jquery.com/plugins/project/dimensions
*/

var viewport = {
    o: function() {
        if (self.innerHeight) {
            this.pageYOffset = self.pageYOffset;
            this.pageXOffset = self.pageXOffset;
            this.innerHeight = self.innerHeight;
            this.innerWidth = self.innerWidth;
        } else if (document.documentElement && document.documentElement.clientHeight) {
            this.pageYOffset = document.documentElement.scrollTop;
            this.pageXOffset = document.documentElement.scrollLeft;
            this.innerHeight = document.documentElement.clientHeight;
            this.innerWidth = document.documentElement.clientWidth;
        } else if (document.body) {
            this.pageYOffset = document.body.scrollTop;
            this.pageXOffset = document.body.scrollLeft;
            this.innerHeight = document.body.clientHeight;
            this.innerWidth = document.body.clientWidth;
        }
        return this;
    },
    init: function(el) {
        var viewData = viewport.o();
        $(el).css("left", Math.round(viewData.innerWidth / 2) + viewData.pageXOffset - Math.round($(el).width() / 2));
        $(el).css("top", Math.round(viewData.innerHeight / 2) + viewData.pageYOffset - Math.round($(el).height() / 2));
    }
};

$(document).ready(function() {

    $(function() {
        $('#gallery a').lightBox();
    });


    $(".simple_popup_info").each(function() {
        $(this).css("display", "none").siblings(".simple_popup").click(function() {
            $(".simple_popup_div").remove();
            $("#country").css("display", "none");
            var strSimple = "<div class='simple_popup_div'></div><div class='simple_popup_inner'>";
            strSimple += "<p class='simple_close'>[ x ] <a href='#'>Close</a></p>";
            strSimple += $(this).siblings(".simple_popup_info").html();
            strSimple += "</div>";
            $("body").append(strSimple);
            viewport.init(".simple_popup_inner");
            $(".simple_close").click(function() {
                $(".simple_popup_div").remove();
                $(".simple_popup_inner").remove();
                $("#country").css("display", "inline");
                return false;
            });
            return false;
        });
    });
});
