$(function(){




// This is the Click Class and linking for the Design Page //


$(".detail-image").hide();
$(".infoBox").hide();
$(".itemText").hide();
$(".sample-project-detail").hide();


$("#pd2").hide();

$("img#art1-detail").show();
$("#art1-info").show();
$("#info-item1-txt").show();
$("#info-item1").addClass("hover");


$('<div class="infoBtn">INFO</div>').insertBefore('div.name');

$('img.clickClass').bind('click', function() {
  
  	if (!$(this).hasClass("hover")) {


	var thisId = $(this).attr('id');
	var infoId = thisId + '-info';
	var imageId = thisId + '-detail';
	
	$('.clickClass').removeClass('hover');
	$(this).addClass('hover');
	
	$('.detail-image').each(function () {
		$(this).hide();
	});
	
	$('.infoBox').each(function () {
		$(this).hide();
	});
		
	$(".areaCopy-contest").hide();

	$("#" + infoId).show('fade', 500);

	$("#" + imageId).show('fade', 1200);


 }
});





$('div.location').bind('click', function() {
  	$('div.artpanel').show();
	$('div.infoBtn').removeClass('hover');
	$('div.name').removeClass('liver');
	$("div.location").hide();

});



$('div.infoBtn').bind('click', function() {
  	$(this).parent().find('div.name').toggleClass("liver");
  	$('div.artpanel').toggle();
  	$('div.artpanel').toggleClass("active");
	$(this).toggleClass('hover');
	$(this).parent().find("div.location").toggle();

});


$('div.srvcBtn').bind('click', function() {
 
  	if (!$(this).hasClass("hover")) {


	var thisId = $(this).attr('id');
	var infoTxtId = thisId + '-txt';
	
	$('.srvcBtn').removeClass('hover');
	$(this).addClass('hover');
	
	$('.itemText').each(function () {
		$(this).hide();
	});
	
	$("#" + infoTxtId).show('fade', 500);



 }
});





$('div.sampleBtn').bind('click', function() {
  	$('div.sample-project-text').toggle();
  	$('#pd1').toggle();
  	$('#pd2').toggle();
  	$('div.sample-project-detail').toggle();
	$(this).toggleClass('slider');
});

$('div.stdBtn').bind('click', function() {
		$('div.sampleBG').toggleClass('activor');	
		$('div.stdBtn').toggle();	
		$(this).toggle();
		$(this).toggleClass('hover');
		$(this).find("span.followTxt").toggle();
		
});




$('div.artFeature img').bind('click', function() {
	var imgId = $(this).attr("src");
	$('img.detail-image').colorbox({href:imgId});
});





});




