// JavaScript Document
$(document).ready(function(){
						   
						   
$(".subMenu ul").hide();

	$(".subLevel").hover(function(){
		$(this).find("ul").eq(0).show();
		$(this).find("a").eq(0).css({'background':'url(images/hoverBgPink.png) no-repeat -5px top','color':'#fff'})
	},function(){
		$(this).find("ul").eq(0).hide();
		$(this).find("a").removeAttr('style');
	});

	var imgPath;
	$(".overImg").hover(function(){
	  imgPath = ($(this).attr("src")).split(".");
	  $(this).attr("src",imgPath[0]+'-over.jpg') 	
	},function(){
	  $(this).attr("src",imgPath[0]+'.jpg') 		
	})
	
	
	$(".scroll").hover(function(){
		coords = ($(this).attr("coords")).split(",");
		$("#services").css({	
			'margin-left':Number(coords[0])-10,
			'margin-top':Number(coords[1])-9,
			'z-index':'99',
			'clip':'rect(0px,'+eval(Number(coords[2]-coords[0])+20)+'px,30px,0px)'
			});
		$("#services").show();
    },function(){
		$("#services").hide().removeAttr('style');
	})




	
	
	
	
$(".slider li").live('click',function(){
  imgPath = ($(this).find("img").attr("src")).split("-");
  $("#showcase").attr('src',imgPath[0]+'.jpg').hide().fadeIn();;  
})

$("#prdShowCaseIcon li img").click(function(){									
	index = $("#prdShowCaseIcon li img").index(this);
	$("#prdBannerShow").attr('src','../images/metImg-'+eval(index+1)+'.jpg')										
})


$("#prdShowCaseIcon1 li img").click(function(){									
	index = $("#prdShowCaseIcon1 li img").index(this);
	$("#prdBannerShow").attr('src','../images/LocIt-Main-0'+eval(index+1)+'.jpg')										
})


 $(".scroll").click(function(event){
	        event.preventDefault();
	        var full_url = this.href;
	        var parts = full_url.split("#");
	        var trgt = parts[1];
	        var target_offset = $('a[name='+trgt+']').offset();
	        var target_top = target_offset.top;
	        $('html, body').animate({scrollTop:target_top}, 500);
	    });





$("#prd div").hover(function(){
 $(this).find('a').animate({backgroundPosition:'0px 0'},{queue: false, duration: 600} )						 							 
},function(){
  $(this).find('a').animate({backgroundPosition:'-300px 0'},{queue: false, duration: 600 })	
})


$("#prd div").click(function(){
  index = $(this).index();
  switch (index){
	case 0:
	window.location.replace("whoWeAre.html");
	break;
	case 1:
	window.location.replace("whereWeCanHelp.html");
	break;
	case 2:
	window.location.replace("gallery.html");
	break;
	}						 
})

})



