

var preloadFlag = false;
function preloadImages() {
    if (document.images) {
        navindex = newImage("./img/home_on.gif");
        navabout = newImage("./img/about_on.gif");
        navpricing = newImage("./img/pricing_on.gif");
        navstyles = newImage("./img/styles_on.gif");
        navordnow = newImage("./img/ordernow_on.gif");
        navordnow2 = newImage("./img/ordernow_on.gif");
        navfaq = newImage("./img/faq_on.gif");
        navcontact = newImage("./img/contact_on.gif");
	
        product_choice_canvas = newImage("./img/product_choice_canvas_on.jpg");
        product_choice_acrylic = newImage("./img/product_choice_acrylic_on.jpg");
        product_choice_paper = newImage("./img/product_choice_paper_on.jpg");
        product_choice_download = newImage("./img/product_choice_download_on.jpg");
        product_choice_metal = newImage("./img/product_choice_metal_on.jpg");
        badge_styles_pricing_hover = newImage("./img/badge_styles_pricing_hover.gif");
        lounge_hover = newImage("./img/lounge_hover.gif");
        badge_acrylic_ice_hover = newImage("./img/badge_acrylic_ice_hover.gif");
        gift_boxes_hover = newImage("./img/gift_boxes_hover.gif");
        product_choice_canvas = newImage("./img/product_choice_canvas.jpg");
        triangle = newImage("./img/yellow_triangle.png");
        preloadFlag = true;
    }
}


function pageLoad() {
    preloadImages();
}

function newImage(arg) {
    if (document.images) {
        rslt = new Image();
        rslt.src = arg;
        return rslt;
    }
}

function changeImages() {
    if (document.images && (preloadFlag == true)) {
        for (var i=0; i<changeImages.arguments.length; i+=2) {
            document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
        }
    }
}

function scrollDown(elementId) {
      
    $('html,body').animate({
        scrollTop: $("#"+elementId).offset().top
    }, 500);
}


function loading () {
    $('.content-home').load('styles/loading',function(){
       
        });
}
function formevent() {
    $("input,textarea,select").focusin(function(){
        $(this).css("border-color","#FF6900");
    });
    $("input,textarea,select").focusout(function(){
        $(this).css("border-color","#8F8F8F");
    });
    $("#sbm_btn").mousedown(function(){
     
        $("#sbm_btn").css({
            "background-color":"#FF6900",
            "top":"1px"
        });
        
    });
}
function faq (){
    // FAQ slider
    
    $(".nav-faq h2").click(function(){
       
        var s = $(this).next('.faq-block');   
        $(".nav-faq .faq-block").not(s).hide();
        s.toggle();



    });
    
    $(".nav-faq em").click(function(){
       
        var a = $(this).nextAll('div:eq(0)');    
        //$(".nav-faq div").not(s).hide();
        a.toggle();



    });
}

