#= require jquery #= require jquery_ujs #= require vendor/filterable.js #= require vendor/jquery.mousewheel-3.0.4.pack.js #= require vendor/jquery.fancybox.pack.js jQuery.expr[":"].regex = (elem, index, match) -> matchParams = match[3].split(",") validLabels = /^(data|css):/ attr = method: (if matchParams[0].match(validLabels) then matchParams[0].split(":")[0] else "attr") property: matchParams.shift().replace(validLabels, "") regexFlags = "ig" regex = new RegExp(matchParams.join("").replace(/^\s+|\s+$/g, ""), regexFlags) regex.test jQuery(elem)[attr.method](attr.property) $.fn.animateBG = (x, y, speed) -> pos = @css("background-position").split(" ") @x = pos[0] or 0 @y = pos[1] or 0 $.Animation(this, x: x y: y , duration: speed, easing:"linear" ).progress (e) -> @css "background-position", e.tweens[0].now + "px " + e.tweens[1].now + "px" this @popstat = false; $ -> $("a[rel^='prettyPhoto']:visible").fancybox({ helpers : { title: { type: 'inside' } } })