jQuery.noConflict();
var $j = jQuery;

var Industry = {

    documentReady: function() {

        this.isLoading();
    },

    isLoading: function() {

        /*Check client browser*/
        if (typeof document.body.style.maxHeight == 'undefined') {
            $j('body').addClass('ie6');
            try {
                document.execCommand('BackgroundImageCache', false, true);
            } catch(e) {}
        } else {
            $j('body').addClass('modern');
        }

        /*Restructure the HTML elements*/
        $j('.cb-images ul').addClass("strip");
        $j('.cb-images ul li').addClass("strip convert");
        $j('.strip').unwrap();
        $j('.convert').wrap('<div class="cb cb-images" />');
        $j('.cb-images span').unwrap();

        /*Append JS Based styles and HTML elements*/
        $j('body').append('<a class="prevPage scroll scroll-left" title="Click for previous project">Previous</a>');
        $j('body').append('<a class="nextPage scroll scroll-right" title="Click for next project">Next</a>');

        /*Finish the page load*/
        $j.preloadCssImages();

    },

    isLoaded: function() {

        /*fade/show the page*/
        if ($j('body').hasClass('modern')) {
            $j('.content').fadeTo(650, 1);
        }
        $j('body').removeClass('isLoading').addClass('ready');

        /*Kick off the scrolling plugin*/
        this.startScroll();

    },

    startScroll: function() {

        var api = $j("div.content-container").scrollable({
            size: 1,
            clickable: false,
            api: true,
            activeClass: "active"
        });
				$j('h6').click(function() {
	         api.next();
        });
       /*
        api.onBeforeSeek(function() {
                   $j("div.content div.cb").fadeTo(250, 0.25);

               });
               api.onSeek(function() {
                   var current = this.getPageIndex() + 1;
                   $j("div.content div.cb:nth-child(" + current + ")").fadeTo(250, 1);

               });

               $j('.cb').fadeTo(0, 0.25);
               $j('.cb-home').fadeTo(0, 1);*/
       
    }

};

$j(document).ready(function() {
    Industry.documentReady();
});




/*
   Cufon.replace(".product-item .type .title", {
       fontSize: "19px",
       textShadow: '1px 1px 1px #333',
       fontWeight: "bold"
   });
   Cufon.replace(".four-up-c h3", {
       fontSize: "16px"
   });
   Cufon.now();

});*/

