

/* ------------------------------------------------------------------------

(c) 99°

Alle Scripte in diesem Dokument unterliegen dem strengen Copyright der
Firma 99° und dürfen ohne deren Zustimmung nicht kopiert, vervielfältigt
oder verfremdet werden.

Für Fragen: www.99grad.de / 0611-4080919

------------------------------------------------------------------------ */



// ---------------------------------------------------------------------
// http://gettopup.com/documentation

TopUp.players_path = "fileadmin/templates/js/topup/players/";
TopUp.images_path = "fileadmin/templates/js/topup/top_up/";


TopUp.addPresets({
	".shaded": {
	 shaded: 1,
	 overlayClose: 1,
	 layout: 'dashboard',
	 resizable: 0
	}
});

TopUp.addPresets({
	".flv-video": {
	 shaded: 1,
	 overlayClose: 1,
	 layout: 'dashboard',
	 resizable: 0,
	 width: 950,
	 height: 550,
	 effect: 'appear'
	}
});


// ---------------------------------------------------------------------
// http://gsgd.co.uk/sandbox/jquery/easing/
// http://jqueryui.com/download
// http://docs.jquery.com/UI/Effects/Slide

var _firstRun = true;

$( function () {
	
	if (SWFAddress) {
	
		SWFAddress._ignore_change = false;
		SWFAddress.onChange = function () {
		
			if (SWFAddress._ignore_change) return false;
			try {
				var str = SWFAddress.getValue();
				if (str.substr(0,1) == '/') str = str.substr(1);
				var parts = str.split('/');
				var url = parts.join("/");
				
				if (url) {
					ajax_menue_func( false, url );
				} else {
				
					if (!_firstRun) {
						ajax_menue_func( false, $.currentURL().split('#')[0] );
					}
					_firstRun = false;
				}
				
			} catch (e) {}
		}
		
		SWFAddress.setValueSilently = function ( url ) {
			SWFAddress._ignore_change = true;
			SWFAddress.setValue( url );
			SWFAddress._ignore_change = false;
		}
		
	}
});




/* ------------------------------------------------------------------------ */
// I N I T 



$( function () {
	init_page();
	onWindowResized();
} );


function init_page () {
	
		// #######  Navigation: Ajax
//*
	$('#main_menu ul li a').unbind().click( ajax_menue_func );
	$('#sub_menu ul li a').unbind().click( ajax_menue_func );
	$('#meta_menu ul li a').unbind().click( ajax_menue_func );
	$('#meta_menu ul.languages li a').unbind();
	
	$('#contentbox a').unbind().click( ajax_menue_func );
	$('.fce_download_item a').unbind();
	
	$('.rpid_68 .fce_30_30_30 a').unbind();
	
	$('#main_menu ul li a').rolloverColor();
//*/	

	// Dieses div brauche ich davor wegen des IE7
	
	$('#sub_menu ul').clearQueue().stop(true,true);
	$('#sub_menu').accordeonMenue();
	$('#sub_menu li.selected ul').css({'display':'block', 'height':'auto'});
	
	
	$('.fce_product_overview').click( function () {
		var href = $(this).find('a').attr('href');
		window.location = href;
	});

		// #######  Style der Combobox
	
	$('.quicknavi select').comboBox( {lockTitle:true, useMouseEnter:true, durationClose:200, durationOpen:500} );
	
	
		// ####### TopUp Lightbox
	
	$('a.shaded').unbind().click( function () {
		try {
			zvmlightbox.display( {full:$(this).attr('href')} );
		} catch (e) {}
		return false;
	} );
	
		// ####### IE7: Bei RollOver von Flash-Filmen erscheint sonst ein Rand
	
	//fls = document.getElementsByTagName("object");
	//for (var a = 0; a < fls.length; a++){fls[a].outerHTML = fls[a].outerHTML;}
	
		// ####### Bilder nicht kopierbar machen

	$('a img').copyProtectImage();
		
}


