12 C
New Delhi, India
Monday, February 27, 2017
Khanderi launched in water: 10 interesting features

Khanderi launched in water: 10 interesting features

0
19

12 Jan, 2017

‘;
}
htm+=’

‘;
$(“body”).append(htm);
$(“.popbox”).fadeIn(500);
}

$(“body”).on(“click”,”.popupbox .close”,function(){
var popbox=$(this).parent().parent();
popbox.fadeOut(500,function(){
popbox.remove();
});
});
return toiwe;
});

/* Social Sharing */
define(“ui_socialshare”,[“jquery”,”ui”,”event”,”load”,”toiwe”],function($,ui,event,load,toiwe){
$.fn.socialShare = function(options) {
var toiws=$(this); //Main Element
// This is the easiest way to have default options.
var s = $.extend({},{
// These are the defaults.
/*
header:”#header”, //Page Header Class *Mandatory for Sticky
footer:”#footer”, //Page Footer Class *Mandatory for Sticky
topholder:”#socialbuttons”, //Top Holder DIV ID for Social Buttons – Container if available in page will override sticky rule *Mandatory for Sticky
element:”article-social”, //Class Assigned to Share Buttons
c_sticky:”sticky”, //Sticky Class *Mandatory for Sticky
c_maxbottom:”maxbottom”, //Class used for page bottom
c_ceclass:”toishare”, //Class used for icons rendered
c_sprite:”article-sprite”, //Sprite Class
c_font:”main-content”,
i_comment:”write”, //comments ID
pgtag:”pgtag”, //PgTag of inner icons
position:”position”, //Widget Position*/
fontdefaultsize:100,
fontchangesize:5,
t_cetag:”span”, //Tag used for rendering icons
icons:”fb,twitter,gplus,linkedin,pinterest,save,email,comment,print,fonti,fontd”, //icons
enableSticky:false,
c_name:$(this).selector,
msid:window.msid,
href:window.location.href,
image:$(“meta[property=’og:image’]”).attr(“content”),
title:$(“title:eq(0)”).text()
}, options );
if(s.enableSticky===true) {
event.subscribe(“window.scroll”, function () {
var header=$(s.header);
var footer=$(s.footer);
var topholder=$(s.topholder);
var element=$(“.”+s.element+”:first”);
if(ui.inView(topholder,true,0) || ui.inView(header,true,0)) { //returns boolean
element.removeClass(s.c_sticky);
element.removeClass(s.c_maxbottom);
//} else if(($(“.article-social”).offset().top) + $(“.article-social”).height() > $(“#socialbuttonsbottom”).offset().top) {
} else if (ui.inView(footer,true,0)) { //returns boolean
element.removeClass(s.c_sticky);
element.addClass(s.c_maxbottom);
} else {
element.removeClass(s.c_maxbottom);
element.addClass(s.c_sticky);
}
});
}
var toiwso={};
$.each(toiws, function(key,val) {
toiw_s=$(this);
toiwso.title=(toiw_s.data(“title”) || s.title); //Child Element Tag
toiwso.href=(toiw_s.data(“href”) || s.href); //Child Element Tag
toiwso.cetag=s.t_cetag; //Child Element Tag
toiwso.ceclass=s.c_sprite; //Child Element Class
toiwso.fontele=$(“.”+s.c_font);
if(toiwso.fontele && toiwso.fontele.length>0) {
toiwso.fontsize=parseInt(toiwso.fontele.css(“font-size”).slice(0,-2));
} else {
toiwso.fontsize=s.fontdefaultsize;
}
if(s.c_ceclass && s.c_ceclass!=””) {
toiwso.ceclass+=” “+s.c_ceclass;
}
toiwso.pg=s.pgtag;//toiw_s.data(“pgtag”);
//toiwso.pageurl=toiw_s.data(“pageurl”);
toiwso.op=””;
toiwso.options=(toiw_s.data(“icons”) || s.icons);
toiwso.options=toiwso.options.split(“,”);
$.each(toiwso.options, function(key,val) {
toiwso.e=$(“”);
toiwso.e.addClass(val);
toiwso.e.attr(“data-type”,val);
if(toiwso.ceclass && toiwso.ceclass!=”) {
toiwso.e.addClass(toiwso.ceclass);
}
if(toiwso.pg && toiwso.pg!=”) {
toiwso.e.attr(“pg”,toiwso.pg+”#”+val);
}
if(toiwso.title && toiwso.title!=”) {
toiwso.e.attr(“data-title”, toiwso.title);
}
switch(val) {
case “fb”:
toiwso.e.attr(“data-plugin”,”facebook-share”);
break;
case “twitter”:
toiwso.e.attr(“data-plugin”,”twitter-share”);
toiwso.e.attr(“data-title”,toiwso.title);
break;
case “gplus”:
toiwso.e.attr(“data-plugin”,”googleplus-share”);
break;
case “linkedin”:
toiwso.e.attr(“data-plugin”,”linkedin-share”);
break;
case “pinterest”:
toiwso.e.attr(“data-plugin”,”pinterest-share”);
if(s.image && s.image!=”) {
toiwso.e.attr(“data-image”,s.image);
}
break;
}
toiw_s.append(toiwso.e);
});
});
$(s.c_name+” .”+s.c_ceclass).on(“click”,function(){
switch($(this).data(“type”)) {
case “save”:
pop_save();
break;
case “email”:
pop_email();
break;
case “comment”:
scrollToComments();
break;
case “print”:
window.print();
break;
case “fonti”:
if(toiwso.fontele && toiwso.fontele.length>0) {
toiwso.fontele.css(“font-size”,++toiwso.fontsize);
}
break;
case “fontd”:
if(toiwso.fontele && toiwso.fontele.length>0) {
toiwso.fontele.css(“font-size”,–toiwso.fontsize);
}
break;
}
});
function scrollToComments() {
var target = $(“#”+s.i_comment);
$(‘html, body’).animate({
scrollTop: $(target).offset().top-110
}, 2000);
}
function pop_save() {
if(require(“login”).getUser()) {
var url=”http://myt.indiatimes.com/mytimes/addActivity?activityType=Saved&uniqueAppID=”+s.msid+”&appKey=TOI&baseEntityType=ARTICLE&objectType=B&url=”+s.href;
$.ajax(url)
.done(function(data) {
//alert( “success” );
//tthis.html(data);
})
.fail(function() {
//alert( “error” );
})
.always(function() {
//alert( “complete” );
});
var h=”;
toiwe.showPopup(h,true,450,350);
} else {
require(“login”).login();
}
}
function pop_email() {
var h=”;
var p=ui.popup(h,{width:”570px”,height:”270px”});
}
function pop_email2() {
var h=”;
toiwe.showPopup(h,true,570,250);
}
}
});
/* /Social Sharing */

});

