var portfolio = {"projects": 
    [
        {"id": "0", "name": "Nestle NQ", "height": "299", "imgID": "nestle", "client": "Nestle", "clientUrl": "http://www.nestle.com", "projectUrl": "Internal - no link available", "tech": "ASP.Net2, SQL Server 2005", "description": "An internal site to aid staff training worldwide. Staff register to the site, and can then complete pre and post-training questionnaires on a number of subjects. Users can save questionnaire state, so they can return later if they wish to enter their data in parts. Their pre- and post-questionnaire performance is compared and presented to them. Administrators can manage user data, and view reports of the users belonging to their region. The site is fully multi-lingual, with a very simple process for setting up a new language.", "tasks": "Generate cross-browser HTML templates from design, implement templates and develop all functionality."},
        {"id": "1", "name": "Virgin Mobile", "height": "370", "imgID": "virgin", "client": "Virgin Mobile", "clientUrl": "http://www.virginmobile.com/vm", "projectUrl": "Internal - no link available", "tech": "ASP.Net2, SQL Server 2005", "description": "An extranet site to allow staff training for mobile phone sales staff on Virgin Mobile products. Users are able to browse the site content, and then complete quizzes to test their knowledge. Administrators have full functionality to manage the quizzes, archiving old ones and replacing with new on a regular basis, with a number of options for response types, eg multiple choice (select one or many), drop-down lists, and choose from a selection of images. Administrators can also pull off reports of the user's performance on the quizzes, allowing them to run competitions.", "tasks": "Generate cross-browser HTML templates from design, implement templates and develop all functionality."},
        {"id": "2", "name": "ii-Profiles", "height": "320", "imgID": "iiprofiles", "client": "Lintstock", "clientUrl": "http://www.lintstock.com", "projectUrl": "http://www.iiprofiles.com", "tech": "PHP, MySQL", "description": "A product aimed at the boards of FTSE 250 companies. The product allows the board to understand the position of their shareholders on key questions, such as 'How will my investors vote if I propose to combine the role of CEO and Chairman of the Board?'. Functionally very rich, allowing users to construct questionnaires, email them to shareholders or staff, and view the results, all from the web interface. There are also various reporting and charting tools, reports can also be exported to a PDF for offline use.", "tasks": "Actively consult on design process, generate cross-browser HTML templates from design, implement templates and develop all functionality.<br />&nbsp;"},
        {"id": "3", "name": "Navpix Library", "height": "320", "imgID": "navpix", "client": "Navman", "clientUrl": "http://www.navman.com", "projectUrl": "http://www.navman.com/navpix", "tech": "ASP.Net, SQL Server 2000", "description": "Built to promote the inclusion of cameras in Navman's GPS devices, this section of the Navman site allows the public to upload photos, and embed the relevant GPS data in the photo if it has not come from a GPS-enabled device. Users can build albums and search other user's albums for publicly available photos. On the administration side, staff have full visibility of newly uploaded photos, and the ability to approve or reject photos on grounds of taste or decency etc.", "tasks": "Generate cross-browser HTML templates from design, implement templates and develop all functionality."},
        {"id": "4", "name": "Barclays Wealth", "height": "299", "imgID": "barclays", "client": "Barclays", "clientUrl": "http://www.barclayswealth.com", "projectUrl": "http://www.barclayswealth.com", "tech": "ASP.Net2, SecureBlackBox encryption", "description": "This project for us was mainly to generate very high standard HTML templates for the agency to implement using their CMS system. The templates had to be very highly browser compatible, and accessible to Level 3 standard. We also implemented encrypted email functionality for the Contact section.", "tasks": "Generate cross-browser HTML templates from design, accessible to Level 3 standard, fully cross-browser, implement secure, encrypted email functionality for contact form."},
        {"id": "5", "name": "GSK - Pharmassist", "height": "309", "imgID": "gsk", "client": "GlaxoSmithKline", "clientUrl": "http://www.gsk.com/", "projectUrl": "http://www.mypharmassist.co.uk/", "tech": "ASP.Net, SQL Server 2000", "description": "We handled the technical integration on this project, handling local authentication for UK users, and 3rd-party authentication for german users. We also built the RSS feed readers and cache for the news sections, and automated the download and processing of weather data from the Met Office.", "tasks": "Technical implemention of logins, RSS feeds and weather data."},
        {"id": "6", "name": "Blooming Marvellous", "height": "299", "imgID": "bm", "client": "Blooming Marvellous", "clientUrl": "http://www.bloomingmarvellous.co.uk/", "projectUrl": "http://www.bloomingmarvellous.co.uk/", "tech": "ASP.Net, Commerce Server 2000, SQL Server 2000", "description": "We provided technical resource on the build for this site. It is a big e-Commerce site, built on the MS Commerce Server 2000 platform, with some complex features in terms of products sizes / colours etc.", "tasks": "Technical support and build of various aspects of the site."},
        {"id": "7", "name": "Rosie Nieper", "height": "299", "imgID": "rosienieper", "client": "Rosie Nieper", "clientUrl": "http://www.rosienieper.co.uk/", "projectUrl": "http://www.rosienieper.co.uk/", "tech": "ASP.Net, Commerce Server 2000, SQL Server 2000", "description": "Like <a href=\"javascript: getstarted(6);\">Blooming Marvellous</a>, this is an e-Commerce site, built on the MS Commerce Server 2000 platform, with some complex features in terms of stock, sizes etc. We provided technical resource to do the build of this site.", "tasks": "Technical support and build of the site."},
        {"id": "8", "name": "Sky Bigger Picture", "height": "299", "imgID": "sky-bp", "client": "Stickee", "clientUrl": "http://www.stickee.co.uk/", "projectUrl": "http://www.jointhebiggerpicture.com/", "tech": "ASP.Net, SQL Server 2005", "description": "One of Sky's main communication efforts, The Bigger Picture is an informational site for both the public and staff. We were tasked with building a CMS from the ground-up in order to enable Sky to build the site. The timescales were extremely demanding, but as ever we came through for the client - and in a big way. The CMS uses innovative techniques to enable in-place editing of the pages, which is the most user-friendly solution for staff.", "tasks": "Technical build of a CMS allowing production of the whole site, including full cross browser HTML and CSS development."},
        {"id": "9", "name": "Rubii", "height": "299", "imgID": "rubii", "client": "Ruby Financial", "clientUrl": "http://www.rubyfinancial.co.uk/", "projectUrl": "http://www.rubii.co.uk/", "tech": "ASP.Net, SQL Server 2005, NHibernate, MooTools", "description": "Rubii.co.uk was launched as a startup project, with Array[x] supplying all the technical resources. We helped Rubii launch and optimise a complex community site with e-commerce and social networking features such as blogging, article writing, reviews, ratings etc. The site aims to provide consumers with a place to research IFAs and benefit from the past experiences of others.", "tasks": "From concept to full build and provision of server solutions, Array[x] were 100% involved in the whole project."},
        {"id": "10", "name": "Westminster Parliamentary Record", "height": "299", "imgID": "parliamentary-record", "client": "WPR", "clientUrl": "http://www.wpruk.com", "projectUrl": "http://www.parliamentaryrecord.com/", "tech": "ASP.Net, SQL Server 2008, NHibernate, JQuery", "description": "Westminster Westminster Parliamentary Record is a startup project - we worked with the team from the beginning to help specify the whole project and then bring it to fruition. Aimed at the PR industry and anyone who needs to research who to talk to in Parliament, the site provides advanced tools for searching the database of MPs and Candidates, and is highly optimised to deliver the fastest experience possible for a database-intensive application, using advanced caching techniques.", "tasks": "To work with this startup to deliver on all technical aspects of the business, and provide a highly optimised and quick site."},
        {"id": "11", "name": "Clever Diaries", "height": "299", "imgID": "cleverdiaries", "client": "Clever Diaries", "clientUrl": "http://www.cleverdiaries.com/default.aspx", "projectUrl": "http://www.cleverdiaries.com/default.aspx", "tech": "ASP.Net, SQL Server 2005, Web Services, NHibernate, MooTools", "description": "Clever Diaries is a startup project, we worked with the team from the conceptual stage to put the product together - the product being an Outlook plugin which synchronises with the proprietary databases maintained by Clever Diaries. The plugin was extensively tested against various versions of Windows and Outlook and is now a stable product. The website is aimed at selling the product and provides full e-commerce management facilities for managing the products and proprietary databases.", "tasks": "Full build of this startup project and provision of all hosting and technical support services."},
        {"id": "12", "name": "White Label Anti-Spam", "height": "299", "imgID": "whitelabelantispam", "client": "3Q3", "clientUrl": "http://www.3q3.co.uk/", "projectUrl": "http://www.whitelabelantispam.com/", "tech": "Java, ASP.Net, SQL Server 2005, Web Services, NHibernate", "description": "Array[x] have built a bespoke anti-spam solution for their development partner 3Q3. At the heart of this system are open-source anti-spam and anti-virus engines, wrapped in a bespoke application which manages the whole system. Our USP is that the system requires no software and no changes in your existing email setup - just give us your login details and our system will periodically check your email for you, deleting the spam while providing you with full backup and retrieval capabilities - that are very rarely used due to our excellent accuracy in detecting spam.", "tasks": "Design and construction of the anti-spam eco-system consisting of a full specialised server-build and bespoke management and monitoring software."}
    ]
};
   
