$(document).ready(
    function() {
	    myGc = new Gc();
	    myGc.initHome();
	    myGc.initServices();
	    myGc.showService(1);
    $(".first").addClass("serviceSelected");
    }
);

var Gc = function ( )  
{
    $("#lServices li").each(function(i) {
        if (i > 0) {
            $(this).click(function(){
                myGc.showService(i);
                $(this).addClass("serviceSelected");
            });
        };
    });


}
var o = Gc;
o.prototype.initServices = function( )
{
    
    for (var i=1; i<8; i++) {
        $("#o"+i).hide();
        $("#t"+i).hide();
    }
    $("#lServices li").removeClass("serviceSelected");
}

o.prototype.showService = function( w, li )
{
    this.initServices();
    $("#o"+w).show();
    $("#t"+w).show();
    //alert($(li));
    li
}

o.prototype.initHome = function()
{
    $(".imghome").mouseover(function(){
        imgsrc = $(this).attr("src");
        matches = imgsrc.match(/Rov/);
        if (!matches) {
           var imgsrcON = imgsrc.replace(/.jpg$/ig,"Rov.jpg");
           $(this).attr("src", imgsrcON);
       }
    });
    $(".imghome").mouseout(function(){
        $(this).attr("src", imgsrc);
    });
    $(".imghome2").mouseover(function(){
        imgsrc = $(this).attr("src");
        matches = imgsrc.match(/Rov/);
        if (!matches) {
           var imgsrcON = imgsrc.replace(/.jpg$/ig,"Rov.jpg");
           $(this).attr("src", imgsrcON);
       }
    });
    $(".imghome2").mouseout(function(){
        $(this).attr("src", imgsrc);
    });

    $('a[href$=".jpg"], a[href$=".png"]').lightBox({
        imageLoading: "/wp-content/themes/getconfused/js/jquery-lightbox-0.5/images/lightbox-ico-loading.gif",
    	imageBtnClose: "/wp-content/themes/getconfused/js/jquery-lightbox-0.5/images/lightbox-btn-close.gif",
    	imageBtnPrev: "/wp-content/themes/getconfused/js/jquery-lightbox-0.5/images/lightbox-btn-prev.gif",
    	imageBtnNext: "/wp-content/themes/getconfused/js/jquery-lightbox-0.5/images/lightbox-btn-next.gif"
    });


}