function update_flashparams ( html_data ) {

	if (!html_data) html_data = $('body').html();
	
	var flashvars = {};
	var flashvars_src = $.stripNL(html_data.split('/*--flashvars--*/')[1]);

	if (flashvars_src) {
		try { 
			eval(flashvars_src);
			//alert(flashvars.banner_imgs);
			$('#flash_banner').callFlashFunction( 'updateParams', [flashvars] );
		} catch(e) {}
	}
}



function update_flashsize ( h ) {
	$('#flash_banner').callFlashFunction( 'updateSize', [{height:h}] );
}

function ajax_menue_func ( ref, url ) {
	
	if (!url) {
		var url = $(this).attr('href');
		var tg = $(this).attr('target');
		if (tg && tg != '_self') return true;
		if (url.indexOf('javascript:') == 0 || url.indexOf('mailto:') == 0) return true;
	}
	
	url = url.split($('base').attr('href')).join('');
	if (!url) url = $('base').attr('href');
	
	SWFAddress.setValueSilently( '/'+url );
	
	$('body').showPreloader();
	
	var pclass = $(this).parent().attr('class');
	if (pclass) {
		pclass = pclass.split('pid_')[1];
		if (pclass) $('body').addClass('rpid_'+pclass);
	}
	
	var old_height = $('#contentbox').css({'height':'auto'}).height();
	
	if ($.browser.msie) {
		remove_ie_fader();
		$('#contentbox').wrap('<div class="contentbox_wrap">');
		$('.contentbox_wrap').prepend('<div class="ie_fader"></div>');
		$('.ie_fader').stop(true,true).css({'opacity':0, height:$('#contentbox').height()+130 }).animate({'opacity':1});
	} else {
		$('#contentbox').animate({'opacity':0});
	}
	
	$('html').animate({'scrollTop':0});
	
	function remove_ie_fader () {
		if ($('.contentbox_wrap').exists()) {
			$('.ie_fader').remove();
			$('#contentbox').unwrap();
		}
	}
	
	$.m_ajax( {
				url: 		url, 
				targets:	{'#contentbox':'#contentbox', '#sub_menu':'#sub_menu', '#main_menu':'#main_menu', '.logo':'.logo'}, 
				success: 	function( data, html_data ) {
		
					$('meta[name=pid]').removeAttr('content').attr('content', $.metaTagValue('pid', data) );					
					$("body").attr('class', html_data.attr('class'));
					
					$('div:first').attr('class', html_data.find('div').attr('class'));
					
					init_page();
					
					update_flashparams( data );
					$('body').hidePreloader();
					
					// Kein Flash? Dann Header-Bild austauschen
					if ($('#headerbox_inner img').exists() && $('#headerbox_inner').html() !=  $('#headerbox_inner', html_data).html()) {
						$('#headerbox_inner').stop(true,true).animate( {opacity:0}, 500, function () {
							$('#headerbox_inner').html( $('#headerbox_inner', html_data).html() );
							$('#headerbox_inner img').load( function () {
								$('#headerbox_inner').stop(true,true).css({opacity:0}).animate( {opacity:1}, 1000 );
							});
						});
					}
					
					// Position des Horizontes im Hintergrund
					var st = $('.contentbox_outer', html_data).attr('style');
					$('.contentbox_outer').attr('style', st );
					if (!st) $('.contentbox_outer').removeAttr('style');
					
					var new_height = $('#contentbox').css({'height':'auto'}).height();	
					
					if ($.browser.msie) {
						$('.ie_fader').stop(true,true).css({'opacity':1, height:new_height}).animate({'opacity':0}, {complete:function(){
							remove_ie_fader();
							$('#contentbox').css({'height':'auto'});
							onWindowResized();
						}});
					} else {
						$('#contentbox').stop(true, true).css({'height':old_height}).fadeInRemoveFilter().animate({'height':new_height}, {duration:500, easing:'easeInOutQuint', complete:function(){
							$('#contentbox').css({'height':'auto'});
							onWindowResized();
						}});
					}
					
					var headerbox_height = $(html_data).find('#headerbox').css('height');
					$('#headerbox').stop(true,true).animate({'height':headerbox_height}, {duration:400, easing:'easeInOutQuint', step:function(h) {
						update_flashsize( h );
						onWindowResized();
					}});
	}});
	
	return false;
}