function lightboxload () {
    $('.image-view a').lightBox({
        fixedNavigation:true
    }); 
}
function validator () {
    $("#contact").validate({
        rules: {
            firstname: 
            {
                required: true
            },
            phone:
            {             
                required: true
            },
            email:
            {   
                email: true,
                required: true
                    
            },
            comments:   {
                required: true
            },
            how:        {
                required: true
            },
            captcha:    {
                required: true
            }
        }
   
    });
    $("#contact2").validate({
        rules: {
            firstname: 
            {
                required: true
            },
            phone:
            {             
                required: true
            },
            email:
            {   
                email: true,
                required: true
                    
            },
            comments:   {
                required: true
            },
            how:        {
                required: true
            },
            captcha:    {
                required: true
            }
        }
   
    });
}
$(function(){

 
    //Style picker begins 
   
    //this array contains all styles with titles, about info etc
    stylePicker = {
        0:{
            title:"BEAM",
            pictures:{
                1:{
                    title:"beams_blue_modern_art.jpg",
                    alt:"Blue Beams Modern DNA Art",
                    src:"beams_blue.jpg",
                    info:"Beam Blue",
                    about:"Want to brighten up a dark room? This picture in shades of blue and white will work its magic in no time."
                },
                2:{
                    title:"beams_pink_personalised_gift.jpg",
                    alt:"Pink Beams Personalised DNA Art",
                    src:"beams_pink.jpg",
                    info:"Beam Pink",
                    about:"How can you add a touch of cool to a girl's room? With the Pink Beams DNA Art of course! It's guaranteed to fit right in."
                },
                3:{
                    title:"beam_red_unusual_gifts.jpg",
                    alt:"Red Beams Unusual Gifts",
                    src:"beams_red.jpg",
                    info:"Beam Red",
                    about:"This picture looks perfect just above a fireplace or on a wall that's painted in a pastel shade. Vibrant yet classy."
                },
                4:{
                    title:"beams_green_modern_wall_art.jpg",
                    alt:"Green Beams Modern Wall Art",
                    src:"beams_green.jpg",
                    info:"Beam Green",
                    about:"Don't dread shopping for your friend's birthday present. Give him a unique DNA Art piece and he'll be over the moon."
                },
                5:{
                    title:"beams_cyan_cool_art.jpg",
                    alt:"Cyan Beams Cool DNA Art",
                    src:"beams_cyan.jpg",
                    info:"Beam Cyan",
                    about:"A modern wall art style with a unique twist for your corporate office. Guaranteed to look great in the visitor's lounge!"
                },
                6:{
                    title:"beams_yellow_unique_gifts.jpg",
                    alt:"Yellow Beams Unique Gifts",
                    src:"beams_yellow.jpg",
                    info:"Beam Yellow",
                    about:"Want to brighten up your kitchen but not sure how? Place this brilliant yellow artwork on your walls for a super modern look!"
                }
            }
        },
        1:{
            title:"CITY LIGHTS",
            pictures:{
                1:{
                    title:"city_lights_blue_corporate_gifts.jpg",
                    alt:"Blue City Lights Corporate Gifts",
                    src:"city_lights_blue.jpg",
                    info:"City Lights Blue",
                    about:"Bring the city home with you with this fantastic DNA Art. With clear visible bands in shades of blue and white, this will look great up on your study wall."
                },
                2:{
                    title:"city_lights_cyan_corporate_art.jpg",
                    alt:"Cyan City Lights Corporate Art",
                    src:"city_lights_cyan.jpg",
                    info:"City Lights Cyan",
                    about:"Want a DNA Art which will stand out for all the right reasons? Let these city lights show you how."
                },
                3:{
                    title:"city_lights_gold_abstract_art.jpg",
                    alt:"Gold City Lights Abstract Art",
                    src:"city_lights_gold.jpg",
                    info:"City Lights Gold",
                    about:"Gold isn't just gorgeous as jewellery; it can make a room look warm and inviting too. And this Art promises never to go overboard."
                },
                4:{
                    title:"city_lights_green_abstract_canvas_art.jpg",
                    alt:"Green City Lights Abstract Canvas Art",
                    src:"city_lights_green.jpg",
                    info:"City Lights Green",
                    about:"If you're a nature lover, then this DNA Art is perfect for you. Put it up in your bedroom and be soothed by its colours."
                },
                5:{
                    title:"city_lights_pink_contemporary_art.jpg",
                    alt:"Pink City Lights Contemporary Art",
                    src:"city_lights_pink.jpg",
                    info:"City Lights Pink",
                    about:"Pink can look great on the walls without looking tacky. And if you're a big pink fan, then this one's for you."
                },
                6:{
                    title:"city_lights_red_modern_art_prints.jpg",
                    alt:"Red City Lights Modern Art Prints",
                    src:"city_lights_red.jpg",
                    info:"City Lights Red",
                    about:"For those who like glamour with a touch of class, this DNA Art is for you. It's guaranteed to add the right air of mystique to a room."
                }
            }
        },
        2:{
            title:"DARK SPACE",
            pictures:{
                1:{
                    title:"dark_space_blue_online_art.jpg",
                    alt:"Blue Dark Space Online Art",
                    src:"dark_space_blue.jpg",
                    info:"Dark Space Blue",
                    about:"It's the ideal DNA Art for those who like artwork that's bolder and darker. Just right for putting up in the library as well."
                },
                2:{
                    title:"dark_space_cyan_wall_art.jpg",
                    alt:"Cyan Dark Space Wall Art",
                    src:"dark_space_cyan.jpg",
                    info:"Dark Space Cyan",
                    about:"Want an eye-catching artwork for your kitchen? This one will add just the right play of colours to your walls."
                },
                3:{
                    title:"dark_space_green_modern_art.jpg",
                    alt:"Green Dark Space Modern DNA Art",
                    src:"dark_space_green.jpg",
                    info:"Dark Space Green",
                    about:"Love all things techno? It's time to come out and celebrate your taste with this awesome DNA Art."
                },
                4:{
                    title:"dark_space_orange_unique_gifts.jpg",
                    alt:"Orange Dark Space Unique Gift",
                    src:"dark_space_orange.jpg",
                    info:"Dark Space Orange",
                    about:"Place this DNA Art on a wall and an illusion of glowing embers is created instantly. Eye-catching and vibrant."
                },
                5:{
                    title:"dark_space_purple_cool_art.jpg",
                    alt:"Purple Darl Space Cool Art",
                    src:"dark_space_purple.jpg",
                    info:"Dark Space Purple",
                    about:"If you love purple, then this should be your choice. Interspersed with shades of black, this artwork isn't too dull or too bright for your walls."
                },
                6:{
                    title:"dark_space_red_modern_wall_art.jpg",
                    alt:"Red Dark Space Modern Gift",
                    src:"dark_space_red.jpg",
                    info:"Dark Space Red",
                    about:"If you have dark coloured walls, add a dash of panache to them with this gorgeous DNA Art. It blends in effortlessly and creates just the right impact."
                },
                7:{
                    title:"dark_space_yellow_modern_wall_art.jpg",
                    alt:"Yellow Dark Space Modern Wall Art",
                    src:"dark_space_yellow.jpg",
                    info:"Dark Space Yellow",
                    about:"If you love yellow, then get rid of that picture of sunflowers and replace it with this DNA Art that's both modern and fun. Plus, it's distinctly you!"
                }
            }
        },
        3:{
            title:"EMBOSS",
            pictures:{
                1:{
                    title:"emboss_blue_corporate_gifts.jpg",
                    alt:"Blue Emboss Corporate Gifts",
                    src:"emboss_blue.jpg",
                    info:"Emboss Blue",
                    about:"Want the right artwork for your office walls? This one in shades of blue and white creates just the right impression."
                },
                2:{
                    title:"emboss_blue_inverse_corporate_art.jpg",
                    alt:"Blue Inverse Emboss Corporate Art",
                    src:"emboss_blue_inverse.jpg",
                    info:"Emboss Blue Inverse",
                    about:"With just the right play of light and dark shades, this artwork is right at home on a wall of any colour. Perfect for the study too!"
                },
                3:{
                    title:"emboss_orange_abstract_art.jpg",
                    alt:"Orange Emboss Abstract Art",
                    src:"emboss_orange.jpg",
                    info:"Emboss Orange",
                    about:"Shades of orange, white and brown come together in this artwork that's ideal for gifting dad on his birthday."
                },
                4:{
                    title:"emboss_orange_inverse_abstract_canvas_art.jpg",
                    alt:"Orange Inverse Emboss Abstract Canvas Art",
                    src:"emboss_orange_inverse.jpg",
                    info:"Emboss Orange Inverse",
                    about:"Show your team your distinct stylish side with this artwork in shades of orange, white and brown. It's all that's missing in your office!"
                },
                5:{
                    title:"emboss_pink_contemporary_art.jpg",
                    alt:"Pink Emboss Contemporary Art",
                    src:"emboss_pink.jpg",
                    info:"Emboss Pink",
                    about:"Gift one to your sister and we guarantee she'll be thrilled. It's colourful, modern and artistic- all in one."
                },
                6:{
                    title:"emboss_pink_inverse_contemporary_wall_art.jpg",
                    alt:"Pink Inverse Emboss Contemporary Wall Art",
                    src:"emboss_pink_inverse.jpg",
                    info:"Emboss Pink Inverse",
                    about:"Celebrate your uniqueness with this vibrant artwork in shades of pink, black and white. It creates a distinct and youthful look."
                }
            }
        },
        4:{
            title:"GLOW",
            pictures:{
                1:{
                    title:"glow_brown_modern_art_prints.jpg",
                    alt:"Brown Glow Modern Art Prints",
                    src:"glow_brown.jpg",
                    info:"Glow Brown",
                    about:"Looking for a subtle yet eye-catching DNA Art? You found it! Different shades of brown and white are combined to highlight your uniqueness."
                },
                2:{
                    title:"glow_choc_online_art.jpg",
                    alt:"Choc Glow Online Art",
                    src:"glow_choc.jpg",
                    info:"Glow Choc",
                    about:"Can't get enough of the sweet temptation? Now, add a hint of chocolate to your walls with this arresting DNA Art that makes your room warm and cosy."
                },
                3:{
                    title:"glow_cool_modern_art.jpg",
                    alt:"Cool Glow Modern Art",
                    src:"glow_cool.jpg",
                    info:"Glow Cool",
                    about:"Bring the beauty of the seas and oceans to your home with this art piece. It calms the senses instantly and perks up the room too."
                },
                4:{
                    title:"glow_green_wall_art.jpg",
                    alt:"Green Glow Wall Art",
                    src:"glow_green.jpg",
                    info:"Glow Green",
                    about:"Room looking too dull? All you need is this DNA Art to add the right sparkle to your walls!"
                },
                5:{
                    title:"glow_lightbrown_personalised_gift.jpg",
                    alt:"Light Brown Glow Personalised Gift",
                    src:"glow_light_brown.jpg",
                    info:"Glow Light Brown",
                    about:"If your mom prefers artwork that's easy on the senses, then this one's perfect for gifting her. Plus, it shows her how special you think she is!"
                },
                6:{
                    title:"glow_warm_unusual_gifts.jpg",
                    alt:"Warm Glow Unusual Gifts",
                    src:"glow_warm.jpg",
                    info:"Glow Warm",
                    about:"Add some fire and heat to your walls with this warm DNA Art. With a unique play of fiery shades, this one's guaranteed to spice things up."
                }
            }
        },
        5:{
            title:"GLOWING COLOURS",
            pictures:{
                1:{
                    title:"glowing_colours_blue_cool_art.jpg",
                    alt:"Blue Glowing Colours Cool Art",
                    src:"glowing_colours_blue.jpg",
                    info:"Glowing Colours Blue",
                    about:"Add a funky retro vibe to your walls with this eye-catching DNA Art. Now who said choosing the right look was hard?"
                },
                2:{
                    title:"glowing_colours_brown_unique_gifts.jpg",
                    alt:"Brown Glowing Colours Unique Gifts",
                    src:"glowing_colours_brown.jpg",
                    info:"Glowing Colours Brown",
                    about:"Radiate an aura of style and substance with this brown DNA Art work. It's a perfect fit for your study or for the library too."
                },
                3:{
                    title:"Glowing_colours_light_brown_modern_wall_art.jpg",
                    alt:"Glowing_colours_light_brown_modern_wall_art.jpg",
                    src:"glowing_colours_light_brown.jpg",
                    info:"Glowing Colours Light Brown",
                    about:"Gift this to your girlfriend who's just bought her own apartment. It's guaranteed to win you plenty of brownie points."
                },
                4:{
                    title:"Glowing_colours_reddish_corporate_gifts.jpg",
                    alt:"Reddish Glowing Colours Corporate Gifts",
                    src:"glowing_colours_redish.jpg",
                    info:"Glowing Colours Redish",
                    about:"Display your love for all things red with this great looking piece of art. It enhances the look of your sitting room with such minimal effort."
                },
                5:{
                    title:"glowing_colours_teal_corporate_art.jpg",
                    alt:"Teal Glowing Colours Corporate Art",
                    src:"glowing_colours_teal.jpg",
                    info:"Glowing Colours Teal",
                    about:"Looking for a good gift for your pal? This DNA Artwork lets him know how unique he is and will look great on his walls too!"
                }
            }
        },
        6:{
            title:"LADDERS IN LIGHT",
            pictures:{
                1:{
                    title:"Ladders_in_light_blue_abstract_art.jpg",
                    alt:"Blue Ladders Light Abstract Art",
                    src:"ladders_in_light_blue.jpg",
                    info:"Ladders In Light Blue",
                    about:"If you have an affinity for all things modern and hep, then this DNA Art is just for you. In colours of black and electric blue, it'll make your walls even funkier!"
                },
                2:{
                    title:"Ladders_in_light_gradient_abstract_canvas_art.jpg",
                    alt:"Gradient Ladders Light Abstract Canvas Art",
                    src:"ladders_in_light_gradient.jpg",
                    info:"Ladders In Light Gradient",
                    about:"Confused about what to gift your boss for his birthday? Look no further! This DNA Art will do more than just put a smile on the boss's face."
                },
                3:{
                    title:"ladders_in_light_green_contemporary_art.jpg",
                    alt:"Ladders Light Green Contemporary Art",
                    src:"ladders_in_light_green.jpg",
                    info:"Ladders In Light Green",
                    about:"This DNA Art won't just make your office cubicle brighter; it'll give your little space a sense of individuality too. Can't blame the others for dropping by so often now!"
                },
                4:{
                    title:"Ladders_in_light_orange_contemporary_wall_art.jpg",
                    alt:"Orange Ladders Light Contemporary Wall Art",
                    src:"ladders_in_light_orange.jpg",
                    info:"Ladders In Light Orange",
                    about:"Add a dash of citrus to your bedroom with this delightful DNA Art. With a touch of black to enhance the appeal of the art itself, you'll love waking up to this unique piece."
                },
                5:{
                    title:"Ladders_in_light_red_modern_art_prints.jpg",
                    alt:"Red Ladders Light Modern Art Prints",
                    src:"ladders_in_light_red.jpg",
                    info:"Ladders In Light Red",
                    about:"Red or Black? Now, with DNA Art, you don't have to choose between your favourite colours. Get them both in a single artwork that makes your apartment come alive."
                },
                6:{
                    title:"Ladders_in_light_yellow_online_art.jpg",
                    alt:"Yellow Ladders Light Online Art",
                    src:"ladders_in_light_yellow.jpg",
                    info:"Ladders In Light Yellow",
                    about:"Add a neon- light like aura to your room with this DNA Art. Will also look gorgeous on the tiled wall in the kitchen."
                }
            }
        },
        7:{
            title:"LITH",
            pictures:{
                1:{
                    title:"Lith_black_wall_art.jpg",
                    alt:"Black Lith Wall Art",
                    src:"lith_black.jpg",
                    info:"Lith Black",
                    about:"Should you choose a black artwork or a white one? Why not combine both these classic colours with this DNA Art?"
                },
                2:{
                    title:"Lith_white_modern_art.jpg",
                    alt:"White Lith Modern Art",
                    src:"lith_white.jpg",
                    info:"Lith White",
                    about:"Can't get enough of your favourite colours? Wake up feeling on top of the world to this subtle DNA Art piece that's perfect if you prefer classic shades."
                }
            }
        },
        8:{
            title:"MATTE",
            pictures:{
                1:{
                    title:"Matte_brown_personalised_gift.jpg",
                    alt:"Brown Matte personalised Gift",
                    src:"matte_brown.jpg",
                    info:"Matte Brown",
                    about:"Matte brown isn't just for sexy puckers! Just one of these DNA Artworks on a bare wall is enough to infuse colour and radiance in the entire room."
                },
                2:{
                    title:"Matte_burgundy_unusual_gift.jpg",
                    alt:"Burgundy Matte Unusual Gift",
                    src:"matte_burgundy.jpg",
                    info:"Matte Burgundy",
                    about:"The beauty of this artwork lies in its vibrant shade which makes a pastel coloured wall come alive. You really don't need any other displays to get attention."
                },
                3:{
                    title:"Matte_purple_cool_art.jpg",
                    alt:"Purple Matte Cool DNA Art",
                    src:"matte_purple.jpg",
                    info:"Matte Purple",
                    about:"Purple is the colour usually associated with royalty and this artwork in varying shades of purple adds the right note of glamour to any room."
                },
                4:{
                    title:"Matte_teal_unique_gifts.jpg",
                    alt:"Teal Matte Unique Gifts",
                    src:"matte_teal.jpg",
                    info:"Matte Teal",
                    about:"Colleague's birthday coming up? Gift her this great looking DNA Art which is a perfect fit for her office cubicle or apartment."
                }
            }
        },
        9:{
            title:"MOTION",
            pictures:{
                1:{
                    title:"motion_blue_modern_wall_art.jpg",
                    alt:"Blue Motion Modern Wall Art",
                    src:"motion_blue.jpg",
                    info:"Matte Brown",
                    about:"If you like artwork that makes you take a second look, then this one's for you. The little bands look like they are moving!"
                },
                2:{
                    title:"Motion_pink_corporate_gifts.jpg",
                    alt:"Pink Motion Corporate Gifts",
                    src:"motion_pink.jpg",
                    info:"Matte Pink",
                    about:"Have a friend who's a tad fussy about gifts? She won't have any complaints once she receives this eye-catching artwork. Neither will you!"
                },
                3:{
                    title:"motion_red_corporate_art.jpg",
                    alt:"Red Motion Corporate Art",
                    src:"motion_red.jpg",
                    info:"Matte Red",
                    about:"Make your 'mad about science' pal's day by telling he's special with this DNA Art piece. The pretty colours are sure to perk him up every day."
                }
            }
        },
        10:{
            title:"NEON",
            pictures:{
                1:{
                    title:"Neon_brown_abstract_art.jpg",
                    alt:"Brown Neon Abstract Art",
                    src:"neon_brown.jpg",
                    info:"Neon Brown",
                    about:"Looking for modern and unique artwork for your office? You can't go wrong with this DNA Art in a subtle light brown shade that's easy on the senses."
                },
                2:{
                    title:"Neon_green_Abstract_canvas_art.jpg",
                    alt:"Green Neon Abstract Canvas Art",
                    src:"neon_green.jpg",
                    info:"Neon Green",
                    about:"Bring a zen like quality to your room with this work of art. Perfect for putting up on your bedroom wall or library."
                },
                3:{
                    title:"neon_orange_contemporary_art.jpg",
                    alt:"Orange Neon Contemporary Art",
                    src:"neon_orange.jpg",
                    info:"Neon Orange",
                    about:"Want to brighten up your kitchen but not sure how? Why not place this sunflower orange DNA art work on your walls for a lively and modern look?"
                },
                4:{
                    title:"Neon_royal_contemporary_wall_art.jpg",
                    alt:"Royal Neon Contemporary Wall Art",
                    src:"neon_royal.jpg",
                    info:"Neon Royal",
                    about:"Thinking of putting up a wall art which adds just the right amount of colour to your sitting room? Then this one in royal purple is all that you need."
                },
                5:{
                    title:"neon_sky_modern_art_prints.jpg",
                    alt:"Sky Neon Modern Art Prints",
                    src:"neon_sky.jpg",
                    info:"Neon Sky",
                    about:"If you're unsure what to gift your favourite uncle, we suggest this eye-catching wall art in a riveting blue shade. It's guaranteed to look great in any room."
                },
                6:{
                    title:"neon_teal_online_art.jpg",
                    alt:"Teal Neon Online Art",
                    src:"neon_teal.jpg",
                    info:"Neon Teal",
                    about:"If you've got dark coloured furniture, then this is wall art will enhance the overall appeal of your sitting-room. Plus, let the others know how unique you are."
                }
            }
        },
        11:{
            title:"POP ART",
            pictures:{
                1:{
                    title:"Teal Neon Online Art",
                    alt:"Brown Pop Art Wall Art",
                    src:"pop_art_brown.jpg",
                    info:"Pop Art Brown",
                    about:"Looking for artwork to make your walls pop? You found it then! In shades of brown and highlights of white, nothing is more eye-catching."
                },
                2:{
                    title:"pop_art_cool_modern_art.jpg",
                    alt:"Cool Modern Pop Art",
                    src:"pop_art_cool.jpg",
                    info:"Pop Art Cool",
                    about:"Bring the allure of deep blue seas to your bedroom with this enticing DNA Art. It's a great way to make your walls burst with colour."
                },
                3:{
                    title:"Pop_art_green_personalised_gift.jpg",
                    alt:"Green Pop Art Personalised Gift",
                    src:"pop_art_green.jpg",
                    info:"Pop Art Green",
                    about:"Place this artwork on a bare white wall and you'll notice how it lightens up the whole room. Just the ideal gift for loved ones too."
                },
                4:{
                    title:"Pop_art_maroon_unusual_gifts.jpg",
                    alt:"Maroon pop Art unusual Gifts",
                    src:"pop_art_maroon.jpg",
                    info:"Pop Art Maroon",
                    about:"Skip the customary baby gift set for your friend's baby shower and present her this gorgeous DNA Art instead. It's personal and unique at the same time."
                },
                5:{
                    title:"Pop_art_pink_cool_art.jpg",
                    alt:"Pink Cool Pop Art",
                    src:"pop_art_pink.jpg",
                    info:"Pop Art Pink",
                    about:"Thinking of putting up a tasteful wall art for your teenager's room? DNA Art presents breath-taking art pieces that reflect your individuality and which are a great fit for any room."
                },
                6:{
                    title:"pop_art_teal_unique_gifts.jpg",
                    alt:"Teal Pop Art Unique Gifts",
                    src:"pop_art_teal.jpg",
                    info:"Pop Art Teal",
                    about:"Say no to a run of the mill painting and yes to a modern wall art piece with a unique twist for your office. Guaranteed to look great in the visitor's lounge too!"
                },
                7:{
                    title:"pop_art_warm_modern_wall_art.jpg",
                    alt:"Warm Modern Wall Art",
                    src:"pop_art_warm.jpg",
                    info:"Pop Art Warm",
                    about:"Create an illusion of glowing embers on the wall with this art piece. In varying shades of orange and amber highlights, second and third looks are guaranteed."
                }
            }
        },
        12:{
            title:"WARP",
            pictures:{
                1:{
                    title:"warp_blue_corporate_gifts.jpg",
                    alt:"Blue Warp Corporate Gifts",
                    src:"warp_blue.jpg",
                    info:"Warp Blue",
                    about:"Gift one of these to your boyfriend or husband and you'll win plenty of hugs and brownie points. Great way to let him know how unique you think he is!"
                },
                2:{
                    title:"Warp_green_corporate_art.jpg",
                    alt:"Green Warp Corporate Art",
                    src:"warp_green.jpg",
                    info:"Warp Green",
                    about:"Now, you don't have to dread shopping for your friend's birthday. Give her one of these DNA Art pieces and she'll be thrilled."
                },
                3:{
                    title:"warp_orange_abstract_art.jpg",
                    alt:"Orange Warp Abstract Art",
                    src:"warp_orange.jpg",
                    info:"Warp Orange",
                    about:"Chocolate and orange shades merge together to create the perfect DNA Art for your home. Vibrant walls were never this easy!"
                },
                4:{
                    title:"Warp_purple_abstract_canvas_art.jpg",
                    alt:"Purple Warp Abstract Canvas Art",
                    src:"warp_purple.jpg",
                    info:"Warp Purple",
                    about:"This pretty DNA Art in contrasting shades of purple is a great gift to give mom for her birthday. Let her know how unique great moms are!"
                }
            }
        }
    };
    
    
    //To preview images from right side
    function preview(){
        $(".style-picker-preview img").click(function(){
            var temp = $(this).attr("src");
            $(".style-picker-preview img").removeClass("active-pick");
            $(this).addClass("active-pick");
            $(".style-picker-view img").attr("src",temp);
            $(".style-picker-title").text($(this).attr("info"));
            $(".style-picker-about").text($(this).attr("about"));
        });
    }
	
    //Initialization 
    var mply = 0;
    for (var item in stylePicker) {
        $(".style-pick").append('<div class="style-holder"><img class="style-item" objId="'+mply+'" width="101" height="72" src="./img/styles/'+stylePicker[item]['pictures'][1]['src']+'" title="'+stylePicker[item]['pictures'][1]['title']+'" alt="'+stylePicker[item]['pictures'][1]['alt']+'" /><span>'+stylePicker[item]['title']+'</span></div>');
        mply++;
    }
    $(".style-picker-title").text(stylePicker[0]["pictures"][1]["info"]);
    $(".style-picker-view").append('<img class="style-item" width="347" height="249" src="./img/styles/'+stylePicker[0]["pictures"][1]["src"]+'" title="'+stylePicker[0]["pictures"][1]["title"]+'" alt="'+stylePicker[0]["pictures"][1]["alt"]+'"  />');
    $(".style-picker-about").text(stylePicker[0]["pictures"][1]["about"]);
    $(".style-holder:eq(0) img").addClass("active-pick");
    
    for (var item in stylePicker[0]["pictures"]) {
        $(".style-picker-preview").append('<img class="style-item" width="90" about="'+stylePicker[0]["pictures"][item]["about"]+'" info="'+stylePicker[0]["pictures"][item]["info"]+'" height="65" src="./img/styles/'+stylePicker[0]["pictures"][item]["src"]+'" title="'+stylePicker[0]["pictures"][item]["title"]+'" alt="'+stylePicker[0]["pictures"][item]["alt"]+'"/>');
    }
    
    $(".style-picker-preview img:eq(0)").addClass("active-pick");
    
    //UI
    
    preview();
    
    $(".style-holder img").click(function(){
        var temp = $(this).attr("objId");
        $(".style-holder img").removeClass("active-pick");
        $(this).addClass("active-pick");
        $(".style-picker-title").text(stylePicker[temp]['pictures'][1]["info"]);
        $(".style-picker-about").text(stylePicker[temp]['pictures'][1]["about"]);
        $(".style-picker-preview").empty();
        $(".style-picker-preview img").removeClass("active-pick");
        
        for (var item in stylePicker[temp]["pictures"]) {
            $(".style-picker-preview").append('<img class="style-item" about="'+stylePicker[temp]["pictures"][item]["about"]+'" info="'+stylePicker[temp]["pictures"][item]["info"]+'" width="90" height="65" src="./img/styles/'+stylePicker[temp]["pictures"][item]["src"]+'" title="'+stylePicker[temp]["pictures"][item]["title"]+'" alt="'+stylePicker[temp]["pictures"][item]["alt"]+'" />');
       
        }
        
        $(".style-picker-preview img:eq(0)").addClass("active-pick");
        $(".style-picker-view").html('<img class="style-item" width="347" height="249" src="./img/styles/'+stylePicker[temp]["pictures"][1]["src"]+'" />');
        preview(); 
    });
    //End of Style picker
    
   
    $('.image-view a').lightBox({
        fixedNavigation:true
    });
 
    //Price Nav
    
    $(".price-nav span").click(function(){
        var spliter=this.className.split(' ');
        $(".price-nav span").removeClass("active-bar");
        $(this).addClass("active-bar"); 
        $(".nav-stretched-canvas .table-style").hide();
        $("."+spliter[0]+"_content").show();
    });
    
   
    
    
    // Set active menu option function
    var getpath =[];
    var currentPage;
    var realPage;
    
    realPage = document.location.toString().indexOf("?_escaped_fragment_=");
    if (realPage > 0){
        getpath = document.location.toString().split("/");
        currentPage = getpath[getpath.length-1].split("?_escaped_fragment_=");
    
        $("."+currentPage[1]).css("color","#FF9900");

        function hashevent(){
            $(".nav-list a").removeClass("nav-active");
            var gethash = document.location.toString().split("?_escaped_fragment_=");
            var parsenav = ".nav-"+gethash[1];
            var hashclass = ".hash-"+gethash[1];
           
            $(".content-block").find("div").hide();
            $(parsenav).show();  
            $(hashclass).addClass("nav-active");
        }
        hashevent();
        if(currentPage[1]==undefined)
        {
            $(".nav-list a:eq(0)").addClass("nav-active");
            $(".content-block div:eq(0)").show();
        }
        $(window).hashchange( function(){
            hashevent();
        });   
    }
    else{
        getpath = document.location.toString().split("/");
        currentPage = getpath[getpath.length-1].split("#");
        var controller = getpath[getpath.length-1].split("-");
        $("."+currentPage[0]).css("color","#FF9900");

        function hashevent(){
           
            
            $(".nav-list a").removeClass("nav-active");
            var gethash = document.location.hash.toString().split("!");
            var parsenav = ".nav-"+gethash[1];
            var hashclass = ".hash-"+gethash[1];
            
            var request = '';
            
            if(gethash[1]){
                var ajaxreq = $(gethash[1].split("-"));
                $(ajaxreq).each(function(key,arg){
                    request += arg;
                });
            }
            if (!$(parsenav).hasClass('pushed')){
                
                $(parsenav).addClass('pushed');
                $(parsenav).load(controller[0]+'/'+request+'');
                
            }
            $(".content-block").find("div").hide();
            $(parsenav).show();  
            $(hashclass).addClass("nav-active");
            faq ();
            validator();
            lightboxload ();
        }
        hashevent();
        if(currentPage[1]==undefined)
        {
            $(".nav-list a:eq(0)").addClass("nav-active");
            $(".content-block div:eq(0)").show();
        }
        $(window).hashchange( function(){
            faq ();
            validator();
            lightboxload ();
            hashevent();
            formevent();
        });
    }
    
   
});


