jQuery.fn.extend({
    everyTime: function (interval, label, fn, times, belay) {
        return this.each(function () {
            jQuery.timer.add(this, interval, label, fn, times, belay)
        })
    },
    oneTime: function (interval, label, fn) {
        return this.each(function () {
            jQuery.timer.add(this, interval, label, fn, 1)
        })
    },
    stopTime: function (label, fn) {
        return this.each(function () {
            jQuery.timer.remove(this, label, fn)
        })
    }
});
jQuery.extend({
    timer: {
        guid: 1,
        global: {},
        regex: /^([0-9]+)\s*(.*s)?$/,
        powers: {
            'ms': 1,
            'cs': 10,
            'ds': 100,
            's': 1000,
            'das': 10000,
            'hs': 100000,
            'ks': 1000000
        },
        timeParse: function (value) {
            if (value == undefined || value == null) return null;
            var result = this.regex.exec(jQuery.trim(value.toString()));
            if (result[2]) {
                var num = parseInt(result[1], 10);
                var mult = this.powers[result[2]] || 1;
                return num * mult
            } else {
                return value
            }
        },
        add: function (element, interval, label, fn, times, belay) {
            var counter = 0;
            if (jQuery.isFunction(label)) {
                if (!times) times = fn;
                fn = label;
                label = interval
            }
            interval = jQuery.timer.timeParse(interval);
            if (typeof interval != 'number' || isNaN(interval) || interval <= 0) return;
            if (times && times.constructor != Number) {
                belay = !! times;
                times = 0
            }
            times = times || 0;
            belay = belay || false;
            if (!element.$timers) element.$timers = {};
            if (!element.$timers[label]) element.$timers[label] = {};
            fn.$timerID = fn.$timerID || this.guid++;
            var handler = function () {
                    if (belay && this.inProgress) return;
                    this.inProgress = true;
                    if ((++counter > times && times !== 0) || fn.call(element, counter) === false) jQuery.timer.remove(element, label, fn);
                    this.inProgress = false
                };
            handler.$timerID = fn.$timerID;
            if (!element.$timers[label][fn.$timerID]) element.$timers[label][fn.$timerID] = window.setInterval(handler, interval);
            if (!this.global[label]) this.global[label] = [];
            this.global[label].push(element)
        },
        remove: function (element, label, fn) {
            var timers = element.$timers,
                ret;
            if (timers) {
                if (!label) {
                    for (label in timers) this.remove(element, label, fn)
                } else if (timers[label]) {
                    if (fn) {
                        if (fn.$timerID) {
                            window.clearInterval(timers[label][fn.$timerID]);
                            delete timers[label][fn.$timerID]
                        }
                    } else {
                        for (var fn in timers[label]) {
                            window.clearInterval(timers[label][fn]);
                            delete timers[label][fn]
                        }
                    }
                    for (ret in timers[label]) break;
                    if (!ret) {
                        ret = null;
                        delete timers[label]
                    }
                }
                for (ret in timers) break;
                if (!ret) element.$timers = null
            }
        }
    }
});
if (jQuery.browser.msie) jQuery(window).one("unload", function () {
    var global = jQuery.timer.global;
    for (var label in global) {
        var els = global[label],
            i = els.length;
        while (--i) jQuery.timer.remove(els[i], label)
    }
});
//US-Site

var firstImage = "sites/all/themes/fusion/fusion_core/images/1.jpg";
var secondImage = "sites/all/themes/fusion/fusion_core/images/2.jpg";
var thirdImage = "sites/all/themes/fusion/fusion_core/images/3.jpg";
var fourthImage = "sites/all/themes/fusion/fusion_core/images/4.jpg";
var fifthImage = "sites/all/themes/fusion/fusion_core/images/5.jpg";
//US-site-end

//FR-site

var firstImagefr = "sites/all/themes/fusion/fusion_core/images/fr/1.jpg";
var secondImagefr = "sites/all/themes/fusion/fusion_core/images/fr/2.jpg";
var thirdImagefr = "sites/all/themes/fusion/fusion_core/images/fr/3.jpg";
var fourthImagefr = "sites/all/themes/fusion/fusion_core/images/fr/4.jpg";
var fifthImagefr = "sites/all/themes/fusion/fusion_core/images/fr/5.jpg";
//FR-site-end

//US-site-inner

