// JavaScript Document
			$(document).ready(function(){
				//Examples of how to assign the ColorBox event to elements.
				/*$('a[@rel*=lightbox]').colorbox({transition:"fade"});*/
				$("a[rel='example1']").colorbox({transition:"fade"});
				$(".colorbox").colorbox({iframe:true, width:500, height:500});
				
				
				//onclick reset input value
				$('#login-default').click(
					function() {
						if (this.value == this.defaultValue) {
							this.value = '';
						}
					}
					);
				$('#login-default').blur(
					function() {
						if (this.value == '') {
							this.value = this.defaultValue;
						}
					}
				);
				
				$('#pojistka').blur(
					function() {
							$('#uspora').val(this.value/100*$('#sleva').val());
					}
				);	
				
				$('#sleva').blur(
					function() {
							$('#uspora').val(this.value/100*$('#pojistka').val());
					}
				);				
				
				$('#password-clear').show();
				$('#password-password').hide();
				
				$('#password-clear').focus(function() {
					$('#password-clear').hide();
					$('#password-password').show();
					$('#password-password').focus();
				});
				$('#password-password').blur(function() {
					if($('#password-password').val() == '') {
						$('#password-clear').show();
						$('#password-password').hide();
					}
				});		
				
//onclick reset input value
				$('#login-ms').click(
					function() {
						if (this.value == this.defaultValue) {
							this.value = '';
						}
					}
					);
				$('#login-ms').blur(
					function() {
						if (this.value == '') {
							this.value = this.defaultValue;
						}
					}
				);
				
				$('#passwordms-clear').show();
				$('#passwordms-password').hide();
				
				$('#passwordms-clear').focus(function() {
					$('#passwordms-clear').hide();
					$('#passwordms-password').show();
					$('#passwordms-password').focus();
				});
				$('#passwordms-password').blur(function() {
					if($('#passwordms-password').val() == '') {
						$('#passwordms-clear').show();
						$('#passwordms-password').hide();
					}
				});					
				

				$("a.DDR").click(function() { //check for the first selection
					var $column = $(this).attr('title'); // assign the ID of the column
					$('table.RTDDR').children().find("td").removeClass("highlight") //forget the last highlighted column
					$('table.RTDDR').children().find("td."+$column).addClass("highlight"); //highlight the selected column
					$('table.RTDDR').children().find("td."+$column).find(":radio").attr("checked","checked");
					   if($(this).attr('id') == 'car') {
							$('#car_ujeto').removeAttr('disabled');
							$('#car_spotreba').removeAttr('disabled');
							$('#car_palivo').removeAttr('disabled');
							$('#cat_ujeto').attr('disabled', true);
							$('#cat_spotreba').attr('disabled', true);
							$('#cat_palivo').attr('disabled', true);
					   }	
					   else if($(this).attr('id') == 'caterpillar'){
							$('#cat_ujeto').removeAttr('disabled');
							$('#cat_spotreba').removeAttr('disabled');
							$('#cat_palivo').removeAttr('disabled');
							$('#car_ujeto').attr('disabled', true);
							$('#car_spotreba').attr('disabled', true);
							$('#car_palivo').attr('disabled', true);
					   }
					return false;
				});
				$("button.sendit").click(function() {
					var $DDR = $('table.RTDDR').children().find("td").find(":checked").val();
					var $Mbps = $('table.RTMbps').children().find("td").find(":checked").val();
					alert('You selected '+$DDR+' of RAM, and '+$Mbps+' Bandwidth, for example');
					return false;
				});
			
			});				

