
	   $(document).ready(
				function(){
					$(document).pngFix();
					
					$('.slideshow').innerfade({
						speed: 2000,
						timeout: 3500,
						type: 'sequence',
						containerheight: '200px'
					});
					
				


			});

	$(document).ready(function() {
		$("img.reflect").each(function(){
			$(this).load( 
				function(){ 
					$(this).reflect({height: 0.3, opacity: 0.3} );
				} 
			);
		});
		
					$('.changeLang').click(function() { 
						var link = window.location.href;
						if (link.indexOf("/hk/")>-1)
							link = link.replace("/hk/", "/en/");
						else
							link = link.replace("/en/", "/hk/");
						window.location.href = link;
					
					});
					
					$('#bannerLink').click(function() { 
						var link = window.location.href;
						if (link.indexOf("/news/")>-1 || link.indexOf("/product/")>-1)
						{
							link = link.substring(0, link.lastIndexOf("/"));
							link = link.substring(0, link.lastIndexOf("/"));
							link += "/product/product.html";
						}
						else
						{
							link = link.substring(0, link.lastIndexOf("/"));
							link += "/product/product.html";
						}
						window.location.href = link;
					});

		
	});


function changeLang(){
						var link = window.location.href;
						if (link.indexOf("/hk/")>-1)
							link = link.replace("/hk/", "/en/");
						else
							link = link.replace("/en/", "/hk/");
						window.location.href = link;
}


  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-16772875-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