var firstImageTopLarge = "sites/all/themes/fusion/fusion_core/images/top-img-commerce-large.png";
var secondImageTopLarge = "sites/all/themes/fusion/fusion_core/images/top-img-globalexp-large.png";
var thirdImageTopLarge = "sites/all/themes/fusion/fusion_core/images/top-img-embraced-large.png";
var fourthImageTopLarge = "sites/all/themes/fusion/fusion_core/images/top-img-compresolu-large.png";
var fifthImageTopLarge = "sites/all/themes/fusion/fusion_core/images/top-img-superior-large.png";
var firstImageTopMedium = "sites/all/themes/fusion/fusion_core/images/top-img-commerce-medium.png";
var secondImageTopMedium = "sites/all/themes/fusion/fusion_core/images/top-img-globalexp-medium.png";
var thirdImageTopMedium = "sites/all/themes/fusion/fusion_core/images/top-img-embraced-medium.png";
var fourthImageTopMedium = "sites/all/themes/fusion/fusion_core/images/top-img-compresolu-medium.png";
var fifthImageTopMedium = "sites/all/themes/fusion/fusion_core/images/top-img-superior-medium.png";
var firstImageTopSmall = "sites/all/themes/fusion/fusion_core/images/top-img-commerce-small.png";
var secondImageTopSmall = "sites/all/themes/fusion/fusion_core/images/top-img-globalexp-small.png";
var thirdImageTopSmall = "sites/all/themes/fusion/fusion_core/images/top-img-embraced-small.png";
var fourthImageTopSmall = "sites/all/themes/fusion/fusion_core/images/top-img-compresolu-small.png";
var fifthImageTopSmall = "sites/all/themes/fusion/fusion_core/images/top-img-superior-small.png";
var firstImageBottomLarge = "sites/all/themes/fusion/fusion_core/images/gartner_banner.png";
var firstImageBottomMedium = "sites/all/themes/fusion/fusion_core/images/gartner_banner.png";
var firstImageBottomSmall = "sites/all/themes/fusion/fusion_core/images/gartner_banner.png";
var secondImageBottomLarge = "sites/all/themes/fusion/fusion_core/images/smartbrief.png";
var secondImageBottomMedium = "sites/all/themes/fusion/fusion_core/images/smartbrief.png";
var secondImageBottomSmall = "sites/all/themes/fusion/fusion_core/images/smartbrief-small.png";

var thirdImageBottomLarge = "sites/all/themes/fusion/fusion_core/images/banner-commerce-pricing.png";
var thirdImageBottomMedium = "sites/all/themes/fusion/fusion_core/images/banner-commerce-pricing.png";
var thirdImageBottomSmall = "sites/all/themes/fusion/fusion_core/images/banner-commerce-pricingsmall.png";
//US-site-inner-end

//FR-site-inner

var firstImageTopLargefr = "sites/all/themes/fusion/fusion_core/images/fr/top-img-commerce-large.png";
var secondImageTopLargefr = "sites/all/themes/fusion/fusion_core/images/fr/top-img-globalexp-large.png";
var thirdImageTopLargefr = "sites/all/themes/fusion/fusion_core/images/fr/top-img-embraced-large.png";
var fourthImageTopLargefr = "sites/all/themes/fusion/fusion_core/images/fr/top-img-compresolu-large.png";
var fifthImageTopLargefr = "sites/all/themes/fusion/fusion_core/images/fr/top-img-superior-large.png";
var firstImageTopMediumfr = "sites/all/themes/fusion/fusion_core/images/fr/top-img-commerce-medium.png";
var secondImageTopMediumfr = "sites/all/themes/fusion/fusion_core/images/fr/top-img-globalexp-medium.png";
var thirdImageTopMediumfr = "sites/all/themes/fusion/fusion_core/images/fr/top-img-embraced-medium.png";
var fourthImageTopMediumfr = "sites/all/themes/fusion/fusion_core/images/fr/top-img-compresolu-medium.png";
var fifthImageTopMediumfr = "sites/all/themes/fusion/fusion_core/images/fr/top-img-superior-medium.png";
var firstImageTopSmallfr = "sites/all/themes/fusion/fusion_core/images/fr/top-img-commerce-small.png";
var secondImageTopSmallfr = "sites/all/themes/fusion/fusion_core/images/fr/top-img-globalexp-small.png";
var thirdImageTopSmallfr = "sites/all/themes/fusion/fusion_core/images/fr/top-img-embraced-small.png";
var fourthImageTopSmallfr = "sites/all/themes/fusion/fusion_core/images/fr/top-img-compresolu-small.png";
var fifthImageTopSmallfr = "sites/all/themes/fusion/fusion_core/images/fr/top-img-superior-small.png";
var firstImageBottomLargefr = "sites/all/themes/fusion/fusion_core/images/fr/gartner_banner.png";
var firstImageBottomMediumfr = "sites/all/themes/fusion/fusion_core/images/fr/gartner_banner.png";
var firstImageBottomSmallfr = "sites/all/themes/fusion/fusion_core/images/fr/gartner_banner.png";
var secondImageBottomLargefr = "sites/all/themes/fusion/fusion_core/images/fr/smartbrief.png";
var secondImageBottomMediumfr = "sites/all/themes/fusion/fusion_core/images/fr/smartbrief.png";
var secondImageBottomSmallfr = "sites/all/themes/fusion/fusion_core/images/fr/smartbrief-small.png";