$(function() {
require([“ui_socialshare”],function(socialshare){
var options={
//options.enableSticky=true;
//options.icons=”fb,twitter,gplus,linkedin,pinterest,comment”;

c_name:$(this).selector,
header:”#header”, //Page Header Class *Mandatory for Sticky
footer:”#footer”, //Page Footer Class *Mandatory for Sticky
topholder:”#socialbuttons”, //Top Holder DIV ID for Social Buttons – Container if available in page will override sticky rule *Mandatory for Sticky
element:”article-social”, //Class Assigned to Share Buttons
c_sticky:”sticky”, //Sticky Class *Mandatory for Sticky
c_maxbottom:”maxbottom”, //Class used for page bottom
t_cetag:”span”, //Tag used for rendering icons
c_ceclass:”toishare”, //Class used for icons rendered
c_sprite:”article-sprite”, //Sprite Class
i_comment:”write”, //comments ID
icons:”fb,twitter,gplus,linkedin,pinterest,comment”, //icons
pgtag:”pgtag”, //PgTag of inner icons
position:”position”, //Widget Position
enableSticky:true,
pagemsid:window.msid,
href:window.location.href,
image:$(“meta[property=’og:image’]”).attr(“content”),
title:$(“title:eq(0)”).text()
};

//options.title=;
$(“.toiwidgets_social”).socialShare(options);
});
});

Khanderi, the second Kalvari class Scorpene submarine, was launched into water – or ‘undocked’ – by the Union minister of state for defence Subhash Bhamre at the Mazagon Dock Limited (MDL) today. The submarine will undergo rigorous tests and trials on the surface and underwater before it is commissioned into the Indian Navy as “INS Khanderi” at the end of the year in December.

Here’s a look at some of its special features:

Source link

LEAVE A REPLY