$(document).ready(function() {

	$(".windowimage").colorbox({photo:true});
	$(".windowflash").colorbox();
	$(".windowpage").colorbox({iframe:true, innerWidth:900, innerHeight:506});
	$(".windowvimeo").colorbox({iframe:true, innerWidth:818, innerHeight:468});
	$("#mac-instructions").colorbox({iframe:true, height:400, width:650});
	$("#pre").prepend('<span class="highlight1">HDR Light Studio:</span> ');
	$("#region_go").remove();
	$("#region").change(function() {
		var selection = $(this).val();
		if (selection > 0) {
			var reseller_list = $("#reseller_list");
			reseller_list.empty().html('<div id="ajax-loader"><img src="/asset/image/ajax-loader.gif" width="220" height="19" alt="Loading..." /></div>');
			reseller_list.load("/buy.htm?region="+selection+"&ajax=1", function() { reseller_list.hide().fadeIn("slow") });
		}
	});

	if (window.location.href.indexOf("#") != -1) {
		var myimg = window.location.href.split("#");
		$("#"+myimg[1]).trigger('click');
	}

	$("#placeholder").cycle();

	$("input,select").focus(function() {
		$(this).next("span.errornote").fadeOut("fast");
	});

});



var _gaq = _gaq || [];
 _gaq.push(['_setAccount', 'UA-4623554-9']);
 _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);
 })(); 

