$j = jQuery.noConflict();

// Plug-ins:
(function($) {
                
                if(!$j.cookie("current_country") || $j.cookie("current_country") != current_country) {
                    $j.cookie("current_country", current_country, { expires: 1, path: '/' });
                    
                    if(current_country == "LT") {
                        //$j(window.location).attr('href','http://www.diskusija.lt/lt/');
                        window.location = "http://www.diskusija.lt/lt/";
                    }
                }

				// Calculate fixed tabs width
				$j.fn.fixShadow = function() {
					
				$j(this).each(function() {
					
					$j(this).append('<i class="tshadow">'+ $(this).text() +'</i>');
					
				
				});

				}
})(jQuery);

$j(document).ready(function(){
				
				// Show and hide more news
				blockNews();
				
				// file upload
				$j('.file-upload input[type=file]').change(function(){
					$j(this).parent().find('input.upload').attr('value', $j(this).attr('value'));
				});
				
				// fix ie shadow
                /*
				if(jQuery.browser.msie) {
					$('#nav li .bu span, .date-alt span').fixShadow();
				}
                */
				
				// fix valign
				if(jQuery.browser.msie && parseInt(jQuery.browser.version) == 7) {
					$j('.clients-list img').each(function(){
						$j(this).css('margin-top', '-'+$(this).outerHeight()/2)
					});
				}
                
                $j('.footer .menu .sub-menu').each(function(){
                    $j(this).parent('li').addClass('arr');
                });
                    
                $j('div.wpcf7-response-output').mouseover(function() {
                    $j(this).fadeOut('fast');
                });
                
                $j('.wp_bannerize_clients ul').cycle({
                    fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
                });
});

function 		blockNews() {

				$j('.bl-news .toggle').click(function(){
					
					$j(this).parents('.bl-news').toggleClass('closed');
					
					return false;
					
				});

}
