$(document).ready(function(){


$.fn.qtip.styles.jednakowe1 = { // Last part is the name of the style
   width: 200,
   background: '#F8C400',
   color: 'black',
   textAlign: 'left',
   border: {
      width: 2,
      radius: 3,
      color: '#F8C400'
   },
   tip: 'topMiddle'
}


// By suppling no content attribute, the library uses each elements title attribute by default
$('[title]').qtip({
      content: {
         text: false // Use each elements title attribute
      },
      position: {
          corner: {
            target: 'bottomMiddle',
            tooltip: 'topMiddle'
          }      
      },    
      show: { 
         delay: 2000
      },      
      style: 'jednakowe1' // Give it some style
   });


// Use the each() method to gain access to each elements attributes
$('#main [rel]').each(function()
   {
      $(this).qtip(
      {
         content: {
            // Set the text to an image HTML string with the correct src URL to the loading image you want to use
            text: '<div style=\'padding:10px; text-align:center;\'><img src="/images/loading.gif" /></div>',
            url: $(this).attr('rel'), // Use the rel attribute of each element for the url to load
            title: {
               text:  $(this).attr('tiptitle'),  //$(this).text(), // Give the tooltip a title using each elements text
               button: 'X' // Show a close link in the title
            }
         },
         position: {
            corner: {
               target: 'bottomMiddle', // Position the tooltip above the link
               tooltip: 'topMiddle'
            },
            adjust: {
               screen: true // Keep the tooltip on-screen at all times
            }
         },
         show: { 
            when: 'click', 
            solo: true // Only show one tooltip at a time
         },
         hide: 'unfocus',
         style: {
            tip: true, // Apply a speech bubble tip to the tooltip at the designated tooltip corner
            border: {
               width: 0,
               radius: 4
            },
            name: 'light', // Use the default light style
            width: 570 // Set the tooltip width
         }
      })
   });






$('a#jakosc').qtip({
   content: 'Presets, presets and more presets. Let\'s spice it up a little with our own style!',
   show: { 
         delay: 2000
         },
   style: 'jednakowe1'
});




});