function onWindowResized () {

	// Gras-Hintergrund immer unten am Rand lassen
	$('.hg2').css( {'height':Math.max($(window).height(), $('.centerbox').offset().top + $('.centerbox').height()+100)} );
	
	// Meta-Navi nach unten schieben
	//$('#meta_menu').css( {'padding-top':Math.max( $('#sub_menu').height(), $('.centerbox').offset().top + $('.centerbox').height() - $('#meta_menu').height() - 570) } );
	$('#meta_menu').css( {'padding-top': Math.max( 150, $('#contentbox').height() + $('#contentbox').offset().top -  $('#meta_menu').height() - $('#sub_menu').height() - 150) } );
}
	
$( function () {
	$(window).resize( onWindowResized );	
	onWindowResized();	
});


/* ------------------------------------------------------------------------ */
// EIGENE PLUG-INS für jQuery

// http://www.queness.com/post/112/a-really-simple-jquery-plugin-tutorial
// http://matthiasschuetz.com/jquery-tutorial-eigenes-tooltip-plugin-erstellen

/*

$.metaTagValue('pid');				->	gibt Wert eines Meta-Tags zurück
$.reqVars();						->	alle GET-Vars als Object holen, z.B. aus www.99grad.de/?test=hallo&...
$.reqVars('test');					->	GET-Var 'test' zurückgeben
$.stripTags(html, ['h2'], false );	->	HTML-Tags entfernen: code, allowed-tags-Array, allow-invers 
$.stripNL(html);					->	Tabs und Umbrüche entfernen (IE6-Problem)
$.htmlentitiesdecode( html );		->	Decode HTML
$.getAllTags(html, 'b', true );		->	HTML-Tags holen: code, tag-name, include-tag
$.gaTrackPage( title );				->	Seiten-Titel an Google Analytics senden, falls Tracking-ID im Quelltext gefunden wurde
$.execScripts(html, debug);			->	JavaScript in HTML-Code ausführen
$.isNumeric( str );					->	Gibt true zurück, wenn str eine Zahl ist
$.noCacheURL( url );				->	Hängt einen noCache=... an die URL, damit Seite beim Laden nicht gecached wird

$(sel).exists();							-> 	Existiert das Element?
$(element).rolloverColor({color:'#000'});	->	Ändert bei RollOver die Textfarbe, z.B. für Menüs

*/


// Erweiterung der Funktionen für den Typ $('id').plugin();

(function($){
	$.fn.extend({
		'copyProtectImage': function ( opt ) {
			var def = {transparent:'fileadmin/templates/imgs/trans.gif' };
			var opt = $.extend( def, opt);
			return this.each( function () {
				if ($(this).parent().nodeName() == 'a') $(this).parent().bind("contextmenu", function(e) { e.preventDefault(); });
				$(this).wrap('<span />');
				$(this).parent().prepend('<span style="position:absolute;"><img src="'+opt.transparent+'" width="'+$(this).width()+'" height="'+$(this).height()+'"></span>');
			});
		},
		'exists': function () {
			//return $(this).length>0;
			return $($(this).selector).length>0;
		},
		'nodeName': function () {
			return $(this)[0].nodeName.toLowerCase();
		},
		'slideToggle': function ( bShow ) {
			return this.each( function () {
				var el = $(this), height = el.data('originalHeight'), visible = el.is(':visible');
				if (bShow == undefined) bShow = !visible;
				if (bShow != visible) {
					if (!height) {
						height = el.show().height();
						el.data('originalHeight', height);
						if (!visible) el.hide().css({height:0});
					}
					if (bShow) {
						el.hide().css({height:0});
						el.stop(true, true).show().animate({height:height}, {duration:500, easing:'easeInOutQuint', complete:function() {
							el.css({height:'auto'});
						}} );
					} else {
						el.stop(true, true).animate({height:0}, {duration:500, easing:'easeInOutQuint', complete:function () { 
							el.hide();
						}});
					}
				}
			});
		},
		
		'fadeInRemoveFilter': function ( opt ) {
			var def = {duration:500, easing:'linear' };
			var opt = $.extend( def, opt);
			return this.each( function () {
				var el = $(this);
				el.animate({'opacity':1}, {duration:opt.duration, easing:opt.easing, complete:function(){
					var el = $(this)[0];
					if (el.style.filter && el.style.removeAttribute) el.style.removeAttribute('filter');
				}});
			});
		},
		
		'rolloverColor': function ( opt ) {
			
			var def = { color:'#777A66', duration: 400, durationOut: 100, 'background-color': false };
			var opt = $.extend( def, opt);
			$(this).resetRolloverColor();
			
			return this.each( function () {	
				$(this).data('col', $(this).css('color') );
				$(this).data('bgcol', $(this).css('background-color') );
				$(this).unbind('mouseenter').mouseenter( function () {
					var obj = {};
					if (opt.color) obj['color'] = opt.color;
					if (opt['background-color']) obj['background-color'] = opt['background-color'];
					$(this).stop(true,true).animate(obj, opt.duration);
				}).unbind('mouseleave').mouseleave( function () {
					var obj = {};
					if (opt.color) obj['color'] = $(this).data('col');
					if (opt['background-color']) obj['background-color'] = $(this).data('bgcol');
					$(this).stop(true,true).animate(obj, opt.durationOut);
				});
			});
		},
		
		'resetRolloverColor': function () {	
			return this.each( function () {
				$(this).removeAttr('style');
			});
		},
		
		'callFlashFunction': function ( func, params ) {
			return this.each( function () {
				$(this)[0][func].apply( this, params );
			});
		}
		
		
	});
})(jQuery);



