/*
 * jQuery Easing v1.1.1 - http://gsgd.co.uk/sandbox/jquery.easing.php
 *
 * Uses the built in easing capabilities added in jQuery 1.1
 * to offer multiple easing options
 *
 * Copyright (c) 2007 George Smith
 * Licensed under the MIT License:
 *   http://www.opensource.org/licenses/mit-license.php
 */

jQuery.extend({easing:{easein:function(x,t,b,c,d){return c*(t/=d)*t+b},easeout:function(x,t,b,c,d){return-c*t*t/(d*d)+2*c*t/d+b},linear:function(x,t,b,c,d){return c*t/d+b}}});


/*
 *
 * Deal listing plugin v1.1
 *
 * © 2009 Copyright, all right reserved, Tom Flídr, Czech (tomflidr@gmail.com)
 * This SOFTWARE is under the MIT (http://en.wikipedia.org/wiki/MIT_License)
 * jQuery 1.2.6+
 *
*/

(function($){$.fn.dealListing=function(u){var v='px';var w='rel';var x='height';var y='auto';var z='visible';var A='hidden';var B='.';var C=false;var D=['.deal-listing-item','.deal-listing-item-head','deal-listing-item-head-active','deal-listing-item-head-focus','deal-listing-item-head-plus','deal-listing-item-head-minus','.deal-listing-item-detail','deal-listing-item-detail-packed','deal-listing-item-detail-unpacked','deal-listing-item-detail-animated',500,450,'easein','easeout','.deal-listing-show-hide-all','.deal-listing','deal-listing-done'];var E=$.extend(D,u);var F=function(a,b){a.removeClass(E[9]).css(x,y).attr(w,a.outerHeight());b.children(B+E[4]).map(function(){$(this).removeClass(E[4]).addClass(E[5])})};var G=function(a,b){a.removeClass(E[9]).hide().css({position:'absolute',visibility:A}).css(x,y).attr(w,a.outerHeight());b.children(B+E[5]).map(function(){$(this).removeClass(E[5]).addClass(E[4])})};var H=function(m,n,o){var p=m.parent().children(E[6]);C=false;if(p.hasClass(E[9])){p.stop();C=true};if((p.hasClass(E[7])&&o==null)||o){p.removeClass(E[7]).addClass(E[8]).addClass(E[9]).css({display:'block',height:((C)?p.outerHeight()+v:0+v),position:'relative',visibility:z}).animate({height:p.attr(w)+v},((o)?1:E[10]),E[12],function(){F(p,m)});if(n){var q=function(a){var b=$(document).scrollLeft();var c=$(document).scrollTop();var d=Math.round(a-c);var e=Math.round(1000/25);var f=Math.round(E[10]/e);var g=0;var h=Math.PI/2;var i=(h-g)/f;var j=g;var k=function(){if(j>=h){clearInterval(l);window.scrollTo(b,a)}else{currentScrollTop=c+(Math.round(Math.sin(j)*d*100)/100);window.scrollTo(b,currentScrollTop);j+=i}};var l=setInterval(k,e)};var r=$(window).height()>((m.outerHeight()*2)+parseInt(p.attr(w)));var s=(m.offset().top+(m.outerHeight()*2)+parseInt(p.attr(w)))-$(window).height()>$(document).scrollTop();var t=m.offset().top<$(document).scrollTop();if(r&&s){q(m.offset().top+(m.outerHeight()*2)+parseInt(p.attr(w))-$(window).height())}else if(!r&&s){q(m.offset().top)}else if(t){q(m.offset().top)}}}else if((p.hasClass(E[8])&&o==null)||!o){p.removeClass(E[8]).addClass(E[7]).addClass(E[9]).animate({height:0+v},((!o)?1:E[11]),E[13],function(){G(p,m)})}};$(E[14]).attr('href','javascript:').click(function(){var a=false;$(this).children().each(function(i){if($(this).css('display')=='none'){if(i==1){a=true};$(this).show()}else{$(this).hide()}});$(E[0]).each(function(){$(this).children(E[1]).each(function(){if(a){$(this).focus()};H($(this),false,a);if(!a){$(this).blur()}})});$(this).focus()});$(E[0]).each(function(){var a=$(this).children(E[1]);var b=$(this).children(E[6]);b.attr(w,b.height());a.click(function(){$(this).focus();H($(this),true,null)});$(document).keyup(function(e){if(e.keyCode==13||e.keyCode==32){$(E[2]).trigger('click')}});a.hover(function(){$(this).addClass(E[2])},function(){$(this).removeClass(E[2])}).focus(function(){$(this).addClass(E[3])}).blur(function(){if(b.hasClass(E[7])){$(this).removeClass(E[3])}});$(E[15]).addClass(E[16])})};})(jQuery);