// Document Ready
jQuery(document).ready(function() { 
        // superfish menus

		jQuery('ul.sf-menu').superfish({ 
            delay:       1000, // one second delay on mouseout 
            animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
            speed:       'fast',  // faster animation speed 
            autoArrows:  false, // disable generation of arrow mark-up 
            dropShadows: false  // disable drop shadows 
        }); 
		
		// open a link in a new window
	jQuery(function(){
		jQuery("a[href$='.pdf'], ._blank").click(function(){
			var newwindow = window.open(this.href, '_blank');
			newwindow.focus();
			return false;
		});
	});
	
	// Chain elements with a comma: #qc .button, #contact .button, #newsletter .button
	
	$("#qc .submitBTN, #contact .mainSubmitBTN").hover(
		function () {
			$(this).addClass("hover");
		}, 
		function () {
			$(this).removeClass("hover");
		}
	);

	
	jQuery(".txt-limit-140").maxLength(140);

	// Show and Hide
	jQuery('.text').hide();
	jQuery('a.toggle-text').click(function() {
	  jQuery('.text').toggle(400); 
	  return false;
	});
	
	// clear input on focus
var clearMePrevious = '';

// clear input on focus
jQuery('.search').focus(function()
{
if(jQuery(this).val()==$(this).attr('title'))
{
clearMePrevious = $(this).val();
jQuery(this).val('');
}
});

// if field is empty afterward, add text again
jQuery('.search').blur(function()
{
if(jQuery(this).val()=='')
{
jQuery(this).val(clearMePrevious);
}
});
	
});

function mast() {
	document.write('<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="630" height="300" id="flash" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="multimedia/mast.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><embed src="http://www.skinlaser.com/multimedia/mast.swf" wmode="transparent" quality="high" bgcolor="#ffffff" width="630" height="300" name="flash" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');
}
