/* ------------------------------------------------- *
 * SWFObject Plugin for jQuery
 * -------------------------------------------------- *
 * Author:  Copyright (c) 2009 Jonathan Neal
 * Version:  v1.0.5
 * ------------------------------------------------- */
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}('(q($){t g=1m,h=\'h\',L=1n,x=\'\';$.M=(q(){t a,i,10,11,w=12,y=\'13.13\';8(!(a=1o.1p[\'1q 14\'])){B{i=N O(y+\'.7\')}C(10){B{i=N O(y+\'.6\');a=[6,0,21];i.1r=\'1s\'}C(11){8(a&&a[0]===6){w=1t}}8(!w){B{i=N O(y)}C(1u){a=\'X 0,0,0\'}}}8(!w&&i){B{a=i.1v(\'$1w\')}C(1x){}}}15{a=a.1y}a=a.1z(/^[A-1A-z\\s]*?(\\d+)(\\.|,)(\\d+)(\\s+r|,)(\\d+)/);o[a[1]*1,a[3]*1,a[5]*1]}());$.16=\'17.P\';$.D=($.M[0]!==0);$.18=q(a){t b=$.M;a=(/1B|1C/.Q(j a))?a.1D().1E(\'.\'):a;a=[a.1F||a[0]||b[0],a.1G||a[1]||b[1],a.1H||a[2]||b[2]];o($.D&&(a[0]>b[0]||(a[0]===b[0]&&(a[1]>b[1]||(a[1]===b[1]&&a[2]>=b[2])))))};$.E=q(e){8(!$.D){o 12}t f=e.P||x,4=e.19||{},R=g.1I(\'1J\'),k,l,F,G,a,b,c,d;e.H=e.H||1K;e.I=e.I||1L;8(e.S&&!$.18(e.S)){$.1a(e,{1M:\'1b\',H:1c.1d(e.H,1N),I:1c.1d(e.I,1O)});f=e.1P||$.16;4={u:{1Q:1R.1S,1T:($.T.1e&&$.T.L)?\'1U\':\'1V\',1W:g.1X.1Y(0,1Z)+\' - 14 20 22\'}}}8(j 4===h){8(e.u){4.u=e.u}8(e.J){4.J=e.J}}m(a n(b=[\'17\',\'u\',\'S\',\'19\',\'P\',\'J\'])){23 e[b[a]]}k=[];m(a n e){8(j e[a]===h){l=[];m(b n e[a]){l.p(b.U(/([A-Z])/,\'-$1\').1f()+\':\'+e[a][b]+\';\')}e[a]=l.9(x)}k.p(a+\'="\'+e[a]+\'"\')}e=k.9(\' \');8(j 4===h){k=[];m(a n 4){8(j 4[a]===h){l=[];m(b n 4[a]){8(j 4[a][b]===h){F=[];m(c n 4[a][b]){8(j 4[a][b][c]===h){G=[];m(d n 4[a][b][c]){G.p([d.U(/([A-Z])/,\'-$1\').1f(),\':\',4[a][b][c][d],\';\'].9(x))}4[a][b][c]=G.9(x)}F.p([c,\'{\',4[a][b][c],\'}\'].9(x))}4[a][b]=F.9(x)}l.p([b,\'=\',L.24(4[a][b])].9(x))}4[a]=l.9(\'&25;\')}k.p([\'<1g 1h="\',a,\'" 1i="\',4[a],\'">\'].9(x))}4=k.9(x)}8(!(/v=/.Q(e))){e+=\' v="V-W:1j-1k;"\'}8(!(/v=(.*?)V-W/.Q(e))){e=e.U(/v="/,\'v="V-W:1j-1k;\')}8($.T.1e){e+=\' 26="27:28-29-2a-2b-2c"\';4=\'<1g 1h="2d" 1i="\'+f+\'">\'+4}15{e+=\' 2e="2f/x-2g-E" 2h="\'+f+\'"\'}R.2i=[\'<1l \',e,\'>\',4,\'</1l>\'].9(x);o $(R.2j)};$.2k.E=q(b){8(!$.D){o K}t a=0,Y;2l((Y=K.2m(a++))[0]){Y.2n($.E($.1a({},b)));8(g.2o(\'1b\')){a=K.2p}}o K}}(2q));',62,151,'||||paramAttributes||||if|join||||||||object|activeX|typeof|aArr|bArr|for|in|return|push|function|||var|flashvars|style|fp6Crash||shockwaveFlash|||try|catch|hasFlashPlayer|flash|cArr|dArr|height|width|wmode|this|win|flashPlayerVersion|new|ActiveXObject|swf|test|buildDOM|hasVersion|browser|replace|vertical|align||each||errorA|errorB|false|ShockwaveFlash|Flash|else|flashExpressInstaller|expressInstall|hasFlashPlayerVersion|params|extend|SWFObjectExprInst|Math|max|msie|toLowerCase|PARAM|NAME|VALUE|text|top|OBJECT|document|window|navigator|plugins|Shockwave|AllowScriptAccess|always|true|errorC|GetVariable|version|errorD|description|match|Za|string|number|toString|split|major|minor|release|createElement|body|180|320|id|137|214|expressInstaller|MMredirectURL|location|href|MMplayerType|ActiveX|PlugIn|MMdoctitle|title|slice|47|Player||Installation|delete|escape|amp|classid|clsid|D27CDB6E|AE6D|11cf|96B8|444553540000|movie|type|application|shockwave|data|innerHTML|firstChild|fn|while|eq|html|getElementById|length|jQuery'.split('|'),0,{}))

