/*(function($) {
    $.fn.extend({
        tipme: function(settings) {
            return this.each(function() {
                var $me = $(this); //$(this).find('[rel]');
                var limit;
				
                var template = '<div class="tipCont">';
                template += '  <div class="arrowDown"></div>';
                template += '  <span class="tip radius shadow"></span>';
                template += '</div>';

                var $template = $(template);

                var methods = {
                    init: function() {
                        methods.addTip();
                        
                        limit = $('body').outerHeight(true);
                        methods.setPosition();
                        
                        $(window).resize(function() {
                            limit = $('body').outerHeight(true);
                            methods.setPosition();
                        });
                        
                    },

                    setPosition: function() {
                        $me.each(function() {
                           // var $tip = $(this).next();
						    var $tip = $(this).children('.tipCont');
                            var width = $(this).outerWidth(true);
                            var height = $tip.find('.tip').outerHeight(true);
                            var left = $(this).offset().left;
                            var top = $(this).offset().top + $(this).outerHeight(true);
                            var total = limit - top;

							left = width/2;
							top = height;

                            $tip.css({
                                'display': 'none',
                                'position': 'absolute',
                               // 'left': left,
                                'top': top,
                                'z-index' : 100
                            });
                        });
                    },

                    addTip: function() {
                        $me.each(function() {
                            $(this).css('position', 'relative');
                            text = $(this).attr('rel');
                            $clone = $template.clone();
                           // $clone.insertAfter($(this));
                            $(this).append($clone);
                            $clone.find('.tip').append(text);

                           // var $tip = $(this).next();
                            var $tip = $(this).children('.tipCont');

                            $(this).bind('mouseover.tipme', function() {
                                $tip.fadeIn();
                                return false;
                            });

                            $(this).bind('mouseout.tipme', function() {
                                $tip.fadeOut();
                                return false;
                            });
                        });
                    }
                };
                methods.init();
            });
        }
    });
})(jQuery);/**/

(function($) {
    $.fn.extend({
        tipme: function(settings) {
            return this.each(function() {
                var $me = $(this).find('[rel]');
                var limit;

                var template = '<div class="tipCont">';
                template += '  <div class="arrowDown"></div>';
                template += '  <span class="tip radius shadow"></span>';
                template += '</div>';

                var $template = $(template);

                var methods = {
                    init: function() {
                        methods.addTip();
                        
                        limit = $('body').outerHeight(true);
                        methods.setPosition();
                        
                        $(window).resize(function() {
                            limit = $('body').outerHeight(true);
                            methods.setPosition();
                        });
                        
                    },

                    setPosition: function() {
                        $me.each(function() {
                            var $tip = $(this).next();
                            var width = $(this).outerWidth(true);
                            var height = $tip.find('.tip').outerHeight(true);
                            var left = $(this).position().left;
                            var top = $(this).offset().top + $(this).outerHeight(true);
                            var total = limit - top;

							
                            $tip.css({
                                'display': 'none',
                                'position': 'absolute',
                                //'left': left,
                                'top': top,
                                'z-index' : 1
                            });
                        });
                    },

                    addTip: function() {
                        $me.each(function() {
                            $(this).css('position', 'relative');
                            text = $(this).attr('rel');
                            $clone = $template.clone();
                            $clone.insertAfter($(this));
                            $clone.find('.tip').append(text);

                            var $tip = $(this).next();

                            $(this).bind('mouseover.tipme', function() {
                                $tip.fadeIn();
                                return false;
                            });

                            $(this).bind('mouseout.tipme', function() {
                                $tip.fadeOut();
                                return false;
                            });
                        });
                    }
                };
                methods.init();
            });
        }
    });
})(jQuery);
/**/