var featured = [
    {"id": "10", "img": "images/portfolio/home/parliamentary-record.gif", "name": "Westminster Parliamentary Record"}, 
    {"id": "9", "img": "images/portfolio/home/rubii.gif", "name": "Rubii"}, 
    {"id": "11", "img": "images/portfolio/home/cleverdiaries.gif", "name": "Clever Diaries"}, 
    {"id": "8", "img": "images/portfolio/home/sky-bp.gif", "name": "Sky Bigger Picture"}, 
    {"id": "12", "img": "images/portfolio/home/whitelabelantispam.gif", "name": "White Label Anti-Spam"}, 
    {"id": "0", "img": "images/portfolio/home/nestle.gif", "name": "Nestle NQ"},
    {"id": "1", "img": "images/portfolio/home/virgin.gif", "name": "Virgin Mobile"},
    {"id": "3", "img": "images/portfolio/home/navpix.gif", "name": "Navpix Library"},
    {"id": "4", "img": "images/portfolio/home/barclays.gif", "name": "Barclays Wealth"},
    {"id": "5", "img": "images/portfolio/home/gsk.gif", "name": "GSK - Pharmassist"}
];

var currentItem = 0, 
    currentHeight = 0,
    fadespeed = 2000,
    start = true,
    refreshSpeed = 6500,
    item = null;
   