/* ------------------------------------------------- *
 * Global jQuery functions
 * ------------------------------------------------- */
$(document).ready(function(){
// For Flash placement
	$('#wizerunek').flash({   
		swf: 'swf/top916x270.swf',
		wmode: 'transparent',
		background: '#003300',
		quality: 'high',
		height: 270,   
		width: 916
	});
});

$(document).ready(function(){
// For Flash placement
	$('#wizerunek_firma').flash({   
		swf: 'swf/top916x270_firma.swf',
		wmode: 'transparent',
		background: '#003300',
		quality: 'high',
		height: 270,   
		width: 916
	});
});

$(document).ready(function(){
// For Flash placement
	$('#flashcontent').flash({   
		swf: 'swf/mapa.swf',
		wmode: 'transparent',
		background: '#003300',
		quality: 'high',
		height: 320,   
		width: 485
	});
});

$(document).ready(function(){
// For Flash placement
	$('#akcesoria_flash1').flash({   
		swf: 'swf/akcesoria_gasiory.swf',
		wmode: 'transparent',
		background: '#003300',
		quality: 'high',
		height: 320,   
		width: 487
	});
	$('#akcesoria_flash2').flash({   
		swf: 'swf/akcesoria_kominki.swf',
		wmode: 'transparent',
		background: '#003300',
		quality: 'high',
		height: 320,   
		width: 487
	});
		$('#akcesoria_flash3').flash({   
		swf: 'swf/akcesoria_roman.swf',
		wmode: 'transparent',
		background: '#003300',
		quality: 'high',
		height: 320,   
		width: 487
	});
		$('#akcesoria_flash4').flash({   
		swf: 'swf/akcesoria_sciany.swf',
		wmode: 'transparent',
		background: '#003300',
		quality: 'high',
		height: 320,   
		width: 487
	});
		$('#akcesoria_flash5').flash({   
		swf: 'swf/akcesoria_pasnadrynnowy.swf',
		wmode: 'transparent',
		background: '#003300',
		quality: 'high',
		height: 320,   
		width: 487
	});
		$('#akcesoria_flash6').flash({   
		swf: 'swf/akcesoria_rynny.swf',
		wmode: 'transparent',
		background: '#003300',
		quality: 'high',
		height: 320,   
		width: 487
	});
		$('#akcesoria_flash7').flash({   
		swf: 'swf/akcesoria_wiatrownice.swf',
		wmode: 'transparent',
		background: '#003300',
		quality: 'high',
		height: 320,   
		width: 487
	});
	$('#akcesoria_flash').flash({   
		swf: 'swf/akcesoria.swf',
		wmode: 'transparent',
		background: '#003300',
		quality: 'high',
		height: 320,   
		width: 487
	});
});

$(document).ready(function(){
			$("a[rel^='prettyPhoto']").prettyPhoto({
				animationSpeed: 'normal', /* fast/slow/normal */
				padding: 40, /* padding for each side of the picture */
				opacity: 0.6, /* Value betwee 0 and 1 */
				showTitle: true, /* true/false */
				allowresize: true, /* true/false */
				counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
				theme: 'dark_rounded', /* light_rounded / dark_rounded / light_square / dark_square */
				callback: function(){}
			});
		});

