/* 
Copyright HKDC Creative Ecologies
All rights reserved
Credits: Site created by pill and pillow

INITIALIZE JQUERY
*/

$(document).ready(function(){
	/*-----Navigation-----*/
	$("div#main_subnav").hkdcNav();
	
	/*-----Fancybox-----*/
	$("a[rel=group]").fancybox({
		'overlayColor'		: '#F48479',
		'overlayOpacity'	: '0.8',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'titlePosition' 	: 'over'
		//'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
		//return '<span id="fancybox-title-over">' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
		//}
	});
	/*
	/*-----Map-----* /
	$("#viewport").mapbox({ 
        mousewheel: true, 
		layerSplit: 8//smoother transition for mousewheel 
	}); 
	$(".map-control a").click(function() {//control panel 
		var viewport = $("#viewport"); 
        //this.className is same as method to be called 
        if(this.className == "zoom" || this.className == "back") { 
            viewport.mapbox(this.className, 1);//step once 
        } 
        else { 
            viewport.mapbox(this.className); 
        } 
		
		if(this.className == "left"){
			viewport.mapbox("left",30);	
		}else if(this.className == "right"){
			viewport.mapbox("right",30);
		}else if(this.className == "up"){
			viewport.mapbox("up",30);
		}else if(this.className == "down"){
			viewport.mapbox("down",30);
		}
		
        return false; 
    }); 
    
    */
});
