﻿/*
* jQuery Co3 Block plugin
* 
* Version 1.3.3
* 12. November 2009
*
* Co3 Interaktivt kompetencebureau
* www.co3.dk
*
* Developer
* Rune Øllgaard Grønkjær
* rg@co3.dk
*
* Created with jQuery v1.3.2
* Tested with jQuery v1.3.2
*
* Useage:
*
* //Shows the selected elements as modal popups in front of a background content block
* jQuery("#selector").showBlock( settings, onOpened, onCloseFn, closedFn );
* 
* //Shows a background content block
* //Use the settings to apply a modal popup in front of the content
* jQuery.showBlock( settings, onOpened, onCloseFn, closedFn );
* 
* Settings:
*
* //The opacity of the block
* maxOpacity
* //The color of the block
* blockBgColor
* //The zIndex of the block
* //The modal will get this zIndex + 1
* blockZIndex
* //Time of the animation
* //If set to 0, no animation will be made
* animateTime
* //The jQuery element to set as a modal popup
* //A clone will be made of the jQuery object
* jQueryModalObject
* //Set to true and the block and modal popup will close if user clicks the block
* closeOnBlockClick
* 
* Changelog:
* Version v1.0:
* Created: 27. February 2009
*
* Version v1.1:
* Created: 8. March 2009
* Changed:
* The html overflow none have been removed.
* To control the scroll two new functions have been added:
* //Stops all mousewheel activity
* //Nullifies any atempts to use the scrollbars
* killScroll()
* //Returns scrollactivities to normal
* normalizeScroll()
*
* Version v1.2:
* Created: 2009-04-27
* Changed:
* The way the height and width of html is calculated has been changed
*
* Version v1.3:
* Created: 2009-06-09
* Changed:
* The plugin is now more stable and animationspeed has been implementet when clicking on the block.
* The fn function param of showBlock now get the jQuery modal object as a parameter when called.
*
* Version v1.3.1:
* Created: 2009-09-29
* Changed:
* Changed all jQuery to jQuery, so no other libraries can destroy the jQuery Class
*
* Version v1.3.2:
* Created: 2009-10-01
* Changed:
* Changed the fn parameters name to onOpened
*
* Version v1.3.3:
* Created: 2009-11-12
* Changed:
* Corrected an error that came when no modal was chosen
*
*/

eval(function(p, a, c, k, e, r) { e = function(c) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) r[e(c)] = k[c] || e(c); k = [function(e) { return r[e] } ]; e = function() { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p } ('3.j=6(){};3.J=6(a,b,c,d){5 a=3.1m({K:0.8,V:"#1n",L:1o,k:W,x:y,X:v,z:y,w:y},a);5 e=3(M.1p(\'1q\'));e.1r("j");e.7("Y","Z");e.7("l",0);e.7("m",0);e.7("10",a.L);e.7("1s",a.V);4(a.X){e.1t(6(){4(c){c()}3(9).11(a,d)})}5 f=1u 1v();5 g=f.1w();e.n("N","O"+g);e.n("12","p");3("C").13(e);3.j.P(e);3(s).1x("1y",6(){3.j.P(e)});3.j.14();5 h;4(a.x!==y){e.n("15","16"+g);h=3.j.17(a.x,g,a.L+1,a.k,a);h.18=a;h.1z=g}e.1A=h;4(a.k>0){e.7("u",0);e.A({u:a.K},a.k,6(){4(b){b(h)}})}D{e.7("u",a.K);4(b){b(h)}}q e};3.j.17=6(a,b,c,d,e){5 f=3.B();5 g=a.1B();g.7("10",c);g.7("Y","Z");g.7("u",0);g.7("1C","O");g.n("Q","O"+b);g.n("N","16"+b);g.n("19","p");5 h=3("E");5 i=3("C");g.7("m",(e.w?(f.m+e.w):(f.m+(f.r/2)-(g.r()/2))));i.13(g);g.7("l",(e.z?(f.l+e.z):(f.l+(f.t/2)-(g.t()/2))));4(!e.w){g.7("1D",-(g.r()/2))}g.A({u:1},d);q g};3.j.P=6(a){5 b=3.B();a.7("l",b.l);a.7("m",b.m);a.7("r",b.r);a.7("t",b.t)};3.R.J=6(a,b,c,d){5 e=9;e.S=[];e.1a(6(){4(a!==F){a.x=3(9)}D{a={x:3(9)}}e.S[e.S.G]=3.J(a,b,c,d)});q e};3.R.1E=6(a,b){5 c=3.B();5 d=9.18;9.7("m",(d.w?(c.m+d.w):(c.m+(c.r/2)-(9.r()/2))));9.7("l",(d.z?(c.l+d.z):(c.l+(c.t/2)-(9.t()/2))));4(a){9.7("r",a)}4(b){9.7("t",b)}};3.R.11=6(f,g){9.1a(6(){k=W;4(f!==F){k=f.k!==F?f.k:k}5 o=3(9);4(o===y&&o===F){q}5 a=v;4(o.n("19")==="p"){5 b=o.n("Q");5 c=3("#"+b);c.T();c.A({u:0},k,6(){4(g){g()}3(9).U()});a=p}D 4(o.n("12")==="p"){5 b=o.n("15");5 d=3("#"+b);5 e=v;4(d.G>0){e=p}D{d=3("[Q="+o.n("N")+"]");4(d.G>0){e=p}}4(e){d.T();d.A({u:0},k,6(){4(g){g()}3(9).U()})}a=p}4(a){o.T();o.A({u:0},k,6(){3(9).U();4(3(".j").G===0){3.j.1b()}})}});q 9};3.j.H=6(a){4(a){4(a.1c){a.1c()}a.1d=v}q v};3.j.1e=6(a){4(a){a.1d=p}q p};3.j.14=6(){5 a=3.B();4(s.1f){s.1f(\'1g\',9.H,v)}s.I=M.I=9.H;s.1h=6(){s.1F(a.m,a.l)}};3.j.1b=6(){1G{s.1H(\'1g\',9.H,v)}1I(1J){}s.I=M.I=9.1e;s.1h=6(){}};3.B=6(){5 a=3("E");5 b=a.r();5 c=a.t();q{l:3.1i(),m:3.1j(),r:b,t:c}};3.1i=6(){5 a=3("E").1k();4(a===0){a=3("C").1k()}q a};3.1j=6(){5 a=3("E").1l();4(a===0){a=3("C").1l()}q a};', 62, 108, '|||jQuery|if|var|function|css||this||||||||||Co3Block|animateTime|top|left|attr||true|return|width|window|height|opacity|false|fixedLeft|jQueryModalObject|null|fixedTop|animate|getHtmlStats|body|else|html|undefined|length|stopWheel|onmousewheel|showBlock|maxOpacity|blockZIndex|document|id|block|resizeBlock|blockID|fn|blocks|stop|remove|blockBgColor|500|closeOnBlockClick|position|absolute|zIndex|hideBlock|isCo3Block|prepend|killScroll|jQueryModalObjectID|modal|showModal|ModalSettings|isCo3Modal|each|normalizeScroll|preventDefault|returnValue|wheel|addEventListener|DOMMouseScroll|onscroll|getScrollTop|getScrollLeft|scrollTop|scrollLeft|extend|000000|2001|createElement|div|addClass|background|click|new|Date|getTime|bind|resize|ModalID|Modal|clone|display|marginLeft|updateModalPosition|scroll|try|removeEventListener|catch|ex'.split('|'), 0, {}))