var is_ie = ((/msie/i.test(window.navigator.userAgent) && !/opera/i.test(window.navigator.userAgent)) || /Firefox/i.test(window.navigator.userAgent));
function GID(id){ return (is_ie) ? document.all[id] : document.getElementById(id);}
var BrUserAgent = navigator.userAgent.toLowerCase();
var BrUserVersion = parseInt(navigator.appVersion);
var browser = '';
if(BrUserAgent.indexOf('opera')!=-1){browser = 'Opera';}else if(BrUserAgent.indexOf('msie')!=-1){browser = 'Explorer';}else if(BrUserAgent.indexOf('mozilla')!=-1){browser = 'Mozilla';}else{browser = 'Unknown';}

var isFlash = $.fn.flash.hasFlash();
var versionFlash = $.fn.flash.hasFlash.playerVersion();
var pluginOptions = { version: versionFlash, expressInstall: true };

$.fn.flash.replace = function(htmlOptions) {
   if (isFlash && versionFlash != '0,0,0') {
      htmlOptions.replace = '';
	  $(this).html($.fn.flash.transform(htmlOptions));
   }
   else $(this).html(htmlOptions.replace);
};

$(document).ready(function() {
	$(document).pngFix();
   if ($("#gallery a").length) $("#gallery a").fancybox({ 'hideOnContentClick': true, 'overlayShow': true, 'overlayOpacity': 0.5, 'speedIn': 1000, 'speedOut': 600, 'titlePosition': 'inside', 'transitionIn': 'elastic', 'transitionOut': 'elastic' });
	var htmlOptions = { src: 'image/akziya_karta.swf', width: '295', height: '142', replace: '&nbsp;' };
	$('#discFlash').flash(htmlOptions, pluginOptions);

	if (typeof window['showGallery'] == 'function') showGallery();

});
