/*

	mls-design.js
	--------------

	@file 		mls-design.js
	@version 	0.2
	@date 		2010-04-02 13:59:02 +0200 (Fri, 2 Apr 2010)
	@author 	Kreuder <mail@einhalt.net>

	Copyright (c) 2010 e-inhalt.net <http://www.einhalt.net>

*/

$(function(){ 
// Celine
// set defaults (onload)
	var $cel_typ = "c"; // = "cool girl"
	$.cookie("cel_typ", "c");
	var $cel_prod = "Lotion"; // = "Lotion"
	$.cookie("cel_prod", "Lotion");

// nav
$("a#cel_sham").click(function() {
    $.cookie("cel_prod", "Shampoo");
    $("div#p1nav a").removeClass("duscheActive").removeClass("lotionActive");
    $(this).addClass("shampooActive");
    $("div.cel_prod").fadeOut(500);
    var $cel_typ = $.cookie("cel_typ");
    // get "type" cookie
    $("div.prod1Shampoo_" + $cel_typ).fadeIn(500);
    return false;
});
$("a#cel_dusch").click(function() {
    $.cookie("cel_prod", "Dusche");
    $("div#p1nav a").removeClass("shampooActive").removeClass("lotionActive");
    $(this).addClass("duscheActive");
    $("div.cel_prod").fadeOut(500);
    var $cel_typ = $.cookie("cel_typ");
    // get "type" cookie
    $("div.prod1Dusche_" + $cel_typ).fadeIn(500);
    return false;
});
$("a#cel_lot").click(function() {
    $.cookie("cel_prod", "Lotion");
    $("div#p1nav a").removeClass("shampooActive").removeClass("duscheActive");
    $(this).addClass("lotionActive");
    $("div.cel_prod").fadeOut(500);
    var $cel_typ = $.cookie("cel_typ");
    // get "type" cookie
    $("div.prod1Lotion_" + $cel_typ).fadeIn(500);
    return false;
});
// choose type
$("a#cel_typ_c").click(function() {
    // set "Cool Girl" cookie
    $("div#p1nav a.button_typ_p").removeClass("button_typ_active");
    $.cookie("cel_typ", "c");
    $(this).addClass("button_typ_active");
    $("div.cel_prod").fadeOut(500);
    var $cel_prod = $.cookie("cel_prod");
    // get "product" cookie
    $("div.prod1" + $cel_prod + "_c").fadeIn(500);
    return false;
});
$("a#cel_typ_p").click(function() {
    // Prinzessin
    $("div#p1nav a.button_typ_c").removeClass("button_typ_active");
    $.cookie("cel_typ", "p");
    $(this).addClass("button_typ_active");
    $("div.cel_prod").fadeOut(500);
    var $cel_prod = $.cookie("cel_prod");
    // get "product" cookie
    $("div.prod1" + $cel_prod + "_p").fadeIn(500);
    return false;
});


// Frida
// set defaults (onload)
	var $fri_typ = "c"; // = "cool girl"
	$.cookie("fri_typ", "c");
	var $fri_prod = "Lotion"; // = "Lotion"
	$.cookie("fri_prod", "Lotion");

// nav
$("a#fri_sham").click(function() {
    $.cookie("fri_prod", "Shampoo");
    $("div#p2nav a").removeClass("duscheActive").removeClass("lotionActive");
    $(this).addClass("shampooActive");
    $("div.fri_prod").fadeOut(500);
    var $fri_typ = $.cookie("fri_typ");
    // get "type" cookie
    $("div.prod2Shampoo_" + $fri_typ).fadeIn(500);
    return false;
});
$("a#fri_dusch").click(function() {
    $.cookie("fri_prod", "Dusche");
    $("div#p2nav a").removeClass("shampooActive").removeClass("lotionActive");
    $(this).addClass("duscheActive");
    $("div.fri_prod").fadeOut(500);
    var $fri_typ = $.cookie("fri_typ");
    // get "type" cookie
    $("div.prod2Dusche_" + $fri_typ).fadeIn(500);
    return false;
});
$("a#fri_lot").click(function() {
    $.cookie("fri_prod", "Lotion");
    $("div#p2nav a").removeClass("shampooActive").removeClass("duscheActive");
    $(this).addClass("lotionActive");
    $("div.fri_prod").fadeOut(500);
    var $fri_typ = $.cookie("fri_typ");
    // get "type" cookie
    $("div.prod2Lotion_" + $fri_typ).fadeIn(500);
    return false;
});
// choose type
$("a#fri_typ_c").click(function() {
    // set "Cool Girl" cookie
    $("div#p2nav a.button_typ_p").removeClass("button_typ_active");
    $.cookie("fri_typ", "c");
    $(this).addClass("button_typ_active");
    $("div.fri_prod").fadeOut(500);
    var $fri_prod = $.cookie("fri_prod");
    // get "product" cookie
    $("div.prod2" + $fri_prod + "_c").fadeIn(500);
    return false;
});
$("a#fri_typ_p").click(function() {
    // Prinzessin
    $("div#p2nav a.button_typ_c").removeClass("button_typ_active");
    $.cookie("fri_typ", "p");
    $(this).addClass("button_typ_active");
    $("div.fri_prod").fadeOut(500);
    var $fri_prod = $.cookie("fri_prod");
    // get "product" cookie
    $("div.prod2" + $fri_prod + "_p").fadeIn(500);
    return false;
});

// Jaqueline
// set defaults (onload)
	var $jaq_typ = "p"; // = "cool girl"
	$.cookie("jaq_typ", "p");
	var $jaq_prod = "Dusche"; // = "Dusche"
	$.cookie("jaq_prod", "Dusche");

// nav
$("a#jaq_sham").click(function() {
    $.cookie("jaq_prod", "Shampoo");
    $("div#p3nav a").removeClass("duscheActive").removeClass("lotionActive");
    $(this).addClass("shampooActive");
    $("div.jaq_prod").fadeOut(500);
    var $jaq_typ = $.cookie("jaq_typ");
    // get "type" cookie
    $("div.prod3Shampoo_" + $jaq_typ).fadeIn(500);
    return false;
});
$("a#jaq_dusch").click(function() {
    $.cookie("jaq_prod", "Dusche");
    $("div#p3nav a").removeClass("shampooActive").removeClass("lotionActive");
    $(this).addClass("duscheActive");
    $("div.jaq_prod").fadeOut(500);
    var $jaq_typ = $.cookie("jaq_typ");
    // get "type" cookie
    $("div.prod3Dusche_" + $jaq_typ).fadeIn(500);
    return false;
});
$("a#jaq_lot").click(function() {
    $.cookie("jaq_prod", "Lotion");
    $("div#p3nav a").removeClass("shampooActive").removeClass("duscheActive");
    $(this).addClass("lotionActive");
    $("div.jaq_prod").fadeOut(500);
    var $jaq_typ = $.cookie("jaq_typ");
    // get "type" cookie
    $("div.prod3Lotion_" + $jaq_typ).fadeIn(500);
    return false;
});
// choose type
$("a#jaq_typ_c").click(function() {
    // set "Prinzessin" cookie
    $("div#p3nav a.button_typ_p").removeClass("button_typ_active");
    $.cookie("jaq_typ", "c");
    $(this).addClass("button_typ_active");
    $("div.jaq_prod").fadeOut(500);
    var $jaq_prod = $.cookie("jaq_prod");
    // get "product" cookie
    $("div.prod3" + $jaq_prod + "_c").fadeIn(500);
    return false;
});
$("a#jaq_typ_p").click(function() {
    // Prinzessin
    $("div#p3nav a.button_typ_c").removeClass("button_typ_active");
    $.cookie("jaq_typ", "p");
    $(this).addClass("button_typ_active");
    $("div.jaq_prod").fadeOut(500);
    var $jaq_prod = $.cookie("jaq_prod");
    // get "product" cookie
    $("div.prod3" + $jaq_prod + "_p").fadeIn(500);
    return false;
});


// Set defaults:
// Typ
	$("div#p1nav a.button_typ_c").addClass("button_typ_active");
	$("div#p2nav a.button_typ_c").addClass("button_typ_active");
	$("div#p3nav a.button_typ_p").addClass("button_typ_active");
// Product
	$("div#p1nav a.navLotion").addClass("lotionActive");
	$("div#p2nav a.navShampoo").addClass("shampooActive");
	$("div#p3nav a.navDusche").addClass("duscheActive");
});
