jQuery.easing['jswing'] = jQuery.easing['swing'];

jQuery.extend( jQuery.easing,
{
	def: 'easeOutQuad',
	swing: function (x, t, b, c, d) {
		// alert(jQuery.easing.default);
		return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
	},
	easeInQuad: function (x, t, b, c, d) {
		return c*(t/=d)*t + b;
	},
	easeOutQuad: function (x, t, b, c, d) {
		return -c *(t/=d)*(t-2) + b;
	},
	easeInOutQuad: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t + b;
		return -c/2 * ((--t)*(t-2) - 1) + b;
	},
	easeInCubic: function (x, t, b, c, d) {
		return c*(t/=d)*t*t + b;
	},
	easeOutCubic: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t + 1) + b;
	},
	easeInOutCubic: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t + b;
		return c/2*((t-=2)*t*t + 2) + b;
	},
	easeInQuart: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t + b;
	},
	easeOutQuart: function (x, t, b, c, d) {
		return -c * ((t=t/d-1)*t*t*t - 1) + b;
	},
	easeInOutQuart: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
		return -c/2 * ((t-=2)*t*t*t - 2) + b;
	},
	easeInQuint: function (x, t, b, c, d) {
		return c*(t/=d)*t*t*t*t + b;
	},
	easeOutQuint: function (x, t, b, c, d) {
		return c*((t=t/d-1)*t*t*t*t + 1) + b;
	},
	easeInOutQuint: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
		return c/2*((t-=2)*t*t*t*t + 2) + b;
	},
	easeInSine: function (x, t, b, c, d) {
		return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
	},
	easeOutSine: function (x, t, b, c, d) {
		return c * Math.sin(t/d * (Math.PI/2)) + b;
	},
	easeInOutSine: function (x, t, b, c, d) {
		return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
	},
	easeInExpo: function (x, t, b, c, d) {
		return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
	},
	easeOutExpo: function (x, t, b, c, d) {
		return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
	},
	easeInOutExpo: function (x, t, b, c, d) {
		if (t==0) return b;
		if (t==d) return b+c;
		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
	},
	easeInCirc: function (x, t, b, c, d) {
		return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
	},
	easeOutCirc: function (x, t, b, c, d) {
		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
	},
	easeInOutCirc: function (x, t, b, c, d) {
		if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
		return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
	},
	easeInElastic: function (x, t, b, c, d) {
		var s=1.70158;
		var p=0;
		var a=c;
		if (t==0) return b;
		if ((t/=d)==1) return b+c;
		if (!p) p=d*.3;
		if (a < Math.abs(c)) {
			a=c;
			var s=p/4;
		}
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
	},
	easeOutElastic: function (x, t, b, c, d) {
		var s=1.70158;
		var p=0;
		var a=c;
		if (t==0) return b;
		if ((t/=d)==1) return b+c;
		if (!p) p=d*.3;
		if (a < Math.abs(c)) {
			a=c;
			var s=p/4;
		}
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
	},
	easeInOutElastic: function (x, t, b, c, d) {
		var s=1.70158;
		var p=0;
		var a=c;
		if (t==0) return b;
		if ((t/=d/2)==2) return b+c;
		if (!p) p=d*(.3*1.5);
		if (a < Math.abs(c)) {
			a=c;
			var s=p/4;
		}
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
		return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
	},
	easeInBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*(t/=d)*t*((s+1)*t - s) + b;
	},
	easeOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158;
		return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
	},
	easeInOutBack: function (x, t, b, c, d, s) {
		if (s == undefined) s = 1.70158; 
		if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
		return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
	},
	easeInBounce: function (x, t, b, c, d) {
		return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
	},
	easeOutBounce: function (x, t, b, c, d) {
		if ((t/=d) < (1/2.75)) {
			return c*(7.5625*t*t) + b;
		} else if (t < (2/2.75)) {
			return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
		} else if (t < (2.5/2.75)) {
			return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
		} else {
			return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
		}
	},
	easeInOutBounce: function (x, t, b, c, d) {
		if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
		return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
	}
});


var qwe123 = 0;

/**
 * Cookie plugin
 *
 * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 */

/**
 * Create a cookie with the given name and value and other optional parameters.
 *
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Set the value of a cookie.
 * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
 * @desc Create a cookie with all available options.
 * @example $.cookie('the_cookie', 'the_value');
 * @desc Create a session cookie.
 * @example $.cookie('the_cookie', null);
 * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
 *       used when the cookie was set.
 *
 * @param String name The name of the cookie.
 * @param String value The value of the cookie.
 * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
 * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
 *                             If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
 *                             If set to null or omitted, the cookie will be a session cookie and will not be retained
 *                             when the the browser exits.
 * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
 * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
 * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
 *                        require a secure protocol (like HTTPS).
 * @type undefined
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */

/**
 * Get the value of a cookie with the given name.
 *
 * @example $.cookie('the_cookie');
 * @desc Get the value of a cookie.
 *
 * @param String name The name of the cookie.
 * @return The value of the cookie.
 * @type String
 *
 * @name $.cookie
 * @cat Plugins/Cookie
 * @author Klaus Hartl/klaus.hartl@stilbuero.de
 */
jQuery.cookie = function(name, value, options) {
	if (typeof value != 'undefined') { // name and value given, set cookie
		options = options || {};
		if (value === null) {
			value = '';
			options.expires = -1;
		}
		var expires = '';
		if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
			var date;
			if (typeof options.expires == 'number') {
				date = new Date();
				date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
			} else {
				date = options.expires;
			}
			expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
		}
		// CAUTION: Needed to parenthesize options.path and options.domain
		// in the following expressions, otherwise they evaluate to undefined
		// in the packed version for some reason...
		var path = options.path ? '; path=' + (options.path) : '';
		var domain = options.domain ? '; domain=' + (options.domain) : '';
		var secure = options.secure ? '; secure' : '';
		document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
	} else { // only name given, get cookie
		var cookieValue = null;
		if (document.cookie && document.cookie != '') {
			var cookies = document.cookie.split(';');
			for (var i = 0; i < cookies.length; i++) {
				var cookie = jQuery.trim(cookies[i]);
				// Does this cookie string begin with the name we want?
				if (cookie.substring(0, name.length + 1) == (name + '=')) {
					cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
					break;
				}
			}
		}
		return cookieValue;
	}
};


