
function load_tweet(  twitter_count ) {
	$( twitter_selector ).tweet({
        query: twitter_query,
        join_text: "auto",
        avatar_size: 32,
		outro_text: '<p id="more_tweets" class="more_tweets"><a href="#" onclick="$(\'.tweet_list\').html(\'\');$(\'.more_tweets\').html(\'\');load_tweet(30);$(\'#more_tweets\').hide();return false;">more tweets</a>', 
        count: twitter_count,
        auto_join_text_default: "we said,",
        auto_join_text_ed: "we",
        auto_join_text_ing: "we were",
        auto_join_text_reply: "we replied to",
        auto_join_text_url: "we were checking out",
        loading_text: "loading tweets..."
    });
}

function banner_track( that ) {
	$.get('/BannerTrack?target=' + escape(that.href)  ); 
	return true;
}

	$(function() {
			//$('body.load').removeClass('load');

	if ( $.flash ) {
	var ad_energy_html; 
		if( !$.flash.available ) {
		ad_energy_html = '<a href="http://www.energy.de/MUENCHEN" target="_blank" ><img src="/banner/energybanner/Fallback_Skyscraper_160x600.jpg" style="width:160px;height:600px;" border="0" /></a>';			
	} else {
		ad_energy_html= $.flash.create({
			swf: '/banner/energybanner/160x600.swf',
			height: 600, 
			width: 160, 
			hasVersion: 10, 
			flashvars: {
				clicktag:"http://www.energy.de/MUENCHEN", 
				clicktarget:"_blank"
			}
		});
	}
	$('#ad_energy').html(ad_energy_html);
	}		
			$('div.expander').css('height', 'auto').expander({
					slicePoint: 290,
					widow: 2,
					expandEffect: 'show',
					expandText: '<img src="/image/icons/more.gif" height="16" alt="mehr" />',
					userCollapseText: '<img src="/image/icons/less.gif" height="16" alt="weniger" />'
				});
			
			$('a.extern_kategorien'     ).fancybox({ 'zoomSpeedIn': 100, 'zoomSpeedOut': 100, 'imageScale': true, 'overlayShow': true , 'overlayOpacity': 0.6, 'frameWidth': 850 ,'frameHeight':650 });  
			$('a.extern_positionen'     ).fancybox({ 'zoomSpeedIn': 100, 'zoomSpeedOut': 100, 'imageScale': true, 'overlayShow': true , 'overlayOpacity': 0.6, 'frameWidth': 850 ,'frameHeight':650 });  
			$('a.extern_eigenschaften'  ).fancybox({ 'zoomSpeedIn': 100, 'zoomSpeedOut': 100, 'imageScale': true, 'overlayShow': true , 'overlayOpacity': 0.6, 'frameWidth': 850 ,'frameHeight':650 });  
			$('a.extern_login'  ).fancybox({ 'callbackOnStart': function(){ $('#details_pictures').cycle('pause'); }, 'callbackOnClose': function(){ $('#details_pictures').cycle(); }, 'zoomSpeedIn': 100, 'zoomSpeedOut': 100, 'imageScale': true, 'overlayShow': true , 'overlayOpacity': 0.6, 'frameWidth': 450 ,'frameHeight': 305 });  
			$('a.extern_mvv_direct'  ).fancybox({ 'callbackOnStart': function(){ $('#details_pictures').cycle('pause'); }, 'callbackOnClose': function(){ $('#details_pictures').cycle(); }, 'zoomSpeedIn': 100, 'zoomSpeedOut': 100, 'imageScale': true, 'overlayShow': true , 'overlayOpacity': 0.6, 'frameWidth': 670 ,'frameHeight':660 });  
			$('a.extern_mvv'  ).fancybox({ 'callbackOnStart': function(){ $('#details_pictures').cycle('pause'); }, 'callbackOnClose': function(){ $('#details_pictures').cycle(); }, 'zoomSpeedIn': 100, 'zoomSpeedOut': 100, 'imageScale': true, 'overlayShow': true , 'overlayOpacity': 0.6, 'frameWidth': 850 ,'frameHeight':650 });  
			$('a.extern_gmap' ).fancybox({ 'callbackOnStart': function(){ $('#details_pictures').cycle('pause'); }, 'callbackOnClose': function(){ $('#details_pictures').cycle(); }, 'zoomSpeedIn': 100, 'zoomSpeedOut': 100, 'imageScale': true, 'overlayShow': true , 'overlayOpacity': 0.6, 'frameWidth': 1000 ,'frameHeight':650 });  
			$('a.extern_gmap2' ).fancybox({ 'callbackOnStart': function(){ $('#details_pictures').cycle('pause'); }, 'callbackOnClose': function(){ $('#details_pictures').cycle(); }, 'zoomSpeedIn': 100, 'zoomSpeedOut': 100, 'imageScale': true, 'overlayShow': true , 'overlayOpacity': 0.6, 'frameWidth': '90%' ,'frameHeight':'90%' });  
			$('a.extern_live').fancybox({ 'callbackOnStart': function(){ $('#details_pictures').cycle('pause'); }, 'callbackOnClose': function(){ $('#details_pictures').cycle(); }, 'zoomSpeedIn': 100, 'zoomSpeedOut': 100, 'imageScale': true, 'overlayShow': true , 'overlayOpacity': 0.6, 'frameWidth': 280 ,'frameHeight':480 });  
			$('a.lightbox'   ).fancybox({ 'callbackOnStart': function(){ $('#details_pictures').cycle('pause'); }, 'callbackOnClose': function(){ $('#details_pictures').cycle(); },'zoomSpeedIn': 100, 'zoomSpeedOut': 100, 'overlayShow': true , 'imageScale':true,'overlayOpacity': 0.6 , 'hideOnContentClick': true});  
			$('a.extern_mail').fancybox({ 'callbackOnStart': function(){ $('#details_pictures').cycle('pause'); }, 'callbackOnClose': function(){ $('#details_pictures').cycle(); }, 'zoomSpeedIn': 100, 'zoomSpeedOut': 100, 'imageScale': true, 'overlayShow': true , 'overlayOpacity': 0.6, 'frameWidth': 580 ,'frameHeight':580 });  
			$('a.extern_edit_big').fancybox({ 'callbackOnStart': function(){ $('#details_pictures').cycle('pause'); }, 'callbackOnClose': function(){ $('#details_pictures').cycle(); }, 'zoomSpeedIn': 100, 'zoomSpeedOut': 100, 'imageScale': true, 'overlayShow': true , 'overlayOpacity': 0.6, 'frameWidth': 1000 ,'frameHeight':650 });  
			$('a.extern_edit').fancybox({ 'callbackOnStart': function(){ $('#details_pictures').cycle('pause'); }, 'callbackOnClose': function(){ $('#details_pictures').cycle(); }, 'zoomSpeedIn': 100, 'zoomSpeedOut': 100, 'imageScale': true, 'overlayShow': true , 'overlayOpacity': 0.6, 'frameWidth': 880 ,'frameHeight':580 });  
			$('a.extern_code').fancybox({ 'callbackOnStart': function(){ $('#details_pictures').cycle('pause'); }, 'callbackOnClose': function(){ $('#details_pictures').cycle(); }, 'zoomSpeedIn': 100, 'zoomSpeedOut': 100, 'imageScale': true, 'overlayShow': true , 'overlayOpacity': 0.6, 'frameWidth': '99%' ,'frameHeight':'99%' });  
			$('a.extern_map').fancybox({ 'callbackOnStart': function(){ $('#details_pictures').cycle('pause'); }, 'callbackOnClose': function(){ $('#details_pictures').cycle(); }, 'zoomSpeedIn': 100, 'zoomSpeedOut': 100, 'imageScale': true, 'overlayShow': true , 'overlayOpacity': 0.6, 'frameWidth': '90%' ,'frameHeight':'90%' });  
			$('a.show_inline'   ).fancybox({ 'imageScale':true,'overlayShow':true,'Width': 880,'overlayOpacity': 0.6 , 'hideOnContentClick': true});  
			$('a.show_inline2'   ).fancybox({ 'imageScale':true,'overlayShow':true,'Width': 880,'overlayOpacity': 0.6 });  
			
			
			// hide functions ?
			//if ($.browser.msie && parseInt($.browser.version) <= 6) {} else {}
				if (global_ticker_url != "") {
					$.get(global_ticker_url, {}, function(data){
						if (data.search(/az_win/)) {
							$("#news1").html(data);
							initnews();
						}
						else {
						// error while loading ajax-feed
						}
					});
				}
				$('#ilike_fb').html('<iframe src="http://www.facebook.com/plugins/like.php?href=' + global_fb_url + '&amp;layout=standard&amp;show_faces=true&amp;width=300&amp;action=like&amp;font=lucida+grande&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:310px; height:70px"></iframe>');
				
				/*$('#voycer_content').html('<div><script type="text/javascript" sf-voycer-key="48eec8905edf7d20283a969035a7a8d7" src="http://www.voycer.de/includes/php/widget/widget.php?key=48eec8905edf7d20283a969035a7a8d7"></script></div>');
				*/
				
				//$('#voycer_content').html('<iframe id="voycer1" width="380px" scrolling="hidden" height="280px" frameborder="0" name="voy_1a080b4cddd4f4b3b43d9f1c9f6f68b3" id="voy_1a080b4cddd4f4b3b43d9f1c9f6f68b3" style="top: 0pt; left: 0pt; width: 380px; height: 270px; background-color: white; border: 0px none; z-index: 100;" src="http://www.voycer.de/includes/php/widget/frame.php?hash=1a080b4cddd4f4b3b43d9f1c9f6f68b3&info=aHR0cDovL3d3dy5tdXguZGUvYXl1cm1lZGlh"></iframe>');
			
				//$('#voycer_content').html('<script type="text/javascript" sf-voycer-key="1a080b4cddd4f4b3b43d9f1c9f6f68b3" src="http://www.voycer.de/includes/php/widget/widget.php?key=1a080b4cddd4f4b3b43d9f1c9f6f68b3"></script>');
			
				if (global_is_detail) {
					$('#tabs1').tabs();
					load_tweet(3);
				
					// only needed with multiple iframes
					var f = document.getElementsByTagName('iframe');
					if ( f.length> 0) {
   						for (var i=0; i<f.length; i++) {
   							f[i].src = f[i].src;
   						}
   					}
				}
			
				
	});
	