$(window).load(function() {
    faq ();
    validator();
    lightboxload ();
    formevent();

    //Did you know widget//
    var items=[
    {
        color:"#f1c530",
        img:".banner-moon",
        index:0
    },

    {
        color:"#e7e6e4",
        img:".banner-monkeys",
        index:1
    },

    {
        color:"#b0d76c",
        img:".banner-bananas",
        index:2
    },

    {
        color:"#99ccff",
        img:".banner-dna",
        index:3
    },

    {
        color:"#6be6e4",
        img:".banner-blood",
        index:4
    }];
    
    var curIndex = -1;
    function changeItem(){
        var fadeOutFunction = function(){
            curIndex++;
            curIndex = curIndex >= items.length ? 0 : curIndex;
            var item = items[curIndex];
            var prevItem = items[curIndex-1];
            
            if(prevItem){
                $(prevItem['img']).fadeOut();
            }else{
                $(items[items.length-1]['img']).fadeOut();
            }
                     
            $(item['img']).fadeIn();
            $(".banner-slider").animate({
                backgroundColor:item['color']
            }, 500 );
            $(".banner-slider span:eq("+curIndex+")").fadeIn("500",function(){
                changeItem();
                
            });
        }  
        if(curIndex > -1){
            $(".banner-slider span:eq("+curIndex+")").delay("5000").fadeOut("500",function(){
                fadeOutFunction();            
            });
        }else{
            fadeOutFunction();
        }
    }
    
    changeItem();
    
   
   
    $("#sbm_btn").mouseup(function(){
     
        $("#sbm_btn").css({
            "background-color":"#FF9900",
            "top":"0"
        });
        
    });
    
    $(".nav li").hover(function(){
        $(".subnav").hide();
        $(this).find(".subnav").show();
    },function(){
        
        $(".subnav").hide();
    });


    // Get the contents of the #slider div, and find all
    // nodes of type ID 8 (comments).  Replace the first
    // comment with the data from inside the comment.
    $('#slider').contents().filter( function () {
        return this.nodeType == 8;
    } ).replaceWith( function () {
        return $(this)[0].data;
    } );
    $('#slider').nivoSlider({
        animSpeed:500, // Slide transition speed
        pauseTime:6000, // How long each slide will show
        controlNav:false, // 1,2,3... navigation
        pauseOnHover:true
    });
});