/**
 * Sexy LightBox - for asljQuery 1.3
 * @name sexylightbox.v2.2.js
 * @author Eduardo D. Sada - http://www.coders.me/web-html-js-css/javascript/sexy-lightbox-2
 * @version 2.2
 * @date 1-Jun-2009
 * @copyright (c) 2009 Eduardo D. Sada (www.coders.me)
 * @license MIT - http://es.wikipedia.org/wiki/Licencia_MIT
 * @example http://www.coders.me/ejemplos/sexy-lightbox-2/
*/
eval(function(p,a,c,k,e,d){
	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--){
			d[e(c)]=k[c]||e(c)
		}
		k=[function(e){
			return d[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
}('b(3p(5)==\'1V\'){5=3o}5.f=9(1y,3k){m 2Z=3r.3s.3u.3t(2X,2);1b 9(){m 2P=[3].3n(2Z,5.3w(2X));1b 3k.3m(1y,2P)}};(9(5){3S={2W:9(){1b{c:\'29\',1v:3M,h:\'3e\',1s:\'3L\',19:\'3K\',k:\'2V.1j\',2s:\'2V.1P\',2D:\'3J.1j\',V:0,18:0,2A:3N,3x:\'31\',2B:3O,3R:\'31\',2v:2T,2K:\'2O\',2d:2T,28:\'2O\',F:{3h:10,S:1Y,1z:\'3Q\',3j:2},B:{\'7\':3A,\'8\':3z},1f:{\'3y\':{\'1L\':\'#3a\',\'1E\':\'#3d\',\'k-h\':\'#3C\',\'1h\':0.6},\'3e\':{\'1L\':\'#3d\',\'1E\':\'#3a\',\'k-h\':\'#3F\',\'1h\':0.6}}}},3E:9(4){3.4=5.26(3.2W(),4);3.4.1t=5.26(3.4.1f[3.4.h],3.4.1t||{});m 1w=3.4.19+\'/\'+3.4.h+\'/\'+((((C.3G==1V)&&(3D!=1V)))?3.4.2s:3.4.k);m c=3.4.c;5(\'3B\').L(\'<n j="\'+c+\'-t"></n><n j="\'+c+\'-w"><n j="\'+c+\'-R"></n><n j="\'+c+\'-M"><n j="\'+c+\'-2a" 1c="k-E: o(\'+1w+\')"><a j="\'+c+\'-1K" 1d="#"><2r 12="\'+3.4.19+\'/\'+3.4.h+\'/\'+3.4.2D+\'" 3H="3I"></a><n j="\'+c+\'-3P" 1c="k-E: o(\'+1w+\')"></n></n><n j="\'+c+\'-I"></n><n j="\'+c+\'-2t" 1c="k-E: o(\'+1w+\')"><n j="\'+c+\'-2J" 1c="k-E: o(\'+1w+\')"><n j="\'+c+\'-2C"><2H j="\'+c+\'-2y"></2H></n></n></n></n></n>\');3.t=5(\'#\'+c+\'-t\');3.w=5(\'#\'+c+\'-w\');3.R=5(\'#\'+c+\'-R\');3.M=5(\'#\'+c+\'-M\');3.2a=5(\'#\'+c+\'-2a\');3.1K=5(\'#\'+c+\'-1K\');3.I=5(\'#\'+c+\'-I\');3.2f=5(\'#\'+c+\'-2t\');3.1N=5(\'#\'+c+\'-2J\');3.1a=5(\'#\'+c+\'-2C\');3.1q=5(\'#\'+c+\'-2y\');3.t.e({\'1Z\':\'2E\',\'1A\':0,\'O\':0,\'1h\':3.4.1t[\'1h\'],\'8\':5(1o).8(),\'7\':5(1o).7(),\'z-1u\':3.4.1v,\'k-h\':3.4.1t[\'k-h\']}).1J();3.w.e({\'z-1u\':3.4.1v,\'1A\':(-3.4.B[\'8\']-23)+\'N\',\'O\':((5(1o).7()-3.4.B[\'7\'])/2)}).1J();3.R.e({\'z-1u\':3.4.1v+1});3.M.e({\'1Z\':\'2E\',\'7\':3.4.B[\'7\']+\'N\',\'z-1u\':3.4.1v+2});3.I.e({\'8\':3.4.B[\'8\']+\'N\',\'2z-O-h\':3.4.1f[3.4.h].1L,\'2z-3v-h\':3.4.1f[3.4.h].1L});3.1a.e({\'h\':3.4.1f[3.4.h].1E});3.1q.e({\'h\':3.4.1f[3.4.h].1E});3.1K.f(\'17\',5.f(3,9(){3.1D();1b U}));3.t.f(\'17\',5.f(3,9(){b(!3.4.18){3.1D()}}));5(1o).f(\'3q\',5.f(3,9(1C,v){b(3.4.V==1){b(v.2q==27){3.1D()}b(v.2q==37){b(3.11){3.11.2m(\'17\',v)}}b(v.2q==39){b(3.Y){3.Y.2m(\'17\',v)}}}}));5(C).f(\'1l\',5.f(3,9(){b(3.4.V==1){3.1g()}G{3.t.e({\'8\':\'1n\',\'7\':\'1n\'})}}));5(C).f(\'4u\',5.f(3,9(){b(3.4.V==1){3.1g()}}));3.2F()},1B:9(Z){Z=5(Z);Z.4v();3.1x((Z.q("1Q")||Z.q("c")||""),Z.q("1d"),(Z.q(\'P\')||U))},1D:9(){3.1R(0);3.18=0},2F:9(){m H=3;3.1T=[];5("a, 4w").3f(9(){b(5(3).q(\'P\')&&2h 4x("^"+H.4.1s).4t(5(3).q(\'P\'))){5(3).17(9(v){v.2j();v.4s();H.1B(3)});b(!(5(3).q(\'j\')==H.4.c+"32"||5(3).q(\'j\')==H.4.c+"3g")){H.1T.4o(3)}}})},1R:9(2k){b(3.4.V==0&&2k!=0||2k==1){5(\'2i, 1y, 2l\').e({\'2g\':\'4z\'});b(3.4.V==0){3.w.e({\'1A\':(-3.4.B[\'8\']-23)+\'N\',\'8\':(3.4.B[\'8\']-2b)+\'N\',\'7\':3.4.B[\'7\']+\'N\'}).1J()}3.4.V=1;3.t.1r();3.t.4n(3.4.2A,5.f(3,9(){3.w.1x();3.t.e({\'1h\':3.4.1t[\'1h\']})}))}G{5(\'2i, 1y, 2l\').e({\'2g\':\'36\'});3.w.e({\'1A\':(-3.4.B[\'8\']-23)+\'N\',\'8\':(3.4.B[\'8\']-2b)+\'N\',\'7\':3.4.B[\'7\']+\'N\'}).1J();3.4.V=0;3.t.1r();3.t.4p(3.4.2B,5.f(3,9(){b(3.u)3.u.4q();3.t.e({\'8\':0,\'7\':0})}))}},1g:9(K){K=5.26({\'7\':3.1k,\'8\':3.W,\'1l\':0},K||{});b(3.2p)3.2p.1r();3.2p=3.w.16({O:(5(C).4r()+((5(C).7()-K.7)/2)),1A:(5(C).4y()+(5(C).8()-(K.8+((3.1m)?2b:48)))/2)},{S:3.4.2v,2c:3.4.2K});b(K.1l){b(3.2e)3.2e.1r();3.2e=3.I.16({8:K.8},{S:3.4.2d,2c:3.4.28});b(3.J)3.J.1r();3.J=3.M.16({7:K.7},{S:3.4.2d,2c:3.4.28,4G:5.f(3,9(){3.w.e({\'7\':K.7});3.J.2m(\'1i\')})})}b(C.2u){3.t.e({\'8\':0,\'7\':0})}3.t.e({\'8\':5(1o).8(),\'7\':5(C).7()})},1S:9(E,j){E=5(E);1O=5(\'<a j="\'+3.4.c+j+\'" 1Q="\'+E.q(\'1Q\')+\'" P="\'+E.q(\'P\')+\'"><2r 2Y="4F\'+j+\'" 12="\'+3.4.19+\'/\'+3.4.h+\'/4D\'+j+\'.1j\'+\'" /></a>\');1O.q(\'1d\',E.q(\'1d\'));1b 1O},1x:9(X,o,P){3.1m=U;3.2M();m 2I=o.24(/(.+)?/)[1]||o;m 2x=/\\.(4E?g|1j|1P|4A)/4B;b(3.J){3.J.4C(\'1i\')}b(X){3.1m=1I}b(2I.24(2x)){3.T=2h u();3.T.2G=5.f(3,9(){3.T.2G=9(){};m x=5(C).7()-1Y;m y=5(C).8()-1Y;m A=3.T.7;m s=3.T.8;b(A>x){s=s*(x/A);A=x;b(s>y){A=A*(y/s);s=y}}G b(s>y){A=A*(y/s);s=y;b(A>x){s=s*(x/A);A=x}}b(3.1m||X){3.W=(s-21)}G{3.W=(s-35)};3.1k=(A+14);3.1g({\'7\':3.1k,\'8\':3.W,\'1l\':1});3.J.f(\'1i\',5.f(3,9(){3.2R(3.T.12,{\'7\':A,\'8\':s})}))});3.T.4l=5.f(3,9(){3.1x(\'\',3.4.19+\'/\'+3.4.h+\'/42.1j\',3.4.1s)});3.T.12=o}G{m 2w=o.24(/\\?(.+)/)[1];m p=3.3l(2w);p[\'7\']=1G(p[\'7\']);p[\'8\']=1G(p[\'8\']);p[\'18\']=p[\'18\'];3.4.18=p[\'18\'];3.W=1G(p[\'8\'])+(C.2u?2:0);3.1k=1G(p[\'7\'])+14;3.1g({\'7\':3.1k,\'8\':3.W,\'1l\':1});b(o.3b(\'41\')!=-1){3.J.f(\'1i\',5.f(3,9(){3.2o(5(\'#\'+p[\'43\']).15(),{\'7\':p[\'7\']+14,\'8\':3.W},p[\'k\'])}))}G b(o.3b(\'44\')!=-1){m 38=o.1U(\'4m\');3.J.f(\'1i\',5.f(3,9(){3.34(38[0],{\'7\':p[\'7\']+14,\'8\':p[\'8\']},p[\'k\'])}))}G{3.J.f(\'1i\',5.f(3,9(){5.45({o:o,3T:"40",3Z:U,3V:5.f(3,9(){3.1x(\'\',3.4.19+\'/\'+3.4.h+\'/3U.1j\',3.4.1s)}),3W:5.f(3,3.2Q)})}))}}3.Y=U;3.11=U;b(P.1F>3.4.1s.1F){3.1m=1I;m 20=U;m 25=U;m H=3;5.3f(3.1T,9(1u){b(5(3).q(\'P\')==P&&!25){b(5(3).q(\'1d\')==o){20=1I}G{b(20){H.Y=H.1S(3,"3g");25=1I}G{H.11=H.1S(3,"32")}}}})}3.2L();3.30(X,o);3.1R(1)},2Q:9(1C,15){3.2o(15,{\'7\':3.1k,\'8\':3.W})},2M:9(){3.R.D().33(\'1c\').e({\'7\':\'Q\',\'8\':\'Q\'});3.I.D().e({\'k-h\':\'2n\',\'1M\':\'1n\',\'7\':\'Q\'});3.M.e({\'k\':\'o(\'+3.4.19+\'/\'+3.4.h+\'/3X.1P) 3Y-46 2U% 2U%\'});3.I.D().e({\'k-h\':\'2n\',\'1M\':\'1n\',\'7\':\'Q\'});3.1g({\'7\':3.4.B.7,\'8\':3.4.B.8,\'1l\':1})},2L:9(){b(3.11)3.11.f(\'17\',5.f(3,9(1C,v){v.2j();3.1B(3.11)}));b(3.Y)3.Y.f(\'17\',5.f(3,9(1C,v){v.2j();3.1B(3.Y)}))},30:9(X,o){b(3.1m||X){3.2f.47("29-2S");3.1a.D();3.1N.D();3.1N.L(3.1a);b(3.4.4h&&o){3.1q.15(\'<a 2Y="4g" 1d="\'+o+\'">4i</a>&4j;\'+X)}G{3.1q.15(X)}3.1a.L(3.11);3.1a.L(3.Y);3.1a.L(3.1q)}G{3.2f.4k("29-2S");3.1N.D()}},2R:9(E,r){3.R.D().33(\'1c\').e({\'7\':\'Q\',\'8\':\'Q\'}).L(\'<2r j="\'+3.4.c+\'-u"/>\');3.u=5(\'#\'+3.4.c+\'-u\');3.u.q(\'12\',E).e({\'7\':r[\'7\'],\'8\':r[\'8\']});3.M.e({\'k\':\'22\'});3.I.D().e({\'k-h\':\'2n\',\'1M\':\'1n\',\'7\':\'Q\'})},2o:9(15,r,13){3.R.D().e({\'7\':r[\'7\']-14,\'8\':r[\'8\']+35,\'k-h\':13||\'#1e\'});3.I.D().e({\'7\':r[\'7\']-14,\'k-h\':13||\'#1e\'}).L(\'<n j="\'+3.4.c+\'-u"/>\');3.u=5(\'#\'+3.4.c+\'-u\');3.u.e({\'7\':r[\'7\']-14,\'8\':r[\'8\'],\'4f\':\'Q\',\'k\':13||\'#1e\'}).L(15);3.M.e({\'k\':\'22\'});m 1H=5(3.w).q(\'j\');5(\'#\'+1H+\' 2l, #\'+1H+\' 1y, #\'+1H+\' 2i\').e({\'2g\':\'36\'})},34:9(12,r,13){3.R.D().e({\'7\':r[\'7\']-14,\'8\':r[\'8\']+35,\'k-h\':13||\'#1e\'});m j="4e"+2h 4a().49()+"-u";3.I.D().e({\'7\':r[\'7\']-14,\'k-h\':13||\'#1e\',\'1M\':\'1n\'}).L(\'<3c j="\'+j+\'" 4b="0"></3c>\');3.u=5(\'#\'+j);3.u.e({\'7\':r[\'7\']-14,\'8\':r[\'8\'],\'k\':13||\'#1e\'}).q(\'12\',12);3.M.e({\'k\':\'22\'})},3l:9(1W){b(!1W)1b{};m p={};m 1X=1W.1U(/[;&]/);3i(m i=0;i<1X.1F;i++){m 1p=1X[i].1U(\'=\');b(!1p||1p.1F!=2)4c;p[2N(1p[0])]=2N(1p[1]).4d(/\\+/g,\' \')}1b p},F:9(){m d=3.4.F.3h;m l=3.w.1Z();l=l.O;3i(x=0;x<3.4.F.3j;x++){3.w.16({O:l+d},3.4.F.S,3.4.F.1z).16({O:l-d},3.4.F.S,3.4.F.1z)}3.w.16({"O":l+d},3.4.F.S,3.4.F.1z).16({"O":l},3.4.F.S,3.4.F.1z)}}})(5);',62,291,'|||this|options|asljQuery||width|height|function||if|name||css|bind||color||id|background||var|div|url|params|attr|size|imageHeight|Overlay|Image|event|Wrapper||||imageWidth|BoxStyles|window|empty|image|shake|else|self|Contenido|ResizeBox|data|append|Contenedor|px|left|rel|auto|Background|duration|imgPreloader|false|displayed|ajustarHeight|caption|next|enlace||prev|src|bg||html|animate|click|modal|imagesdir|Nav|return|style|href|ffffff|Skin|replaceBox|opacity|onComplete|png|ajustarWidth|resize|MostrarNav|0px|document|pair|Descripcion|stop|find|OverlayStyles|index|zIndex|strBG|show|object|transition|top|hook|obj|close|captionColor|length|parseInt|wId|true|hide|CloseButton|hexcolor|padding|innerbb|IEuta|gif|title|display|getInfo|anchors|split|undefined|query|pairs|100|position|foundSelf||none|280|match|exit|extend||resizeEffect|SLB|Top|80|easing|resizeDuration|ResizeBox2|bb|visibility|new|embed|preventDefault|option|select|trigger|transparent|showContent|MoveBox|keyCode|img|backgroundIE|Bottom|opera|moveDuration|queryString|imageURL|Caption|border|showDuration|closeDuration|Navegador|closeButton|absolute|refresh|onload|strong|baseURL|BottomRight|moveEffect|addButtons|showLoading|unescape|easeOutBack|args2|handlerFunc|showImage|bbnav|800|50|bgSexy|getOptions|arguments|class|args|showNav|linear|Left|removeAttr|showIframe||visible||urlNoQuery||FFFFFF|indexOf|iframe|000000|black|each|Right|distance|for|loops|method|parseQuery|apply|concat|jQuery|typeof|keydown|Array|prototype|call|slice|right|makeArray|showEffect|white|320|486|body|000|ActiveXObject|initialize|fff|XMLHttpRequest|alt|Close|SexyClose|sexyimages|sexylightbox|65555|200|400|TopLeft|easeInOutBack|closeEffect|SexyLightbox|type|404html|error|success|loading|no|cache|GET|TB_inline|404|inlineId|TB_iframe|ajax|repeat|addClass||getTime|Date|frameborder|continue|replace|if_|overflow|sexylightbox_download|downloadLink|download|nbsp|removeClass|onerror|TB_|fadeIn|push|fadeOut|remove|scrollLeft|stopImmediatePropagation|test|scroll|blur|area|RegExp|scrollTop|hidden|bmp|gi|unbind|SexyBt|jpe|bt|complete'.split('|'),0,{}))

$(document).ready(function(){
	SexyLightbox.initialize({
		"path":"images/asl/twitter",
		"name":"SLB",
		"zIndex":65555,
		"color":"black",
		"find":"sexylightbox",
		"imagesdir":"/szablony/cobi2/images/sexylightbox",
		"background":"bgSexy.png",
		"backgroundIE":"bgSexy.gif",
		"closeButton":"SexyClose.png",
		"showDuration":200,
		"showEffect":"linear",
		"closeDuration":400,
		"closeEffect":"linear",
		"moveDuration":800,
		"resizeDuration":800,
		"moveEffect":"easeOutBack",
		"resizeEffect":"easeOutBack",
		"singleImage":"",
		"reflHeight":56,
		"reflGap":2,
		"yRadius":40,
		"xPos":285,
		"yPos":120,
		"titleBox":".cloud_carousel_title"
	});
});

/* Zarzadzanie wykonywaniem skryptow po doczytaniu strony */
var EditoStart = new Object();
EditoStart.functions = new Array();

EditoStart.Add = function(fnc)
{
	EditoStart.functions[EditoStart.functions.length] = fnc;
}

EditoStart.init = function()
{
	for(var i = 0; i < EditoStart.functions.length; i++)
	{
		EditoStart.functions[i]();
	}
}

$(document).ready(function()
{
	EditoStart.init();
});

$(document).ready(function()
{
	// Przegladarka zdjec
	// $('a[rel*=artsexylightboxpreview]').lightBox();
	// $('a[class*=artsexylightboxpreview]').lightBox();

	// zabezpieczenie przed 2-krotnym wysylaniem formularzy
	$('form:not(.jquery_form)').bind('submit', function(){
		$('input[type=submit]', this).attr('disabled', 'disabled');
	})
});     

$(document).ready(function()
{
	/*
	 * Kolor naglowka w skrocie aktualnosci $('.region3
	 * .block-container:has(.news-block) .headers01').addClass('color');
	 */
	/* Brak marginesu dolnego w module opisowym */
	$('.region0 .modul-container .box-desc:last-child').addClass('none');

	/* Tabelka zmiana tła */
	$('.tabelkaszara tr:even').addClass('bg1');

	$('.lang:first-child').css('margin-right', '3px');

 	
	/* Tooltip w pasku Koszyk */
	var cookie = getCookie('basket-tooltip');

	if(!cookie)
	{
		$('#basket-tooltip').fadeIn('2000');
	}

	$('#tooltip-close').click(function() {
		$('#basket-tooltip').fadeOut('1000');
		setCookie('basket-tooltip', '1', '1', '/');
	});
 	
	// Selecty mapy google
	if($('#miejscowosc option').size() == 0)
		$('#miejscowosc').css('width', '100px');

	// Wyszukiwarka - zwin/rozwin
	if(getCookie('search-exp') == undefined)
		setCookie('search-exp', '0', '1', '/');
	if(getCookie('search-exp') == '0')
	{
//		$('.block-container2 .hide').each(function () {
//			$(this).hide();
//		})
		$('.block-container2 .zwin').css('margin-top', '20px');
			
		$('.wyczysc').hide();
	}
	

	$('#wyszukiwarka_rozwin').click(function() {
		$('.block-container2 .szukaj_wiecej').slideDown("slow");
		$('.wyczysc').slideDown("slow");
	});
	$('#wyszukiwarka_zwin').click(function() {
		$('.block-container2 .szukaj_wiecej').slideUp("slow");
		$('.wyczysc').slideUp("slow");
	});
	$("#toggle a").click(function () {
		$("#toggle a").toggle();
	});	
		$('.wyczysc').click(function(){
			$('.cobi_wyszukiwarka input[type=text]').attr('value', '');
			$('.cobi_wyszukiwarka input[type=checkbox]').removeAttr('checked');
			$('.cobi_wyszukiwarka select').val('');
		});

	var buttonWidth = $('#modul_komunikat .button01').width();
	
	var containerWidth = $('#modul_komunikat').width();
	
	$('#modul_komunikat .margin').css('padding-left', (containerWidth-buttonWidth)/2);
	
	
	$('#komentarz').focus(function() {
		$(this).val('');		
	});
	
	/* Znikajace komunikaty */
	if($('.jq-disappear'))
	{
		setTimeout(function(){
			$('.jq-disappear').fadeOut('slow');
		}, 10000);
	}
	
	/* Zakladki boczne */	
	if(screen.height < 800)
	{
		$('#zakladki').css('top', '34px');
	}
	
	$('#zakladki .icon').click(function() {
		
		setCookie('tabs-exp', '', '1', '/');
		
		if($(this).parent().hasClass('exp'))
		{
			zwin($(this).parent());
		}
		else
		{
			$('#zakladki .exp').each(function() {		
				zwin($(this));
			});

			rozwin($(this).parent());
			setCookie('tabs-exp', $(this).parent().attr('id'), '1', '/');
		}
	});	
	
	// X - zamykanie
	$('#zakladki .close').click(function() {	
		zwin($(this).parent().parent());
	});
	//$.cookie('basket-click', '0');	
	$('.webSiteShell').click(function() {		
		$('#zakladki .exp').each(function() {			
			var basketClick =$.cookie('basket-click');				
			if(qwe123 == '0')
				zwin($(this));				
						
		});	
		
		qwe123 = 0;
	});
	var i = 1;
	$('#zakladki .zakladka').each(function() {
		var margin = i++*46;
		$(this).css('top', margin+'px');		
	});
	
	function zwin(obj) {
		obj.animate({ 
			marginRight: "0px"	
		}, 500,  function() {
			obj.removeClass('exp');
			obj.css('z-index', '-1');			  
		});				
	}
	
	function rozwin(obj) {
		;
		$('#zakladki').css('width', '250px');
		obj.addClass('exp');
		obj.css('z-index', '9999');	
		obj.animate({ 
			marginRight: "197px"	
		}, 500);		
	}   
});

function zwin(obj) {
	obj.animate({ 
		marginRight: "0px"	
	}, 500,  function() {
		obj.removeClass('exp');
		obj.css('z-index', '-1');			  
	});		
}

function rozwin(obj) {
	$('#zakladki').css('width', '250px');
	obj.addClass('exp');
	obj.css('z-index', '9999');	
	obj.animate({ 
		marginRight: "197px"	
	}, 500);	
}   

function zwinWyszukiwarke()
{
	if(getCookie('search-exp') == '1')
	{
		$('.block-container2 .hide').each(function () {
			$(this).slideToggle('medium');					
		})
		$('.wyczysc').slideToggle('medium');
		setCookie('search-exp', '0', '1', '/');
		$('.block-container2 .zwin').css('margin-top', '20px');
		
	}	
}

/* Wysokosci bloczkow */
$(document).ready(function() {
	var height1 = $('.region8').children('.block-container').height();
	var height2 = $('.region9').children('.block-container').height();

	if(height2 > height1)
		$('.region8').children('.block-container').css('height', height2);
	else
		$('.region9').children('.block-container').css('height', height1);

	var height = 0;

	$('.region3').find('.block-container').each(function(){
		if($(this).height() > height )
			height = $(this).height();
	});

	var i=1;
	$('.region3').find('.block-container').each(function(){
		$(this).css('height', height);

		if(i++>1)
		{
			$(this).css('margin-left', '10px');
			$(this).children('h2').addClass('color');
		}

	});

	    
	    
	var w = 0;
	$('.region10 .menu-aliasy').each(function() {
		w += $(this).width();
	});	 
	    
	$('.region10 .block-container').width(778-w);
	    
	    
});

function insertActiveX(html)
{
	document.write(html);
}

/* Pozostale skrypty */
function findObj(obj) {
	return document.getElementById(obj);
}

function preloadimages(images) {
	if (!images) {
		var images = new Array();
	}
	var img = new Array();
	for (i=0; i<images.length; i++) {
		img[i] = new Image();
		img[i].src = images[i];
	}
}

function swapImage(id, img) {
	o = findObj(id);
	if(o)
		o.src = img;
}

function SendTo(before, after, user, host, label) {
	label = label.replace(' // ', '@');
	document.write('<a' + before + 'href="mailto:' + user + '@' + host + '"' + after+'>' + label + '</a>');
}

// popup
function popUpWindow(src, w, h) {
	noweOkienko = null;
	if (window.screen) {
		aw = screen.availWidth;
		ah = screen.availHeight;
	} else {
		aw = 640;
		ah = 450;
	}
	if (noweOkienko==null || noweOkienko.closed) {
		ustawienia=
		"left=" + (aw-w)/2 + ","
		+"top=" + (ah-h)/2 + ","
		+"screenX=" + (aw-w)/2 + ","
		+"screenY=" + (ah-h)/2 + ","
		+"width=" + w + ","
		+"height=" + h + ","
		+"innerWidth=" + w + ","
		+"innerHeight=" + h + ","
		+"toolbar=no,"
		+"location=no,"
		+"directories=no,"
		+"status=yes,"
		+"menubar=no,"
		+"scrollbars=yes,"
		+"resizable=no"
		var url = '/' + src;
		noweOkienko = window.open(url, 'plik', ustawienia);
	}
	try {
		noweOkienko.focus();
	}
	catch (e) {
	}
}

// rozwijanie listy wynikow
function showResult(id) {
	o = document.getElementById(id);
	if (o.style.display == '' || o.style.display == 'none') {
		o.style.display = 'block';
	} else {
		o.style.display = 'none';
	}
}
// rozwijanie listy wynikow w wyszukiwarce + zmiana koloru nagłówka
function showResultSearch(id, id2) {
	o = document.getElementById(id);
	objTitle = document.getElementById(id2);
	if (o.style.display == '' || o.style.display == 'none') {
		o.style.display = 'block';
		objTitle.className = 'headers02';
	} else {
		o.style.display = 'none';
		objTitle.className = 'headers03';
	}
}

function limiter(obj, limit) {
	if (obj.value.length > limit) {
		obj.value = obj.value.substring(0,limit);
	}
}

// obliczanie pozostalych znakow w textarea
function limit(obj, limit, msg) {
	if (obj.value.length > limit) {
		obj.value = obj.value.substring(0,limit);
		alert(msg);
	}
}

function getCookie(name)
{
	var dc = document.cookie;
	var cname = name + "=";
	var clen = dc.length;
	var cbegin = 0;

	while (cbegin < clen)
	{
		var vbegin = cbegin + cname.length;

		if (dc.substring(cbegin, vbegin) == cname)
		{
			var vend = dc.indexOf (";", vbegin);
			if (vend == -1) vend = clen;

			return unescape(dc.substring(vbegin, vend));
		}

		cbegin = dc.indexOf(" ", cbegin) + 1;

		if (cbegin== 0) break;
	}
	return null;
}

function setCookie(name, value, days, path, domain, secure)
{
	var expires = null;

	if(days)
	{
		expires = new Date();
		var theDay = expires.getDate();
		theDay = theDay + days;
		expires.setDate(theDay);
	}

	var ciacho = name + "=" + escape(value) +
	((expires) ? "; expires=" + expires.toGMTString() : "") +
	((path) ? "; path=" + path : "") +
	((domain) ? "; domain=" + domain : "") +
	((secure) ? "; secure" : "");

	document.cookie = ciacho;
}

/* obiekt zakladek TabStrip */
function TabStrip(id, tabsCount)
{
	this.selected = id;
	this.tabsCount = tabsCount;

	this.renderTabs(this.selected);
}

TabStrip.prototype.renderTabs = function(selected)
{
	for(var i=0; i < this.tabsCount; i++)
	{
		if(i == selected)
			this.setActive(i);
		else
			this.setInactive(i);
	}
}

TabStrip.prototype.setActive = function(id)
{
	findObj('TabStrip_'+id).style.display = '';
	findObj('TabStripHeader_'+id).className = 'TabStripActive';
	setCookie('TabStrip_activeTab', id);
}

TabStrip.prototype.setInactive = function(id)
{
	findObj('TabStrip_'+id).style.display = 'none';
	findObj('TabStripHeader_'+id).className = 'TabStripInactive';
}

TabStrip.prototype.showTab = function(id)
{
	this.renderTabs(id);
}

var EditoCalendar = new Object();

/* wywolanie kalendarza */
EditoCalendar.showCalendar = function(obj, field, btn)
{
	Calendar.setup({
		inputField		:	field,
		ifFormat		:	"%Y-%m-%d",
		button			:	btn,
		singleClick		:	true,
		align			:	"Lt"
	});
	obj.onclick();

	return false;
}

/* bannery */
var EditoBannery = new Object();
EditoBannery.show = function(bannerList, kontener, mode, idBloku)
{
	if(mode == 'all')
	{
		for(bannerIndex in bannerList)
		{
			var cBanner = bannerList[bannerIndex];
			EditoBannery.showElement(kontener, cBanner);
		}
	}
	else if(mode == 'single_view_popup' && getCookie(kontener) == 1)
	{
		return;
	}
	else if(bannerList.length > 0)
	{
		// wylosuj banner z listy
		var randomIndex = Math.floor(Math.random() * bannerList.length);
		var cBanner = bannerList[randomIndex];
		// ustawianie ciacha jezeli popup ma sie pokazac tylko 1 raz
		if(mode == 'single_view_popup')
			setCookie(kontener, 1);
		EditoBannery.showElement(kontener, cBanner);
	}
}

EditoBannery.showElement = function(kontener, cBanner)
{
	var swfParams = {
		menu: "false",
		quality: "high",
		wmode: "transparent"
	};

	switch( cBanner.params.type )
	{
		case 'flash':

			var box = Math.floor(Math.random()*1000);
			$("#"+kontener).append('<div class="reklama" id="' + kontener + box + '"></div>');

			swfobject.embedSWF(cBanner.file, kontener + box, cBanner.width, cBanner.height, "9.0.124", base_href + "flash/expressinstall.swf", {}, swfParams);
			break;

		case 'flash_link':

			var box = Math.floor(Math.random()*1000);
			$("#"+kontener).append('<div style="position: relative; width: ' + cBanner.width + 'px; height: ' + cBanner.height + 'px; text-align: left; margin: 0 auto;"><a href="/'+ cBanner.params.link +'" target="'+cBanner.params.target+'" class="mediaMaska" style="height: '+cBanner.height+'px;"></a><div id="' + kontener + box + '"></div></div>');

			var flashvars = {
				alink1: cBanner.params.link,
				atar1: cBanner.params.target
			};
			swfobject.embedSWF(cBanner.file + "?alink1=" + cBanner.params.link + "&amp;atar1=" + cBanner.params.target, kontener + box, cBanner.width, cBanner.height, "9.0.124", base_href + "flash/expressinstall.swf", flashvars, swfParams);

			break;

		case 'flash_popup':
			EditoStart.Add( function()
			{
				EditoPopup.Popup(cBanner.file, cBanner.params.link, cBanner.params.target, cBanner.width, cBanner.height, 'popup_flash', cBanner.params.popup_id, cBanner.params.popup_szablon, cBanner.params.popup_padding);
			}
			);
			break;

		case 'obrazek':
			$("#"+kontener).append('<div class="reklama2"><img src="' + cBanner.file + '" width="' + cBanner.width + '" height="' + cBanner.height + '" border="0" alt="" /></div>');
			break;

		case 'obrazek_link':
			$("#"+kontener).append('<div class="reklama2"><a href="' + cBanner.params.link + '" target="' + cBanner.params.target + '" rel="nofollow"><img src="' + cBanner.file + '" width="' + cBanner.width + '" height="' + cBanner.height + '" border="0" alt="" /></a></div>');
			break;

		case 'obrazek_popup':
			EditoStart.Add( function()
			{
				EditoPopup.Popup(cBanner.file, cBanner.params.link, cBanner.params.target, cBanner.width, cBanner.height, 'popup_obrazek', cBanner.params.popup_id, cBanner.params.popup_szablon, cBanner.params.popup_padding);
			}
			);
			break;

		case 'script':
			$("#"+kontener).append(cBanner.script);
			break;
	}
}

function showWin(src, w, h, title)
{
	$('#PopupDiv').css("height", document.body.clientHeight + "px");
	$('#PopupDiv #PopupContent').css("width", w);
	$('#PopupDiv #PopupContent').css("height", h);

	if($('#PopupDiv #PopupContent').find('#start').length == 0)
	{
		var content = '<table id="PopUp" class="PopUp" cellspacing="0" cellpadding="0" border="0">'
		+'					<tr>'
		+'						<td colspan="3" class="TitleBar">'
		+'							<table width="100%" cellspacing="0" cellpadding="0" border="0">'
		+'								<tr>'
		+'									<td class="btl">&nbsp;</td>'
		+'									<td class="bt"><span class="Title"></span></td>'
		+'									<td class="btc"><a href="javascript: void(hideWin());"><img src="/admin/Data/Images/popup/BtnClose.gif" width="16" height="16" border="0" class="Close" /></a></td>'
		+'									<td class="btr">&nbsp;</td>'
		+'								</tr>'
		+'							</table>'
		+'						</td>'
		+'					</tr>'
		+'					<tr>'
		+'						<td class="b bl">&nbsp;</td>'
		+'						<td class="bg"><div style="width: 100%; height:' + h + 'px; position: relative;">'
		+'							<div id="PopupLoading" style="width: 100%; height: 100%; background-color: #ffffff; position: absolute; border: 1px solid #888888;">'
		+'								<table border="0" style="width: 100%; height: 100%;">'
		+'									<tr>'
		+'										<td align="center" valign="middle">'
		+'											<img src="/admin/Data/Images/bigrotation.gif" border="0">'
		+'										</td>'
		+'									</tr>'
		+'								</table>'
		+'							</div>'
		+'							<iframe src="/szablony/blank.html" name="start" id="start" width="100%" height="100%" style="border: 1px solid #888888; background-color: #ffffff;" frameborder="0" marginheight="0" marginwidth="0" scrolling="auto"></iframe></div>'
		+'						</td>'
		+'						<td class="b br">&nbsp;</td>'
		+'					</tr>'
		+'					<tr>'
		+'						<td class="b bbl">&nbsp;</td>'
		+'						<td class="b bb">&nbsp;</td>'
		+'						<td class="b bbr">&nbsp;</td>'
		+'					</tr>'
		+'				</table>';

		$('#PopupDiv #PopupContent').append(content);
	}
	if(title != undefined) $('.PopUp .Title').html(title);
	$('#PopupLoading').show();
	$('#PopupDiv').show();
	window.frames['start'].location.href = src + '&ispopup=1';
	return window.frames['start'];
}

function hideWin()
{
	$('.PopUp .Title').html('');
	$('#PopupDiv').hide();
	window.frames['start'].location.href = '/szablony/blank.html';
}

jQuery.fn.extend( {
	showAjaxIndicator: function() {
		var div = $('<div class="jq_progress2"></div>');
		this.before(div);

		div.css('width', this.get(0).offsetWidth + 'px');
		div.css('height', this.get(0).offsetHeight + 'px');
		div.css('top', this.get(0).offsetTop + 'px');
		div.css('left', this.get(0).offsetLeft + 'px');
	}
});

jQuery.fn.extend( {
	hideAjaxIndicator: function() {
		$(this).prev('div.jq_progress2').remove();
	}
});

function addBookmarkForBrowser(msg)
{
	if (window.sidebar)
	{ // Mozilla Firefox Bookmark
		window.sidebar.addPanel(document.title, document.location.href,"");
	} else if( window.external )
{ // IE Favorite
		window.external.AddFavorite( document.location.href, document.title);
	}
	else if(window.opera && window.print)
	{ // Opera Hotlist
		alert(msg);
	}
	return false;
}

/* SWFObject v2.1 */
var swfobject=function(){
	var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;
	var h=function(){
		var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;
		if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){
			x=T.plugins[n].description;
			if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){
				x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");
				AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);
				AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);
				AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0
			}
		}else{
			if(typeof j.ActiveXObject!=b){
				var y=null,AB=false;
				try{
					y=new ActiveXObject(p+".7")
				}catch(t){
					try{
						y=new ActiveXObject(p+".6");
						AC=[6,0,21];
						y.AllowScriptAccess="always"
					}catch(t){
						if(AC[0]==6){
							AB=true
						}
					}
					if(!AB){
						try{
							y=new ActiveXObject(p)
						}catch(t){}
					}
				}
				if(!AB&&y){
					try{
						x=y.GetVariable("$version");
						if(x){
							x=x.split(" ")[1].split(",");
							AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]
						}
					}catch(t){}
				}
			}
		}
		var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*
																																																																																																																																																																																																																																																																																																																																																				 * @cc_on
																																																																																																																																																																																																																																																																																																																																																				 * q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@
																																																																																																																																																																																																																																																																																																																																																				 */
		return{
			w3cdom:v,
			pv:AC,
			webkit:AA,
			ie:q,
			win:z,
			mac:w
		}
	}();
	var L=function(){
		if(!h.w3cdom){
			return
		}
		f(H);
		if(h.ie&&h.win){
			try{
				K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");
				J=C("__ie_ondomload");
				if(J){
					I(J,"onreadystatechange",S)
				}
			}catch(q){}
		}
		if(h.webkit&&typeof K.readyState!=b){
			Z=setInterval(function(){
				if(/loaded|complete/.test(K.readyState)){
					E()
				}
			},10)
		}
		if(typeof K.addEventListener!=b){
			K.addEventListener("DOMContentLoaded",E,null)
		}
		R(E)
	}();
	function S(){
		if(J.readyState=="complete"){
			J.parentNode.removeChild(J);
			E()
		}
	}
	function E(){
		if(e){
			return
		}
		if(h.ie&&h.win){
			var v=a("span");
			try{
				var u=K.getElementsByTagName("body")[0].appendChild(v);
				u.parentNode.removeChild(u)
			}catch(w){
				return
			}
		}
		e=true;
		if(Z){
			clearInterval(Z);
			Z=null
		}
		var q=o.length;
		for(var r=0;r<q;r++){
			o[r]()
		}
	}
	function f(q){
		if(e){
			q()
		}else{
			o[o.length]=q
		}
	}
	function R(r){
		if(typeof j.addEventListener!=b){
			j.addEventListener("load",r,false)
		}else{
			if(typeof K.addEventListener!=b){
				K.addEventListener("load",r,false)
			}else{
				if(typeof j.attachEvent!=b){
					I(j,"onload",r)
				}else{
					if(typeof j.onload=="function"){
						var q=j.onload;
						j.onload=function(){
							q();
							r()
						}
					}else{
						j.onload=r
					}
				}
			}
		}
	}
	function H(){
		var t=N.length;
		for(var q=0;q<t;q++){
			var u=N[q].id;
			if(h.pv[0]>0){
				var r=C(u);
				if(r){
					N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";
					N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";
					if(c(N[q].swfVersion)){
						if(h.webkit&&h.webkit<312){
							Y(r)
						}
						W(u,true)
					}else{
						if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){
							k(N[q])
						}else{
							O(r)
						}
					}
				}
			}else{
				W(u,true)
			}
		}
	}
	function Y(t){
		var q=t.getElementsByTagName(Q)[0];
		if(q){
			var w=a("embed"),y=q.attributes;
			if(y){
				var v=y.length;
				for(var u=0;u<v;u++){
					if(y[u].nodeName=="DATA"){
						w.setAttribute("src",y[u].nodeValue)
					}else{
						w.setAttribute(y[u].nodeName,y[u].nodeValue)
					}
				}
			}
			var x=q.childNodes;
			if(x){
				var z=x.length;
				for(var r=0;r<z;r++){
					if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){
						w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))
					}
				}
			}
			t.parentNode.replaceChild(w,t)
		}
	}
	function k(w){
		A=true;
		var u=C(w.id);
		if(u){
			if(w.altContentId){
				var y=C(w.altContentId);
				if(y){
					M=y;
					l=w.altContentId
				}
			}else{
				M=G(u)
			}
			if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){
				w.width="310"
			}
			if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){
				w.height="137"
			}
			K.title=K.title.slice(0,47)+" - Flash Player Installation";
			var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;
			if(h.ie&&h.win&&u.readyState!=4){
				var t=a("div");
				x+="SWFObjectNew";
				t.setAttribute("id",x);
				u.parentNode.insertBefore(t,u);
				u.style.display="none";
				var v=function(){
					u.parentNode.removeChild(u)
				};
			
				I(j,"onload",v)
			}
			U({
				data:w.expressInstall,
				id:m,
				width:w.width,
				height:w.height
			},{
				flashvars:r
			},x)
		}
	}
	function O(t){
		if(h.ie&&h.win&&t.readyState!=4){
			var r=a("div");
			t.parentNode.insertBefore(r,t);
			r.parentNode.replaceChild(G(t),r);
			t.style.display="none";
			var q=function(){
				t.parentNode.removeChild(t)
			};
			
			I(j,"onload",q)
		}else{
			t.parentNode.replaceChild(G(t),t)
		}
	}
	function G(v){
		var u=a("div");
		if(h.win&&h.ie){
			u.innerHTML=v.innerHTML
		}else{
			var r=v.getElementsByTagName(Q)[0];
			if(r){
				var w=r.childNodes;
				if(w){
					var q=w.length;
					for(var t=0;t<q;t++){
						if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){
							u.appendChild(w[t].cloneNode(true))
						}
					}
				}
			}
		}
		return u
	}
	function U(AG,AE,t){
		var q,v=C(t);
		if(v){
			if(typeof AG.id==b){
				AG.id=t
			}
			if(h.ie&&h.win){
				var AF="";
				for(var AB in AG){
					if(AG[AB]!=Object.prototype[AB]){
						if(AB.toLowerCase()=="data"){
							AE.movie=AG[AB]
						}else{
							if(AB.toLowerCase()=="styleclass"){
								AF+=' class="'+AG[AB]+'"'
							}else{
								if(AB.toLowerCase()!="classid"){
									AF+=" "+AB+'="'+AG[AB]+'"'
								}
							}
						}
					}
				}
				var AD="";
				for(var AA in AE){
					if(AE[AA]!=Object.prototype[AA]){
						AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'
					}
				}
				v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";
				i[i.length]=AG.id;
				q=C(AG.id)
			}else{
				if(h.webkit&&h.webkit<312){
					var AC=a("embed");
					AC.setAttribute("type",P);
					for(var z in AG){
						if(AG[z]!=Object.prototype[z]){
							if(z.toLowerCase()=="data"){
								AC.setAttribute("src",AG[z])
							}else{
								if(z.toLowerCase()=="styleclass"){
									AC.setAttribute("class",AG[z])
								}else{
									if(z.toLowerCase()!="classid"){
										AC.setAttribute(z,AG[z])
									}
								}
							}
						}
					}
					for(var y in AE){
						if(AE[y]!=Object.prototype[y]){
							if(y.toLowerCase()!="movie"){
								AC.setAttribute(y,AE[y])
							}
						}
					}
					v.parentNode.replaceChild(AC,v);
					q=AC
				}else{
					var u=a(Q);
					u.setAttribute("type",P);
					for(var x in AG){
						if(AG[x]!=Object.prototype[x]){
							if(x.toLowerCase()=="styleclass"){
								u.setAttribute("class",AG[x])
							}else{
								if(x.toLowerCase()!="classid"){
									u.setAttribute(x,AG[x])
								}
							}
						}
					}
					for(var w in AE){
						if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){
							F(u,w,AE[w])
						}
					}
					v.parentNode.replaceChild(u,v);
					q=u
				}
			}
		}
		return q
	}
	function F(t,q,r){
		var u=a("param");
		u.setAttribute("name",q);
		u.setAttribute("value",r);
		t.appendChild(u)
	}
	function X(r){
		var q=C(r);
		if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){
			if(h.ie&&h.win){
				if(q.readyState==4){
					B(r)
				}else{
					j.attachEvent("onload",function(){
						B(r)
					})
				}
			}else{
				q.parentNode.removeChild(q)
			}
		}
	}
	function B(t){
		var r=C(t);
		if(r){
			for(var q in r){
				if(typeof r[q]=="function"){
					r[q]=null
				}
			}
			r.parentNode.removeChild(r)
		}
	}
	function C(t){
		var q=null;
		try{
			q=K.getElementById(t)
		}catch(r){}
		return q
	}
	function a(q){
		return K.createElement(q)
	}
	function I(t,q,r){
		t.attachEvent(q,r);
		d[d.length]=[t,q,r]
	}
	function c(t){
		var r=h.pv,q=t.split(".");
		q[0]=parseInt(q[0],10);
		q[1]=parseInt(q[1],10)||0;
		q[2]=parseInt(q[2],10)||0;
		return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false
	}
	function V(v,r){
		if(h.ie&&h.mac){
			return
		}
		var u=K.getElementsByTagName("head")[0],t=a("style");
		t.setAttribute("type","text/css");
		t.setAttribute("media","screen");
		if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){
			t.appendChild(K.createTextNode(v+" {"+r+"}"))
		}
		u.appendChild(t);
		if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){
			var q=K.styleSheets[K.styleSheets.length-1];
			if(typeof q.addRule==Q){
				q.addRule(v,r)
			}
		}
	}
	function W(t,q){
		var r=q?"visible":"hidden";
		if(e&&C(t)){
			C(t).style.visibility=r
		}else{
			V("#"+t,"visibility:"+r)
		}
	}
	function g(s){
		var r=/[\\\"<>\.;]/;
		var q=r.exec(s)!=null;
		return q?encodeURIComponent(s):s
	}
	var D=function(){
		if(h.ie&&h.win){
			window.attachEvent("onunload",function(){
				var w=d.length;
				for(var v=0;v<w;v++){
					d[v][0].detachEvent(d[v][1],d[v][2])
				}
				var t=i.length;
				for(var u=0;u<t;u++){
					X(i[u])
				}
				for(var r in h){
					h[r]=null
				}
				h=null;
				for(var q in swfobject){
					swfobject[q]=null
				}
				swfobject=null
			})
		}
	}();
	return{
		registerObject:function(u,q,t){
			if(!h.w3cdom||!u||!q){
				return
			}
			var r={};
		
			r.id=u;
			r.swfVersion=q;
			r.expressInstall=t?t:false;
			N[N.length]=r;
			W(u,false)
		},
		getObjectById:function(v){
			var q=null;
			if(h.w3cdom){
				var t=C(v);
				if(t){
					var u=t.getElementsByTagName(Q)[0];
					if(!u||(u&&typeof t.SetVariable!=b)){
						q=t
					}else{
						if(typeof u.SetVariable!=b){
							q=u
						}
					}
				}
			}
			return q
		},
		embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){
			if(!h.w3cdom||!x||!AE||!AB||!AD||!q){
				return
			}
			AB+="";
			AD+="";
			if(c(q)){
				W(AE,false);
				var AA={};
		
				if(AC&&typeof AC===Q){
					for(var v in AC){
						if(AC[v]!=Object.prototype[v]){
							AA[v]=AC[v]
						}
					}
				}
				AA.data=x;
				AA.width=AB;
				AA.height=AD;
				var y={};

				if(z&&typeof z===Q){
					for(var u in z){
						if(z[u]!=Object.prototype[u]){
							y[u]=z[u]
						}
					}
				}
				if(r&&typeof r===Q){
					for(var t in r){
						if(r[t]!=Object.prototype[t]){
							if(typeof y.flashvars!=b){
								y.flashvars+="&"+t+"="+r[t]
							}else{
								y.flashvars=t+"="+r[t]
							}
						}
					}
				}
				f(function(){
					U(AA,y,AE);
					if(AA.id==AE){
						W(AE,true)
					}
				})
			}else{
				if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){
					A=true;
					W(AE,false);
					f(function(){
						var AF={};
			
						AF.id=AF.altContentId=AE;
						AF.width=AB;
						AF.height=AD;
						AF.expressInstall=w;
						k(AF)
					})
				}
			}
		},
		getFlashPlayerVersion:function(){
			return{
				major:h.pv[0],
				minor:h.pv[1],
				release:h.pv[2]
			}
		},
		hasFlashPlayerVersion:c,
		createSWF:function(t,r,q){
			if(h.w3cdom){
				return U(t,r,q)
			}else{
				return undefined
			}
		},
		removeSWF:function(q){
			if(h.w3cdom){
				X(q)
			}
		},
		createCSS:function(r,q){
			if(h.w3cdom){
				V(r,q)
			}
		},
		addDomLoadEvent:f,
		addLoadEvent:R,
		getQueryParamValue:function(v){
			var u=K.location.search||K.location.hash;
			if(v==null){
				return g(u)
			}
			if(u){
				var t=u.substring(1).split("&");
				for(var r=0;r<t.length;r++){
					if(t[r].substring(0,t[r].indexOf("="))==v){
						return g(t[r].substring((t[r].indexOf("=")+1)))
					}
				}
			}
			return""
		},
		expressInstallCallback:function(){
			if(A&&M){
				var q=C(m);
				if(q){
					q.parentNode.replaceChild(M,q);
					if(l){
						W(l,true);
						if(h.ie&&h.win){
							M.style.display="block"
						}
					}
					M=null;
					l=null;
					A=false
				}
			}
		}
	}
}();

