
jQuery.noConflict();

jQuery(document).ready(function() {

jQuery('#header-flash img:gt(0)').hide();
    setInterval(function(){
      jQuery('#header-flash :first-child').fadeOut()
         .next('img').fadeIn()
         .end().appendTo('#header-flash');}, 
      5000);

  //jQuery('div.header-fade-item-image').ifixpng();
  //jQuery('div.header-fade-item-text').ifixpng();
  
    jQuery('#fallstudien-modul').cycle({
    fx:     'scrollUp',
    timeout: 6000,
    delay:  -2000
  });

	jQuery("form").jqTransform();


  jQuery('#nav .hlist ul li').mouseover(function() {
  jQuery(this).children('ul').show();
  jQuery(this).children('a').css('background-position','left top');
  //jQuery(this).children('ul').css('opacity',0.9);
  jQuery(this).children('a').css('background-color', '#d9d9d9');

 });
 
  jQuery('#nav .hlist ul li').mouseout(function() {
  jQuery(this).children('ul').hide();
  if(!jQuery(this).hasClass('active'))
  jQuery(this).children('a').css('background-position','left -30px');
  jQuery(this).children('a').css('background-color', '#fff');
 });

  // initialize scrollable
  jQuery("#browsable").scrollable().navigator({
	navi:'div.itemlist ul'
  });
});


/*Alternative png Fix*/
(function($) {

	$.fn.fixPNG = function() {
		return this.each(function () {
			var image = $(this).css('backgroundImage');

			if (image.match(/^url\(["']?(.*\.png)["']?\)$/i)) {
				image = RegExp.$1;
				$(this).css({
					'backgroundImage': 'none',
					'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=" + ($(this).css('backgroundRepeat') == 'no-repeat' ? 'crop' : 'scale') + ", src='" + image + "')"
				}).each(function () {
					var position = $(this).css('position');
					if (position != 'absolute' && position != 'relative')
						$(this).css('position', 'relative');
				});
			}
		});
};
})(jQuery);


jQuery.fn.wait = function(time, type) {
    time = time || 1000;
    type = type || "fx";
    return this.queue(type, function() {
        var self = this;
        setTimeout(function() {
            $(self).dequeue();
        }, time);
    });
};
