
/*START TECNAVIA CUSTOM BIDDER HERE*/
			/*
			var div_skyscraper_sizes = [
                [160, 600]
            ];
			var div_desktopleaderboard_sizes = [
                [728,90]
            ];
			var div_desktopfooter_sizes = [
                [728,90]
            ];
			var div_mobilefooter_sizes = [
                [320,50]
            ];
			var div_mobileleaderboard_sizes = [
                [320,50]
            ];
			var div_instorysquare_sizes = [
                [300,250],
				[300,300]
            ];
*/
		/*adding analytics
		*/
		(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
		(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
		m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
		})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
		
		if(googleAnalyticsID && googleAnalyticsID != ''){
		//	ga('create', googleAnalyticsID, 'auto');
		}

			
            var PREBID_TIMEOUT = 1000;
            var FAILSAFE_TIMEOUT = 3000;

            var adUnits = [{
                /*needs to be GENERIC*/
				code: tan_dfpcode + adPositionTag,
				mediaTypes: {
                    banner: {
                        sizes: adPositionSizes
                    }
                },
                bids: [
					{
                    bidder: 'districtm',
                    params: {
                        placementId: tan_districtMplacementId	//specific berkshire
                        }
                    },{
					bidder: 'sharethrough',
						params: {
							pkey: tecnavia_sharethrough,
							iframe:true
						}
					},{
                    bidder: 'districtmDMX',
                    params: {
                        dmxid: tan_dmxid, //specific berkshire
						memberid: tan_dmxmemberId //Tecnavia account
                        }
					},{
                    bidder: 'appnexus',
                    params: {
                        placementId: tan_appNexusPID, //ID from AppNexus appnexus placementID
						supplyType: 'web' //options 'web', 'mobile_web', 'mobile_app'
						//allowSmallerSizes: true, //probably want this on the leaderboard and 300x300 sizes
						//position: 0 //1 is above the fold, 2 below the fold, 0 is unknown (will set on leaderboard as 1)
                        }
					
                    }]
				}
            ];

            const customConfigObject = {
                "buckets": [
                	{
                        "precision": 2, //default is 2 if omitted - means 2.1234 rounded to 2 decimal places = 2.12
                        "min": 0,
                        "max": 5,
                        "increment": 0.05
                    },
					{
                        "precision": 2,
                        "min": 5,
                        "max": 10,
                        "increment": 0.10
                    },
                    {
                        "precision": 2,
                        "min": 10,
                        "max": 20,
                        "increment": 0.50
                    }/*,
                    {
                        "precision": 2,
                        "min": 20,
                        "max": 50,
                        "increment": 1
                    }
					*/
                ]
            };
            /*star part of google standard tag*/
            var googletag = googletag || {};
            googletag.cmd = googletag.cmd || [];
            googletag.cmd.push(function() {
                googletag.pubads().disableInitialLoad();
            });
			/*end part of google standard tag*/
			
            var pbjs = pbjs || {};
            pbjs.que = pbjs.que || [];

            pbjs.que.push(function() {
                pbjs.addAdUnits(adUnits);
                pbjs.setConfig({
                	priceGranularity: customConfigObject
                });
				if(googleAnalyticsID && googleAnalyticsID != ''){
/*					pbjs.enableAnalytics([{
						provider: 'ga',
						options: {
							enableDistribution: false
						}
					}]);	*/				
				}
                pbjs.requestBids({
                    bidsBackHandler: initAdserver,
                    timeout: PREBID_TIMEOUT
                });
            });

            function initAdserver() {
                if (pbjs.initAdserverSet) return;
                pbjs.initAdserverSet = true;
                googletag.cmd.push(function() {
                    pbjs.que.push(function() {
                        pbjs.setTargetingForGPTAsync();
                        googletag.pubads().refresh();
                    });
                });
            }
            
            // in case PBJS doesn't load
            setTimeout(function() {
                initAdserver();
            }, FAILSAFE_TIMEOUT);
            /*END TECNAVIA CUSTOM BIDDER HERE*/
			