// ajaxLink - koszyk / schowek
$(document).ready(function(){

	var arr;
	var id_oferty;
	var id_kategorii_oferty;
	var magazyn_oferty;
	var opcje_lokalne;
	var koszyk = false;

	$('.jq-addKoszykHandle').click(function(e){		
		
		$.cookie('basket-click', '1');		
		
		qwe123 = 1;
		// Rozwijamy zakladke
		rozwin($('#kontenerBlokuKoszykaListy').parent().parent());		
		
		arr = $(this).attr('rel').split('_');
		id_oferty = arr[1];
		id_kategorii_oferty = arr[2];
		magazyn_oferty = arr[3];
		opcje_lokalne = arr[4];

		if($('#ajaxInfoArea').css('display') == 'none')
		{
			$('#ajaxInfoArea .infoSchowek').hide();
			$('#ajaxInfoArea .infoKoszyk').show();
			$('#ajaxInfoArea').css({
				'left' : (e.pageX - 140) +'px',
				'top' : (e.pageY - 40) + 'px'
			}).show();

			$.post( $('#ajaxLinkDodajDoKoszyka').val() , {
				id_oferty:id_oferty, 
				id_kategorii_oferty:id_kategorii_oferty, 
				magazyn_oferty:magazyn_oferty, 
				opcje_lokalne:opcje_lokalne
			}, function(){
				$.post( $('#ajaxLinkZaktualizujBlokKoszyka').val() , function(data){
					$('#kontenerBlokuKoszyka').html(data);
				});
				$.post( $('#ajaxLinkZaktualizujBlokKoszykaListy').val() , function(data){
					$('#kontenerBlokuKoszykaListy').html(data);
				});
			});
			
			setTimeout(function() {
				$('#ajaxInfoArea').fadeOut(200);
			}, 3000);
		}
				
	});

	$.post( $('#ajaxLinkZaktualizujBlokKoszykaListy').val() , function(data){
		$('#kontenerBlokuKoszykaListy').html(data);
	});
	
	$('.jq-addSchowekHandle').click(function(e){
		arr = $(this).attr('rel').split('_');
		id_oferty = arr[1];
		id_kategorii_oferty = arr[2];
		magazyn_oferty = arr[3];
		opcje_lokalne = arr[4];
		
		if($('#ajaxInfoArea').css('display') == 'none')
		{
			$('#ajaxInfoArea .infoKoszyk').hide();
			$('#ajaxInfoArea .infoSchowek').show();
			$('#ajaxInfoArea').css({
				'left' : (e.pageX - 140) +'px',
				'top' : (e.pageY - 40) + 'px'
			}).show();

			$.post( $('#ajaxLinkDodajDoSchowka').val() , {
				id_oferty:id_oferty, 
				id_kategorii_oferty:id_kategorii_oferty, 
				magazyn_oferty:magazyn_oferty, 
				opcje_lokalne:opcje_lokalne
			}, function(){
				$.post( $('#ajaxLinkZaktualizujBlokKoszyka').val() , function(data){
					$('#kontenerBlokuKoszyka').html(data);
				});
				$.post( $('#ajaxLinkZaktualizujBlokKoszykaListy').val() , function(data){
					$('#kontenerBlokuKoszykaListy').html(data);
				});
			});
			
			setTimeout(function() {
				$('#ajaxInfoArea').fadeOut(200);
			}, 3000);
						
		}
		
		
	})

	$('[name=opcje_lokalne]').click(function(){
		var rel = $('.jq-addSchowekHandle').attr('rel');
		if(rel)
		{
			var relArg = rel.split('_');
			$('.jq-addSchowekHandle, .jq-addKoszykHandle').attr('rel', 'id_'+relArg[1]+'_'+relArg[2]+'_'+relArg[3]+'_'+this.value);
		}
	});
	$('#ajaxInfoArea .hideWindow').click(function(){
		$('#ajaxInfoArea, .ajaxinfo').fadeOut(200);
	});
});