// Erweiterung der Funktionen für Typ $.plugin();

(function($){
	$.extend({
	
		'log': function ( str ) {
			if (!$.__log) $.clearLog();
			$.__log.push( str );
		},
		
		'alertLog': function () {
			alert($.__log.join("\n"));
		},
		'clearLog': function () {
			$.__log = [];
		},
		
		
		'metaTagValue': function ( id, data ) {
				if (!data) var data = $('head').html();
				var val = data.split("<meta name=\""+id+"\" content=\"")[1].split("\"")[0];
				return val;
			},
			
		'currentURL': function () {
			return window.location.href;
		},
		
		'currentAnchor': function () {
			var a = $.currentURL().split('#');
			if (a.length < 2) return ''; 
			return a[1];
		},
		
		'reqVars': function ( id, url) {
			if (!url) url = $.currentURL();
			var paramsRaw = (url.split("?", 2)[1] || "").split("#")[0].split("&") || [];
			var _params = {};
			for (var i = 0; i < paramsRaw.length; i++){
				var single = paramsRaw[i].split("=");
				if (single[0]) _params[unescape(single[0])] = unescape(single[1]);
			}
			return id ? _params[id] : _params;
		},
		
		'stripTags': function ( html ) {
			if(arguments.length < 2) {
				html=html.replace(/<\/?(?!\!)[^>]*>/gi, '');
			} else {
				var allowed = arguments[2] == undefined ? true : arguments[2];				
				var specified = arguments[1];
				if(allowed){
					html=html.replace(new RegExp('</?[^('+specified.join('|')+'|/)][^>]*>', 'gi'), '');
				} else{
					html=html.replace(new RegExp('</?[('+specified.join('|')+')][^>]*>', 'gi'), '');
				}
			}
				
			return $.trim( html );
		},
		
		'stripNL': function ( data ) {
			if (!data) return '';
			return data.split("\t").join("").split("\r").join("").split("\n").join("");
		},
		
		'htmlentitiesdecode': function ( str ) {
			if (!$("<div />").html(str)) return '';
			return $("<div />").html(str).text();
		},
		
		'getAllTags': function  ( source, tagname, include_tag ) {
			var arr = [];
			while(source.indexOf("<"+tagname) > -1 || source.indexOf("</"+tagname) > -1) {
				var s = source.indexOf("<"+tagname);
				var s_e = source.indexOf(">", s);
				var e = source.indexOf("</"+tagname, s);
				var e_e = source.indexOf(">", e);
				
				var str = include_tag ? source.substring(s,e_e+1) : source.substring(s_e+1, e);
				
				if (tagname == "script" && (str.indexOf("gaJsHost") > -1 || str.indexOf("_getTracker") >-1 || str.indexOf("only_execute_once") >-1 )) {
					// ignorieren, weil Page-Tracker-Script von Google
				} else {
					if ($.trim(str)) arr.push( str );
				}
				
				source = source.substring(0, s) + source.substring(e_e+1);
			}
			return arr;	
		},
		
		'execScripts': function ( source, debug ) {
			var sc = $.getAllTags(source, "script");
			for (var i = 0; i < sc.length; i++) {
				try {
					eval( sc[i] );
				} catch (e) {
					if (debug) {
						alert( e );
						alert( sc[i] );
					}
					return false;
				}
			}
			return true;
		},
		
		'isNumeric': function ( input ) {
			return (input - 0) == input && input.length > 0;
		},
		
		'noCacheURL': function ( url ) {
			return url;
			return url + (url.indexOf('?') > 0 ? '' : '?') + '&nocache='+Math.floor(Math.random()*10000);
		},
		
		'gaTrackPage': function ( title ) {
			if (!title) title = document.title.split(': ')[1];
			try { 
				var gaid = $( 'body' ).html().split('_getTracker("')[1].split('"')[0];
				var pageTracker = _gat._getTracker( gaid );
				_gat._anonymizeIp();
				pageTracker._trackPageview( title );
			} catch (e) {}

		},
		
		'm_ajax': function ( obj ) {
			if (!obj.id) obj.id = '';
			try {
				$('body').data('m_ajax_loader_'+obj.id).abort();
			} catch (e) {}
			var n = $.ajax({ 	url: $.noCacheURL(obj.url), 
						success: function (data) {
							if (!data) return false;
							document.title = $.htmlentitiesdecode( $.getAllTags(data, 'title')[0] );
							
							// Aus dem Body-Tag ein DIV machen, sonst kann man die Klasse nicht lesen!
							var body2div = $.stripNL($.getAllTags(data, 'body', true)[0]).split("<body").join("<div").split("</body").join("</div");
							var html_data = $(body2div);
							//var html_data = $($.stripNL($.getAllTags(data, 'body')[0]));
							
							for (var target in obj.targets) {
								var o = html_data.find( target );
								var div = obj.targets[target] === true ? target : obj.targets[target];
								$( div ).html( o.html() );
							}
							
							if (obj.execScripts !== false) $.execScripts( data );
							$.gaTrackPage();
							if (obj.success) obj.success( data, html_data );
						}
				});
			$('body').data('m_ajax_loader_'+obj.id, n );

		}
		
	});
})(jQuery);


