Subversion Repositories SmartDukaan

Rev

Rev 7680 | Rev 7783 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6967 kshitij.so 1
function toggle(containerId){
2
        var divC = document.getElementById(containerId);
3
        if (divC.style.display == 'none') {
4
            divC.style.display = 'block';
5
        } else if (divC.style.display == 'block'){
6
            divC.style.display = 'none';
7
        }
8
        else {
9
        	divC.style.display = 'none';
10
        }
11
    }
12
 
4126 varun.gupt 13
$(function(){
4984 varun.gupt 14
	function CollapsibleWidget(container)	{
15
 
16
		this.widgetContainer = container;
17
		this.collapsbiles = $(container).children('.common-widget-control-bar, .common-widget-content-area');
18
		this.isCollapsed = null;
19
 
20
		this.collapse = function()	{
21
			$(this.collapsbiles).each(function()	{
22
				$(this).slideUp();
23
			});
24
			this.isCollapsed = true;
25
		};
26
 
27
		this.open = function()	{
28
			$(this.collapsbiles).each(function()	{
29
				$(this).slideDown();
30
			});
31
			this.isCollapsed = false;
32
		};
33
 
34
		this.test = function()	{
35
		};
36
	}
4798 varun.gupt 37
 
4984 varun.gupt 38
	ResearchWidget.prototype = new CollapsibleWidget();
39
	ResearchWidget.prototype.constructor = CollapsibleWidget;
40
 
41
	function ResearchWidget(container)	{
42
		CollapsibleWidget.call(this, container);
43
	}
44
 
4798 varun.gupt 45
	function updateCompareCount()	{
46
		$('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length);
47
	}
48
 
4126 varun.gupt 49
	/** Sidebar Widgets **/
4237 varun.gupt 50
 
6840 kshitij.so 51
	$('#otg_know_more,.otg_know_more').click(function(){
6552 kshitij.so 52
		$.colorbox({
53
    		width: "490px",
6772 kshitij.so 54
    		height: "420px",
6552 kshitij.so 55
    		inline: true,
56
    		href: "<h3 style='text-align: center; margin: 18px; font-size: 14px;'>On Time Guarantee, We Pay if we Delay</h3>" +
57
		"<p style='text-align: justify; margin-left: 12px; margin-right: 12px; margin-bottom: 9px; line-height: 22px;'>Saholic stands for 100% on time delivery. We ensure all your orders reach your doorstep on or "+
58
        "before the promised delivery date. In the rare case that we deliver an order later than promised "+
59
        "we will compensate you.This Guarantee is Valid on"+
60
        "</p>" +
61
        "<ul style='list-style: disc none none; margin-left: 25px; text-align: justify; margin-right:12px; line-height: 22px;'><li>All Mobiles, Cameras, Laptops, Tablets and Accessories above Rs. 2000 in value."+
62
        "</li>"+
63
        "<li>Orders Placed using Credit/Debit Card, Net Banking, EMI, Prepaid Cash Cards."+
64
        "</li>"+
65
        "</ul>"+
6772 kshitij.so 66
        "<p style='text-align: justify; line-height: 22px; margin: 12px;'>Compensation for delay is in the form of Gift Vouchers at the rate of Rs. 50 per business day. " +
67
        "GV can be applied to ANY product on Saholic.com without limitation.</p>"+
7063 kshitij.so 68
        "<span class='right'><a target='_blank' href='/static/on-time-guarantee' style='margin-right: 12px; color: #006699';>Detailed Terms & Conditions</a></span>",
6552 kshitij.so 69
        onComplete: function(){
70
		trackEventWithGA('Widget', 'OTG Know More is clicked', '');
71
			}
72
    	});
73
	});
7680 rajveer 74
 
75
	$('#otg_know_more,.otg_know_more').click(function(){
76
		$.colorbox({
77
    		width: "490px",
78
    		height: "420px",
79
    		inline: true,
80
    		href: "<h3 style='text-align: center; margin: 18px; font-size: 14px;'>On Time Guarantee, We Pay if we Delay</h3>" +
81
		"<p style='text-align: justify; margin-left: 12px; margin-right: 12px; margin-bottom: 9px; line-height: 22px;'>Saholic stands for 100% on time delivery. We ensure all your orders reach your doorstep on or "+
82
        "before the promised delivery date. In the rare case that we deliver an order later than promised "+
83
        "we will compensate you.This Guarantee is Valid on"+
84
        "</p>" +
85
        "<ul style='list-style: disc none none; margin-left: 25px; text-align: justify; margin-right:12px; line-height: 22px;'><li>All Mobiles, Cameras, Laptops, Tablets and Accessories above Rs. 2000 in value."+
86
        "</li>"+
87
        "<li>Orders Placed using Credit/Debit Card, Net Banking, EMI, Prepaid Cash Cards."+
88
        "</li>"+
89
        "</ul>"+
90
        "<p style='text-align: justify; line-height: 22px; margin: 12px;'>Compensation for delay is in the form of Gift Vouchers at the rate of Rs. 50 per business day. " +
91
        "GV can be applied to ANY product on Saholic.com without limitation.</p>"+
92
        "<span class='right'><a target='_blank' href='/static/on-time-guarantee' style='margin-right: 12px; color: #006699';>Detailed Terms & Conditions</a></span>",
93
        onComplete: function(){
94
		trackEventWithGA('Widget', 'OTG Know More is clicked', '');
95
			}
96
    	});
97
	});
98
 
4237 varun.gupt 99
	$('#shoppingExpInfo').click(function(){
100
		$.colorbox({
4284 varun.gupt 101
    		width: "550px",
102
    		height: "320px",
4237 varun.gupt 103
    		inline: true,
104
    		href: "<h3>Shopping with Saholic.com is completely safe</h3><br />" +
4284 varun.gupt 105
		"<b>1.</b> We are part of Spice Group - India's # 1 Mobile retailer.<br /><br />" +
106
		"<b>2.</b> We procure directly from the Manufacturers - Hence we only sell genuine products with full Manufacturer Warranty.<br /><br />" +
107
		"<b>3.</b> We provide free Next Day Delivery to most locations - You can check the delivery time to your location by entering your pin code on the product page.<br /><br />" +
6173 kshitij.so 108
		"<b>4.</b> We use the best Internet Security technology - Your payment is 100% secure.<br />",
4372 varun.gupt 109
			onComplete: function(){
6261 amit.gupta 110
				trackEventWithGA('Widget', 'Safe shopping sticky banner is clicked', '');
4372 varun.gupt 111
			}
4237 varun.gupt 112
    	});
113
	});
6245 kshitij.so 114
 
6552 kshitij.so 115
 
6970 kshitij.so 116
	$('.insuranceInfo').click(function(){
117
		$.colorbox({
118
    		width: "520px",
119
    		height: "280px",
120
    		inline: true,
121
    		href: "<h3 style='font-size:15px; text-align:center; font-weight:bold; margin-left:15px; margin-top:5px;margin-bottom:10px'>Exclusively at Saholic</h3>" +
122
    		"<ul style='text-align: justify; padding-right: 10px; width: 93%; padding-left: 16px; line-height: 25px;'>"+
123
    		"<li>Only Saholic brings to you an option to protect your smartphone against theft and burglary.</li>"+
124
    		"<li>While buying your favourite mobile from Saholic, you can opt for 1 year WorldWide theft insurance.</li>"+
125
    		"<li>Introductory offer - You can opt for insurance by paying an all inclusive nominal fee of 1.5% of price of your mobile.</li>"+
7062 kshitij.so 126
    		"<a target='_blank' href='/static/insurance-terms' style='float: right; text-decoration: none;color:#006699';>Detailed Terms and Conditions</a>"+
6970 kshitij.so 127
    		"</ul>",
128
			onComplete: function(){
129
				trackEventWithGA('Widget', 'Insurance sticky banner is clicked', '');
130
			}
131
    	});
132
	});
133
 
134
 
6959 kshitij.so 135
	$('.emiInfo').click(function(){
6453 kshitij.so 136
		$.colorbox({
6967 kshitij.so 137
    		width: "590px",
138
    		height: "480px",
6453 kshitij.so 139
    		inline: true,
7051 kshitij.so 140
    		href: "<h3 style='font-size: 15px; text-align: center; font-weight: bold; margin-left: 15px; margin-bottom: 10px; margin-top: 7px;'>Completely Free EMI For 3 Months</h3>" +
6967 kshitij.so 141
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/hdfc-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 142
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9, 12 and 18 months.Completely free for 3 months<br><a onclick='toggle(\"emi-table-hdfc\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 143
    		"<div id='emi-table-hdfc' style='padding-left: 5px; display: none;'>"+
144
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
145
    		"<thead>"+
146
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
147
            "</thead>"+
148
            "<tbody>"+
149
            "<tr>"+
150
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
151
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
152
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
7011 kshitij.so 153
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
154
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
6967 kshitij.so 155
            "</tr>"+
156
            "<tr>"+
157
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
158
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>4.22%</td>"+
159
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>7.04%</td>"+
7011 kshitij.so 160
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>9.67%</td>"+
161
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>15.36%</td>"+
6967 kshitij.so 162
            "</tr>"+
163
            "</tbody>"+
164
            "</table>"+
165
            "<br>"+
166
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
167
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
6772 kshitij.so 168
    		"<br>"+
6967 kshitij.so 169
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
170
    		"</ul>"+
6959 kshitij.so 171
    		"<br>"+
6967 kshitij.so 172
    		"</div>"+
173
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/citi-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 174
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3 and 6 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-citi\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 175
    		"<div id='emi-table-citi' style='padding-left: 5px;display: none;'>"+
6970 kshitij.so 176
    		"<table width='70%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
6967 kshitij.so 177
    		"<thead>"+
178
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='2'>All Inclusive Processing Fee*</th>"+
6772 kshitij.so 179
            "</thead>"+
180
            "<tbody>"+
181
            "<tr>"+
6970 kshitij.so 182
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>3 Months</th>"+
183
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>6 Months</th>"+
6967 kshitij.so 184
            "</tr>"+
185
            "<tr>"+
186
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
187
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray; text-align: center;'>4.22%</td>"+
188
            "</tr>"+
189
            "</tbody>"+
190
            "</table>"+
191
            "<br>"+
192
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
193
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
194
    		"<br>"+
195
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
196
    		"</ul>"+
197
    		"<br>"+
198
    		"</div>"+
199
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/icici-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 200
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months.Completely free for 3 months<br><a  onclick='javascript:toggle(\"emi-table-icici\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 201
    		"<div id='emi-table-icici' style='padding-left: 5px;display: none;'>"+
202
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
203
    		"<thead>"+
6970 kshitij.so 204
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 205
            "</thead>"+
206
            "<tbody>"+
207
            "<tr>"+
208
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
6959 kshitij.so 209
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
210
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
211
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
212
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
213
            "</tr>"+
6772 kshitij.so 214
            "<tr>"+
7051 kshitij.so 215
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
6967 kshitij.so 216
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
217
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
218
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
219
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
6772 kshitij.so 220
            "</tr>"+
6967 kshitij.so 221
            "</tbody>"+
222
            "</table>"+
223
            "<br>"+
224
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
225
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
226
    		"<br>"+
6970 kshitij.so 227
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1500.</li>"+
6967 kshitij.so 228
    		"</ul>"+
229
    		"<br>"+
230
    		"</div>"+
231
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/sbi-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 232
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-sbi\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 233
    		"<div id='emi-table-sbi' style='padding-left: 5px;display: none;'>"+
234
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
235
    		"<thead>"+
6970 kshitij.so 236
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 237
            "</thead>"+
238
            "<tbody>"+
6772 kshitij.so 239
            "<tr>"+
6967 kshitij.so 240
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
241
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
242
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
243
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
244
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
6772 kshitij.so 245
            "</tr>"+
246
            "<tr>"+
7051 kshitij.so 247
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
6967 kshitij.so 248
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
249
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
250
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
251
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
252
            "</tr>"+
253
            "</tbody>"+
254
            "</table>"+
255
            "<br>"+
256
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
257
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
258
    		"<br>"+
6970 kshitij.so 259
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1000.</li>"+
6967 kshitij.so 260
    		"</ul>"+
261
    		"<br>"+
262
    		"</div>"+
263
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/hsbc-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 264
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-hsbc\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 265
    		"<div id='emi-table-hsbc' style='padding-left: 5px;display:none;'>"+
6970 kshitij.so 266
    		"<table width='70%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
6967 kshitij.so 267
    		"<thead>"+
6970 kshitij.so 268
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 269
            "</thead>"+
270
            "<tbody>"+
271
            "<tr>"+
7017 kshitij.so 272
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
273
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
274
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
275
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6967 kshitij.so 276
            "</tr>"+
277
            "<tr>"+
7051 kshitij.so 278
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
7017 kshitij.so 279
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
280
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
281
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
6772 kshitij.so 282
            "</tr>"+
6967 kshitij.so 283
            "</tbody>"+
284
            "</table>"+
285
            "<br>"+
286
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
287
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
288
    		"<br>"+
6970 kshitij.so 289
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1500.</li>"+
6967 kshitij.so 290
    		"</ul>"+
291
    		"<br>"+
292
    		"</div>"+
293
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/std-chartered-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 294
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-std-chart\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 295
    		"<div id='emi-table-std-chart' style='padding-left: 5px;display: none;'>"+
296
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
297
    		"<thead>"+
6970 kshitij.so 298
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 299
            "</thead>"+
300
            "<tbody>"+
6772 kshitij.so 301
            "<tr>"+
6970 kshitij.so 302
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%%;'>3 Months</th>"+
6967 kshitij.so 303
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
304
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
305
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6772 kshitij.so 306
            "</tr>"+
307
            "<tr>"+
7051 kshitij.so 308
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
6967 kshitij.so 309
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
310
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
311
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
6772 kshitij.so 312
            "</tr>"+
6967 kshitij.so 313
            "</tbody>"+
314
            "</table>"+
315
            "<br>"+
316
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
317
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
318
    		"<br>"+
6970 kshitij.so 319
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 500.</li>"+
6967 kshitij.so 320
    		"</ul>"+
321
    		"<br>"+
322
    		"</div>"+
323
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/axis-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 324
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months.Completely free for 3 months<br><a onclick='javascript:toggle(\"emi-table-axis\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 325
    		"<div id='emi-table-axis' style='padding-left: 5px;display: none;'>"+
326
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
327
    		"<thead>"+
6970 kshitij.so 328
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 329
            "</thead>"+
330
            "<tbody>"+
331
            "<tr>"+
332
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
333
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
334
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
335
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
336
            "</tr>"+
337
            "<tr>"+
7051 kshitij.so 338
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
6967 kshitij.so 339
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
340
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
341
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
6959 kshitij.so 342
            "</tr>"+
6967 kshitij.so 343
            "</tbody>"+
344
            "</table>"+
345
            "<br>"+
346
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
347
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
348
    		"<br>"+
6970 kshitij.so 349
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 2500.</li>"+
6967 kshitij.so 350
    		"</ul>"+
351
    		"<br>"+
352
    		"</div>"+
353
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/indusind-icon.png' style='vertical-align: middle;'></div>"+
7062 kshitij.so 354
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 6, 9 and 12 months. <br><a onclick='javascript:toggle(\"emi-table-indus\");' style='cursor: pointer; text-decoration: none;color:#006699;'>See Full Details</a></p></div>"+
6967 kshitij.so 355
    		"<div id='emi-table-indus' style='padding-left: 5px;display: none;'>"+
356
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
357
    		"<thead>"+
358
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
359
            "</thead>"+
360
            "<tbody>"+
6959 kshitij.so 361
            "<tr>"+
6967 kshitij.so 362
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
363
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
364
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6959 kshitij.so 365
            "</tr>"+
366
            "<tr>"+
7051 kshitij.so 367
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%%</td>"+
6967 kshitij.so 368
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
369
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
6959 kshitij.so 370
            "</tr>"+
6772 kshitij.so 371
            "</tbody>"+
372
            "</table>"+
373
            "<br>"+
6967 kshitij.so 374
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
375
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
376
    		"<br>"+
377
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
378
    		"</ul>"+
379
    		"<br>"+
380
    		"</div>"+
381
    		"<br><br>",
6453 kshitij.so 382
			onComplete: function(){
383
				trackEventWithGA('Widget', 'Emi info widget is clicked', '');
384
			}
385
    	});
386
	});
6245 kshitij.so 387
 
6792 vikram.rag 388
	$('a.mk_best_deal_detail').live('click', function(){
389
		var offerLinkHtml = '';
390
		if(OFFER_HELP_LINK!='$OFFER_DETAIL_LINK') {
6795 vikram.rag 391
			offerLinkHtml = '<a target="_blank" href="' +OFFER_HELP_LINK + '" style="z-index: 1; float: right; bottom: 0px; right: 0px; margin: 15px; position: relative;">More</a></span>';
6792 vikram.rag 392
		}
393
		$.colorbox({
394
			width: "550px",
395
    		height: "300px",
396
    		inline: true,
397
    		href: '<h3 style="text-align: left; padding: 10px;">Offer Details</h3>' +
398
    			'<p style="text-align: justify; line-height: 22px; margin: 12px;">' + OFFER_HELP_TEXT +
399
    			'</p><span class="right">' + offerLinkHtml 
400
		});
401
	});
6453 kshitij.so 402
 
6792 vikram.rag 403
 
6245 kshitij.so 404
	$('#pickupstoreInfo').click(function(){
405
		$.colorbox({
406
    		width: "550px",
407
    		height: "370px",
408
    		inline: true,
409
    		href: "<h3>Frequently Asked Questions</h3><br />" +
7062 kshitij.so 410
		"<b style='color: black; cursor: default;'>Q)</b> What is 'Buy Online & Pickup in Store' ?<br /><br />" +
411
		"<b style='color: black; cursor: default;'>A)</b> Buy Online from Saholic.Com and pickup your product from the nearest Spice Hotspot Retail Store.<br /><br />" +
412
		"<b style='color: black; cursor: default;'>Q)</b> How do i avail this facility ?<br /><br />" +
413
		"<b style='color: black; cursor: default;'>A)</b> Simply select Pickup In Store On the Shipping Page and select your nearest store. Please note this facility is available only in Delhi/NCR.</a><br /><br />"+
414
		"<b style='color: black; cursor: default;'>Q)</b> When will the product be available for pickup ?<br /><br />" +
415
		"<b style='color: black; cursor: default;'>A)</b> You can enter your pin code on the Product Page to find estimated time to deliver. After placing the order we will also give you the estimated date for pickup.</a><br /><br />",
6245 kshitij.so 416
 
417
			onComplete: function(){
6262 amit.gupta 418
				var ev = "Product Page";
6303 amit.gupta 419
				var label = window.location.pathname;
6264 amit.gupta 420
				if (label=="" || label=="#")
6261 amit.gupta 421
				{
6303 amit.gupta 422
					label = "";
6262 amit.gupta 423
					ev = "Home Page";
6261 amit.gupta 424
				}
6262 amit.gupta 425
				else if (label.indexOf("shipping") != -1){
426
					ev = "Shipping Page";
427
					var blkstr = [];
6263 amit.gupta 428
					jQuery("#cartDetail").find("span.cart-item-name").each(function(key,str){
6262 amit.gupta 429
						blkstr.push(str);
430
					});
6303 amit.gupta 431
					label = blkstr.join(", ");
432
				} else if (label.substr(label.lastIndexOf('/') + 1).length==5 && typeof label.substr(label.lastIndexOf('/') + 1) =="number") {
433
					ev = "Category Page";
434
				} else if (label.substr(label.lastIndexOf('-') + 1).length==7  && typeof label.substr(label.lastIndexOf('-') + 1) =="number") {
435
					ev = "Product Page";
6262 amit.gupta 436
				}
6261 amit.gupta 437
				trackEventWithGA('Pickup in Store LightBox', ev, label);
6245 kshitij.so 438
			}
439
    	});
440
	});
4126 varun.gupt 441
 
5420 amit.gupta 442
	$('.common-widget-top-bar').live('click', function(e, callback){
4126 varun.gupt 443
		var isColapsed = $(this).data('is_colapsed') == true ? true : false;
444
		var widgetBox = $(this).siblings('.common-widget-content-area');
445
		var controlBox = $(this).siblings('.common-widget-control-bar');
446
		var controlBoxArrowImg = $(this).find('img');
4210 varun.gupt 447
 
4126 varun.gupt 448
		if (isColapsed)	{
449
			if(controlBox.length > 0)	{
450
				$(controlBox).slideDown('fast', function(){
5420 amit.gupta 451
					$(widgetBox).slideDown('fast', callback);
4126 varun.gupt 452
					$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
453
				});
454
			} else	{
455
				$(widgetBox).slideDown();
456
				$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
457
			}
458
		} else	{
459
			$(widgetBox).slideUp(function(){
460
				$(controlBox).slideUp('fast');
461
				$(controlBoxArrowImg).attr('src', '/images/IconRightArrow_UnselectedTab.png');
462
			});
463
		}
464
		$(this).data('is_colapsed', !isColapsed);
465
	});
466
 
467
	/**
468
	 * Update count of products checked for comparison
469
	 **/
470
	$('#myresearch input[type="checkbox"]').live('click', function(){
4798 varun.gupt 471
		updateCompareCount();
4126 varun.gupt 472
	});
473
 
474
	$("#research_compare").live('click', function(){
475
		var seldata = "";
5322 amit.gupta 476
		var prodnames = "";
4126 varun.gupt 477
		var tot = 1;
478
		var saprt = "";
479
		var par = $('#myresearch').find('input[type=checkbox]:checked');
4926 varun.gupt 480
		var haveSameProductType = true;
481
		var productType = null;
482
 
4126 varun.gupt 483
		$(par).each(function(){
4926 varun.gupt 484
 
485
			if(productType != null && productType != $(this).attr('producttype'))	{
486
				haveSameProductType = false;
487
			}
488
			productType = $(this).attr('producttype');
489
 
4126 varun.gupt 490
			if(tot == 1)	{
5358 amit.gupta 491
				prodnames += $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
4126 varun.gupt 492
				seldata += "p" + tot + "=" + $(this).val();
493
			} else	{
494
				seldata += "&p" + tot + "=" + $(this).val();
5358 amit.gupta 495
				prodnames += "-vs-" + $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
4126 varun.gupt 496
			}
497
			tot ++;
498
		});
4984 varun.gupt 499
 
4926 varun.gupt 500
		if(! haveSameProductType)	{
501
			alert("Only products of same category can be compared");
502
		} else if(tot > 6)	{
4126 varun.gupt 503
			alert("Can compare upto five products only.");
504
		} else if(tot > 2)	{
5552 phani.kuma 505
			window.location = "/compare-" + productType.replace(/ +/g, '-').toLowerCase() + "/" + prodnames + "?" + seldata+"&fromsrc=comparison_widget";
4126 varun.gupt 506
		} else	{
507
			alert("Please select atleast two products");
508
		}
509
	});
510
 
511
	$("#research_delete").live('click', function(){
512
		var research_tot = $("#research_total").val();
513
		var seldata = [];
514
		var tot = 0;
515
		var saprt = "";
516
		var par = $('#myresearch').find('input[type=checkbox]:checked');
517
 
518
		$(par).each(function(){
519
			seldata.unshift($(this).val());
520
			tot ++;
521
		});
522
 
523
		if(tot > 0)	{
524
			var t = (research_tot * 1) - (tot * 1);
525
			$("#research_total").val(t);
526
 
527
			jQuery.ajax({
528
				type: "GET",
529
				url: "/deletefromresearch/[" + seldata + "]?_method=delete",
530
				success: function(msg)	{
531
					jQuery.each(seldata, function(intIndex, objValue){
532
						delete_from_storage_set("resitems", objValue);
533
						$("#myresearch").find("#" + objValue).fadeOut('slow', function() {
534
							$(this).remove();
535
							if(t === 0)	{
536
								$("#research_default").css("display", "block");
537
							}
538
						});
539
					});
4984 varun.gupt 540
 
4922 varun.gupt 541
					//Updating the count
542
					$('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length - seldata.length);
4984 varun.gupt 543
 
544
					if ($('#myresearch input[type="checkbox"]').length - seldata.length <= 0)	{
545
						$("#myresearch").children(".common-widget-top-bar").trigger('click');
546
					}
4126 varun.gupt 547
				}
548
			});
549
		} else	{
550
			alert("Please select atleast one product");
551
		}
552
	});
553
 
554
	// No uid cookie
555
	if (!$.cookie("uid"))	{
556
		// No uid in storage
557
		if (!$.Storage.get("uid"))	{
558
			if (!$.Storage.get("resitems"))	{
559
				$.Storage.set("resitems", "[]");
560
			}
561
			if (!$.Storage.get("histitems"))	{
562
				$.Storage.set("histitems", "[]");
563
			}
564
		}
565
		else	{			// uid in storage : logout
566
			$.Storage.remove("uid");
567
			$.Storage.set("resitems", "[]");
568
			$.Storage.set("histitems", "[]");
569
		}
570
		load_research_widget();
571
		load_history_widget();
572
	}
573
	else	{				// With uid cookie
574
		var cookie = $.cookie("uid");
575
		// Just logged in merge storage items
576
		if (!$.Storage.get("uid"))	{
577
			$.Storage.set("uid", cookie);
578
			merge_history_items();
579
			load_research_items();
580
		}
581
		else	{
582
			// UID changed
583
			if ( cookie != $.Storage.get("uid"))	{
584
				$.Storage.set("uid", cookie);
585
				$.Storage.set("resitems", "[]");
586
				$.Storage.set("histitems", "[]");
587
				merge_history_items();
588
				load_research_items();
589
			}
590
			else	{		// Uid is same
591
				if (!$.Storage.get("resitems"))	{
592
					$.Storage.set("resitems", "[]");
593
					load_research_items();
594
				}
595
				else	{
596
					load_research_widget();
597
				}
598
 
599
				if (!$.Storage.get("histitems"))	{
600
					$.Storage.set("histitems", "[]");
601
					merge_history_items();
602
				}
603
				else	{
604
					load_history_widget();
605
				}
606
			}
607
		}
608
	}
4798 varun.gupt 609
 
610
	function load_research_items(){
611
		jQuery.ajax({
612
			type: "GET",
613
			url: "/myresearch",
614
			cache: false,
615
			success: function(json) {
616
			    $.Storage.set("resitems", json);
617
			    load_research_widget();
618
		    }
619
		});
620
	}
621
 
622
	function load_research_widget(){
623
		var myResearchWidgetContainer = $("#myresearch");
624
 
625
		if($(myResearchWidgetContainer).length == 0) {
626
			return;
627
		}
628
		var resitems = $.Storage.get("resitems");
629
 
630
		if (resitems == "[]") {
631
			var emptyResWidgetHtml = '<table border="0" width="100%" cellspacing="1" cellpadding="0" id="research_default">\
632
		      <tbody>\
633
		        <tr><td align="center"><b>Add items to compare list</b></td></tr>\
634
		       </tbody>\
635
		      </table>';
636
			$(myResearchWidgetContainer).find(".common-widget-content-area").html(emptyResWidgetHtml);
637
			$(myResearchWidgetContainer).children(".common-widget-top-bar").trigger('click');
638
			return;
639
		}
640
		var params = "/" + resitems;
641
 
642
		jQuery.ajax({
643
			type : "GET",
644
			url : "/myresearch" + params,
645
			cache: true,
646
			success : function(html) {
647
	   		    $("#myresearch").html(html);
648
	   			updateCompareCount();
649
 
650
			    // Product Title
651
			    $("#myresearch table td div a.truncate").each(function() {
652
						$(this).truncate({addtitle : true});
653
			    });
654
 
655
			    // Product Price
656
			    $("#myresearch table td div div.price").each(function() {
657
						$(this).truncate({addtitle : true});
658
				});
659
 
660
			    // Product Details
661
			    $("#myresearch table td div div.text").each(function() {
662
						$(this).truncate( {addtitle : true});
663
				});
664
		    }
665
		});
666
	}
4126 varun.gupt 667
});