
function mycarousel_initCallback(carousel)
{
	// Disable autoscrolling if the user clicks the prev or next button.
	carousel.buttonNext.bind('click', function() {
		carousel.startAuto(0);
	});

	carousel.buttonPrev.bind('click', function() {
		carousel.startAuto(0);
	});

	// Pause autoscrolling if the user moves with the cursor over the clip.
	carousel.clip.hover(function() {
		carousel.stopAuto();
	}, function() {
		carousel.startAuto();
	});
};
x$(document).ready(function(){
	x$('#show-carousel').jcarousel({
		scroll: 1,
		visible: 3,
		wrap: 'last',
		animation: 'slow',
		initCallback: mycarousel_initCallback
	});
	
	// add custom classes
    x$(".module_text").each(function(){
        var customClass = x$(this).find(".custom_module").attr("class");
        x$(this).addClass(customClass);
    });

    if(x$("div.module_welcome .xg_module_head").length < 1) { x$("div.module_welcome:has('.xg_module_body')").prepend('<div class="xg_module_head"><h2>Welcome to iSeeColor</h2></div>') }
});

centSiteDomain = "www.iseecolor.com";

function get_js_path(url){
	var Pages=new Array('invite','profile','profiles','group','groups','video','chat','photo','blogs','blogpost','events','forum', 'main');
	var x = url.split('/'); 
	if(x[3]){
		for(i in Pages) { if (Pages[i] == x[3]) { return centSiteDomain + '/' + x[3]; } }
		return centSiteDomain + '/undefined';
	} else { return centSiteDomain + '/home'; }
}
js_path = get_js_path(window.location.href);
if (js_path == centSiteDomain + '/home') { citadel_slug = ',Position1' } else { citadel_slug = ''; }
// alert("Path = " + js_path);
OAS_version = 10;
OAS_rn = '001234567890'; OAS_rns = '1234567890';
OAS_rn = new String (Math.random()); OAS_rns = OAS_rn.substring (2, 11);

ts=String.fromCharCode(60);


jQuery(document).ready(function() {
	if(jQuery('div.xg_widget_main_index_index').size() == 0) {
		jQuery(".xg_module").corner("5px");
	} else {
		jQuery("div.xg_widget_main_index_index div.module_video,div.xg_widget_main_index_index div.module_video").corner("bottom 5px");
		jQuery("div.xg_widget_main_index_index div.module_flash").corner("top 5px");
		jQuery(".xg_module").not('.module_welcome,.module_video, .module_flash').corner("5px");
	}
});