jQuery.noConflict();

lb = {
    imageLoading:  '/images/lightbox-ico-loading.gif',
	imageBtnClose: '/images/lightbox-btn-close.gif',
	imageBtnPrev:  '/images/lightbox-btn-prev.gif',
	imageBtnNext:  '/images/lightbox-btn-next.gif',
	imageBlank :   '/images/lightbox-blank.gif'
	}

jQuery(document).ready(function(){
	
	jQuery('#mcplogo img, #paypal-verified a img, #mcptoplogo img').cluetip({showTitle: false,local: true,positionBy: 'mouse',clickThrough: true});
	
	jQuery('a[rel="lightbox\[1\]"]').lightBox(lb);   //pozostalosc po protptype
	jQuery('a[rel="lightbox\[2\]"]').lightBox(lb);   //pozostalosc po protptype
	jQuery('a[rel="lightbox\[3\]"]').lightBox(lb);   //pozostalosc po protptype
	jQuery('a[rel="lightbox\[4\]"]').lightBox(lb);   //pozostalosc po protptype
	jQuery('a[rel="lightbox\[5\]"]').lightBox(lb);   //pozostalosc po protptype
	jQuery('a[rel="lightbox\[6\]"]').lightBox(lb);   //pozostalosc po protptype
	jQuery('a[rel="lightbox\[7\]"]').lightBox(lb);   //pozostalosc po protptype
	jQuery('a[rel="lightbox\[8\]"]').lightBox(lb);   //pozostalosc po protptype
	jQuery('a[rel="lightbox\[9\]"]').lightBox(lb);   //pozostalosc po protptype
	jQuery('a[rel="lightbox\[10\]"]').lightBox(lb);   //pozostalosc po protptype
	
	jQuery('span.tips').cluetip({
	    attribute: 'alt',
	    attributeTitle: 'alt',
	    sticky: true,
	    arrows: true,
	    local: true,
	    closePosition: 'title',
	    mouseOutClose: true,
	    positionBy: 'auto'
	});
	
	jQuery('span.tips a').click(function(){
	    window.location = this.href;
	});
	
	jQuery('span#mouse').cluetip({
	    attribute: 'alt',
	    attributeTitle: 'alt',
	    sticky: true,
	    arrows: true,
	    local: true,
	    closePosition: 'title',
	    mouseOutClose: true,
	    positionBy: 'mouse'
	});

	
	/* IE7 hack*/
	jQuery('#facebook').hover(
		function(){jQuery(this).css('background-position','0 0');},
		function(){jQuery(this).css('background-position','0 -38px');}
	);
	jQuery('#tweeter').hover(
		function(){jQuery(this).css('background-position','-52px 0');},
		function(){jQuery(this).css('background-position','-52px -38px');}
	);
	jQuery('#youtube').hover(
		function(){jQuery(this).css('background-position','-104px 0');},
		function(){jQuery(this).css('background-position','-104px -38px');}
	);
	
	
    /* wyszukiwarka */
    jQuery('#search-2').mouseover(
	    function(){
		    jQuery('#search-2-a').addClass('search-2-a-hover');
		    jQuery('.search-2-form').fadeIn(300);
	    }).click(
	    function(event)
	    {
	        return false;
	    });

    jQuery(document).click(
	    function(event){
		    if ( jQuery.inArray(event.target.id,['search-2-form-q','search-2-form','search-2-form-form']) == -1 )
		    {
			    jQuery('#search-2-a').removeClass('search-2-a-hover');
			    jQuery('.search-2-form').fadeOut(0);

		    } 
	    });
	    
    /*broszura er-pro*/
    if ( (jQuery.browser.msie == true && jQuery.browser.version >= 7) || jQuery.browser.msie != true )
    {
        jQuery('#erprobox_b').mouseover(
            function(){
                //jQuery('.erpro_b_next').css('position','relative').css('top','-74px');
                //jQuery('erpro_b_h').css('hieght','271px');
                jQuery('#erprobox_b_wrp').fadeIn(250);
            }
        );
        jQuery(document).mouseout(
            function(event){
                if ( jQuery.inArray(event.target.id, ['erprobox_b','erpro_b_web','erpro_b_prn','erprobox_b']) == -1)
                {
                    
                    jQuery('#erprobox_b_wrp').fadeOut(0);
                    //jQuery('.erpro_b_next').css('position','static').css('top','-0px');
                    //jQuery('erpro_b_h').css('hieght','100%');
                }
            }
        );
        /*jQuery(document).click(
            function(event){
                if ( jQuery.inArray(event.target.id, ['erprobox_b','erprobox_b_wrp','erprobox_b_web','erprobox_b_prn']) == -1)
                {
                    jQuery('#erpro_b_next').css('position','relative').css('top','0px');
                    jQuery('#erprobox_b_wrp').fadeOut(0);
                }
            }
        );
        */	  
    }  
})
