    /*
     ___    ___
     \   \  \   \
      \ \ \__\ \ \
       \_\______\_\
    Independent, \ \
    Creative,     \ \__
    Digital        \___\
    and good at it.
    morphlondon.com
    */  
    var isiPad = navigator.userAgent.match(/iPad/i) != null || navigator.userAgent.match(/iPhone/i) != null ;
    var ver = '';
    if(isiPad){
        var s = navigator.userAgent.indexOf('CPU OS ') + 7;
         ver = parseInt( navigator.userAgent.substring(s, s + 1) );
    }
    var isMobile = /android|blackberry|symbian|iemobile|ipad|iphone/gi.test(navigator.userAgent);
    var vidBtn = (isiPad) ? 'click-to-play.gif' : 'play-btn.gif';
    var imgUrls =[];
    var vidList = new Array();
    var currentVid;
    var maxPage=2;
    var fold;
    var canPage = 1;

    var i = 0;
    function postLoad(){
        $('img.post-load').each(function(){
            var img = $(this);         
            var pos = img.offset().top;
            //if image is past the fold log it and give it an identifer ELSE give it iots originam src
            if(pos > fold) {
                imgUrls.push( {id:i,src:img.attr('data-image-url'),pos:pos} );
                img.attr({'data-index':i});
            }else{
                img.attr('src',img.attr('data-image-url'));
            }
            i++;
        });
    }
    
    //this function is called every time a yt player is ready and checks if it should be auto played
    function videoAutoPlay(id){
        var url = window.location.hash,
        action = url.split('/');
        if(action[1] == 'play'){
            var vidId = action[2];
            if(id == vidId)
                loadPlayVideo(vidId);
        }
    } 
    
    function getQuerystring(key, default_)
    {
      if (default_==null) default_=""; 
      key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
      var regex = new RegExp("[\\?&]"+key+"=([^&#]*)");
      var qs = regex.exec(window.location.href);
      if(qs == null)
        return default_;
      else
        return qs[1];
    }
    
    function grayscaleImage(imgObj){
            var canvas = document.createElement('canvas');
            var canvasContext = canvas.getContext('2d');

            var imgW = imgObj.width;
            var imgH = imgObj.height;
            canvas.width = imgW;
            canvas.height = imgH;
            canvasContext.drawImage(imgObj, 0, 0);
            var imgPixels = canvasContext.getImageData(0, 0, imgW, imgH);

            for(var y = 0; y < imgPixels.height; y++){
                for(var x = 0; x < imgPixels.width; x++){
                    var i = (y * 4) * imgPixels.width + x * 4;
                    var avg = (imgPixels.data[i] + imgPixels.data[i + 1] + imgPixels.data[i + 2]) / 3;
                    imgPixels.data[i] = avg; 
                    imgPixels.data[i + 1] = avg; 
                    imgPixels.data[i + 2] = avg;
                }
            }

            canvasContext.putImageData(imgPixels, 0, 0, 0, 0, imgPixels.width, imgPixels.height);
            return canvas.toDataURL();
    }
    
    function grayscaleImageIE(imgObj){
        imgObj.style.filter = 'progid:DXImageTransform.Microsoft.BasicImage(grayScale=1)';
    }
    
    function playVideo(id) {
      player = document.getElementById(id);
      if (player) {
        player.seekTo(0);
        player.playVideo();
      }
    }
    
    function loadPlayVideo(id) {
      player = document.getElementById(id);
      if (player) {
        //player.seekTo(0);
        player.loadVideoById(id,0);
      }
    }
    
    function stopVideo(id) {
        if (player) {
            player.stopVideo();
        }
    }
    
  //youtubeplayerready
    
    function onytplayerStateChange(newState,id) {
        var player = currentVid;
        var btn = $('#'+player).parent('.vid').siblings('.play-btn');
        //2 stopped, 0 ended
        if ( newState == 0) {
            setStartStopState(false,player,btn);   
        }else if (newState == 1){//if playing
            setStartStopState(true,player,btn);
        }
    }
    
    function setStartStopState(start,player,btn){
        if(start){
            if( btn.parent('.img-vid-cont').length > 0 ){ // if case study media (small)
                //btn.siblings('.vidImg').hide();
                var mediaName = btn.siblings('.media-info').children().eq(0);
                mediaName.text(mediaName.data('media-name'));
                btn.siblings('.vidImg').animate({opacity:'0.0'},1000,function(){
                    btn.siblings('.vidImg').hide();
                });
            }else if( btn.parent('.home-img-vid-cont').length > 0 ){ //if home page
                //var mediaName = btn.parent().siblings('.media-info').children().eq(0);
                //mediaName.text(mediaName.data('media-name'));
                
                btn.animate({opacity:'0.0'},800).siblings('.vidImg').animate({opacity:'0.0'},1000)
                .siblings('.case-study-header').animate({opacity:'0.0'},1000,function(){
                    btn.hide().children('img').attr('src',BASE_URL+'/wp-content/themes/lambie-nairn-2011-1.0/assets/img/'+vidBtn)
                    .parent('a').siblings('.vidImg').hide().siblings('.case-study-header').hide();
                });
            }else{ // if case study Feature
                var mediaName = btn.siblings('.media-info').children().eq(0);
                mediaName.text(mediaName.data('media-name'));
                
                btn.animate({opacity:'0.0'},800).siblings('.vidImg').animate({opacity:'0.0'},1000)
                .siblings('.cs-details').animate({opacity:'0.0'},1000,function(){
                    btn.hide().children('img').attr('src',BASE_URL+'/wp-content/themes/lambie-nairn-2011-1.0/assets/img/'+vidBtn)
                    .parent('a').siblings('.vidImg').hide().siblings('.cs-details').hide();
                });
            }//end vid type if
        }else{
            if( btn.parent('.img-vid-cont').length > 0 ){//if CASE STUDY MEDIA
                 $('#'+player).parent('.vid')
                 .siblings('.vidImg').show().animate({opacity:'1.0'},50,function(){
                     $('#'+player).replaceWith('<div id="'+player+'"></div>');
                 })
                 .siblings('.play-btn').show().animate({opacity:'1.0'},200);
             }else if( btn.parent('.home-img-vid-cont').length > 0 ){//if HOMEPAGE
                 $('#'+player).parent('.vid')
                 .siblings('.vidImg').show().animate({opacity:'1.0'},50,function(){
                      $('#'+player).replaceWith('<div id="'+player+'"></div>');
                  })
                 .siblings('.play-btn').show().animate({opacity:'1.0'},200)
                 .siblings('.case-study-header').show().animate({opacity:'1.0'},200);
             }else{//IF CASE STUDY FEATURe
                 $('#'+player).parent('.vid')
                 .siblings('.vidImg').show().animate({opacity:'1.0'},50,function(){
                      $('#'+player).replaceWith('<div id="'+player+'"></div>');
                  })
                 .siblings('.play-btn').show().animate({opacity:'1.0'},200)
                 .siblings('.cs-details').show().animate({opacity:'1.0'},200);
             }
        }
    }