/* Slider bannerow w regionie 16 - Strona glowna */
var start = 0;
function timedCount()
{		
	if($('.region16').length)
	{
		var id = $('.region16').find('.reklama').attr('id');
		var a = id.split('_');
		var id_bloku = a['1'];	
		var length = eval('images'+id_bloku).length;	
			
		$('.region16 #'+id).fadeOut('slow', function() {
			$('.region16 #'+id).find('img').attr('src', eval('images'+id_bloku)[start]['file']);
			$('.region16 #'+id).find('a').attr('href', eval('images'+id_bloku)[start]['params']['link']);	
			$('.region16 #'+id).fadeIn('slow');	
		});			
		start++;
		if(start==length) start = 0;
	}
}
$(document).ready(function(){	
	if($('.region16').length)
	{
		var id = $('.region16').find('.reklama').attr('id');
		var a = id.split('_');
		var id_bloku = a['1'];	
		
		$('.region16 #'+id).find('img').attr('src', eval('images'+id_bloku)['0']['file']);	
		$('.region16 #'+id).find('a').attr('href', eval('images'+id_bloku)['0']['params']['link']);	
		setInterval("timedCount()", 10000); // czas zmiany banera (1000 - 1s)	
	}
});

$(document).ready(function() {
	$('.text-content').find('object').parent().css('text-align', 'center');
});

/* wyszarzenie w koszyku buttona ostatenigo etapu */
function WyszarzenieKoszyk()
{
	if (!$('.zamowienie-status .etap .button05').hasClass('disabled'))
	{ 
		$('.zamowienie-status .etap .button05').addClass('disabled');
	}
}
