$(document).ready(function(){


/* PNG-Transparenz für IE6 
  $.ifixpng("http://www.deflektor.de/fileadmin/img/pixel.gif"); 
  $(".shadow-one, .shadow-two, .shadow-three, .shadow-four").ifixpng();  
*/

/* Haupmenue Navigation Rollover-Effekt */
  $("ul.submenu li").hover(
    function() {
      $(this).children("a").animate({ paddingLeft: "10px" }, "fast", "easeInBack")
    }, 
    function () {
      $(this).children("a").animate({ paddingLeft: "12px" }, "fast", "easeOutQuad")
  });

/* Tabs */
  $(".tab-box").tabs({ fx: { opacity: 'toggle', duration: 'fast' } }); 

/* Akkordeon */
  $("div.tx-irfaq-pi1 dl").accordion({
     header: "dt.tx-irfaq-dynheader",
     autoHeight: false,
     collapsible: true
  });

/* Background-Animation */
  $("body").animate( { backgroundColor: '#ccff99' }, 30000).animate( { backgroundColor: '#BEDEF8' }, 30000).animate( { backgroundColor: '#ccff99' }, 30000).animate( { backgroundColor: '#BEDEF8' }, 30000);
  
/* Sterne ersetzen */
  $("span.def-wertung:contains('1')").html("<img src='fileadmin/img/icon_extern.gif' alt='' />");
  $("span.def-wertung:contains('2')").html("<img src='fileadmin/img/icon_extern.gif' alt='' /><img src='fileadmin/img/icon_extern.gif' alt='' />");

/* qtip Website-Vorschau */
  $('a.qtipWebsite').each(function()
   {
      // Create image content using websnapr thumbnail service
      var content = '<img src="http://images.websnapr.com/?key=k18CHcCiT695&url=';
      content += $(this).attr('href');
      content += '" alt="Lade Vorschau..." height="152" width="202" />';
      
      // Setup the tooltip with the content
      $(this).qtip(
      {
         content: content,
         position: {
            corner: {
               tooltip: 'leftMiddle',
               target: 'rightMiddle'
            }
         },
         style: {
            tip: true,
            width: { max: 236 },
            'background-color': '#666666',
            border: { width: 5, radius: 8, color:'#666666' },
            name: 'dark'
         }
      });
  });
/* ui-button */
  $('.ui-button').click(function() {})
	.hover(
		function(){ 
			$(this).addClass("ui-state-hover"); 
		},
		function(){ 
			$(this).removeClass("ui-state-hover"); 
		}
	).mousedown(function(){
		$(this).addClass("ui-state-active"); 
	})
	.mouseup(function(){
		$(this).removeClass("ui-state-active");
  });  
  
  
/* Ready-Funktion ENDE */	
});

