
video = function(url)
{
    var win = window.open(url, 'video', 'width='+640+',height='+480+',resizable=no,scrollbars=no,menubar=no');
	return false;
}


help = function(url)
{
    var win = window.open(url, 'helper', 'width='+600+',height='+430+',resizable=0,scrollbars=yes,menubar=no');
	return false;
}

showInfo = function(url)
{
    var win = window.open(url, 'helper', 'width='+400+',height='+355+',resizable=0,scrollbars=no,menubar=no');
	return false;
}

showRanks = function(url)
{
    var win = window.open(url, 'helper', 'width='+400+',height='+405+',resizable=0,scrollbars=no,menubar=no');
	return false;
}

review = function(url)
{
    var win = window.open(url, 'review', 'width='+600+',height='+495+',resizable=0,scrollbars=yes,menubar=no');
	return false;
}

illustration = function(url)
{
    var win = window.open(url, 'illustration', 'width='+750+',height='+563+',resizable=0,scrollbars=no,menubar=no');
	return false;
}

compare = function()
{
	var cIds = '';
	
	$('ul li input[@type=checkbox][@checked]').each(
		function (i)
		{
			cIds = cIds+(i==0 ? '' : '_')+$(this).attr('value');
		}
	);
	
	var win = window.open('shop,comparer,'+cIds, 'compare', 'width='+1000+',height='+750+',resizable=yes,scrollbars=yes,menubar=no');
}


$(document).ready(function() 
{
	/*
	$('#top').flash({
	    src: 'images/top.swf',
	    width: 990,
	    height: 245,
		flashvars: { KoszykUrl: 'shop,cart', StartUrl: '' }
	});
	
	$('#top > embed').attr('wmode', 'transparent');
	*/
	//$('#topmenu').hide();
	
	if(!$.browser.safari) $('#safaritop').hide();
	
	
	$('#comapreProducts').click(compare);
	
	
	$('#topmenu > ul > li > ul').hide();
	
	$('#topmenu > ul > li').hover(
		function()
		{
			$(this).find('ul').show();
		},
		
		function()
		{
			$(this).find('ul').hide();
		}	
	);
	
});

ehhh = function()
{
	$('#safaritop').hide();
}

window.onload = ehhh;


var MM_contentVersion = 7;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
		for (var i = 0; i < words.length; ++i)
		{
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
		}
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}


var FO_Count = 0;
function FlashObject( Path )
{
  this.ID = FO_Count++;
  
  this.Path = Path;
  this.Width = "100%";
  this.Height = "100%";
  this.FlashVars = null;
  this.BgColor = "#ffffff";
  this.Alt = "";
  this.SwfId = "FO_" + this.ID;
  this.WMode = "opaque";
  this.Quality = "high";
  this.Scale = "noscale";
  this.SAlign = "lt";
  this.Menu = "false";

  this.insertSwf = FO_insSwf;
  this.getSwf = FO_getSwf;
}


function FO_insSwf()
{
	document.write( this.getSwf() );
}
function FO_getSwf()
{
	if( typeof(MM_FlashCanPlay) == "undefined" || MM_FlashCanPlay == false )
	{
		return this.Alt;
	}

	var FlashHtml = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + this.Width + '" height="' + this.Height + '" id="' + this.SwfId + '" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="' + this.Path + '" />';
	if( typeof(this.FlashVars) == "string" && this.FlashVars != '')
		FlashHtml += '<param name="FlashVars" value="' + this.FlashVars + '" />';
		FlashHtml += '<param name="menu" value="'+this.Menu+'" /><param name="wmode" value="'+this.WMode +'" /><param name="quality" value="'+this.Quality+'" /><param name="scale" value="'+this.Scale+'" /><param name="salign" value="'+this.SAlign+'" /><param name="bgcolor" value="' + this.BgColor + '" />';
		FlashHtml += '<embed src="' + this.Path + '" '
		if( typeof(this.FlashVars) == "string" && this.FlashVars != '')
			FlashHtml += 'FlashVars="' + this.FlashVars + '" ';
	FlashHtml += 'menu="'+this.Menu+'" wmode="'+this.WMode+'" quality="'+this.Quality+'" scale="'+this.Scale+'" salign="'+this.SAlign+'" bgcolor="' + this.BgColor + '" width="' + this.Width + '" height="' + this.Height + '" name="' + this.SwfId + '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	FlashHtml += '</object>';
  //alert(FlashHtml)
	return FlashHtml;
}