// Preloader-Effekt

(function($){
	$.fn.extend({
		'showPreloader': function ( opt ) {
		
			var def = {offsetX:0, offsetY:0 };
			var opt = $.extend( def, opt);
			
			return this.each( function () {
				$('body').append('<div class="dots_preloader">&nbsp;</div>');
				var el = $('.dots_preloader');
				var cb = $('#contentbox');
				var pos = cb.position();
				pos.left += cb.width()/2 + 40;
				pos.top += 50;
				el.offset( pos ).hide().stop(true,true).fadeIn(3000);
			});
		
		},
		

		'hidePreloader': function () {
			return this.each( function () {
			
				$('.dots_preloader').remove();
				
			});
		}
		
	});
})(jQuery);





(function($){
	$.fn.extend({
		'accordeonMenue': function ( opt ) {
		
			
			var def = {offsetX:0, offsetY:0, radius:20, pause:0 };
			var opt = $.extend( def, opt);
			
			var div = $(this);
			
			var closeAll = function ( noAnimation ) {
			
				div.find('ul:first').addClass('selected');
				
				div.find('ul').each( function () {
					if (!$(this).hasClass('selected')) {
						if (noAnimation) {
							$(this).stop(true,true).hide();
						} else {
							$(this).stop(true,true).slideUp( 200, 'easeInOutQuint' );
						}
					}
				});
				div.find('ul:first, ul.selected').each( function () {
					if (!$(this).is(':visible')) {
						if (noAnimation) {
							$(this).stop(true,true).show();
						} else {
							$(this).stop(true,true).delay(210).slideDown( 200, 'easeInOutQuint' );
						}
					}
				});
			
			}
			
			var openUp = function ( ref ) {
				
				var li = $(ref).parent('li:first');
				var ul = li.parent('ul:first');
				
				div.find('ul,li,a').removeClass('selected');
				li.addClass('selected');
				li.find('ul:first').addClass('selected');
				$(ref).addClass('selected');
				
				$(this).addClass('selected');
				var t = ul;
				while ($(t).length) {
					t.addClass('selected');
					t.parent('li:first').find('a:first').addClass('selected');
					t = $(t.parent('ul:first,li:first'));
				}
			}
			
			var ref = div.find('ul li a.selected:last');
			openUp( ref );			
			closeAll( true );
			
			return this.each( function () {
				var mc = div.find('ul li a');
				mc.unbind('click', do_click).click( do_click );
				
				function do_click () {
					if ($(this).html()) {
						openUp( this );
						closeAll();
						div.find('a').resetRolloverColor();
					}
				}
			});
		
		}
	});
})(jQuery);




