/* aqFloater v1.3
   Floats an element that attaches itself to a part of the browser window.
   Copyright (C) 2011 paul pham <http://aquaron.com/jquery/aqFloater>

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
(function($){$.fn.aqFloater=function(o){var _0=$.extend({offsetX:0,offsetY:0,attach:'',duration:50,opacity:'1.1'},o);var _2=function(o){var _4=(_0.attach.match(/n/)?0:(_0.attach.match(/s/)?($(window).height()-o.outerHeight()-10):Math.round(($(window).height()-o.height())/2)));var _3=(_0.attach.match(/w/)?0:(_0.attach.match(/e/)?($(window).width()-o.outerWidth()-10):Math.round(($(window).width()-o.width())/2)));o.animate({top:(_4+$(document).scrollTop()+_0.offsetY),left:(_3+$(document).scrollLeft()+_0.offsetX)},{queue:false,duration:_0.duration})};return this.each(function(){var _1=$(this).css({position:'absolute',opacity:_0.opacity});$(window).bind('scroll resize',function(){_2(_1)}).trigger('scroll');return true})}})(jQuery);
