$(function(){
	$('a[rel=lightbox]').lightBox({fixedNavigation:false});
	$('a[rel=window]').live("click",function(){
		var url = $(this).attr("href");
		window.open(url,'','')
		return false;
	});

	$("#mycarousel").jcarousel({
//		wrap: 'circular',
		easing: 'easeOutQuart',
		scroll: 3
	});

	$("input[rel=magazine]").click(function(){
		if($(this).attr("checked") == true){
			$(this).parent().parent().css("background-color","#E4FFB0");
		}else{
			$(this).parent().parent().css("background-color","transparent");
		}
	});

	$("label.girlmagazineLabel").click(function(){
		if($("input[rel=magazine]",this).attr("checked") == true){
			$("input[rel=magazine]",this).removeAttr("checked");
			$(this).parent().css("background-color","transparent");
		}else{
			$("input[rel=magazine]",this).attr("checked","checked");
			$(this).parent().css("background-color","#E4FFB0");
		}
	});

	$("a[rel=girlWindow]").click(function(){
		var url = $(this).attr("href");
		window.open(url,'girl','width=990,height=750,status=1,menubar=0,scrollbars=1,resizable=0');
		
		return false;
	});

	$("a[rel=photolink]").live("click",function(){
		var photourl = $(this).attr("href");

		$.ajax({
			type: "get",
			url: photourl,
			cache: false,
			beforeSend: function(){
				$("#mailBox").html("<img src='/img/loading.gif' />");
			},
			dataType: "html",
			success: function(data){
				$("#mailBox").show().html(data);
			}
		});

		return false;
	});


});