function doCreatePlan()        
{
   
    var name = $("#name").val();
    var amount = $("#amount").val();
    var users = $("#users").val();
    var forms = $("#forms").val();
    var fields = $("#fields").val();
    var entries = $("#entries").val();
    var storage = $("#storage").val();
    var ssl = $("#ssl").val();
    var payment = $("#payment").val();
    var reports = $("#reports").val();
    
    $.ajax(
    {
        url: 'contactdone.php'+ajax_rand(),
        beforeSend: function(){
            ajax_move($(".ajax_messages_area"));
            ajax_loader();
        },
        success: function(data)
        {
            ajax_loader();
            if( data.status == 0 )
            {
                if( data.msg != null && data.msg != undefined )
                {
                    ajax_error(data.msg);
                }
                validator.showErrors(validator_errors_prepare(validator,data.params));
            }
                
            if( data.status == 1 )
            {
                if( data.params.url )
                {
                    window.location.replace(data.params.url);
                }
            }
                
        },
        error: function(){
            ajax_loader();   
            ajax_error('Plan create error.');
        },
        timeout: 5*1000,
        dataType: 'json',
        data: 
        {
            'action': 'plan_create', 
               
            'name': name,
            'amount': amount,
            'users': users,
            'forms': forms,
            'fields': fields,
            'entries': entries,
            'storage': storage,
            'ssl': ssl,
            'payment': payment,
            'reports': reports
        },
        type: 'POST'
            
    }
    );
    
    return false;
    
}
