﻿//panels
var currentContent = 'home';   //always load w/home content
var products = '<div id="simplegallery1"></div>';

var about = "<div id='aboutDiv'><p style='padding-top: 60px;'>2 fresh threads is the vision of 2 fresh ladies with a love of color and scrumptious design.</p><p>tracy and christina, each with a background in art and graphic design, took their oh so fresh ideas to their sewing machines (each using a hand-me-down machine from their uber talented mothers). with that,<br />2 fresh threads was born.</p><p>pairing fresh fabrics together to create items that are as fashionable as they are functional, each item is handmade by the ladies (and sometimes the help of a few of their favorite people).</p><p>each fresh item is made with care and attention to detail in hopes of pleasing even the most particular of customers.</p><p>enjoy your threads!</p></div>";
var home = '<img src="images/home/homePage528x353.jpg" alt="fresh fabrics at 2 fresh fhreads!" />';

var contact = "<div id='contactDiv'><p>questions, comments, ordering?<br>don't hesitate to contact us:<br /><br /><span style='color:#417f8a;'>2 fresh threads</span><br />po box 3083<br />portland, maine 04104<br />p. 207.317.1536<br />e. <a class='contact' href='mailto:info@2freshthreads.com'>info@2freshthreads.com</a></p></div>";


$(document).ready(function() {

    

    //turn home blue
    $('#home').addClass('selected');

    //set up toggle for product list
    //    $('#products').click(function() {
    //        $('#productList').toggle('slow');
    //    });

    //set up clicks
    $('.navList li').click(function() {
        if (currentContent != $(this).attr("id"))  //are we already showing this content?
        {
            //change any items that are colored to white
            $('.navList li').removeClass('selected');

            //replace the contents and color the item that was clicked
            //note the ids of each element match the variable names above
            $('#rightCol').html(eval($(this).attr("id")));
            $(this).addClass('selected');

            //this loads the simple gallery if products was clicked
            //note, this can only be fired after the div has been loaded on the page.
            if ($(this).attr('id') == 'products') {
                sg();
            }
            //            else //if products wasn't selected, hide the product list if it's viewable
            //            {
            //                if ($('#productList').is(':visible'))
            //                    $('#productList').hide('slow');
            //            }

            //reset currentContent
            currentContent = $(this).attr("id");
        }

    }); //end of click



});   //end of document.ready


//used for header image - this should be better handled, but time is of the essence right now.
function goHome() {
    //change any items that are colored to white
    $('.navList li').removeClass('selected');
    
    //turn home white
    $('#home').addClass('selected');
    
    $('#rightCol').html(home);
}