function printWindow(){
   bV = parseInt(navigator.appVersion)
   if (bV >= 4) window.print()
}
function clearText(field){
    if (field.defaultValue == field.value) field.value = '';
    else if (field.value == '') field.value = field.defaultValue;
}

function confirmSubmit()
{

	if(document.contactForm.email.value == 'E-mail Address' || document.contactForm.fname.value == 'Full Name') 
			{ 
				alert("Please fill out both form fields"); 
				return false; 
			}
}

jQuery(document).ready(function(){
	jQuery('#photohome').fadeSlideShow(
		{
			width: 873, // default width of the slideshow
			height: 160, // default height of the slideshow
			speed: 'slow', // default animation transition speed
			interval: 6000, // default interval between image change
			PlayPauseElement: false, // default css id for the play / pause element
			PlayText: 'Play', // default play text
			PauseText: 'Pause', // default pause text
			NextElement: 'fssNext', // default id for next button
			NextElementText: 'Next >', // default text for next button
			PrevElement: 'fssPrev', // default id for prev button
			PrevElementText: '< Prev', // default text for prev button
			ListElement: false, // default id for image / content controll list
			ListLi: 'fssLi', // default class for li's in the image / content controll 
			ListLiActive: 'fssActive', // default class for active state in the controll list
			addListToId: false, // add the controll list to special id in your code - default false
			allowKeyboardCtrl: true, // allow keyboard controlls left / right / space
			autoplay: true // autoplay the slideshow
		}
	);
	jQuery.validator.addMethod("defaultInvalid", function(value, element) 
	    {
	     switch (element.value) 
	     {
	      case "Full Name":
	       if (element.name == "element_name") return false;
	       break;

	       default: return true; 
	       break;

	     }
	    });
	jQuery("#contactform").validate(
		{
		      rules:{ name: "required defaultInvalid"} 
		 }
	);
	jQuery("#speakerform").validate({
	      rules:{ name: "required defaultInvalid"} 
	 });
	jQuery("#cdform").validate(	{
		      rules:{ name: "required defaultInvalid"} 
		 });
		
	jQuery("#collapsable").hide();
	//toggle the componenet with class msg_body
	jQuery("#btncollap").click(function()
		{
			jQuery(this).next(".#collapsable").slideToggle(500);
		});
	jQuery("#tabs").tabs("#contact-right > div");

		jQuery("ul.sub-menu li:last-child").each(function(){
		      jQuery(this).addClass("end");
		});
	//jQuery("#contact-left a.box").colorbox({width:"400px", padding: "10px", inline:true});
	jQuery(".fancybox").colorbox({iframe:true, innerWidth:700, innerHeight:400});
	jQuery(".googlemap").colorbox({iframe:true, innerWidth:700, innerHeight:400});
	jQuery('input').click(function(){
			var ourText = jQuery('p');
			var currFontSize = ourText.css('fontSize');
			var finalNum = parseFloat(currFontSize, 10);
			var stringEnding = currFontSize.slice(-2);
			if(this.id == 'large') {
				finalNum *= 1.2;
			}
			else if (this.id == 'small'){
				finalNum /=1.2;
			}
			ourText.css('fontSize', finalNum + stringEnding);
		});
		

				jQuery('.fontResizer').jfontsizer({
					applyTo: '#body',
					changesmall: '2',
					changelarge: '2',
					expire: 30
				});

	
});


