
$(document).ready(function() {

	// dropdown chrome effect	
	//Default Action
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content_main").show(); //Show first tab content
	
	//On Click Event
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});
	
	// colorbox for stone images
	$("a[rel='colorboximage']").colorbox({transition:"none", width:"75%", height:"75%"});
	$(".colorboxiframe1").colorbox({width:"40%", height:"580px", iframe:true});

});

			// jc - zoom in/out funtion
			function findDOM(objectId) {
				if (document.getElementById) {
					return (document.getElementById(objectId));
				}
				if (document.all) {
					return (document.all[objectId]);
				}
			}
			function zoom(type,imgx) {
				imgd = findDOM(imgx);
				if (type=="x" && imgd.width < 1000) {
					imgd.width = 900;
					imgd.height = 900;
					
				}
				if (type=="o" && imgd.width > 370) {
					imgd.width = 400;
					imgd.height = 400;
				}
			}
			// print functions
			function findimgID(objectId){
				if (document.getElementById) {
					return (document.getElementById(objectId).src);
				}
				if (document.all) {
					return (document.all[objectId]);
				}
			}
			function imgtoprint(imgx) {
				imgd = findimgID(imgx);
				imgd = imgd.replace("http://","");
				window.open("http://www.thegembank.com/wp-content/plugins/wp-e-commerce/js/printimage.php?imgsrc="+imgd,"toprint","width=10,height=10,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no");
			}		