$(document).ready(function(){
    fold = $(window).height();
    postLoad();
    
    //fix line height accross windows and osx coz im on one!
    if(navigator.platform.indexOf('Win') > -1){
        $('#site-title').css('margin-top','-2px');
        $('#site-nav').css('margin-top','1px');
        //$('a.social-icons').css('margin-top','-2px');
    }
    if(navigator.userAgent.indexOf('Firefox') > -1 && navigator.platform.indexOf('Mac') > -1){
        $('#lang-list').css('margin-top','3px');
    }
    if(isMobile){
        $('#footer').hide();//fixed positioning fails on mobile
    }  
         
    //ipad set up
    if(isiPad){
        //header alignment
            //$('#site-nav').css('margin-top','2px');
            //$('#search').css('margin-top','1px');
        //footer set up
        //btns
        $('a.play-btn').children('img').attr('src',BASE_URL+'/wp-content/themes/lambie-nairn-2011-1.0/assets/img/click-to-play.gif');
        if(ver < 5){
            $('#footer').css('position','static');
            // check if it needs to be sent to the bottom of the page
            if( $(window).height() - 20 > $('#footer').offset().top )
                $('#footer').css({'position':'absolute','left':'0','bottom':'0'});    
        }
    } 
    
    if( $('#client-grid').length > 0){
        //set up about page client grid
        var clientGridLoaded = setInterval(function(){  
            if( $('.client-grid-itm').eq($('.client-grid-itm').length - 1).children('a').children('img').height() >= 76 ){//wait until all images are loaded (check the last img has full height)  
                $('.client-grid-itm').each(function(){
                    var imgObj = $(this).children('a').children('img').get(0);
                    $(this).css('background-image','url('+imgObj.src+')' );
                        if($.browser.msie){
                            grayscaleImageIE(imgObj);
                        } else {
                           $(this).children('a').children('img').attr('src', grayscaleImage(imgObj) );
                        }
                });   
                clearInterval(clientGridLoaded);
            }  
        },100);    
    } 
    
    //set up reels for carousels
    $('.reel').each(function(){
        var itmWidth = $(this).children().eq(0).outerWidth();
        $(this).width( itmWidth * $(this).children().length + 10 ); // plus 10 for good luck 
    });
    
    //CAROUSEL
    var caroInterval;
    if( $('.caro').length > 0 ){ 
        setCaroOff('on');   
    }
    
    $('#office-hero').children('ul.reel').children('li').click(function(){
        setCaroOff();
        var caro = $('.caro');
        var reel = caro.children('ul'),
            pos = caro.attr('data-position'),
            max = reel.children('li').length - 1;
        if(pos <= (max - 1)){
            reel.stop().animate({'left': - ((parseInt(pos) + 1) * 604) + 'px' },1000,'easeInOutQuad',function(){ setCaroOff('on'); });
            caro.attr('data-position', parseInt(caro.attr('data-position')) + 1 );
        }else{
            reel.stop().animate({'left': '0px' },2000,'easeInOutQuad',function(){ setCaroOff('on'); });
            caro.attr('data-position', 0);
        }
        return false;
    });
    
    function setCaroOff(on){
        if( on != undefined){
            var caro = $('.caro');
            caroInterval = setInterval(function(){
                var reel = caro.children('ul'),
                pos = caro.attr('data-position'),
                max = reel.children('li').length - 1;
                if(pos <= (max - 1)){
                    reel.stop().animate({'left': - ((parseInt(pos) + 1) * 604) + 'px' },1000,'easeInOutQuad');
                    caro.attr('data-position', parseInt(caro.attr('data-position')) + 1 );
                }else{
                    reel.stop().animate({'left': '0px' },2000,'easeInOutQuad');
                    caro.attr('data-position', 0);
                }

            },5000);
        }else{
            clearInterval(caroInterval);
        }
    }
    
    //Like btns
    if( $('.like-cont').length > 0 ){
        $('.like-cont').html('<fb:like href="'+window.location+'" send="false" layout="button_count" width="150" show_faces="false" action="like" font=""></fb:like>');
        if (typeof FB  != "undefined"){
            FB.XFBML.parse(document.getElementById('like'))
        }
    }  
   
    $(window).scroll(function(){
        for(i in imgUrls){
            if( ($(window).scrollTop() + fold) >= imgUrls[i].pos ){
                $('img[data-index="'+imgUrls[i].id+'"]').css({opacity:'0.0'})
                .attr('src',imgUrls[i].src).animate({opacity:'1.0'},500); 
                delete imgUrls[i];
            } 
        }  
    
        //PAG
        if(isiPad){
            //do nothing
        }else if( navigator.userAgent.indexOf('Firefox') > -1){
            if( $(window).scrollTop() + $(window).height() >= (document.body.offsetHeight - 1 ) && canPage == 1 ) {        
                canPage = 0;
                page();
            }
        }else if( navigator.userAgent.indexOf('MSIE') > -1){
            if($(window).scrollTop() + $(window).height() == document.body.offsetHeight && canPage == 1 ) {   
                canPage = 0;
                page();
            }
        }else{
            if($(window).scrollTop() + $(window).height() == document.height && canPage == 1 ) {   
                canPage = 0;
                page();
            }
        }

    }).resize(function(){
        //window resize
    }); 
    
    var paging = 0;
    function page(){
        if(paging == 0){
            paging = 1;
        
            if($('#work').length > 0 || $('#news').length > 0 || $('#search-page').length > 0) {
             
                var requestPage = parseInt( $('section.wrapper').attr('data-current-page') ) + 1;
                var page = $('section.wrapper').attr('id');
                if(page=='search-page') 
                    page = 'search';

                if(requestPage <= maxPage){
                    $('body').append('<img src="'+BASE_URL+'/wp-content/themes/lambie-nairn-2011-1.0/assets/img/pag-load.gif" id="pag-loader" alt="loading" />');
                    var sTerm = ($('#search-page').length > 0) ? getQuerystring('s')  : '';// if on search page, get query string
                    $.getJSON(
                        BASE_URL+"/wp-admin/admin-ajax.php",
                        {
                            page_type: page,
                            page: requestPage,
                            s: sTerm,
                            action: 'get_pagination'
                        },
                        function(data) {
                            maxPage = data.max_num_pages;
                            $('#pag-loader').remove();
                            for(i in data.results){
                                if(page == 'work'){
                                    if( $('#work-'+data.results[i].ID ).length == 0){
                                        var third = ( ( (parseInt(i)+1) / 3 ).toString().length == 1 ) ? 'end' : '';
                                        $('#work-grid').append('<li style="opacity:0.0;" id="work-'+data.results[i].ID+'" class="grid-col292 fade-in '+third+'"><a href="'+data.results[i].link+'"><img class="post-load" data-image-url="'+data.results[i].image[0]+'" src="'+BASE_URL+'/assets/img/292.gif" width="292" height="164" alt=""/></a><h3 class="work-client">'+data.results[i].title+'</h3></li>');
                                        $('.work-title').css({opacity:'0.0'});
                                    }
                                }else if(page == 'news'){
                                    if( $('#news-'+data.results[i].ID ).length == 0){
                                        var img = (data.results[i].image == false)? '<div class="grid-col604 gray six40"></div>' : '<a href="'+data.results[i].link+'"><img data-image-url="'+data.results[i].image[0]+'" src="'+BASE_URL+'/assets/img/604.gif" class="grid-col604 post-load" width="604" height="340" alt="" data-src="'+data.results[i].image[0]+'"></a>' ; 
                                        $('#news').append('<article style="opacity:0.0;" id="news-'+data.results[i].ID+'" class="news-article fade-in '+data.results[i].colour+' clearfix">'+img+'<div class="grid-col292 nws-copy-col end"><h3 class="title-18 '+data.results[i].colour+'"><a href="'+data.results[i].link+'">'+data.results[i].title+'</a></h3><p>'+data.results[i].excerpt+'</p><a href="'+data.results[i].link+'" class="news-cta">'+data.results[i].readmore+'</a><p class="news-time paddingTop20">'+data.results[i].date+'</p></div></article>');
                                    }
                                }else if(page == 'search'){
                                    if( $('#search-'+data.results[i].ID ).length == 0){
                                        $('.results-block').append('<article id="search-'+data.results[i].ID+'" style="opacity:0.0;" class="fade-in"><h4 class="result-title"><a href="'+data.results[i].link+'">'+data.results[i].title+'</a></h4><p>'+data.results[i].excerpt+'</p><a href="'+data.results[i].link+'" class="result-cta">More</a></article>');   
                                    }
                                }
                            }
                            postLoad();
                            $('.fade-in').animate({opacity:'1.0'},500,function(){
                                $('.fade-in').each(function(){
                                     $(this).removeClass('fade-in');
                                }); 
                            });
                            $('section.wrapper').attr('data-current-page',requestPage); 
                        } 
                    );//end getjson
                }   
            }
            paging = 0;
            canPage = 1;
        }//end is paging if
        
    }   
  
    $('.play-btn').click(function(){
        var btn = $(this);
        var vidId = btn.siblings('.vid').children('div').attr('id');
        var vidDim = [];
            vidDim.width = ( btn.parent('.case-study-header').length > 0 || btn.parent('.home-img-vid-cont').length > 0 ) ? '916' : '604'; 
            vidDim.height = ( btn.parent('.case-study-header').length > 0 || btn.parent('.home-img-vid-cont').length > 0 ) ? '515' : '340'; 
        
        if(isiPad){
            btn.siblings('.vid').children('div').replaceWith('<object width="'+vidDim.width+'" height="'+vidDim.height+'"><param name="movie" value="http://www.youtube.com/v/'+vidId+'?version=3&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/'+vidId+'?version=3&amp;hl=en_US" type="application/x-shockwave-flash" width="'+vidDim.width+'" height="'+vidDim.height+'" allowscriptaccess="always" allowfullscreen="true"></embed></object>');
        } else {
            //remove any existing vids
            setStartStopState(false,currentVid,btn);
            
            btn.fadeOut();
            var mediaName = btn.siblings('.media-info').children().eq(0);
            if(mediaName.length == 1){
                mediaName.data('media-name',mediaName.text()).text(LOADING_VIDEO_COPY);
            }
            
            //insert player
            var params = { allowScriptAccess: "always", wmode:'opaque' };
            var atts = { id: vidId};
            swfobject.embedSWF('http://www.youtube.com/e/'+vidId+'?enablejsapi=1&playerapiid='+vidId+'&controls=0&iv_load_policy=3&rel=0&showinfo=0,',vidId,vidDim.width,vidDim.height,'8', null, null, params, atts);
            
            if(BrowserDetect.browser == 'Firefox' && BrowserDetect.version < 4.0 || BrowserDetect.browser == 'Explorer' && BrowserDetect.version < 9.0){
                btn.siblings('.vidImg').fadeOut();
            }
        }  
        return false;
    });
    
    var clientLstTimeout;
    $('#by-client').mouseover(function(){
        clearTimeout(clientLstTimeout);
        $('#client-filter').animate({opacity:'1.0','height': $('#client-filter').children('ul').outerHeight() + 7 },600);
        //rollover states on btns
        $(this).addClass('active')
        .siblings('#by-newest').removeClass('active');
    }).mouseout(function(){
        setClientFiltrClose();
    }).toggle(function(){//touch open for ios
        if(isiPad){
            $('#by-client').addClass('active')
            .siblings('#by-newest').removeClass('active');
            $('#client-filter').animate({opacity:'1.0','height': $('#client-filter').children('ul').outerHeight() + 7 },400);
        }
    },function(){
        if(isiPad){
            //rollover states on btns
            $('#by-client').removeClass('active')
            .siblings('#by-newest').addClass('active');
            $('#client-filter').animate({opacity:'0.0','height': 0 },800);
        }
    });
    
    $('#client-filter').mouseover(function(){
        clearTimeout(clientLstTimeout);
    }).mouseout(function(){
        setClientFiltrClose();
    });
    
    function setClientFiltrClose(){
        clientLstTimeout = setTimeout(function(){
            $('#client-filter').animate({opacity:'0.0','height': 0 },800);
            //rollover states on btns
            $('#by-client').removeClass('active')
            .siblings('#by-newest').addClass('active');
        },500);
    }
    
    $('a.social-icons').hover(function(){
        $(this).stop().children('span').fadeOut();
    },function(){
        $(this).stop().children('span').fadeIn();
    }); 
    
    $('#search').focus(function(){
        if($(this).val() == SEARCH_COPY)
            $(this).val('');
    }).blur(function(){
        if($(this).val() == '')
            $(this).val(SEARCH_COPY);
    });
    
    $('.twitter').click(function(){
        window.open($(this).attr('href'),'Lambie Nairn on Twitter','left=100,top=100,width=560,height=530,toolbar=1,resizable=0');
        return false;
    });

	/*FOLLOW________________________*/
	var followLstTimeout;
    $('.follow').mouseover(function(){
        clearTimeout(followLstTimeout);
        $('#follow-menu').animate({opacity:'1.0','height': $('#follow-menu').children('ul').outerHeight() + 7 },600);
    }).mouseout(function(){
        setFollowMenuClose();
    }).toggle(function(){//touch open for ios
        if(isiPad){
            $('#follow-menu').animate({opacity:'1.0','height': $('#follow-menu').children('ul').outerHeight() + 7 },400);
        }
    },function(){
        if(isiPad){
            //rollover states on btns
            $('#follow-menu').animate({opacity:'0.0','height': 0 },800);
        }
    });
    
    $('#follow-menu').mouseover(function(){
        clearTimeout(followLstTimeout);
    }).mouseout(function(){
        setFollowMenuClose();
    });
    
    function setFollowMenuClose(){
        followLstTimeout = setTimeout(function(){
            $('#follow-menu').animate({opacity:'0.0','height': 0 },800);
            //rollover states on btns
        },500);
    }
    
    $('.tweet').click(function(){
        window.open($(this).attr('href'),'Tweet from Lambie Nairn','left=100,top=100,width=580,height=330,toolbar=1,resizable=0');
        return false;
    });
    
    //work page image rollover
    $('.work-title').css({opacity:'0.0'});

    $('#work-grid').find('img').live('mouseover',function(){
        $(this).parent('a').siblings('.work-title').css({opacity:'1.0'}).siblings('.work-client').addClass('light-gray-rollover');
    }).live('mouseout',function(){
        $(this).parent('a').siblings('.work-title').css({opacity:'0.0'}).siblings('.work-client').removeClass('light-gray-rollover');
    });
    $('.work-title').live('mouseover',function(){
        $(this).css({opacity:'1.0'}).next('.work-client').addClass('light-gray-rollover');
    }).live('mouseout',function(){
        $(this).next('.work-client').removeClass('light-gray-rollover');
    });
    
    $('a.people-thumb').mouseover(function(){
        var link = $(this).attr('data-link-id');
        $('#'+link).addClass('active');
    }).mouseout(function(){
        var link = $(this).attr('data-link-id');
        $('#'+link).removeClass('active');
    });
    
    
    $('#client-grid').children('li')
    .mouseover(function(){
        var clientGridTimeout;
        clearTimeout(clientGridTimeout);
        $(this).children('a').children('img').animate({opacity:'0.0'},300);
    }).mouseout(function(){
        var moused = $(this);
        clientGridTimeout = setTimeout(function(){
            moused.children('a').children('img').animate({opacity:'1.0'},300);
        },100);
    });

});