var thirdImageBottomLargefr = "sites/all/themes/fusion/fusion_core/images/fr/banner-commerce-pricing.png";
var thirdImageBottomMediumfr = "sites/all/themes/fusion/fusion_core/images/fr/banner-commerce-pricing.png";
var thirdImageBottomSmallfr = "sites/all/themes/fusion/fusion_core/images/fr/banner-commerce-pricingsmall.png";
//FR-site-inner-end




var imageControl = "#image_control";
var baseURL = '';
var timeout;
var timerOn;
var currentImageIndexForAuto = 1;
var cacheStatus = new Array(false, false, false, false, false);
var currentTopImageIndex = 0;
var clientImagesLoaded = false;
$(document).ready(function () {
    baseURL = siteURL;
    setImageSize("firstImage");
    timerOn = true;
    currentImageIndexForAuto = 0;
    $('#container').hide();
    loadandShowImage(0, 'Timer')
});

function slideshowControl() {
	if(Lang=="en-US")
	{
		if (currentImageIndexForAuto < 4) {
			currentImageIndexForAuto += 1
		} else {
			currentImageIndexForAuto = 0
		}
		loadandShowImage(currentImageIndexForAuto, 'Timer')
	}
	else 
	{
	 if (currentImageIndexForAuto < 3) {
			currentImageIndexForAuto += 1
		} else {
			currentImageIndexForAuto = 0
		}
		loadandShowImage(currentImageIndexForAuto, 'Timer')
	}
}
function loadandShowImage(n, source) {
    if (source == 'Page') {
        timerOn = false
    }
    currentTopImageIndex = n;
    clearTimeout(timeout);
    preloadImage(n)
}
function preloadImage(n) {
    if ($.browser.msie) preloadImageIE(n);
    else preloadImageOther(n)
}
function preloadImageOther(n) {
    $('#loaderdiv').show();
    if (!cacheStatus[n]) {
        var filePath = getImageFilePath(n);
        $('<img />').attr('src', filePath).load(function () {
            cacheStatus[n] = true;
            loadRemainingStuff(n)
        })
    } else {
        loadRemainingStuff(n)
    }
}
function preloadImageIE(n) {
    $('#loaderdiv').show();
    if (!cacheStatus[n]) {
        var filePath = getImageFilePath(n);
        var image = new Image();
        image.src = filePath;
        if (image.complete) {
            cacheStatus[n] = true;
            loadRemainingStuff(n)
        } else {
            image.onLoad = imageLoadedIE(n)
        }
    } else {
        loadRemainingStuff(n)
    }
}
function imageLoadedIE(n) {
    var filePath = getImageFilePath(n);
    $('<img />').attr('src', filePath).load(function () {
        cacheStatus[n] = true;
        loadRemainingStuff(n)
    })
}
function preloadNextImage(n) {
    var next = n + 1;
    var filePath = getImageFilePath(next);
    if (filePath != "" && !cacheStatus[next]) {
        $('<img />').attr('src', filePath).load(function () {
            cacheStatus[next] = true
        })
    }
}
function loadRemainingStuff(n) {
    $(imageControl)[0].src = getImageFilePath(n);
    $('#container').show();
    $('#container').css({
        opacity: 0
    }).fadeTo(1000, 1);
    loadContents(n);
    setThumbnailImages(n);
    if (!clientImagesLoaded) $(this).oneTime(2000, "clients", loadClientImages);
    $('#loaderdiv').hide();
    if (timerOn) {
        timeout = setTimeout('slideshowControl()', 8000)
    }
    preloadNextImage(n)
}
function loadClientImages() {
    $('.content-bg-client-images').css({
        display: "block"
    })
}
function loadContents(n) {
    setChildFirstImage(n);
	setChildSecondImage(n);
}
$(window).resize(function () {
    setImageSize("resize")
});

