/* 
Photo Gallery function
-----------------------------------------------------------------------------------------
HTML Path: /asia/products/featured/loader/wheel/zw/gallery/index.html
JavaScript Path: /asia/js/products/featured/loader/wheel/zw/gallery/load_functions.js;
-----------------------------------------------------------------------------------------
*/

function getPrototype(){
	var 
		ve = navigator.appVersion.toLowerCase(),
		ua = navigator.userAgent.toLowerCase(),
		is = function(t){ return ua.indexOf(t) != -1; },
		val = ((/opera/i.test(ua))&&(/^[1-7]/i.test(ve))||
			(/msie 5.0/i.test(ve))||(/netscape[4-6]/i.test(ua))|| is("mac")&&(/msie/i.test(ve)))? false : true;
	return val;
}

var jsfile = new Array(
	"/asia/js/products/featured/loader/wheel/zw/common/prototype-effects.js",
	"/asia/js/products/featured/loader/wheel/zw/gallery/functions.js");

var jsfiles = {
	require: function(libraryName) {
		document.write("<script type=\"text/javascript\" src=\"" + libraryName + "\"><\/script>");
	},
	load: function(){
		for(var i=0,f=jsfile.length ; i<f ; i++){
			if(getPrototype()){
				jsfiles.require(jsfile[i]);
			}
		}
	}
}
jsfiles.load();

var setPrototypeCls = function(){
	var hs = document.getElementsByTagName('html')[0],
		cls = (getPrototype())? " prototype" : "";
	hs.className += cls;
}();