// Combo-Box

(function($){
	$.fn.extend({
		'comboBox': function ( opt ) {

			var allRefs = this;
			var levelCnt = 100;
			
			var def = {lockTitle:false, useMouseEnter:false, durationClose:500, durationOpen:500};
			var opt = $.extend( def, opt);
			
			var maxWidth = function ( sel ) {
				var w = 0;
				$(sel).each( function () {
					w = Math.max($(this).width(), w);
				});
				return w;
			}
			
			var closeAll = function () {
				$('.jqcb .selbox').stop(true,true).slideUp( opt.durationClose );
			}
			
			var closeOne = function ( sel ) {
				$(sel).stop(true,true).slideUp( opt.durationClose );
			}
			
			var updateAll = function () {
				allRefs.each( function () {
					var ref = $(this).data('orig');
					if (ref) {
						$(ref).parent().find('.selbox li').removeClass('selected');
						var s = ref.find( ':selected' );
						if ($(s).data('li')) {
							$(s).data('li').addClass('selected');
						}
						var v = !opt.lockTitle ? $(s).html() : ref.find('[value=""]').html();
						$(ref).parent().find('.cur .text').html( v ? v : '&nbsp;' );
					}
				});
				
			}
			
			return this.each( function () {
			
				var orig = $(this);
				
				if (orig.data('orig')) {
					orig.parent().find('.selbox, .cur').remove();
					orig.unwrap();
				}
				
				orig.data('orig', orig);
				
				orig.wrap('<div class="jqcb" />');
				orig.css({display:'none'});
				orig.parent().append('<div class="selbox"></div><div class="cur"><div class="text"></div></div>');
				
				var cur = orig.parent().find('.cur');
				var selbox = orig.parent().find('.selbox');
				cur.css({width:orig.width()});
				cur.addClass( orig.attr('class') );
				
				var lng = orig.find('option').length;
				orig.find('option').each( function ( i, ref ) {
					var str = $(this).html();
					if ($(this).attr('value')) {
						var cls = '';
						if (i == 0) cls += ' first';
						if (i == lng-1) cls += ' last';

						var li = $('<li class="'+cls+'">' + str + '</li>' ).data('ori',$(ref)).appendTo(selbox).click( function () {
							cur.find('.text').html( $(this).html() );
							closeAll();
							orig.find('option').removeAttr('selected');
							
							$(this).data('ori').attr('selected', true);
							updateAll();
							orig.change();
						}).rolloverColor({'background-color':'#dddddd', color:false});
						$(ref).data('li', $(li));
					}
				});
				
				selbox.wrapInner('<ul />');	
				selbox.width( Math.max( maxWidth(selbox.find('li'))+50, orig.parent().width() ) );
				selbox.hide();

				cur.unbind().bind('click'+ (opt.useMouseEnter ? ' mouseenter' : ''), function () {
					var isOpen = selbox.is(':visible');
					var pos = cur.position();
					pos.top += cur.height();
					pos.left = Math.min( pos.left, $(window).width()-selbox.width() );
					closeAll();
					if (!isOpen) selbox.css({left:pos.left,top:pos.top,'z-index':levelCnt++}).stop(true,true).slideDown( opt.durationOpen );
					cur.addClass('opened');
				});
				
				// geöffnete ComboBoxen bei RollOut nach einer Sekunde automatisch schliessen
				var iv = false;
				orig.parent().unbind('mouseleave').mouseleave( function () {
					if (iv) clearTimeout(iv);
					iv = setTimeout( function () { 
						closeOne( selbox ); 
						cur.removeClass('opened');
					}, 200 );
				}).mouseenter( function () {
					if (iv) clearTimeout(iv);
				});
				
				updateAll();
			});
		
		}
	})
})(jQuery);