var BrowserDetect = {
	init: function () {
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
		this.OS = this.searchString(this.dataOS) || "an unknown OS";
	},
	searchString: function (data) {
		for (var i=0;i<data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{
			string: navigator.userAgent,
			subString: "Chrome",
			identity: "Chrome"
		},
		{ 	string: navigator.userAgent,
			subString: "OmniWeb",
			versionSearch: "OmniWeb/",
			identity: "OmniWeb"
		},
		{
			string: navigator.vendor,
			subString: "Apple",
			identity: "Safari",
			versionSearch: "Version"
		},
		{
			prop: window.opera,
			identity: "Opera",
			versionSearch: "Version"
		},
		{
			string: navigator.vendor,
			subString: "iCab",
			identity: "iCab"
		},
		{
			string: navigator.vendor,
			subString: "KDE",
			identity: "Konqueror"
		},
		{
			string: navigator.userAgent,
			subString: "Firefox",
			identity: "Firefox"
		},
		{
			string: navigator.vendor,
			subString: "Camino",
			identity: "Camino"
		},
		{		// for newer Netscapes (6+)
			string: navigator.userAgent,
			subString: "Netscape",
			identity: "Netscape"
		},
		{
			string: navigator.userAgent,
			subString: "MSIE",
			identity: "Explorer",
			versionSearch: "MSIE"
		},
		{
			string: navigator.userAgent,
			subString: "Gecko",
			identity: "Mozilla",
			versionSearch: "rv"
		},
		{ 		// for older Netscapes (4-)
			string: navigator.userAgent,
			subString: "Mozilla",
			identity: "Netscape",
			versionSearch: "Mozilla"
		}
	],
	dataOS : [
		{
			string: navigator.platform,
			subString: "Win",
			identity: "Windows"
		},
		{
			string: navigator.platform,
			subString: "Mac",
			identity: "Mac"
		},
		{
			   string: navigator.userAgent,
			   subString: "iPhone",
			   identity: "iPhone/iPod"
	    },
		{
			string: navigator.platform,
			subString: "Linux",
			identity: "Linux"
		}
	]
};
BrowserDetect.init();


