jQuery.noConflict(); 





function openYhteydenotto()
{
	jQuery("#yhteydenotto").dialog("open");
}

function openSisustusKuvasto()
{
	jQuery("#sisustuskuvasto").dialog("open");
}
		
function openTeollisuusKuvasto()
{
	jQuery("#teollisuuskuvasto").dialog("open");
}
			
function openJalleenmyyjat()
{
	jQuery("#jalleenmyyjat").dialog("open");
}

function valohome()
{
	jQuery("#valohome").dialog('open');
}

function kelvindemo()
{
	jQuery("#kelvindemo").dialog('open'); 
}

jQuery(window).load(function(){  
	window.location.href = document.getElementById("thelink").href;
});  
	
jQuery(document).ready(function($)
{
		jQuery("#tuotekortti_select").change(function(){
			var $valittu;
			$valittu = jQuery('#tuotekortti_select :selected').val();
			
			
			var $linkki;
			$linkki = "http://web10.supergreenhosting.com/~winledf1/winled2/index.php/tuotteet/lataaPDF/"+$valittu;
			jQuery("a#pdf_link").attr("href", $linkki);
		});						
	
		jQuery("#valohome").dialog({
		autoOpen: false,
		height: 500,
		width: 600
		});
	
		jQuery("#kelvindemo").dialog({
		autoOpen: false,
		height: 460,
		width: 650
		});
		
		jQuery("#lisatiedot").dialog({
		autoOpen: false,
		height: 'auto',
		width: '900'
		});
	
	
		$("#sisustuskuvasto").dialog({ autoOpen: false });
		jQuery("#sisustuskuvasto").dialog({ height: 'auto' });
		jQuery("#sisustuskuvasto").dialog({ width: 'auto' });
		jQuery("#sisustuskuvasto").dialog({ position: 'top' });
			
		jQuery("#teollisuuskuvasto").dialog({ autoOpen: false });
		jQuery("#teollisuuskuvasto").dialog({ height: '650' });
		jQuery("#teollisuuskuvasto").dialog({ width: '710' });
		jQuery("#teollisuuskuvasto").dialog({ position: 'top' });
			
		jQuery("#jalleenmyyjat").dialog({ autoOpen: false });
		jQuery("#jalleenmyyjat").dialog({ height: 'auto' });
		jQuery("#jalleenmyyjat").dialog({ width: 'auto' });
		jQuery("#jalleenmyyjat").dialog({ position: 'top' });
			
		jQuery("#yhteydenotto").dialog({ autoOpen: false });
		jQuery("#yhteydenotto").dialog({ height: 'auto' });
		jQuery("#yhteydenotto").dialog({ width: 'auto' });
		jQuery("#yhteydenotto").dialog({ position: 'top' });
		

		
			jQuery("#etusivu_link_active").hide();
			
			jQuery("#etusivu_link").hover(
			  function () {
				jQuery("#etusivu_link_nonactive").hide();
				jQuery("#etusivu_link_active").show();
			  }, 
			  function () {
				jQuery("#etusivu_link_nonactive").show();
				jQuery("#etusivu_link_active").hide();
			  }
			);
			
			jQuery("#sisalto_link_active").hide();
			jQuery("#sisalto_link").hover(
			  function () {
				jQuery("#sisalto_link_nonactive").hide();
				jQuery("#sisalto_link_active").show();
			  }, 
			  function () {
				jQuery("#sisalto_link_nonactive").show();
				jQuery("#sisalto_link_active").hide();
			  }
			);
			
			jQuery("#kirje_link_active").hide();
			jQuery("#kirje_link").hover(
			  function () {
				jQuery("#kirje_link_nonactive").hide();
				jQuery("#kirje_link_active").show();
			  }, 
			  function () {
				jQuery("#kirje_link_nonactive").show();
				jQuery("#kirje_link_active").hide();
			  }
			);

		
			$(function() {
				jQuery("#accordion").accordion();
			});

		
		


	
		

	jQuery(".hidden").hide();
	jQuery(".navlink").hover(
		
	  function () {
		var tama = jQuery(this);
		var nimi = tama.find('span:first').html();
		jQuery("."+nimi+"active").show();
		jQuery("."+nimi).hide();

	  }, 
	  function () {
		var tama = jQuery(this);
		var nimi = tama.find('span:first').html();
		jQuery("."+nimi+"active").hide();
		jQuery("."+nimi).show();
	  }
	);
			
});