function setImageSize(from) {
    var winWidth = $(window).width();
    var winHeight = $(window).height();
    var imageDataTop = (winHeight) / 4;
    var imageDataLeft = (winWidth) / 2;
    $('#loader').css({
        top: winHeight / 2,
        left: imageDataLeft
    });
    if ($('#main_image').width() > 1) picWidth = $('#main_image').width();
    if ($('#main_image').height() > 1) picHeight = $('#main_image').height();
    $('#container').css({
        height: winHeight,
        width: winWidth
    });
    $('.main_image').css({
        height: winHeight,
        width: winWidth
    });
    if (from == "resize") loadContents(currentTopImageIndex);
    $('#image_data').css({
        top: imageDataTop
    })
}
function getImageFilePath(index) {
    switch (index) {
    case 0:
	if(Lang=="en-US")
		{
        imageSource = firstImage;
		}
		else
		{
        imageSource = firstImagefr;
		}
        break;
    case 1:
	if(Lang=="en-US")
		{
        imageSource = secondImage;
		}
		else
		{
        imageSource = secondImagefr;
		}
		
        break;
    case 2:
	if(Lang=="en-US")
		{
        imageSource = thirdImage;
		}
		else
		{
        imageSource = thirdImagefr;
		}
        break;
    case 3:
	if(Lang=="en-US")
		{
        imageSource = fourthImage;
		}
		else
		{
        imageSource = fourthImagefr;
		}
        break;
    case 4:
	if(Lang=="en-US")
		{
        imageSource = fifthImage;
		}
		else
		{
        imageSource = '';
		}
        break
    }
    return imageSource
}
function setChildFirstImage(index) {
    var winHeight = $(window).height();
    var link;
    switch (index) {
    case 0:
	{
		if(Lang=="en-US")
		{
        if (winHeight >= 600) {
            link = '<a href=' + baseURL + "convergent-commerce" + '><img src=' + firstImageTopLarge + ' alt="convergent-commerce" />' + '</a>'
        } else if (winHeight < 600 && winHeight >= 500) {
            link = '<a href=' + baseURL + "convergent-commerce" + '><img src=' + firstImageTopMedium + ' alt="convergent-commerce" />' + '</a>'
        } else {
            link = '<a href=' + baseURL + "convergent-commerce" + '><img src=' + firstImageTopSmall + ' alt="convergent-commerce" />' + '</a>'
        }
        $('#image_data p:eq(0)').html(link);
		}
		
		else
		
		{
        if (winHeight >= 600) {
            link = '<a href=' + baseURL + "/convergent-commerce/convergence-cross-canal" + '><img src=' + firstImageTopLargefr + ' alt="convergent-commerce" />' + '</a>'
        } else if (winHeight < 600 && winHeight >= 500) {
            link = '<a href=' + baseURL + "/convergent-commerce/convergence-cross-canal" + '><img src=' + firstImageTopMediumfr + ' alt="convergent-commerce" />' + '</a>'
        } else {
            link = '<a href=' + baseURL + "/convergent-commerce/convergence-cross-canal" + '><img src=' + firstImageTopSmallfr + ' alt="convergent-commerce" />' + '</a>'
        }
        $('#image_data p:eq(0)').html(link);
		}
	}
        break;
    case 1:
	{
		if(Lang=="en-US")
		{
        if (winHeight >= 600) {
            link = '<a href=' + baseURL + "online/international-commerce" + '><img src=' + secondImageTopLarge + ' alt="international-commerce" />' + '</a>'
        } else if (winHeight < 600 && winHeight >= 500) {
            link = '<a href=' + baseURL + "online/international-commerce" + '><img src=' + secondImageTopMedium + ' alt="international-commerce" />' + '</a>'
        } else {
            link = '<a href=' + baseURL + "online/international-commerce" + '><img src=' + secondImageTopSmall + ' alt="international-commerce" />' + '</a>'
        }
        $('#image_data p:eq(0)').html(link);
		}
		
		else
		
		{
        if (winHeight >= 600) {
            link = '<a href=' + baseURL + "/convergent-commerce/internationalisation" + '><img src=' + secondImageTopLargefr + ' alt="international-commerce" />' + '</a>'
        } else if (winHeight < 600 && winHeight >= 500) {
            link = '<a href=' + baseURL + "/convergent-commerce/internationalisation" + '><img src=' + secondImageTopMediumfr + ' alt="international-commerce" />' + '</a>'
        } else {
            link = '<a href=' + baseURL + "/convergent-commerce/internationalisation" + '><img src=' + secondImageTopSmallfr + ' alt="international-commerce" />' + '</a>'
        }
        $('#image_data p:eq(0)').html(link);
		}
	}
        break;
    case 2:
	{
		if(Lang=="en-US")
		{
        if (winHeight >= 600) {
            link = '<a href=' + baseURL + "customers" + '><img src=' + thirdImageTopLarge + ' alt="customers" />' + '</a>'
        } else if (winHeight < 600 && winHeight >= 500) {
            link = '<a href=' + baseURL + "customers" + '><img src=' + thirdImageTopMedium + ' alt="customers" />' + '</a>'
        } else {
            link = '<a href=' + baseURL + "customers" + '><img src=' + thirdImageTopSmall + ' alt="customers" />' + '</a>'
        }
        $('#image_data p:eq(0)').html(link);
		}
		
		else
		
		{
        if (winHeight >= 600) {
            link = '<a href=' + baseURL + "/mobile-commerce" + '><img src=' + thirdImageTopLargefr + ' alt="customers" />' + '</a>'
        } else if (winHeight < 600 && winHeight >= 500) {
            link = '<a href=' + baseURL + "/mobile-commerce" + '><img src=' + thirdImageTopMediumfr + ' alt="customers" />' + '</a>'
        } else {
            link = '<a href=' + baseURL + "/mobile-commerce" + '><img src=' + thirdImageTopSmallfr + ' alt="customers" />' + '</a>'
        }
        $('#image_data p:eq(0)').html(link);
		}
	}
        break;
    case 3:
	{
		if(Lang=="en-US")
		{
        if (winHeight >= 600) {
            link = '<a href=' + baseURL + "end-to-end/fulfillment" + '><img src=' + fourthImageTopLarge + ' alt="fulfillment" />' + '</a>'
        } else if (winHeight < 600 && winHeight >= 500) {
            link = '<a href=' + baseURL + "end-to-end/fulfillment" + '><img src=' + fourthImageTopMedium + ' alt="fulfillment" />' + '</a>'
        } else {
            link = '<a href=' + baseURL + "end-to-end/fulfillment" + '><img src=' + fourthImageTopSmall + ' alt="fulfillment" />' + '</a>'
        }
        $('#image_data p:eq(0)').html(link);
		}
		
		else
		
		{
        if (winHeight >= 600) {
            link = '<a href=' + baseURL + "/convergent-commerce/eCommerce-SaaS" + '><img src=' + fourthImageTopLargefr + ' alt="fulfillment" />' + '</a>'
        } else if (winHeight < 600 && winHeight >= 500) {
            link = '<a href=' + baseURL + "/convergent-commerce/eCommerce-SaaS" + '><img src=' + fourthImageTopMediumfr + ' alt="fulfillment" />' + '</a>'
        } else {
            link = '<a href=' + baseURL + "/convergent-commerce/eCommerce-SaaS" + '><img src=' + fourthImageTopSmallfr + ' alt="fulfillment" />' + '</a>'
        }
        $('#image_data p:eq(0)').html(link);
		}
	}
        break;
	
    case 4:
	{
		if(Lang=="en-US")
		{
        if (winHeight >= 600) {
            link = '<a href=' + baseURL + "online/cloud-platform" + '><img src=' + fifthImageTopLarge + ' alt="cloud-platform" />' + '</a>'
        } else if (winHeight < 600 && winHeight >= 500) {
            link = '<a href=' + baseURL + "online/cloud-platform" + '><img src=' + fifthImageTopMedium + ' alt="cloud-platform" />' + '</a>'
        } else {
            link = '<a href=' + baseURL + "online/cloud-platform" + '><img src=' + fifthImageTopSmall + ' alt="cloud-platform" />' + '</a>'
        }
        $('#image_data p:eq(0)').html(link);
		}
		
		else
		
		{
        if (winHeight >= 600) {
            link = ''
        } else if (winHeight < 600 && winHeight >= 500) {
            link = ''
        } else {
            link = ''
        }
        $('#image_data p:eq(0)').html(link);
		}
	}
        break;
    }
}
function setChildSecondImage(index) {
    var link;
    var winHeight = $(window).height();
    switch (index) {
    case 0:
	{
		if(Lang=="en-US")
		{
        if (winHeight >= 700) {
            link = '<a href=' + baseURL + "resources/in-the-media>" + '<img src=' + firstImageBottomLarge + ' alt="Gartner" />' + '</a>'
        } else if (winHeight < 700 && winHeight >= 600) {
            link = '<a href=' + baseURL + "resources/in-the-media>" + '<img src=' + firstImageBottomMedium + ' alt="Gartner" />' + '</a>'
        } else {
            link = '<a href=' + baseURL + "resources/in-the-media>" + '<img src=' + firstImageBottomSmall + ' alt="Gartner" />' + '</a>'
        }
        $('#image_data p:eq(1)').html(link);
		}
		
		else
		
		{
        if (winHeight >= 700) {
            link = ''
        } else if (winHeight < 700 && winHeight >= 600) {
            link = ''
        } else {
            link = ''
        }
        $('#image_data p:eq(1)').html(link);
		}
	}
        break;
		
	case 1:
	{
		if(Lang=="en-US")
		{
        if (winHeight >= 700) {
            link = '<a href=' + baseURL + "likeme>" + '<img src=' + secondImageBottomLarge + ' alt="Social Commerce" />' + '</a>'
        } else if (winHeight < 700 && winHeight >= 600) {
            link = '<a href=' + baseURL + "likeme>" + '<img src=' + secondImageBottomMedium + ' alt="Social Commerce" />' + '</a>'
        } else {
            link = '<a href=' + baseURL + "likeme>" + '<img src=' + secondImageBottomSmall + ' alt="Social Commerce" />' + '</a>'
        }
        $('#image_data p:eq(1)').html(link);
		}
		
		else
		
		{
        if (winHeight >= 700) {
            link = ''
        } else if (winHeight < 700 && winHeight >= 600) {
            link = ''
        } else {
            link = ''
        }
        $('#image_data p:eq(1)').html(link);
		}
	}
        break;
		
	case 2:
	{
		if(Lang=="en-US")
		{
       if (winHeight >= 700) {
            link = '<a href=' + baseURL + "predictable-ecommerce-pricing>" + '<img src=' + thirdImageBottomLarge + ' alt="Predictable eCommerce Pricing" />' + '</a>'
        } else if (winHeight < 700 && winHeight >= 600) {
            link = '<a href=' + baseURL + "predictable-ecommerce-pricing>" + '<img src=' + thirdImageBottomMedium + ' alt="Predictable eCommerce Pricing" />' + '</a>'
        } else {
            link = '<a href=' + baseURL + "predictable-ecommerce-pricing>" + '<img src=' + thirdImageBottomSmall + ' alt="Predictable eCommerce Pricing" />' + '</a>'
        }
        $('#image_data p:eq(1)').html(link);
		}
		
		else
		
		{
       if (winHeight >= 700) {
            link = '' + '</a>'
        } else if (winHeight < 700 && winHeight >= 600) {
            link = '' + '</a>'
        } else {
            link = ''
        }
        $('#image_data p:eq(1)').html(link);
		}
	}
        break;

	case 3:
        if (winHeight >= 700) {
            link = ''
        } else if (winHeight < 700 && winHeight >= 600) {
            link = ''
        } else {
            link = ''
        }
        $('#image_data p:eq(1)').html(link);
        break;

	case 4:
        if (winHeight >= 700) {
            link = ''
        } else if (winHeight < 700 && winHeight >= 600) {
            link = ''
        } else {
            link = ''
        }
        $('#image_data p:eq(1)').html(link);
        break;

     }
}
function setThumbnailImages(index) {
    var winWidth = $(window).width();
    var winHeight = $(window).height();
    $thumbnailContainer = $('.thumbs', $('#thumbnails'));
    $thumbs = $thumbnailContainer.children();
    $thumbs.each(function (i) {
        var $this = $(this);
        $this.css('left', i * 35 + 'px');
        if (i == index) {
            $this.removeClass('default');
            $this.addClass('selected')
        } else {
            $this.removeClass('selected');
            $this.addClass('default')
        }
    })
}