function rotateFeatured() {
    var imageload=new Image()
    imageload.src=featured[currentItem].img;
    
    var fadeimg=new Fx.Style('featureImg','opacity',{duration:fadespeed,transition: Fx.Transitions.quartInOut})
    var titlefade=new Fx.Style('featureTitle','opacity',{duration:fadespeed,transition: Fx.Transitions.quartInOut})
    //var setheight=new Fx.Style('featuredImageWrapper','height',{duration:transspeed,transition: Fx.Transitions.quartInOut})
    
    if (start) {
        loadImage(featured[currentItem]);
        start = false;
        setTimeout(rotateFeatured, refreshSpeed);
    } else {
        //return;
        titlefade.start(1,0);
        fadeimg.start(1,0).chain(function() {
            //setheight.start(currentHeight,imageload.height+40)
            //currentHeight=imageload.height
            loadImage(featured[currentItem]);
            fadeimg.start(0, 1);
            titlefade.start(0, 1);           
            setTimeout(rotateFeatured, refreshSpeed);
        });
    }
    
    function loadImage(item) {
        $('featureImg').innerHTML = '<a href="portfolio.aspx?id='+item.id+'"><img  src="'+item.img+'" border="0" alt="'+item.name+'" /></a>';
        $('featureTitle').innerHTML = item.name;
        currentItem++;
        if (currentItem > featured.length-1)
            currentItem = 0;
    }
}
window["rotateFeatured"] = rotateFeatured;