Cufon.replace('h1',{fontFamily: 'TheMixBold',textShadow: '1px 1px #cdcdcd'}); Cufon.replace('h2',{fontFamily: 'TheMixBold',textShadow: '1px 1px #cdcdcd'}); Cufon.replace('h3',{fontFamily: 'TheMixBold',hover:true,textShadow: '1px 1px rgba(51, 51, 51, 0.8)'}); jQuery(document).ready(function() { if ($.browser.msie) { // ie 9 footer hack for jquery-latest if($.browser.version == 9){ $(window).resize(function(){ htmllength = $('html').height(); $('html').height(htmllength); }); htmllength = $('html').height(); $('html').height(htmllength); } else { //alpha png fix & opacity fix for ie < 9 $('img[src$=".png"]').each(function() { this.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+this.src+",sizingMethod='scale')"; }); } } //Start - Portrait accordeon /* jQuery('.portrait > span').click(function(){ if(jQuery('.portrait > div').not(':animated').length>=1){ jQuery('.portrait > div').not(jQuery(this).next().next()).slideUp(); jQuery(this).next().next('div').slideToggle(); } }); */ //End - Portrait accordeon //Start - 3-boxen-element speed = 400; jQuery('div.drei-boxen-element > div').mouseenter(function() { var elements = ["first", "second", "third"]; var relClass = jQuery(this).attr('id'); jQuery.each(elements, function(i,val) { if(val != relClass) { jQuery('div.drei-boxen-element div#'+val).clearQueue(); jQuery('div.drei-boxen-element div#'+val).animate({opacity:0},speed,function() { jQuery('div.drei-boxen-element div#'+val).children().hide(); jQuery('div.drei-boxen-element div#'+val).css('background-image','url('+jQuery('#backgroundimage').attr('src')+')'); jQuery('div.drei-boxen-element div#'+val).animate( { opacity:1.0 },speed); }); } }); }); jQuery('div.drei-boxen-element > div').mouseleave(function() { var elements = ["first", "second", "third"]; var relClass = jQuery(this).attr('id'); jQuery.each(elements, function(i,val) { if(val != relClass) { jQuery('div.drei-boxen-element div#'+val).clearQueue(); jQuery('div.drei-boxen-element div#'+val).animate({opacity:0},speed,function() { jQuery('div.drei-boxen-element div#'+val).children().show(); jQuery('div.drei-boxen-element div#'+val).css('background-image','none'); jQuery('div.drei-boxen-element div#'+val).animate( { opacity:1.0 },speed); }); } }); }); //End - 3-boxen-element //Start - functions for search jQuery('nav#navigation a').last().attr('id','search'); jQuery('#search').live('click',function(e){ e.preventDefault(); jQuery('#searchpanel').animate({ top: '70px' },500); }); jQuery('#searchclose').click(function(){ jQuery('#searchpanel').animate({ top: '-60px' },500); }); jQuery('#searchsubmit').click(function(){ document.forms['searchform'].submit(); }); //End - functions for search //Start - functions for aufklappelemente jQuery('.aufklappelement b').click(function(){ if(jQuery(this).parent().find('div').is(':hidden')) { jQuery('.aufklappelement > div').slideUp(); jQuery(this).parent().find('div').slideDown(); } else { jQuery('.aufklappelement > div').slideUp(); } }); //End - functions for aufklappelemente //Start - functions for qTip jQuery('.qtooltip').qtip( { content: { text: false, // Use each elements title attribute button: true }, style: { classes: 'ui-tooltip-shadow ui-tooltip-green' } }); //End - functions for qTip //Start - functions for polaroids jQuery('#portraitnames a').mouseenter(function(){ picID = jQuery(this).attr('id').substr(8); setMaxZindex(jQuery('#pic'+picID)); jQuery('.pic').not('#pic'+picID).css('opacity',0.3); }); jQuery('#portraitnames a').mouseleave(function(){ jQuery('.pic').css('opacity',1.0); }); jQuery(".pic").draggable({ containment: '#portraituebersicht', start: function() { jQuery('#category'+jQuery(this).attr('id').substr(3)).css('color','#579034'); jQuery('.pic').not('#pic'+jQuery(this).attr('id').substr(3)).css('opacity',0.3); }, stop: function() { jQuery('#category'+jQuery(this).attr('id').substr(3)).css('color','#000000'); jQuery('.pic').css('opacity',1.0); } }); jQuery(".pic").mousedown(function(){ setMaxZindex(this); }); //End - functions for polaroids var zIndexNumber = 500; $('.pic').each(function() { jQuery('#'+jQuery(this).attr('id')).css('zIndex', zIndexNumber); zIndexNumber+=5; }); }); function setMaxZindex(element) { var maxZ = 0; // Find the max z-index property jQuery('.pic').each(function(){ currZ = jQuery('#'+jQuery(this).attr('id')).css('zIndex'); currZ = parseInt(currZ); if(maxZ < currZ) { maxZ = currZ; } }); zIndexNumber = (maxZ+1); elementID = jQuery(element).attr('id'); document.getElementById(elementID).style.zIndex = zIndexNumber; }