//menu poziome
	$(function() {
		// set opacity to nill on page load
		$("ul#menu span").css("opacity","0");
		// on mouse over
		$("ul#menu span").hover(function () {
			// animate opacity to full
			$(this).stop().animate({
				opacity: 1
			}, 'slow');
		},
		// on mouse out
		function () {
			// animate opacity to nill
			$(this).stop().animate({
				opacity: 0
			}, 'medium');
		});
	});

//menu poziome-firma
	$(function() {
		// set opacity to nill on page load
		$("ul#menu-firma span").css("opacity","0");
		// on mouse over
		$("ul#menu-firma span").hover(function () {
			// animate opacity to full
			$(this).stop().animate({
				opacity: 1
			}, 'slow');
		},
		// on mouse out
		function () {
			// animate opacity to nill
			$(this).stop().animate({
				opacity: 0
			}, 'medium');
		});
	});


//TOOLTIP
$(function () {
        $('.bubbleInfo').each(function () {
            var distance = 0;
            var time = 250;
            var hideDelay = 500;

            var hideDelayTimer = null;

            var beingShown = false;
            var shown = false;
            var trigger = $('.trigger', this);
            var info = $('.popup', this).css('opacity', 0);


            $([trigger.get(0), info.get(0)]).mouseover(function () {
                if (hideDelayTimer) clearTimeout(hideDelayTimer);
                if (beingShown || shown) {
                    // don't trigger the animation again
                    return;
                } else {
                    // reset position of info box
                    beingShown = true;

                    info.css({
                        top: -10,
                        left: 10,
                        display: 'block'
                    }).animate({
                        top: '-=' + distance + 'px',
                        opacity: 1
                    }, time, 'swing', function() {
                        beingShown = false;
                        shown = true;
                    });
                }

                return false;
            }).mouseout(function () {
                if (hideDelayTimer) clearTimeout(hideDelayTimer);
                hideDelayTimer = setTimeout(function () {
                    hideDelayTimer = null;
                    info.animate({
                        top: '-=' + distance + 'px',
                        opacity: 0
                    }, time, 'swing', function () {
                        shown = false;
                        info.css('display', 'none');
                    });

                }, hideDelay);

                return false;
            });
        });
    });

//slider
$(function(){
		$('.SlideTab').tabSwitch('create', {type: 'toggle', height: 225, width: 400});
		$('.tabSelect').click(function(e){
			$('.SlideTab').tabSwitch('moveStep',{step: parseInt($(this).attr('rel'))});
			e.preventDefault();
		});
		$('.Nav').click(function(e){
			$('.SlideTab').tabSwitch('moveStep',{step: $(this).attr("rel")});
			e.preventDefault();
						
		});
	});








/* sIFR
 var swis = {
      src: 'swf/swis.swf'
      
    };


    sIFR.activate( swis);

     sIFR.replace(swis, {
      selector: 'li.red '
	 ,css: [ '.sIFR-root {  l font-size:13px;   }' ,'a { text-decoration: none; font:normal }' ,' a:link { color: #FFFFFF; }' ,'a:hover {color: #FFFFFF; text-decoration:underline }' ]
      ,transparent: true
    });

  
     sIFR.replace(swis, {
      selector: 'li.gren '
	 ,css: [ '.sIFR-root {  l font-size:13px;   }' ,'a { text-decoration: none;  }' ,' a:link { color: #cbe7a0; }' ,'a:hover {color: #cbe7a0; text-decoration:underline }' ]
      ,transparent: true
    });
 
 */
 
 

$(document).ready(function() {
	$('#menu_pr ul li').hover(function() {
		$(this).addClass('hove');
	}, 
	function() {
		$(this).removeClass('hove');
	});
});
 
 
  $(document).ready(function() {
$('li.METROGARD').hover(function() {
 $(this).addClass('hove');
}, function() {
$(this).removeClass('hove');
});
});
  

 
 
// na meni wczesniejsze ladowanio obrazków 
new Image().src = 'img/akcesoria_hover.gif';
new Image().src = 'img/metrobond_hover.gif';
new Image().src = 'img/metroclassic_hover.gif';
new Image().src = 'img/metrogard_hover.gif';
new Image().src = 'img/metroroman_hover.gif';
new Image().src = 'img/metroshake1_hover.gif';
new Image().src = 'img/metroshake2_hover.gif';
new Image().src = 'img/metroshingle_hover.gif';
new Image().src = 'img/metrosolar_hover.gif';
new Image().src = 'img/multimetrobond_hover.gif';

