//menu
anylinkcssmenu.init("anchorclass")

//stylesheet
	$(function() {
		$.stylesheetInit();
			$('.styleswitch').bind(
				'click',
				function(e)
				{ 	$.stylesheetSwitch(this.getAttribute('rel'));
					return false;	}	); 		} 	);
//tabs
  $(document).ready(function() {
    $("#tabs").tabs();
  	$(function() {
        $('#tab1 .galleryimg').lightBox();
    });
	$(function() {
        $('#tab2 .galleryimg').lightBox();
    });
	$(function() {
        $('#tab3 .galleryimg').lightBox();
    });
	$(function() {
        $('#tab4 .galleryimg').lightBox();
    });
	$(function() {
        $('#tab5 .galleryimg').lightBox();
    });
	$(function() {
        $('#b2b .galleryimg').lightBox();
    });
	$(function() {
        $('#b2c .galleryimg').lightBox();
    });
	$(function() {
        $('#prof .galleryimg').lightBox();
    });
	$(function() {
        $('#lifestyle .galleryimg').lightBox();
    });
	$(function() {
        $('#portother .galleryimg').lightBox();
    });
 //tips 
 $('a.tips').cluetip({
     ajaxProcess: function(data) {
       $div = $('<div>' + data + '</div>').find(this.hash);
       return $div;
     }
   });
});
//external
function externalLinks() {   
 if (!document.getElementsByTagName) return;   
 var anchors = document.getElementsByTagName("a");   
 for (var i=0; i<anchors.length; i++) {   
   var anchor = anchors[i];   
   if (anchor.getAttribute("href") &&   
       anchor.getAttribute("rel") == "external")   
     anchor.target = "_blank";   
 }   
}   
window.onload = externalLinks;
//bookmark
$(function () {
	$('#selectBookmark').bookmark({sites: 
    ['facebook', 'linkedin', 'twitter']});});
//google analytics
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-25038908-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
