// JavaScript Document

$(document).ready(function () {
	
	
	/*--HIDE THE CONTACT PANEL--*/
	$("#contact-panel").hide();
	
	/*--TOGGLE THE CONTACT PANEL--*/
	$("#contact-button").click(function () {
      $("#contact-panel").slideToggle("slow");
    });
	
	
	/*--POPULATE SAMPLES FROM JSON--*/
			/* var qt_root = "vid/qt/";
			 var flv_root = "vid/flv/";
			 
            $.getJSON("page-data.json",
                function(data){
					$.each(data.samples_data, function(i,item){
							
							var sample=data.samples_data[i];
							var w = sample.w;
							var h = sample.h;
							var qt = sample.qt_link;
							var flv = sample.flv_link;
							var t = sample.img_thumb;
							var t_alt = sample.thumb_alt;
							var n = sample.spot_name;
							var c = sample.client;
							var l = sample.spot_length;
							
							if (i+1 > 9){
								var num="." + (i+1);
							} else {
								var num=".0" + (i+1);
							}
													   
						   $("#content-col").append(
													
													'<div class="content-item"><a href="' + qt_root + qt + '" rel="shadowbox;height=' + h + ';width='+ w +'" title="' + c + ' – ' + n + ';"><img class="thumb" src="' + t + '" width="320" height="180" alt="' + t_alt + '" /></a><div class="num">' + num + '</div><br/><h1>' + c + '</h1><h2>' + n + '<br/>' + l + '</h2><a href="' + qt_root + qt + '" rel="shadowbox;height=' + h + ';width=' + w + '" title="' + n + ' – ' + n + '">Quicktime</a><a href="' + flv_root + flv + '" rel="shadowbox;height=' + h +' ;width=' + w + '" title="' + c + ' – ' + n + '">Flash</a></div>'
													)});
                });*/
	/*--POPULATE SAMPLES FROM JSON--*/
	
	
	
	
	
	
	
	
	
	
	
	/*--TOOLTIP FUNTIONS--*/
	/*$(".tooltip").hover(
			function() { $(this).contents("span:last-child").css({ display: "block" }); },
			function() { $(this).contents("span:last-child").css({ display: "none" }); }
		);
	$(".tooltip").mousemove(function(e) {
		var mousex = e.pageX + 10;
		var mousey = e.pageY + 5;
		$(this).contents("span:last-child").css({  top: mousey, left: mousex });
	});*/
	
	
	
	 
});




