﻿function initMenu() {
  $('#serv ul').hide();
  $('#serv ul:first').show();
  $('#serv li a').click(
    function() {
      var checkElement = $(this).next();
      if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
        return false;
        }
      if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
        $('#serv ul:visible').slideUp('slow');
        checkElement.slideDown('slow');
        return false;
        }
      }
    );
  }
$(document).ready(function() {initMenu();});

// preload images ---------------------------------------------------------------------------------------------
jQuery.preloadImages = function() {
  for(var i = 0; i<arguments.length; i++)   {
    jQuery("<img>").attr("src", arguments[i]);
  }
}
// ------------------------------------------------------------------------------------------------------------

<!--

//Disable right click script III- By Renigade (renigade@mediaone.net)
//For full source code, visit http://www.dynamicdrive.com

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// --> 

var bookmarkscroll={
	setting: {duration:2000, yoffset:-90}, //{duration_of_scroll_milliseconds, offset_from_target_element_to_rest}
	topkeyword: '#top', //keyword used in your anchors and scrollTo() to cause script to scroll page to very top

	scrollTo:function(dest, options, hash){
		var $=jQuery, options=options || {}
		var $dest=(typeof dest=="string" && dest.length>0)? (dest==this.topkeyword? 0 : $('#'+dest)) : (dest)? $(dest) : [] //get element based on id, topkeyword, or dom ref
		if ($dest===0 || $dest.length==1 && (!options.autorun || options.autorun && Math.abs($dest.offset().top+(options.yoffset||this.setting.yoffset)-$(window).scrollTop())>5)){
			this.$body.animate({scrollTop: ($dest===0)? 0 : $dest.offset().top+(options.yoffset||this.setting.yoffset)}, (options.duration||this.setting.duration), function(){
				if ($dest!==0 && hash)
					location.hash=hash
			})
		}
	},

	urlparamselect:function(){
		var param=window.location.search.match(/scrollto=[\w\-_,]+/i) //search for scrollto=divid
		return (param)? param[0].split('=')[1] : null
	},
	
	init:function(){
		jQuery(document).ready(function($){
			var mainobj=bookmarkscroll
			mainobj.$body=(window.opera)? (document.compatMode=="CSS1Compat"? $('html') : $('body')) : $('html,body')
			var urlselectid=mainobj.urlparamselect() //get div of page.htm?scrollto=divid
			if (urlselectid) //if id defined
				setTimeout(function(){mainobj.scrollTo(document.getElementById(urlselectid) || $('a[name='+urlselectid+']:eq(0)').get(0), {autorun:true})}, 100)
			$('a[href^="#"]').each(function(){ //loop through links with "#" prefix
				var hashvalue=this.getAttribute('href').match(/#\w+$/i) //filter links at least 1 character following "#" prefix
				hashvalue=(hashvalue)? hashvalue[0].substring(1) : null //strip "#" from hashvalue
				if (this.hash.length>1){ //if hash value is more than just "#"
					var $bookmark=$('a[name='+this.hash.substr(1)+']:eq(0)')
					if ($bookmark.length==1 || this.hash==mainobj.topkeyword){ //if HTML anchor with given ID exists or href==topkeyword
						if ($bookmark.length==1 && !document.all || document.all && window.XMLHttpRequest) //non IE, or IE7+
							$bookmark.html('.').css({position:'absolute', fontSize:1, visibility:'hidden'})
						$(this).click(function(e){
							mainobj.scrollTo((this.hash==mainobj.topkeyword)? mainobj.topkeyword : $bookmark.get(0), {}, this.hash)
							e.preventDefault()
						})
					}
				}
			})
		})
	}
}

bookmarkscroll.init()

// ------------------------------------------------------------------------------------------------------------

function insertFlash(src,width,height,wmode,menu,flashVars) {
	
	var pwmode = (wmode==null)? "" : wmode;
	var pmenu = (menu==null)? true : false;
	var pflashVars = (flashVars==null)? "" : flashVars;
	
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+width+'" height="'+height+'">');
	document.write('<param name="movie" value="'+src+'">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="flashVars" value="'+pflashVars+'">');
	document.write('<param name="wmode" value="'+pwmode+'">');
	document.write('<param name="menu" value="'+pmenu+'">');
	document.write('<embed src="'+src+'" width="'+width+'" height="'+height+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" flashvars="'+pflashVars+'" wmode="'+pwmode+'" menu="'+pmenu+'"></embed>');
	document.write('</object>');
	
}

// ------------------------------------------------------------------------------------------------------------

$(document).ready(function() {
 $("a.group, a.group2").fancybox({
 'zoomOpacity' : true,
 'overlayShow' : true,
 'zoomSpeedIn' : 1000,
 'zoomSpeedOut' : 1000
 });
 $("a.box").fancybox({
 'zoomOpacity' : true,
 'overlayShow' : true,
 'zoomSpeedIn' : 800,
 'zoomSpeedOut' : 800,
 'frameWidth' : 700,
 'zoomSpeedIn' : 0,
 'zoomSpeedOut' : 0,
 'hideOnContentClick' : false
 });
});

// ------------------------------------------------------------------------------------------------------------
			$(document).ready(function(){
				$('.boxgrid.captionfull').hover(function(){
					$(".cover", this).stop().animate({top:'46px'},{queue:false,duration:160});
				}, function() {
					$(".cover", this).stop().animate({top:'66px'},{queue:false,duration:160});
				});
				$('.boxgrid.caption').hover(function(){
					$(".cover", this).stop().animate({top:'35px'},{queue:false,duration:160});
				}, function() {
					$(".cover", this).stop().animate({top:'50px'},{queue:false,duration:160});
				});
			});