// PNG-FIX für IE6+
// http://jquery.andreaseberhard.de/pngFix/
/*
$( function() {$(document).pngFix();});
(function($){jQuery.fn.pngFix=function(settings){settings=jQuery.extend({blankgif:'blank.gif'},settings);var ie55=(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)==4&&navigator.appVersion.indexOf("MSIE 5.5")!=-1);var ie6=(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)==4&&navigator.appVersion.indexOf("MSIE 6.0")!=-1);if(jQuery.browser.msie&&(ie55||ie6)){jQuery(this).find("img[src$=.png]").each(function(){jQuery(this).attr('width',jQuery(this).width());jQuery(this).attr('height',jQuery(this).height());var prevStyle='';var strNewHTML='';var imgId=(jQuery(this).attr('id'))?'id="'+jQuery(this).attr('id')+'" ':'';var imgClass=(jQuery(this).attr('class'))?'class="'+jQuery(this).attr('class')+'" ':'';var imgTitle=(jQuery(this).attr('title'))?'title="'+jQuery(this).attr('title')+'" ':'';var imgAlt=(jQuery(this).attr('alt'))?'alt="'+jQuery(this).attr('alt')+'" ':'';var imgAlign=(jQuery(this).attr('align'))?'float:'+jQuery(this).attr('align')+';':'';var imgHand=(jQuery(this).parent().attr('href'))?'cursor:hand;':'';if(this.style.border){prevStyle+='border:'+this.style.border+';';this.style.border='';}
if(this.style.padding){prevStyle+='padding:'+this.style.padding+';';this.style.padding='';}
if(this.style.margin){prevStyle+='margin:'+this.style.margin+';';this.style.margin='';}
var imgStyle=(this.style.cssText);strNewHTML+='<span '+imgId+imgClass+imgTitle+imgAlt;strNewHTML+='style="position:relative;white-space:pre-line;display:inline-block;background:transparent;'+imgAlign+imgHand;strNewHTML+='width:'+jQuery(this).width()+'px;'+'height:'+jQuery(this).height()+'px;';strNewHTML+='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader'+'(src=\''+jQuery(this).attr('src')+'\', sizingMethod=\'scale\');';strNewHTML+=imgStyle+'"></span>';if(prevStyle!=''){strNewHTML='<span style="position:relative;display:inline-block;'+prevStyle+imgHand+'width:'+jQuery(this).width()+'px;'+'height:'+jQuery(this).height()+'px;'+'">'+strNewHTML+'</span>';}
jQuery(this).hide();jQuery(this).after(strNewHTML);});jQuery(this).find("*").each(function(){var bgIMG=jQuery(this).css('background-image');if(bgIMG.indexOf(".png")!=-1){var iebg=bgIMG.split('url("')[1].split('")')[0];jQuery(this).css('background-image','none');jQuery(this).get(0).runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+iebg+"',sizingMethod='scale')";}});jQuery(this).find("input[src$=.png]").each(function(){var bgIMG=jQuery(this).attr('src');jQuery(this).get(0).runtimeStyle.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader'+'(src=\''+bgIMG+'\', sizingMethod=\'scale\');';jQuery(this).attr('src',settings.blankgif)});}
return jQuery;};})(jQuery);
*/


