// JavaScript Document
// Used for popup messages
 /*
        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_top: function(el) {
            $(el).css("left",425);
            $(el).css("top",210);
        },
        init_bottom: function(el) {
            $(el).css("left",425);
            $(el).css("top",300);
        }		
    };
	//$("#fuzz").css("height", $(document).height());

    $(".simple_popup_info_top").each(function(){
		
        $(this).css("display","none").siblings(".simple_popup").mouseover(function(){
            //$("#fuzz").css('display', 'block');
			$(".simple_popup_div").remove();
            var strSimple = "<div class='simple_popup_div'><div class='simple_popup_inner'>";
            /*strSimple += "<p class='simple_close'>[ x ] <a href='#'>Close</a></p>";*/
            strSimple += $(this).siblings(".simple_popup_info_top").html();
            strSimple += "</div></div>";
            $("body").append(strSimple);
            viewport.init_top(".simple_popup_div");
			
            $(".simple_popup").mouseout(function(){
                //$("#fuzz").css('display', 'none');
				$(".simple_popup_div").remove();
		
                return false;
            });
            return false;
        });
    });
	
    $(".simple_popup_info_bottom").each(function(){
		
        $(this).css("display","none").siblings(".simple_popup").mouseover(function(){
            //$("#fuzz").css('display', 'block');
			$(".simple_popup_div").remove();
            var strSimple = "<div class='simple_popup_div'><div class='simple_popup_inner'>";
            /*strSimple += "<p class='simple_close'>[ x ] <a href='#'>Close</a></p>";*/
            strSimple += $(this).siblings(".simple_popup_info_bottom").html();
            strSimple += "</div></div>";
            $("body").append(strSimple);
            viewport.init_bottom(".simple_popup_div");
			
            $(".simple_popup").mouseout(function(){
                //$("#fuzz").css('display', 'none');
				$(".simple_popup_div").remove();
		
                return false;
            });
            return false;
        });
    });	


