$(document).ready(function() {
	$("a.iframe").fancybox({
		'width'				: '75%',
		'height'			: '75%',
        'autoScale'     	: false,
       	'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic',
		'speedIn'	: '600',
		'speedOut'	: '200',
		'easingIn'      : 'easeOutBack',
		'easingOut'     : 'easeInBack',

		'type'				: 'iframe'
	});
});

/* MAIN MENU HOVER SCRIPT - REQUIRES bgPOS script to work*/
$(function(){
	$('#menu ul li a')
		.css( {backgroundPosition: "0 0"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(0 -72px)"}, {duration:300});
		
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0 0)"}, {duration:100, complete:function(){
				$(this).css({backgroundPosition: "0 0"});
				
			}})
						   })
});

/* CONTACT FORM SLIDER */
$(document).ready(function(){

			$(function() {
			$("#contactbtn").click(
			function(){
			$(this).toggleClass("selected");

			$("#contactform_expanded").slideToggle("slow");
			return false;
			},
			function(){  
			$(this).toggleClass("selected");

			$("#contactform_expanded").slideToggle("fast");
		
			});
			});

	
	
});


/* HOMEPAGE TABS SCRIPT */
$(function() {
		   $("ul.tabs").tabs("div.panes > div", {event:'mouseover',effect: 'fade', fadeOutSpeed: 400,history: true});
});



/* FORM HOVER */
function myFocus(element) {
     if (element.value == element.defaultValue) {
       element.value = '';
     }
   }
   function myBlur(element) {
     if (element.value == '') {
       element.value = element.defaultValue;
     }
   }

/* BOOKMARK SCRIPT */

function bookmark(url,title){
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
  window.external.AddFavorite(url,title);
  } else if (navigator.appName == "Netscape") {
    window.sidebar.addPanel(title,url,"");
  } else {
    alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
  }
}



/* PRINT SCRIPT */
function printPage() {
  if (window.print)
    window.print()
  else
    alert("Sorry, your browser doesn't support this feature.");
}



   


