   ':visible':
     singular: true
     deferred: true
-    Combinator: (node = scope, engine, operation, continuation, scope) ->
-      return Selector[':visible-y']::Combinator.apply(@, arguments) && 
-             Selector[':visible-x']::Combinator.apply(@, arguments)
+    Pseudo: (node, offset, engine, operation, continuation, scope) ->
+      return Selector[':visible-y']::Pseudo.apply(@, arguments) && 
+             Selector[':visible-x']::Pseudo.apply(@, arguments)
     
   ':visible-y': 
     singular: true
     deferred: true
-    Combinator: (node = scope, engine, operation, continuation, scope) ->
+    Pseudo: (node = scope, offset, engine, operation, continuation, scope) ->
+      property = engine.scope.nodeType == 1 && 'computed-height' || 'height'
       ey = engine.data.watch(node,         'computed-y',      operation, continuation, scope)
       eh = engine.data.watch(node,         'computed-height', operation, continuation, scope)
-      sy = engine.data.watch(engine.scope, 'scroll-top',      operation, continuation, scope)
-
-      sh = engine.data.watch(engine.scope, "#{engine.scope.nodeType == 1 && 'computed-' || ''}height", operation, continuation, scope)
-        
+      sy = engine.data.watch(engine.scope, 'scroll-top',      operation, continuation, scope) - (offset || 0)
+      sh = engine.data.watch(engine.scope, property,          operation, continuation, scope) + (offset || 0) * 2
+
       if (ey <= sy && ey + eh > sy + sh)  || # mid
          (ey > sy && ey < sy + sh)        || # top
          (ey + eh > sy && ey + eh < sy + sh) # bottom

  ':visible-x':
    singular: true
    deferred: true
    Combinator: (node = scope, engine, operation, continuation, scope) ->
      ex = engine.data.watch(node,         'computed-x',     operation, continuation, scope)
      ew = engine.data.watch(node,         'computed-width', operation, continuation, scope)
      sx = engine.data.watch(engine.scope, 'scroll-left',    operation, continuation, scope)
      sw = engine.data.watch(engine.scope, "#{engine.scope.nodeType == 1 && 'computed-' || ''}height", operation, continuation, scope)

      if (ex <= sx && ex + ew > sx + sw)  || # mid
         (ex > sx && ex < sx + sw)        || # left
         (ex + ew > sx && ex < sx + sw)      # right
        return node




  getIndexPrefix: (operation, parent)->
    return parent && ' ' || ''

Selector.Pseudo = Selector.Combinator.extend
  signature: [[
    context: ['Selector']
    query: ['String', 'Number']
  ]]

Selector.Virtual = Selector.extend
  signature: [
    [context: ['Selector']]
